diff --git a/kf_sdk/__init__.py b/kf_sdk/__init__.py new file mode 100644 index 0000000..2efd0d3 --- /dev/null +++ b/kf_sdk/__init__.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Kappa-framework user microservices + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from kf_sdk.api.session_management_api import SessionManagementApi +from kf_sdk.api.dataset_management_api import DatasetManagementApi + +# import ApiClient +from kf_sdk.api_response import ApiResponse +from kf_sdk.api_client import ApiClient +from kf_sdk.configuration import Configuration +from kf_sdk.exceptions import OpenApiException +from kf_sdk.exceptions import ApiTypeError +from kf_sdk.exceptions import ApiValueError +from kf_sdk.exceptions import ApiKeyError +from kf_sdk.exceptions import ApiAttributeError +from kf_sdk.exceptions import ApiException + +# import models into sdk package +from kf_sdk.models.configuration_details import ConfigurationDetails +from kf_sdk.models.http_validation_error import HTTPValidationError +from kf_sdk.models.new_configuration import NewConfiguration +from kf_sdk.models.new_session import NewSession +from kf_sdk.models.organization_details import OrganizationDetails +from kf_sdk.models.user_details import UserDetails +from kf_sdk.models.user_type_details import UserTypeDetails +from kf_sdk.models.validation_error import ValidationError +from kf_sdk.models.dataset_details import DatasetDetails +from kf_sdk.models.dataset_versions import DatasetVersion diff --git a/kf_sdk/api/__init__.py b/kf_sdk/api/__init__.py new file mode 100644 index 0000000..32f2998 --- /dev/null +++ b/kf_sdk/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from kf_sdk.api.session_management_api import SessionManagementApi +from kf_sdk.api.dataset_management_api import DatasetManagementApi \ No newline at end of file diff --git a/kf_sdk/api/dataset_management_api.py b/kf_sdk/api/dataset_management_api.py new file mode 100644 index 0000000..a6a29c4 --- /dev/null +++ b/kf_sdk/api/dataset_management_api.py @@ -0,0 +1,10504 @@ +# coding: utf-8 + +""" + Kappa-framework data microservices + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBytes, StrictInt, StrictStr +from typing import Any, List, Optional, Tuple, Union +from typing_extensions import Annotated +from kappa_datasets.models.dataset_details import DatasetDetails +from kappa_datasets.models.dataset_version import DatasetVersion + +from kf_sdk.api_client import ApiClient, RequestSerialized +from kf_sdk.api_response import ApiResponse +from kf_sdk.rest import RESTResponseType + + +class DatasetManagementApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_post( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_owners: NewDatasetOwners, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Add Dataset Owners + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_owners: (required) + :type new_dataset_owners: NewDatasetOwners + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_owners=new_dataset_owners, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_post_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_owners: NewDatasetOwners, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Add Dataset Owners + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_owners: (required) + :type new_dataset_owners: NewDatasetOwners + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_owners=new_dataset_owners, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_post_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_owners: NewDatasetOwners, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add Dataset Owners + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_owners: (required) + :type new_dataset_owners: NewDatasetOwners + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_owners=new_dataset_owners, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_post_serialize( + self, + user_id, + user_type_id, + dataset_id, + new_dataset_owners, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if new_dataset_owners is not None: + _body_params = new_dataset_owners + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/datasets/users/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_new_entities_via_bulk_datasets_datasets_dataset_entities_bulk_user_id_user_type_id_dataset_id_post( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + sources: BulkModel, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Create New Entities Via Bulk + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param sources: (required) + :type sources: BulkModel + :param file: (required) + :type file: bytearray + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_new_entities_via_bulk_datasets_datasets_dataset_entities_bulk_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + sources=sources, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_new_entities_via_bulk_datasets_datasets_dataset_entities_bulk_user_id_user_type_id_dataset_id_post_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + sources: BulkModel, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Create New Entities Via Bulk + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param sources: (required) + :type sources: BulkModel + :param file: (required) + :type file: bytearray + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_new_entities_via_bulk_datasets_datasets_dataset_entities_bulk_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + sources=sources, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_new_entities_via_bulk_datasets_datasets_dataset_entities_bulk_user_id_user_type_id_dataset_id_post_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + sources: BulkModel, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create New Entities Via Bulk + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param sources: (required) + :type sources: BulkModel + :param file: (required) + :type file: bytearray + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_new_entities_via_bulk_datasets_datasets_dataset_entities_bulk_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + sources=sources, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_new_entities_via_bulk_datasets_datasets_dataset_entities_bulk_user_id_user_type_id_dataset_id_post_serialize( + self, + user_id, + user_type_id, + dataset_id, + sources, + file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + if sources is not None: + _form_params.append(('sources', sources)) + if file is not None: + _files['file'] = file + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/datasets/datasets/datasetEntities/bulk/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_dataset_card_datasets_card_user_id_user_type_id_dataset_id_delete( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_card_datasets_card_user_id_user_type_id_dataset_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_dataset_card_datasets_card_user_id_user_type_id_dataset_id_delete_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_card_datasets_card_user_id_user_type_id_dataset_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_dataset_card_datasets_card_user_id_user_type_id_dataset_id_delete_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_card_datasets_card_user_id_user_type_id_dataset_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_dataset_card_datasets_card_user_id_user_type_id_dataset_id_delete_serialize( + self, + user_id, + user_type_id, + dataset_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/datasets/card/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete( + self, + user_id: StrictInt, + user_type_id: StrictInt, + delete_dataset_entities: DeleteDatasetEntities, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete Dataset Entities + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param delete_dataset_entities: (required) + :type delete_dataset_entities: DeleteDatasetEntities + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + delete_dataset_entities=delete_dataset_entities, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + delete_dataset_entities: DeleteDatasetEntities, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete Dataset Entities + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param delete_dataset_entities: (required) + :type delete_dataset_entities: DeleteDatasetEntities + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + delete_dataset_entities=delete_dataset_entities, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + delete_dataset_entities: DeleteDatasetEntities, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Dataset Entities + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param delete_dataset_entities: (required) + :type delete_dataset_entities: DeleteDatasetEntities + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + delete_dataset_entities=delete_dataset_entities, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_serialize( + self, + user_id, + user_type_id, + delete_dataset_entities, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if delete_dataset_entities is not None: + _body_params = delete_dataset_entities + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_delete( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_owners: NewDatasetOwners, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete Dataset Owners + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_owners: (required) + :type new_dataset_owners: NewDatasetOwners + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_owners=new_dataset_owners, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_delete_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_owners: NewDatasetOwners, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete Dataset Owners + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_owners: (required) + :type new_dataset_owners: NewDatasetOwners + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_owners=new_dataset_owners, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_delete_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_owners: NewDatasetOwners, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Dataset Owners + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_owners: (required) + :type new_dataset_owners: NewDatasetOwners + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_owners=new_dataset_owners, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_dataset_owners_datasets_users_user_id_user_type_id_dataset_id_delete_serialize( + self, + user_id, + user_type_id, + dataset_id, + new_dataset_owners, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if new_dataset_owners is not None: + _body_params = new_dataset_owners + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/datasets/users/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_delete( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_delete_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_delete_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_delete_serialize( + self, + user_id, + user_type_id, + dataset_id, + dataset_version_no, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + if dataset_version_no is not None: + _path_params['dataset_version_no'] = dataset_version_no + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/datasets/versions/{user_id}/{user_type_id}/{dataset_id}/{dataset_version_no}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete( + self, + user_id: StrictInt, + user_type_id: StrictInt, + request_body: List[StrictStr], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete Entity Files + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param request_body: (required) + :type request_body: List[str] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + request_body: List[StrictStr], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete Entity Files + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param request_body: (required) + :type request_body: List[str] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + request_body: List[StrictStr], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Entity Files + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param request_body: (required) + :type request_body: List[str] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_serialize( + user_id=user_id, + user_type_id=user_type_id, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_serialize( + self, + user_id, + user_type_id, + request_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'request_body': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/datasets/datasetEntities/files/{user_id}/{user_type_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def filter_dataset_items_datasets_dataset_entities_filter_user_id_user_type_id_dataset_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + ds_entity_name: Optional[StrictStr] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + entity_status: Optional[StrictInt] = None, + location_id: Optional[StrictInt] = None, + order_by: Optional[StrictStr] = None, + order: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PageDatasetEntityDetails: + """Filter Dataset Items + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param ds_entity_name: + :type ds_entity_name: str + :param start_date: + :type start_date: datetime + :param end_date: + :type end_date: datetime + :param entity_status: + :type entity_status: int + :param location_id: + :type location_id: int + :param order_by: + :type order_by: str + :param order: + :type order: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._filter_dataset_items_datasets_dataset_entities_filter_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + page=page, + size=size, + ds_entity_name=ds_entity_name, + start_date=start_date, + end_date=end_date, + entity_status=entity_status, + location_id=location_id, + order_by=order_by, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def filter_dataset_items_datasets_dataset_entities_filter_user_id_user_type_id_dataset_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + ds_entity_name: Optional[StrictStr] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + entity_status: Optional[StrictInt] = None, + location_id: Optional[StrictInt] = None, + order_by: Optional[StrictStr] = None, + order: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PageDatasetEntityDetails]: + """Filter Dataset Items + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param ds_entity_name: + :type ds_entity_name: str + :param start_date: + :type start_date: datetime + :param end_date: + :type end_date: datetime + :param entity_status: + :type entity_status: int + :param location_id: + :type location_id: int + :param order_by: + :type order_by: str + :param order: + :type order: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._filter_dataset_items_datasets_dataset_entities_filter_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + page=page, + size=size, + ds_entity_name=ds_entity_name, + start_date=start_date, + end_date=end_date, + entity_status=entity_status, + location_id=location_id, + order_by=order_by, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def filter_dataset_items_datasets_dataset_entities_filter_user_id_user_type_id_dataset_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + ds_entity_name: Optional[StrictStr] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + entity_status: Optional[StrictInt] = None, + location_id: Optional[StrictInt] = None, + order_by: Optional[StrictStr] = None, + order: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Filter Dataset Items + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param ds_entity_name: + :type ds_entity_name: str + :param start_date: + :type start_date: datetime + :param end_date: + :type end_date: datetime + :param entity_status: + :type entity_status: int + :param location_id: + :type location_id: int + :param order_by: + :type order_by: str + :param order: + :type order: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._filter_dataset_items_datasets_dataset_entities_filter_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + page=page, + size=size, + ds_entity_name=ds_entity_name, + start_date=start_date, + end_date=end_date, + entity_status=entity_status, + location_id=location_id, + order_by=order_by, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _filter_dataset_items_datasets_dataset_entities_filter_user_id_user_type_id_dataset_id_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + page, + size, + ds_entity_name, + start_date, + end_date, + entity_status, + location_id, + order_by, + order, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if ds_entity_name is not None: + + _query_params.append(('dsEntityName', ds_entity_name)) + + if start_date is not None: + if isinstance(start_date, datetime): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, datetime): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + if entity_status is not None: + + _query_params.append(('entityStatus', entity_status)) + + if location_id is not None: + + _query_params.append(('locationId', location_id)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if order is not None: + + _query_params.append(('order', order)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/filter/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def filter_datasets_datasets_filter_user_id_user_type_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + search: Optional[StrictStr] = None, + dataset_tags: Optional[StrictStr] = None, + dataset_status: Optional[StrictInt] = None, + order_by: Optional[StrictStr] = None, + order_keyword: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PageDatasetDetails: + """Filter Datasets + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param start_date: + :type start_date: datetime + :param end_date: + :type end_date: datetime + :param search: + :type search: str + :param dataset_tags: + :type dataset_tags: str + :param dataset_status: + :type dataset_status: int + :param order_by: + :type order_by: str + :param order_keyword: + :type order_keyword: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._filter_datasets_datasets_filter_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + page=page, + size=size, + start_date=start_date, + end_date=end_date, + search=search, + dataset_tags=dataset_tags, + dataset_status=dataset_status, + order_by=order_by, + order_keyword=order_keyword, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDatasetDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def filter_datasets_datasets_filter_user_id_user_type_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + search: Optional[StrictStr] = None, + dataset_tags: Optional[StrictStr] = None, + dataset_status: Optional[StrictInt] = None, + order_by: Optional[StrictStr] = None, + order_keyword: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PageDatasetDetails]: + """Filter Datasets + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param start_date: + :type start_date: datetime + :param end_date: + :type end_date: datetime + :param search: + :type search: str + :param dataset_tags: + :type dataset_tags: str + :param dataset_status: + :type dataset_status: int + :param order_by: + :type order_by: str + :param order_keyword: + :type order_keyword: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._filter_datasets_datasets_filter_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + page=page, + size=size, + start_date=start_date, + end_date=end_date, + search=search, + dataset_tags=dataset_tags, + dataset_status=dataset_status, + order_by=order_by, + order_keyword=order_keyword, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDatasetDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def filter_datasets_datasets_filter_user_id_user_type_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + search: Optional[StrictStr] = None, + dataset_tags: Optional[StrictStr] = None, + dataset_status: Optional[StrictInt] = None, + order_by: Optional[StrictStr] = None, + order_keyword: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Filter Datasets + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param start_date: + :type start_date: datetime + :param end_date: + :type end_date: datetime + :param search: + :type search: str + :param dataset_tags: + :type dataset_tags: str + :param dataset_status: + :type dataset_status: int + :param order_by: + :type order_by: str + :param order_keyword: + :type order_keyword: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._filter_datasets_datasets_filter_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + page=page, + size=size, + start_date=start_date, + end_date=end_date, + search=search, + dataset_tags=dataset_tags, + dataset_status=dataset_status, + order_by=order_by, + order_keyword=order_keyword, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDatasetDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _filter_datasets_datasets_filter_user_id_user_type_id_get_serialize( + self, + user_id, + user_type_id, + page, + size, + start_date, + end_date, + search, + dataset_tags, + dataset_status, + order_by, + order_keyword, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if start_date is not None: + if isinstance(start_date, datetime): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, datetime): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + if search is not None: + + _query_params.append(('search', search)) + + if dataset_tags is not None: + + _query_params.append(('datasetTags', dataset_tags)) + + if dataset_status is not None: + + _query_params.append(('datasetStatus', dataset_status)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if order_keyword is not None: + + _query_params.append(('orderKeyword', order_keyword)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/filter/{user_id}/{user_type_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dataset_card_datasets_card_user_id_user_type_id_dataset_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DatasetCard: + """Get Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_card_datasets_card_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetCard", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dataset_card_datasets_card_user_id_user_type_id_dataset_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DatasetCard]: + """Get Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_card_datasets_card_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetCard", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dataset_card_datasets_card_user_id_user_type_id_dataset_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_card_datasets_card_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetCard", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dataset_card_datasets_card_user_id_user_type_id_dataset_id_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/card/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_entity_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DatasetEntityDetails: + """Get Dataset Item + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_entity_id=dataset_entity_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_entity_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DatasetEntityDetails]: + """Get Dataset Item + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_entity_id=dataset_entity_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_entity_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dataset Item + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_entity_id=dataset_entity_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + dataset_entity_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + if dataset_entity_id is not None: + _path_params['dataset_entity_id'] = dataset_entity_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}/{dataset_id}/{dataset_entity_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dataset_items_datasets_dataset_entities_user_id_user_type_id_dataset_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[DatasetEntityDetails]: + """Get Dataset Items + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_items_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetEntityDetails]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dataset_items_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[DatasetEntityDetails]]: + """Get Dataset Items + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_items_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetEntityDetails]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dataset_items_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dataset Items + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_items_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetEntityDetails]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dataset_items_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dataset_version_archive_datasets_versions_archive_user_id_user_type_id_dataset_id_dataset_version_no_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Get Dataset Version Archive + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_version_archive_datasets_versions_archive_user_id_user_type_id_dataset_id_dataset_version_no_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dataset_version_archive_datasets_versions_archive_user_id_user_type_id_dataset_id_dataset_version_no_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Get Dataset Version Archive + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_version_archive_datasets_versions_archive_user_id_user_type_id_dataset_id_dataset_version_no_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dataset_version_archive_datasets_versions_archive_user_id_user_type_id_dataset_id_dataset_version_no_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dataset Version Archive + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_version_archive_datasets_versions_archive_user_id_user_type_id_dataset_id_dataset_version_no_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dataset_version_archive_datasets_versions_archive_user_id_user_type_id_dataset_id_dataset_version_no_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + dataset_version_no, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + if dataset_version_no is not None: + _path_params['dataset_version_no'] = dataset_version_no + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/versions/archive/{user_id}/{user_type_id}/{dataset_id}/{dataset_version_no}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DatasetVersion: + """Get Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetVersion", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DatasetVersion]: + """Get Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetVersion", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetVersion", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + dataset_version_no, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + if dataset_version_no is not None: + _path_params['dataset_version_no'] = dataset_version_no + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/versions/{user_id}/{user_type_id}/{dataset_id}/{dataset_version_no}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dataset_versions_datasets_versions_user_id_user_type_id_dataset_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[DatasetVersion]: + """Get Dataset Versions + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_versions_datasets_versions_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetVersion]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dataset_versions_datasets_versions_user_id_user_type_id_dataset_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[DatasetVersion]]: + """Get Dataset Versions + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_versions_datasets_versions_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetVersion]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dataset_versions_datasets_versions_user_id_user_type_id_dataset_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dataset Versions + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_versions_datasets_versions_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetVersion]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dataset_versions_datasets_versions_user_id_user_type_id_dataset_id_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/versions/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + file_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Get Entity File + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param file_id: (required) + :type file_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + file_id=file_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + file_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Get Entity File + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param file_id: (required) + :type file_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + file_id=file_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + file_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Entity File + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param file_id: (required) + :type file_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + file_id=file_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + file_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + if file_id is not None: + _path_params['file_id'] = file_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/files/{user_id}/{user_type_id}/{dataset_id}/{file_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_entity_verification_chat_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[VerificationChat]: + """Get Entity Verification Chat + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_chat_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VerificationChat]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_entity_verification_chat_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[VerificationChat]]: + """Get Entity Verification Chat + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_chat_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VerificationChat]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_entity_verification_chat_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Entity Verification Chat + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_chat_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VerificationChat]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_entity_verification_chat_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_get_serialize( + self, + user_id, + user_type_id, + verification_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if verification_id is not None: + _path_params['verification_id'] = verification_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/Verifications/chats/{user_id}/{user_type_id}/{verification_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_entity_verification_detail_datasets_dataset_entities_verifications_details_user_id_user_type_id_dataset_entity_id_verification_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_entity_id: StrictStr, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DatasetEntityDetails: + """Get Entity Verification Detail + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_detail_datasets_dataset_entities_verifications_details_user_id_user_type_id_dataset_entity_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_entity_id=dataset_entity_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_entity_verification_detail_datasets_dataset_entities_verifications_details_user_id_user_type_id_dataset_entity_id_verification_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_entity_id: StrictStr, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DatasetEntityDetails]: + """Get Entity Verification Detail + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_detail_datasets_dataset_entities_verifications_details_user_id_user_type_id_dataset_entity_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_entity_id=dataset_entity_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_entity_verification_detail_datasets_dataset_entities_verifications_details_user_id_user_type_id_dataset_entity_id_verification_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_entity_id: StrictStr, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Entity Verification Detail + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_detail_datasets_dataset_entities_verifications_details_user_id_user_type_id_dataset_entity_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_entity_id=dataset_entity_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetEntityDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_entity_verification_detail_datasets_dataset_entities_verifications_details_user_id_user_type_id_dataset_entity_id_verification_id_get_serialize( + self, + user_id, + user_type_id, + dataset_entity_id, + verification_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_entity_id is not None: + _path_params['dataset_entity_id'] = dataset_entity_id + if verification_id is not None: + _path_params['verification_id'] = verification_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/verifications/details/{user_id}/{user_type_id}/{dataset_entity_id}/{verification_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_entity_verification_history_datasets_dataset_entities_verifications_history_user_id_user_type_id_verification_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[VerificationHistory]: + """Get Entity Verification History + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_history_datasets_dataset_entities_verifications_history_user_id_user_type_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VerificationHistory]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_entity_verification_history_datasets_dataset_entities_verifications_history_user_id_user_type_id_verification_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[VerificationHistory]]: + """Get Entity Verification History + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_history_datasets_dataset_entities_verifications_history_user_id_user_type_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VerificationHistory]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_entity_verification_history_datasets_dataset_entities_verifications_history_user_id_user_type_id_verification_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Entity Verification History + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_history_datasets_dataset_entities_verifications_history_user_id_user_type_id_verification_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VerificationHistory]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_entity_verification_history_datasets_dataset_entities_verifications_history_user_id_user_type_id_verification_id_get_serialize( + self, + user_id, + user_type_id, + verification_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if verification_id is not None: + _path_params['verification_id'] = verification_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/verifications/history/{user_id}/{user_type_id}/{verification_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_entity_verification_list_datasets_dataset_entities_verifications_user_id_user_type_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + filter_request_entities_verification: FilterRequestEntitiesVerification, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PageEntityVerificationDetails: + """Get Entity Verification List + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param filter_request_entities_verification: (required) + :type filter_request_entities_verification: FilterRequestEntitiesVerification + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_list_datasets_dataset_entities_verifications_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + filter_request_entities_verification=filter_request_entities_verification, + page=page, + size=size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageEntityVerificationDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_entity_verification_list_datasets_dataset_entities_verifications_user_id_user_type_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + filter_request_entities_verification: FilterRequestEntitiesVerification, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PageEntityVerificationDetails]: + """Get Entity Verification List + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param filter_request_entities_verification: (required) + :type filter_request_entities_verification: FilterRequestEntitiesVerification + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_list_datasets_dataset_entities_verifications_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + filter_request_entities_verification=filter_request_entities_verification, + page=page, + size=size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageEntityVerificationDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_entity_verification_list_datasets_dataset_entities_verifications_user_id_user_type_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + filter_request_entities_verification: FilterRequestEntitiesVerification, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Entity Verification List + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param filter_request_entities_verification: (required) + :type filter_request_entities_verification: FilterRequestEntitiesVerification + :param page: Page number + :type page: int + :param size: Page size + :type size: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entity_verification_list_datasets_dataset_entities_verifications_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + filter_request_entities_verification=filter_request_entities_verification, + page=page, + size=size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageEntityVerificationDetails", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_entity_verification_list_datasets_dataset_entities_verifications_user_id_user_type_id_get_serialize( + self, + user_id, + user_type_id, + filter_request_entities_verification, + page, + size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + # process the header parameters + # process the form parameters + # process the body parameter + if filter_request_entities_verification is not None: + _body_params = filter_request_entities_verification + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/verifications/{user_id}/{user_type_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_owners_list_datasets_users_user_id_user_type_id_dataset_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[DatasetOwners]: + """Get Owners List + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_owners_list_datasets_users_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetOwners]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_owners_list_datasets_users_user_id_user_type_id_dataset_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[DatasetOwners]]: + """Get Owners List + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_owners_list_datasets_users_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetOwners]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_owners_list_datasets_users_user_id_user_type_id_dataset_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Owners List + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_owners_list_datasets_users_user_id_user_type_id_dataset_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetOwners]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_owners_list_datasets_users_user_id_user_type_id_dataset_id_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/users/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + file_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Get Thumbnail + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param file_id: (required) + :type file_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + file_id=file_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + file_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Get Thumbnail + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param file_id: (required) + :type file_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + file_id=file_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + file_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Thumbnail + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param file_id: (required) + :type file_id: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + file_id=file_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_serialize( + self, + user_id, + user_type_id, + dataset_id, + file_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + if file_id is not None: + _path_params['file_id'] = file_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/datasetEntities/thumbnail/{user_id}/{user_type_id}/{dataset_id}/{file_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_datasets_datasets_user_id_user_type_id_get( + self, + user_id: StrictInt, + user_type_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[DatasetDetails]: + """Get User Datasets + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_datasets_datasets_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetDetails]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_datasets_datasets_user_id_user_type_id_get_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[DatasetDetails]]: + """Get User Datasets + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_datasets_datasets_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetDetails]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_datasets_datasets_user_id_user_type_id_get_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get User Datasets + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_datasets_datasets_user_id_user_type_id_get_serialize( + user_id=user_id, + user_type_id=user_type_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DatasetDetails]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_datasets_datasets_user_id_user_type_id_get_serialize( + self, + user_id, + user_type_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/datasets/{user_id}/{user_type_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def new_dataset_card_datasets_card_new_user_id_user_type_id_dataset_id_post( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_card: NewDatasetCard, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """New Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_card: (required) + :type new_dataset_card: NewDatasetCard + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_card_datasets_card_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_card=new_dataset_card, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def new_dataset_card_datasets_card_new_user_id_user_type_id_dataset_id_post_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_card: NewDatasetCard, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """New Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_card: (required) + :type new_dataset_card: NewDatasetCard + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_card_datasets_card_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_card=new_dataset_card, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def new_dataset_card_datasets_card_new_user_id_user_type_id_dataset_id_post_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_card: NewDatasetCard, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """New Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_card: (required) + :type new_dataset_card: NewDatasetCard + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_card_datasets_card_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_card=new_dataset_card, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _new_dataset_card_datasets_card_new_user_id_user_type_id_dataset_id_post_serialize( + self, + user_id, + user_type_id, + dataset_id, + new_dataset_card, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if new_dataset_card is not None: + _body_params = new_dataset_card + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/datasets/card/new/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def new_dataset_datasets_new_user_id_user_type_id_post( + self, + user_id: StrictInt, + user_type_id: StrictInt, + new_dataset: NewDataset, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """New Dataset + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param new_dataset: (required) + :type new_dataset: NewDataset + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_datasets_new_user_id_user_type_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + new_dataset=new_dataset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def new_dataset_datasets_new_user_id_user_type_id_post_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + new_dataset: NewDataset, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """New Dataset + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param new_dataset: (required) + :type new_dataset: NewDataset + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_datasets_new_user_id_user_type_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + new_dataset=new_dataset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def new_dataset_datasets_new_user_id_user_type_id_post_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + new_dataset: NewDataset, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """New Dataset + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param new_dataset: (required) + :type new_dataset: NewDataset + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_datasets_new_user_id_user_type_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + new_dataset=new_dataset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _new_dataset_datasets_new_user_id_user_type_id_post_serialize( + self, + user_id, + user_type_id, + new_dataset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if new_dataset is not None: + _body_params = new_dataset + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/datasets/new/{user_id}/{user_type_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def new_dataset_entity_datasets_dataset_entities_new_user_id_user_type_id_dataset_id_post( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_entity: NewDatasetEntity, + files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """New Dataset Entity + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_entity: (required) + :type new_dataset_entity: NewDatasetEntity + :param files: (required) + :type files: List[bytearray] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_entity_datasets_dataset_entities_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_entity=new_dataset_entity, + files=files, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def new_dataset_entity_datasets_dataset_entities_new_user_id_user_type_id_dataset_id_post_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_entity: NewDatasetEntity, + files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """New Dataset Entity + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_entity: (required) + :type new_dataset_entity: NewDatasetEntity + :param files: (required) + :type files: List[bytearray] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_entity_datasets_dataset_entities_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_entity=new_dataset_entity, + files=files, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def new_dataset_entity_datasets_dataset_entities_new_user_id_user_type_id_dataset_id_post_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_entity: NewDatasetEntity, + files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """New Dataset Entity + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_entity: (required) + :type new_dataset_entity: NewDatasetEntity + :param files: (required) + :type files: List[bytearray] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_entity_datasets_dataset_entities_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_entity=new_dataset_entity, + files=files, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _new_dataset_entity_datasets_dataset_entities_new_user_id_user_type_id_dataset_id_post_serialize( + self, + user_id, + user_type_id, + dataset_id, + new_dataset_entity, + files, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'files': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + if new_dataset_entity is not None: + _form_params.append(('new_dataset_entity', new_dataset_entity)) + if files is not None: + _files['files'] = files + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/datasets/datasetEntities/new/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def new_dataset_version_datasets_versions_new_user_id_user_type_id_dataset_id_post( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_version: NewDatasetVersion, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """New Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_version: (required) + :type new_dataset_version: NewDatasetVersion + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_version_datasets_versions_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_version=new_dataset_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def new_dataset_version_datasets_versions_new_user_id_user_type_id_dataset_id_post_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_version: NewDatasetVersion, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """New Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_version: (required) + :type new_dataset_version: NewDatasetVersion + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_version_datasets_versions_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_version=new_dataset_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def new_dataset_version_datasets_versions_new_user_id_user_type_id_dataset_id_post_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_version: NewDatasetVersion, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """New Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_version: (required) + :type new_dataset_version: NewDatasetVersion + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._new_dataset_version_datasets_versions_new_user_id_user_type_id_dataset_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_version=new_dataset_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _new_dataset_version_datasets_versions_new_user_id_user_type_id_dataset_id_post_serialize( + self, + user_id, + user_type_id, + dataset_id, + new_dataset_version, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if new_dataset_version is not None: + _body_params = new_dataset_version + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/datasets/versions/new/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post( + self, + user_id: StrictInt, + user_type_id: StrictInt, + request_body: List[StrictStr], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Recover Dataset Entities + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param request_body: (required) + :type request_body: List[str] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + request_body: List[StrictStr], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Recover Dataset Entities + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param request_body: (required) + :type request_body: List[str] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + request_body: List[StrictStr], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Recover Dataset Entities + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param request_body: (required) + :type request_body: List[str] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_serialize( + self, + user_id, + user_type_id, + request_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'request_body': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/datasets/datasetEntities/recover/{user_id}/{user_type_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def recover_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_put( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Recover Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recover_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def recover_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_put_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Recover Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recover_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def recover_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_put_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_version_no: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Recover Dataset Version + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_version_no: (required) + :type dataset_version_no: str + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recover_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_version_no=dataset_version_no, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _recover_dataset_version_datasets_versions_user_id_user_type_id_dataset_id_dataset_version_no_put_serialize( + self, + user_id, + user_type_id, + dataset_id, + dataset_version_no, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + if dataset_version_no is not None: + _path_params['dataset_version_no'] = dataset_version_no + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/datasets/versions/{user_id}/{user_type_id}/{dataset_id}/{dataset_version_no}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def send_entity_verification_msg_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_post( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + verification_chat_msg: VerificationChatMsg, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Send Entity Verification Msg + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param verification_chat_msg: (required) + :type verification_chat_msg: VerificationChatMsg + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_entity_verification_msg_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + verification_chat_msg=verification_chat_msg, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def send_entity_verification_msg_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_post_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + verification_chat_msg: VerificationChatMsg, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Send Entity Verification Msg + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param verification_chat_msg: (required) + :type verification_chat_msg: VerificationChatMsg + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_entity_verification_msg_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + verification_chat_msg=verification_chat_msg, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def send_entity_verification_msg_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_post_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + verification_id: StrictInt, + verification_chat_msg: VerificationChatMsg, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Entity Verification Msg + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param verification_id: (required) + :type verification_id: int + :param verification_chat_msg: (required) + :type verification_chat_msg: VerificationChatMsg + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_entity_verification_msg_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_post_serialize( + user_id=user_id, + user_type_id=user_type_id, + verification_id=verification_id, + verification_chat_msg=verification_chat_msg, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _send_entity_verification_msg_datasets_dataset_entities_verifications_chats_user_id_user_type_id_verification_id_post_serialize( + self, + user_id, + user_type_id, + verification_id, + verification_chat_msg, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if verification_id is not None: + _path_params['verification_id'] = verification_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if verification_chat_msg is not None: + _body_params = verification_chat_msg + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/datasets/datasetEntities/Verifications/chats/{user_id}/{user_type_id}/{verification_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_dataset_card_datasets_card_user_id_user_type_id_dataset_id_put( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_card: NewDatasetCard, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Update Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_card: (required) + :type new_dataset_card: NewDatasetCard + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dataset_card_datasets_card_user_id_user_type_id_dataset_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_card=new_dataset_card, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_dataset_card_datasets_card_user_id_user_type_id_dataset_id_put_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_card: NewDatasetCard, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Update Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_card: (required) + :type new_dataset_card: NewDatasetCard + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dataset_card_datasets_card_user_id_user_type_id_dataset_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_card=new_dataset_card, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_dataset_card_datasets_card_user_id_user_type_id_dataset_id_put_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + new_dataset_card: NewDatasetCard, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Dataset Card + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param new_dataset_card: (required) + :type new_dataset_card: NewDatasetCard + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dataset_card_datasets_card_user_id_user_type_id_dataset_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + new_dataset_card=new_dataset_card, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_dataset_card_datasets_card_user_id_user_type_id_dataset_id_put_serialize( + self, + user_id, + user_type_id, + dataset_id, + new_dataset_card, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if new_dataset_card is not None: + _body_params = new_dataset_card + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/datasets/card/{user_id}/{user_type_id}/{dataset_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_entity_id: StrictStr, + update_dataset_entity: UpdateDatasetEntity, + files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Update Dataset Entity + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param update_dataset_entity: (required) + :type update_dataset_entity: UpdateDatasetEntity + :param files: (required) + :type files: List[bytearray] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_entity_id=dataset_entity_id, + update_dataset_entity=update_dataset_entity, + files=files, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_entity_id: StrictStr, + update_dataset_entity: UpdateDatasetEntity, + files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Update Dataset Entity + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param update_dataset_entity: (required) + :type update_dataset_entity: UpdateDatasetEntity + :param files: (required) + :type files: List[bytearray] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_entity_id=dataset_entity_id, + update_dataset_entity=update_dataset_entity, + files=files, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + dataset_id: StrictInt, + dataset_entity_id: StrictStr, + update_dataset_entity: UpdateDatasetEntity, + files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Dataset Entity + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param dataset_id: (required) + :type dataset_id: int + :param dataset_entity_id: (required) + :type dataset_entity_id: str + :param update_dataset_entity: (required) + :type update_dataset_entity: UpdateDatasetEntity + :param files: (required) + :type files: List[bytearray] + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + dataset_id=dataset_id, + dataset_entity_id=dataset_entity_id, + update_dataset_entity=update_dataset_entity, + files=files, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_serialize( + self, + user_id, + user_type_id, + dataset_id, + dataset_entity_id, + update_dataset_entity, + files, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'files': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + if dataset_id is not None: + _path_params['dataset_id'] = dataset_id + if dataset_entity_id is not None: + _path_params['dataset_entity_id'] = dataset_entity_id + # process the query parameters + # process the header parameters + # process the form parameters + if update_dataset_entity is not None: + _form_params.append(('update_dataset_entity', update_dataset_entity)) + if files is not None: + _files['files'] = files + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}/{dataset_id}/{dataset_entity_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_entity_verification_datasets_dataset_entities_verifications_user_id_user_type_id_put( + self, + user_id: StrictInt, + user_type_id: StrictInt, + update_entity_verification_data: UpdateEntityVerificationData, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Update Entity Verification + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param update_entity_verification_data: (required) + :type update_entity_verification_data: UpdateEntityVerificationData + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_entity_verification_datasets_dataset_entities_verifications_user_id_user_type_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + update_entity_verification_data=update_entity_verification_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_entity_verification_datasets_dataset_entities_verifications_user_id_user_type_id_put_with_http_info( + self, + user_id: StrictInt, + user_type_id: StrictInt, + update_entity_verification_data: UpdateEntityVerificationData, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Update Entity Verification + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param update_entity_verification_data: (required) + :type update_entity_verification_data: UpdateEntityVerificationData + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_entity_verification_datasets_dataset_entities_verifications_user_id_user_type_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + update_entity_verification_data=update_entity_verification_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_entity_verification_datasets_dataset_entities_verifications_user_id_user_type_id_put_without_preload_content( + self, + user_id: StrictInt, + user_type_id: StrictInt, + update_entity_verification_data: UpdateEntityVerificationData, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Entity Verification + + + :param user_id: (required) + :type user_id: int + :param user_type_id: (required) + :type user_type_id: int + :param update_entity_verification_data: (required) + :type update_entity_verification_data: UpdateEntityVerificationData + :param _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. + :type _request_timeout: int, tuple(int, int), optional + :param _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. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _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. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_entity_verification_datasets_dataset_entities_verifications_user_id_user_type_id_put_serialize( + user_id=user_id, + user_type_id=user_type_id, + update_entity_verification_data=update_entity_verification_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_entity_verification_datasets_dataset_entities_verifications_user_id_user_type_id_put_serialize( + self, + user_id, + user_type_id, + update_entity_verification_data, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + if user_type_id is not None: + _path_params['user_type_id'] = user_type_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_entity_verification_data is not None: + _body_params = update_entity_verification_data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/datasets/datasetEntities/verifications/{user_id}/{user_type_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/openapi_client/api/session_management_api.py b/kf_sdk/api/session_management_api.py index 09298e2..63bd2b6 100644 --- a/openapi_client/api/session_management_api.py +++ b/kf_sdk/api/session_management_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -18,12 +18,12 @@ from typing_extensions import Annotated from pydantic import StrictInt from typing import Any -from openapi_client.models.new_session import NewSession -from openapi_client.models.user_details import UserDetails +from kappa_users.models.new_session import NewSession +from kappa_users.models.user_details import UserDetails -from openapi_client.api_client import ApiClient, RequestSerialized -from openapi_client.api_response import ApiResponse -from openapi_client.rest import RESTResponseType +from kappa_users.api_client import ApiClient, RequestSerialized +from kappa_users.api_response import ApiResponse +from kappa_users.rest import RESTResponseType class SessionManagementApi: @@ -38,12 +38,9 @@ class SessionManagementApi: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call - def delete_session_session_logout_user_id_user_type_id_delete( + def new_anonymous_session_session_anonymous_token_post( self, - user_id: StrictInt, - user_type_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -57,13 +54,9 @@ class SessionManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: - """Delete Session + """New Anonymous Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int :param _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 @@ -86,9 +79,7 @@ class SessionManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_session_session_logout_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -97,7 +88,6 @@ class SessionManagementApi: _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -111,10 +101,8 @@ class SessionManagementApi: @validate_call - def delete_session_session_logout_user_id_user_type_id_delete_with_http_info( + def new_anonymous_session_session_anonymous_token_post_with_http_info( self, - user_id: StrictInt, - user_type_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -128,13 +116,9 @@ class SessionManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[object]: - """Delete Session + """New Anonymous Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int :param _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 @@ -157,9 +141,7 @@ class SessionManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_session_session_logout_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -168,7 +150,6 @@ class SessionManagementApi: _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -182,10 +163,8 @@ class SessionManagementApi: @validate_call - def delete_session_session_logout_user_id_user_type_id_delete_without_preload_content( + def new_anonymous_session_session_anonymous_token_post_without_preload_content( self, - user_id: StrictInt, - user_type_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -199,13 +178,9 @@ class SessionManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Session + """New Anonymous Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int :param _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 @@ -228,9 +203,7 @@ class SessionManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_session_session_logout_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -239,7 +212,6 @@ class SessionManagementApi: _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -248,10 +220,8 @@ class SessionManagementApi: return response_data.response - def _delete_session_session_logout_user_id_user_type_id_delete_serialize( + def _new_anonymous_session_session_anonymous_token_post_serialize( self, - user_id, - user_type_id, _request_auth, _content_type, _headers, @@ -273,10 +243,6 @@ class SessionManagementApi: _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id # process the query parameters # process the header parameters # process the form parameters @@ -297,8 +263,8 @@ class SessionManagementApi: ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/session/logout/{user_id}/{user_type_id}', + method='POST', + resource_path='/session/anonymous_token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -315,7 +281,7 @@ class SessionManagementApi: @validate_call - def new_session_session_login_post( + def get_new_session( self, new_session: NewSession, _request_timeout: Union[ @@ -358,7 +324,7 @@ class SessionManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._new_session_session_login_post_serialize( + _param = self._get_new_session_serialize( new_session=new_session, _request_auth=_request_auth, _content_type=_content_type, @@ -382,7 +348,7 @@ class SessionManagementApi: @validate_call - def new_session_session_login_post_with_http_info( + def get_new_session_with_http_info( self, new_session: NewSession, _request_timeout: Union[ @@ -425,7 +391,7 @@ class SessionManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._new_session_session_login_post_serialize( + _param = self._get_new_session_serialize( new_session=new_session, _request_auth=_request_auth, _content_type=_content_type, @@ -449,7 +415,7 @@ class SessionManagementApi: @validate_call - def new_session_session_login_post_without_preload_content( + def get_new_session_without_preload_content( self, new_session: NewSession, _request_timeout: Union[ @@ -492,7 +458,7 @@ class SessionManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._new_session_session_login_post_serialize( + _param = self._get_new_session_serialize( new_session=new_session, _request_auth=_request_auth, _content_type=_content_type, @@ -511,7 +477,7 @@ class SessionManagementApi: return response_data.response - def _new_session_session_login_post_serialize( + def _get_new_session_serialize( self, new_session, _request_auth, @@ -571,7 +537,7 @@ class SessionManagementApi: return self.api_client.param_serialize( method='POST', - resource_path='/session/login', + resource_path='/session/new', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/openapi_client/api_client.py b/kf_sdk/api_client.py index 494abd3..23c2bf5 100644 --- a/openapi_client/api_client.py +++ b/kf_sdk/api_client.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -26,11 +26,11 @@ from urllib.parse import quote from typing import Tuple, Optional, List, Dict, Union from pydantic import SecretStr -from openapi_client.configuration import Configuration -from openapi_client.api_response import ApiResponse, T as ApiResponseT -import openapi_client.models -from openapi_client import rest -from openapi_client.exceptions import ( +from kf_sdk.configuration import Configuration +from kf_sdk.api_response import ApiResponse, T as ApiResponseT +import kf_sdk.models +from kf_sdk import rest +from kf_sdk.exceptions import ( ApiValueError, ApiException, BadRequestException, @@ -449,7 +449,7 @@ class ApiClient: if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: - klass = getattr(openapi_client.models, klass) + klass = getattr(kappa_users.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) diff --git a/openapi_client/api_response.py b/kf_sdk/api_response.py index 9bc7c11..9bc7c11 100644 --- a/openapi_client/api_response.py +++ b/kf_sdk/api_response.py diff --git a/openapi_client/configuration.py b/kf_sdk/configuration.py index fe1e1ce..29304bc 100644 --- a/openapi_client/configuration.py +++ b/kf_sdk/configuration.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -113,6 +113,7 @@ HTTPSignatureAuthSetting = TypedDict( AuthSettings = TypedDict( "AuthSettings", { + "HTTPBearer": BearerAuthSetting, }, total=False, ) @@ -161,6 +162,7 @@ class Configuration: in PEM format. :param retries: Number of retries for API requests. + :Example: """ _default: ClassVar[Optional[Self]] = None @@ -185,7 +187,7 @@ class Configuration: ) -> None: """Constructor """ - self._base_path = "http://localhost" if host is None else host + self._base_path = "http://localhost/user-micro-services/v1" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -228,7 +230,7 @@ class Configuration: self.logger = {} """Logging Settings """ - self.logger["package_logger"] = logging.getLogger("openapi_client") + self.logger["package_logger"] = logging.getLogger("kappa_users") self.logger["urllib3_logger"] = logging.getLogger("urllib3") self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format @@ -483,6 +485,13 @@ class Configuration: :return: The Auth Settings information dict. """ auth: AuthSettings = {} + if self.access_token is not None: + auth['HTTPBearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } return auth def to_debug_report(self) -> str: @@ -504,7 +513,7 @@ class Configuration: """ return [ { - 'url': "", + 'url': "/user-micro-services/v1", 'description': "No description provided", } ] diff --git a/openapi_client/exceptions.py b/kf_sdk/exceptions.py index 88ab5cf..32f9ef4 100644 --- a/openapi_client/exceptions.py +++ b/kf_sdk/exceptions.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) diff --git a/kf_sdk/models/__init__.py b/kf_sdk/models/__init__.py new file mode 100644 index 0000000..7481871 --- /dev/null +++ b/kf_sdk/models/__init__.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +# flake8: noqa +""" + Kappa-framework user microservices + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from kf_sdk.models.configuration_details import ConfigurationDetails +from kf_sdk.models.new_configuration import NewConfiguration +from kf_sdk.models.new_session import NewSession +from kf_sdk.models.user_details import UserDetails +from kf_sdk.models.user_type_details import UserTypeDetails +from kf_sdk.models.organization_details import OrganizationDetails +from kf_sdk.models.validation_error import ValidationError +from kf_sdk.models.dataset_details import DatasetDetails +from kf_sdk.models.dataset_versions import DatasetVersion diff --git a/openapi_client/models/reset_password.py b/kf_sdk/models/configuration_details.py index cb61a69..80b707f 100644 --- a/openapi_client/models/reset_password.py +++ b/kf_sdk/models/configuration_details.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17,19 +17,26 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class ResetPassword(BaseModel): +class ConfigurationDetails(BaseModel): """ - ResetPassword + ConfigurationDetails """ # noqa: E501 - login_id: StrictStr = Field(alias="loginId") - otp: StrictStr - new_password: StrictStr = Field(alias="newPassword") - __properties: ClassVar[List[str]] = ["loginId", "otp", "newPassword"] + tag: StrictStr + info: StrictStr + config_id: StrictInt = Field(alias="configId") + config_interp: StrictStr = Field(alias="configInterp") + display_value: StrictStr = Field(alias="displayValue") + id: StrictInt + tag_status: StrictInt = Field(alias="tagStatus") + created_on: datetime = Field(alias="createdOn") + modified_on: datetime = Field(alias="modifiedOn") + __properties: ClassVar[List[str]] = ["tag", "info", "configId", "configInterp", "displayValue", "id", "tagStatus", "createdOn", "modifiedOn"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +56,7 @@ class ResetPassword(BaseModel): @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ResetPassword from a JSON string""" + """Create an instance of ConfigurationDetails from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +81,7 @@ class ResetPassword(BaseModel): @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ResetPassword from a dict""" + """Create an instance of ConfigurationDetails from a dict""" if obj is None: return None @@ -82,9 +89,15 @@ class ResetPassword(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "loginId": obj.get("loginId"), - "otp": obj.get("otp"), - "newPassword": obj.get("newPassword") + "tag": obj.get("tag"), + "info": obj.get("info"), + "configId": obj.get("configId"), + "configInterp": obj.get("configInterp"), + "displayValue": obj.get("displayValue"), + "id": obj.get("id"), + "tagStatus": obj.get("tagStatus"), + "createdOn": obj.get("createdOn"), + "modifiedOn": obj.get("modifiedOn") }) return _obj diff --git a/openapi_client/models/dataset_details.py b/kf_sdk/models/dataset_details.py index c784885..bb0c9f7 100644 --- a/openapi_client/models/dataset_details.py +++ b/kf_sdk/models/dataset_details.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework data microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -27,18 +27,18 @@ class DatasetDetails(BaseModel): """ DatasetDetails """ # noqa: E501 - user_id: Optional[StrictInt] = Field(default=0, alias="userId") - dataset_name: StrictStr = Field(alias="datasetName") - dataset_type: Optional[StrictInt] = Field(default=None, alias="datasetType") - dataset_short_info: Optional[StrictStr] = Field(default=None, alias="datasetShortInfo") - dataset_tags: Optional[StrictStr] = Field(default=None, alias="datasetTags") dataset_id: StrictInt = Field(alias="datasetId") + dataset_name: StrictStr = Field(alias="datasetName") + dataset_type: StrictInt = Field(alias="datasetType") dataset_type_interp: Optional[StrictStr] = Field(default=None, alias="datasetTypeInterp") + dataset_short_info: StrictStr = Field(alias="datasetShortInfo") dataset_status: StrictInt = Field(alias="datasetStatus") dataset_status_interp: Optional[StrictStr] = Field(default=None, alias="datasetStatusInterp") - created_on: Optional[datetime] = Field(alias="createdOn") - modified_on: Optional[datetime] = Field(alias="modifiedOn") - __properties: ClassVar[List[str]] = ["userId", "datasetName", "datasetType", "datasetShortInfo", "datasetTags", "datasetId", "datasetTypeInterp", "datasetStatus", "datasetStatusInterp", "createdOn", "modifiedOn"] + dataset_tags: StrictStr = Field(alias="datasetTags") + created_on: datetime = Field(alias="createdOn") + modified_on: datetime = Field(alias="modifiedOn") + version_no: Optional[StrictStr] = Field(default=None, alias="versionNo") + __properties: ClassVar[List[str]] = ["datasetId", "datasetName", "datasetType", "datasetTypeInterp", "datasetShortInfo", "datasetStatus", "datasetStatusInterp", "datasetTags", "createdOn", "modifiedOn", "versionNo"] model_config = ConfigDict( populate_by_name=True, @@ -79,21 +79,6 @@ class DatasetDetails(BaseModel): exclude=excluded_fields, exclude_none=True, ) - # set to None if dataset_type (nullable) is None - # and model_fields_set contains the field - if self.dataset_type is None and "dataset_type" in self.model_fields_set: - _dict['datasetType'] = None - - # set to None if dataset_short_info (nullable) is None - # and model_fields_set contains the field - if self.dataset_short_info is None and "dataset_short_info" in self.model_fields_set: - _dict['datasetShortInfo'] = None - - # set to None if dataset_tags (nullable) is None - # and model_fields_set contains the field - if self.dataset_tags is None and "dataset_tags" in self.model_fields_set: - _dict['datasetTags'] = None - # set to None if dataset_type_interp (nullable) is None # and model_fields_set contains the field if self.dataset_type_interp is None and "dataset_type_interp" in self.model_fields_set: @@ -104,15 +89,10 @@ class DatasetDetails(BaseModel): if self.dataset_status_interp is None and "dataset_status_interp" in self.model_fields_set: _dict['datasetStatusInterp'] = None - # set to None if created_on (nullable) is None + # set to None if version_no (nullable) is None # and model_fields_set contains the field - if self.created_on is None and "created_on" in self.model_fields_set: - _dict['createdOn'] = None - - # set to None if modified_on (nullable) is None - # and model_fields_set contains the field - if self.modified_on is None and "modified_on" in self.model_fields_set: - _dict['modifiedOn'] = None + if self.version_no is None and "version_no" in self.model_fields_set: + _dict['versionNo'] = None return _dict @@ -126,17 +106,17 @@ class DatasetDetails(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "userId": obj.get("userId") if obj.get("userId") is not None else 0, + "datasetId": obj.get("datasetId"), "datasetName": obj.get("datasetName"), "datasetType": obj.get("datasetType"), - "datasetShortInfo": obj.get("datasetShortInfo"), - "datasetTags": obj.get("datasetTags"), - "datasetId": obj.get("datasetId"), "datasetTypeInterp": obj.get("datasetTypeInterp"), + "datasetShortInfo": obj.get("datasetShortInfo"), "datasetStatus": obj.get("datasetStatus"), "datasetStatusInterp": obj.get("datasetStatusInterp"), + "datasetTags": obj.get("datasetTags"), "createdOn": obj.get("createdOn"), - "modifiedOn": obj.get("modifiedOn") + "modifiedOn": obj.get("modifiedOn"), + "versionNo": obj.get("versionNo") }) return _obj diff --git a/openapi_client/models/new_dataset_entity.py b/kf_sdk/models/dataset_version.py index 1d6a2ba..e5e7609 100644 --- a/openapi_client/models/new_dataset_entity.py +++ b/kf_sdk/models/dataset_version.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework data microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -23,19 +23,19 @@ from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class NewDatasetEntity(BaseModel): +class DatasetVersion(BaseModel): """ - NewDatasetEntity + DatasetVersion """ # noqa: E501 - dataset_id: StrictInt = Field(alias="datasetId") + id: StrictInt user_id: StrictInt = Field(alias="userId") - ds_entity_name: StrictStr = Field(alias="dsEntityName") - entity_source: Optional[StrictStr] = Field(default=None, alias="entitySource") - collected_on: datetime = Field(alias="collectedOn") - labeling_algo: Optional[StrictStr] = Field(default=None, alias="labelingAlgo") - ds_entity_info: Dict[str, Any] = Field(alias="dsEntityInfo") - location_id: StrictInt = Field(alias="locationId") - __properties: ClassVar[List[str]] = ["datasetId", "userId", "dsEntityName", "entitySource", "collectedOn", "labelingAlgo", "dsEntityInfo", "locationId"] + dataset_id: StrictInt = Field(alias="datasetId") + version_availability: Optional[StrictInt] = Field(default=1, alias="versionAvailability") + version_no: Optional[StrictStr] = Field(default=None, alias="versionNo") + version_remark: Optional[StrictStr] = Field(default=None, alias="versionRemark") + created_on: datetime = Field(alias="createdOn") + modified_on: datetime = Field(alias="modifiedOn") + __properties: ClassVar[List[str]] = ["id", "userId", "datasetId", "versionAvailability", "versionNo", "versionRemark", "createdOn", "modifiedOn"] model_config = ConfigDict( populate_by_name=True, @@ -55,7 +55,7 @@ class NewDatasetEntity(BaseModel): @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NewDatasetEntity from a JSON string""" + """Create an instance of DatasetVersion from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,21 +76,21 @@ class NewDatasetEntity(BaseModel): exclude=excluded_fields, exclude_none=True, ) - # set to None if entity_source (nullable) is None + # set to None if version_no (nullable) is None # and model_fields_set contains the field - if self.entity_source is None and "entity_source" in self.model_fields_set: - _dict['entitySource'] = None + if self.version_no is None and "version_no" in self.model_fields_set: + _dict['versionNo'] = None - # set to None if labeling_algo (nullable) is None + # set to None if version_remark (nullable) is None # and model_fields_set contains the field - if self.labeling_algo is None and "labeling_algo" in self.model_fields_set: - _dict['labelingAlgo'] = None + if self.version_remark is None and "version_remark" in self.model_fields_set: + _dict['versionRemark'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NewDatasetEntity from a dict""" + """Create an instance of DatasetVersion from a dict""" if obj is None: return None @@ -98,14 +98,14 @@ class NewDatasetEntity(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "datasetId": obj.get("datasetId"), + "id": obj.get("id"), "userId": obj.get("userId"), - "dsEntityName": obj.get("dsEntityName"), - "entitySource": obj.get("entitySource"), - "collectedOn": obj.get("collectedOn"), - "labelingAlgo": obj.get("labelingAlgo"), - "dsEntityInfo": obj.get("dsEntityInfo"), - "locationId": obj.get("locationId") + "datasetId": obj.get("datasetId"), + "versionAvailability": obj.get("versionAvailability") if obj.get("versionAvailability") is not None else 1, + "versionNo": obj.get("versionNo"), + "versionRemark": obj.get("versionRemark"), + "createdOn": obj.get("createdOn"), + "modifiedOn": obj.get("modifiedOn") }) return _obj diff --git a/openapi_client/models/http_validation_error.py b/kf_sdk/models/http_validation_error.py index 9b21f4a..b7384cc 100644 --- a/openapi_client/models/http_validation_error.py +++ b/kf_sdk/models/http_validation_error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from openapi_client.models.validation_error import ValidationError +from kf_sdk.models.validation_error import ValidationError from typing import Optional, Set from typing_extensions import Self diff --git a/openapi_client/models/delete_dataset_entities.py b/kf_sdk/models/new_configuration.py index 47172e6..ac1ed13 100644 --- a/openapi_client/models/delete_dataset_entities.py +++ b/kf_sdk/models/new_configuration.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17,18 +17,21 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class DeleteDatasetEntities(BaseModel): +class NewConfiguration(BaseModel): """ - DeleteDatasetEntities + NewConfiguration """ # noqa: E501 - dataset_entity_ids: List[StrictStr] = Field(alias="datasetEntityIds") - remark: StrictStr - __properties: ClassVar[List[str]] = ["datasetEntityIds", "remark"] + tag: StrictStr + info: StrictStr + config_id: StrictInt + config_interp: StrictStr + display_value: StrictStr + __properties: ClassVar[List[str]] = ["tag", "info", "config_id", "config_interp", "display_value"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +51,7 @@ class DeleteDatasetEntities(BaseModel): @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DeleteDatasetEntities from a JSON string""" + """Create an instance of NewConfiguration from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +76,7 @@ class DeleteDatasetEntities(BaseModel): @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DeleteDatasetEntities from a dict""" + """Create an instance of NewConfiguration from a dict""" if obj is None: return None @@ -81,8 +84,11 @@ class DeleteDatasetEntities(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "datasetEntityIds": obj.get("datasetEntityIds"), - "remark": obj.get("remark") + "tag": obj.get("tag"), + "info": obj.get("info"), + "config_id": obj.get("config_id"), + "config_interp": obj.get("config_interp"), + "display_value": obj.get("display_value") }) return _obj diff --git a/openapi_client/models/new_session.py b/kf_sdk/models/new_session.py index e464880..d6f418a 100644 --- a/openapi_client/models/new_session.py +++ b/kf_sdk/models/new_session.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,8 +28,12 @@ class NewSession(BaseModel): """ # noqa: E501 login_id: StrictStr = Field(alias="loginId") passwd: StrictStr + token: Optional[StrictStr] = None ip_address: Optional[StrictStr] = Field(default='127.0.0.1', alias="ipAddress") - __properties: ClassVar[List[str]] = ["loginId", "passwd", "ipAddress"] + token_expiry_date: Optional[StrictStr] = Field(default=None, alias="tokenExpiryDate") + user_id: Optional[StrictInt] = Field(default=None, alias="userId") + user_type_id: Optional[StrictInt] = Field(default=None, alias="userTypeId") + __properties: ClassVar[List[str]] = ["loginId", "passwd", "token", "ipAddress", "tokenExpiryDate", "userId", "userTypeId"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +74,16 @@ class NewSession(BaseModel): exclude=excluded_fields, exclude_none=True, ) + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if user_type_id (nullable) is None + # and model_fields_set contains the field + if self.user_type_id is None and "user_type_id" in self.model_fields_set: + _dict['userTypeId'] = None + return _dict @classmethod @@ -84,7 +98,11 @@ class NewSession(BaseModel): _obj = cls.model_validate({ "loginId": obj.get("loginId"), "passwd": obj.get("passwd"), - "ipAddress": obj.get("ipAddress") if obj.get("ipAddress") is not None else '127.0.0.1' + "token": obj.get("token"), + "ipAddress": obj.get("ipAddress") if obj.get("ipAddress") is not None else '127.0.0.1', + "tokenExpiryDate": obj.get("tokenExpiryDate"), + "userId": obj.get("userId"), + "userTypeId": obj.get("userTypeId") }) return _obj diff --git a/openapi_client/models/forgot_password.py b/kf_sdk/models/organization_details.py index c4f210a..c8e069e 100644 --- a/openapi_client/models/forgot_password.py +++ b/kf_sdk/models/organization_details.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17,17 +17,18 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class ForgotPassword(BaseModel): +class OrganizationDetails(BaseModel): """ - ForgotPassword + OrganizationDetails """ # noqa: E501 - login_id: StrictStr = Field(alias="loginId") - __properties: ClassVar[List[str]] = ["loginId"] + org_id: StrictInt = Field(alias="orgId") + org_name: StrictStr = Field(alias="orgName") + __properties: ClassVar[List[str]] = ["orgId", "orgName"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ class ForgotPassword(BaseModel): @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ForgotPassword from a JSON string""" + """Create an instance of OrganizationDetails from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ class ForgotPassword(BaseModel): @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ForgotPassword from a dict""" + """Create an instance of OrganizationDetails from a dict""" if obj is None: return None @@ -80,7 +81,8 @@ class ForgotPassword(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "loginId": obj.get("loginId") + "orgId": obj.get("orgId"), + "orgName": obj.get("orgName") }) return _obj diff --git a/openapi_client/api/location_management_api.py b/kf_sdk/models/session_management_api.py index d190b3a..1762754 100644 --- a/openapi_client/api/location_management_api.py +++ b/kf_sdk/models/session_management_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17,17 +17,16 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from pydantic import StrictInt -from typing import Any, List -from openapi_client.models.location_details import LocationDetails -from openapi_client.models.new_location import NewLocation -from openapi_client.models.update_location import UpdateLocation +from typing import Any +from kappa_users.models.new_session import NewSession +from kappa_users.models.user_details import UserDetails -from openapi_client.api_client import ApiClient, RequestSerialized -from openapi_client.api_response import ApiResponse -from openapi_client.rest import RESTResponseType +from kappa_users.api_client import ApiClient, RequestSerialized +from kappa_users.api_response import ApiResponse +from kappa_users.rest import RESTResponseType -class LocationManagementApi: +class SessionManagementApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -41,11 +40,10 @@ class LocationManagementApi: @validate_call - def delete_location_locations_user_id_user_type_id_location_id_delete( + def delete_session_session_user_id_user_type_id_delete( self, user_id: StrictInt, user_type_id: StrictInt, - location_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -59,15 +57,13 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: - """Delete Location + """Delete Session :param user_id: (required) :type user_id: int :param user_type_id: (required) :type user_type_id: int - :param location_id: (required) - :type location_id: int :param _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 @@ -90,10 +86,9 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_location_locations_user_id_user_type_id_location_id_delete_serialize( + _param = self._delete_session_session_user_id_user_type_id_delete_serialize( user_id=user_id, user_type_id=user_type_id, - location_id=location_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -116,11 +111,10 @@ class LocationManagementApi: @validate_call - def delete_location_locations_user_id_user_type_id_location_id_delete_with_http_info( + def delete_session_session_user_id_user_type_id_delete_with_http_info( self, user_id: StrictInt, user_type_id: StrictInt, - location_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -134,15 +128,13 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[object]: - """Delete Location + """Delete Session :param user_id: (required) :type user_id: int :param user_type_id: (required) :type user_type_id: int - :param location_id: (required) - :type location_id: int :param _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 @@ -165,10 +157,9 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_location_locations_user_id_user_type_id_location_id_delete_serialize( + _param = self._delete_session_session_user_id_user_type_id_delete_serialize( user_id=user_id, user_type_id=user_type_id, - location_id=location_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -191,11 +182,10 @@ class LocationManagementApi: @validate_call - def delete_location_locations_user_id_user_type_id_location_id_delete_without_preload_content( + def delete_session_session_user_id_user_type_id_delete_without_preload_content( self, user_id: StrictInt, user_type_id: StrictInt, - location_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -209,15 +199,13 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Location + """Delete Session :param user_id: (required) :type user_id: int :param user_type_id: (required) :type user_type_id: int - :param location_id: (required) - :type location_id: int :param _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 @@ -240,10 +228,9 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_location_locations_user_id_user_type_id_location_id_delete_serialize( + _param = self._delete_session_session_user_id_user_type_id_delete_serialize( user_id=user_id, user_type_id=user_type_id, - location_id=location_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -261,11 +248,10 @@ class LocationManagementApi: return response_data.response - def _delete_location_locations_user_id_user_type_id_location_id_delete_serialize( + def _delete_session_session_user_id_user_type_id_delete_serialize( self, user_id, user_type_id, - location_id, _request_auth, _content_type, _headers, @@ -291,8 +277,6 @@ class LocationManagementApi: _path_params['user_id'] = user_id if user_type_id is not None: _path_params['user_type_id'] = user_type_id - if location_id is not None: - _path_params['location_id'] = location_id # process the query parameters # process the header parameters # process the form parameters @@ -310,11 +294,12 @@ class LocationManagementApi: # authentication setting _auth_settings: List[str] = [ + 'HTTPBearer' ] return self.api_client.param_serialize( method='DELETE', - resource_path='/locations/{user_id}/{user_type_id}/{location_id}', + resource_path='/session/{user_id}/{user_type_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -331,7 +316,7 @@ class LocationManagementApi: @validate_call - def get_user_locations_locations_user_id_user_type_id_get( + def get_refresh_token_session_refresh_token_user_id_user_type_id_post( self, user_id: StrictInt, user_type_id: StrictInt, @@ -347,292 +332,14 @@ class LocationManagementApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[LocationDetails]: - """Get User Locations - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_locations_locations_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[LocationDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_user_locations_locations_user_id_user_type_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[LocationDetails]]: - """Get User Locations - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_locations_locations_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[LocationDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_user_locations_locations_user_id_user_type_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get User Locations - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_locations_locations_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[LocationDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_user_locations_locations_user_id_user_type_id_get_serialize( - self, - user_id, - user_type_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/locations/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def new_location_locations_user_id_user_type_id_post( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_location: NewLocation, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: - """New Location + """Get Refresh Token :param user_id: (required) :type user_id: int :param user_type_id: (required) :type user_type_id: int - :param new_location: (required) - :type new_location: NewLocation :param _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 @@ -655,10 +362,9 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._new_location_locations_user_id_user_type_id_post_serialize( + _param = self._get_refresh_token_session_refresh_token_user_id_user_type_id_post_serialize( user_id=user_id, user_type_id=user_type_id, - new_location=new_location, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -681,11 +387,10 @@ class LocationManagementApi: @validate_call - def new_location_locations_user_id_user_type_id_post_with_http_info( + def get_refresh_token_session_refresh_token_user_id_user_type_id_post_with_http_info( self, user_id: StrictInt, user_type_id: StrictInt, - new_location: NewLocation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -699,15 +404,13 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[object]: - """New Location + """Get Refresh Token :param user_id: (required) :type user_id: int :param user_type_id: (required) :type user_type_id: int - :param new_location: (required) - :type new_location: NewLocation :param _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 @@ -730,10 +433,9 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._new_location_locations_user_id_user_type_id_post_serialize( + _param = self._get_refresh_token_session_refresh_token_user_id_user_type_id_post_serialize( user_id=user_id, user_type_id=user_type_id, - new_location=new_location, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -756,11 +458,10 @@ class LocationManagementApi: @validate_call - def new_location_locations_user_id_user_type_id_post_without_preload_content( + def get_refresh_token_session_refresh_token_user_id_user_type_id_post_without_preload_content( self, user_id: StrictInt, user_type_id: StrictInt, - new_location: NewLocation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -774,15 +475,13 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """New Location + """Get Refresh Token :param user_id: (required) :type user_id: int :param user_type_id: (required) :type user_type_id: int - :param new_location: (required) - :type new_location: NewLocation :param _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 @@ -805,10 +504,9 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._new_location_locations_user_id_user_type_id_post_serialize( + _param = self._get_refresh_token_session_refresh_token_user_id_user_type_id_post_serialize( user_id=user_id, user_type_id=user_type_id, - new_location=new_location, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -826,11 +524,10 @@ class LocationManagementApi: return response_data.response - def _new_location_locations_user_id_user_type_id_post_serialize( + def _get_refresh_token_session_refresh_token_user_id_user_type_id_post_serialize( self, user_id, user_type_id, - new_location, _request_auth, _content_type, _headers, @@ -860,8 +557,6 @@ class LocationManagementApi: # process the header parameters # process the form parameters # process the body parameter - if new_location is not None: - _body_params = new_location # set the HTTP header `Accept` @@ -872,27 +567,15 @@ class LocationManagementApi: ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ + 'HTTPBearer' ] return self.api_client.param_serialize( method='POST', - resource_path='/locations/{user_id}/{user_type_id}', + resource_path='/session/refresh_token/{user_id}/{user_type_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -909,11 +592,8 @@ class LocationManagementApi: @validate_call - def recover_location_locations_user_id_user_type_id_location_id_put( + def new_anonymous_session_session_anonymous_token_post( self, - user_id: StrictInt, - user_type_id: StrictInt, - location_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -927,15 +607,9 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: - """Recover Location + """New Anonymous Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param location_id: (required) - :type location_id: int :param _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 @@ -958,10 +632,7 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._recover_location_locations_user_id_user_type_id_location_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - location_id=location_id, + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -970,7 +641,6 @@ class LocationManagementApi: _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -984,11 +654,8 @@ class LocationManagementApi: @validate_call - def recover_location_locations_user_id_user_type_id_location_id_put_with_http_info( + def new_anonymous_session_session_anonymous_token_post_with_http_info( self, - user_id: StrictInt, - user_type_id: StrictInt, - location_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1002,15 +669,9 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[object]: - """Recover Location + """New Anonymous Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param location_id: (required) - :type location_id: int :param _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 @@ -1033,10 +694,7 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._recover_location_locations_user_id_user_type_id_location_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - location_id=location_id, + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1045,7 +703,6 @@ class LocationManagementApi: _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -1059,11 +716,8 @@ class LocationManagementApi: @validate_call - def recover_location_locations_user_id_user_type_id_location_id_put_without_preload_content( + def new_anonymous_session_session_anonymous_token_post_without_preload_content( self, - user_id: StrictInt, - user_type_id: StrictInt, - location_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1077,15 +731,9 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Recover Location + """New Anonymous Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param location_id: (required) - :type location_id: int :param _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 @@ -1108,10 +756,7 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._recover_location_locations_user_id_user_type_id_location_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - location_id=location_id, + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1120,7 +765,6 @@ class LocationManagementApi: _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -1129,11 +773,8 @@ class LocationManagementApi: return response_data.response - def _recover_location_locations_user_id_user_type_id_location_id_put_serialize( + def _new_anonymous_session_session_anonymous_token_post_serialize( self, - user_id, - user_type_id, - location_id, _request_auth, _content_type, _headers, @@ -1155,12 +796,6 @@ class LocationManagementApi: _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - if location_id is not None: - _path_params['location_id'] = location_id # process the query parameters # process the header parameters # process the form parameters @@ -1181,8 +816,8 @@ class LocationManagementApi: ] return self.api_client.param_serialize( - method='PUT', - resource_path='/locations/{user_id}/{user_type_id}/{location_id}', + method='POST', + resource_path='/session/anonymous_token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1199,11 +834,9 @@ class LocationManagementApi: @validate_call - def update_location_locations_user_id_user_type_id_put( + def new_session_session_new_post( self, - user_id: StrictInt, - user_type_id: StrictInt, - update_location: UpdateLocation, + new_session: NewSession, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1216,16 +849,12 @@ class LocationManagementApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Update Location + ) -> UserDetails: + """New Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param update_location: (required) - :type update_location: UpdateLocation + :param new_session: (required) + :type new_session: NewSession :param _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 @@ -1248,10 +877,8 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_location_locations_user_id_user_type_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - update_location=update_location, + _param = self._new_session_session_new_post_serialize( + new_session=new_session, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1259,7 +886,7 @@ class LocationManagementApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "UserDetails", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1274,11 +901,9 @@ class LocationManagementApi: @validate_call - def update_location_locations_user_id_user_type_id_put_with_http_info( + def new_session_session_new_post_with_http_info( self, - user_id: StrictInt, - user_type_id: StrictInt, - update_location: UpdateLocation, + new_session: NewSession, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1291,16 +916,12 @@ class LocationManagementApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Update Location + ) -> ApiResponse[UserDetails]: + """New Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param update_location: (required) - :type update_location: UpdateLocation + :param new_session: (required) + :type new_session: NewSession :param _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 @@ -1323,10 +944,8 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_location_locations_user_id_user_type_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - update_location=update_location, + _param = self._new_session_session_new_post_serialize( + new_session=new_session, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1334,7 +953,7 @@ class LocationManagementApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "UserDetails", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1349,11 +968,9 @@ class LocationManagementApi: @validate_call - def update_location_locations_user_id_user_type_id_put_without_preload_content( + def new_session_session_new_post_without_preload_content( self, - user_id: StrictInt, - user_type_id: StrictInt, - update_location: UpdateLocation, + new_session: NewSession, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1367,15 +984,11 @@ class LocationManagementApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Location + """New Session - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param update_location: (required) - :type update_location: UpdateLocation + :param new_session: (required) + :type new_session: NewSession :param _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 @@ -1398,10 +1011,8 @@ class LocationManagementApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_location_locations_user_id_user_type_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - update_location=update_location, + _param = self._new_session_session_new_post_serialize( + new_session=new_session, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1409,7 +1020,7 @@ class LocationManagementApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "UserDetails", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1419,11 +1030,9 @@ class LocationManagementApi: return response_data.response - def _update_location_locations_user_id_user_type_id_put_serialize( + def _new_session_session_new_post_serialize( self, - user_id, - user_type_id, - update_location, + new_session, _request_auth, _content_type, _headers, @@ -1445,16 +1054,12 @@ class LocationManagementApi: _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_location is not None: - _body_params = update_location + if new_session is not None: + _body_params = new_session # set the HTTP header `Accept` @@ -1484,8 +1089,8 @@ class LocationManagementApi: ] return self.api_client.param_serialize( - method='PUT', - resource_path='/locations/{user_id}/{user_type_id}', + method='POST', + resource_path='/session/new', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/openapi_client/models/user_details.py b/kf_sdk/models/user_details.py index 194e170..59ea274 100644 --- a/openapi_client/models/user_details.py +++ b/kf_sdk/models/user_details.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17,8 +17,11 @@ import pprint import re # noqa: F401 import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from kf_sdk.models.organization_details import OrganizationDetails +from kf_sdk.models.user_type_details import UserTypeDetails from typing import Optional, Set from typing_extensions import Self @@ -26,20 +29,20 @@ class UserDetails(BaseModel): """ UserDetails """ # noqa: E501 - user_name: Optional[StrictStr] = Field(alias="userName") + user_id: StrictInt = Field(alias="userId") + user_name: StrictStr = Field(alias="userName") first_name: StrictStr = Field(alias="firstName") middle_name: Optional[StrictStr] = Field(alias="middleName") last_name: StrictStr = Field(alias="lastName") email: StrictStr - user_type_id: Optional[StrictInt] = Field(alias="userTypeId") + user_type_id: StrictInt = Field(alias="userTypeId") org_id: StrictInt = Field(alias="orgId") - user_id: StrictInt = Field(alias="userId") - user_type: Optional[StrictStr] = Field(default=None, alias="userType") - org_name: Optional[StrictStr] = Field(default=None, alias="orgName") - token: Optional[StrictStr] = None - token_expiry_at: Optional[StrictStr] = Field(default=None, alias="tokenExpiryAt") + user_type_details: Optional[UserTypeDetails] = Field(default=None, alias="userTypeDetails") + org_details: Optional[OrganizationDetails] = Field(default=None, alias="orgDetails") profile_pic: Optional[StrictStr] = Field(default=None, alias="profilePic") - __properties: ClassVar[List[str]] = ["userName", "firstName", "middleName", "lastName", "email", "userTypeId", "orgId", "userId", "userType", "orgName", "token", "tokenExpiryAt", "profilePic"] + token: Optional[StrictStr] = None + token_expiry_date: Optional[datetime] = Field(default=None, alias="tokenExpiryDate") + __properties: ClassVar[List[str]] = ["userId", "userName", "firstName", "middleName", "lastName", "email", "userTypeId", "orgId", "userTypeDetails", "orgDetails", "profilePic", "token", "tokenExpiryDate"] model_config = ConfigDict( populate_by_name=True, @@ -80,45 +83,41 @@ class UserDetails(BaseModel): exclude=excluded_fields, exclude_none=True, ) - # set to None if user_name (nullable) is None - # and model_fields_set contains the field - if self.user_name is None and "user_name" in self.model_fields_set: - _dict['userName'] = None - + # override the default output from pydantic by calling `to_dict()` of user_type_details + if self.user_type_details: + _dict['userTypeDetails'] = self.user_type_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of org_details + if self.org_details: + _dict['orgDetails'] = self.org_details.to_dict() # set to None if middle_name (nullable) is None # and model_fields_set contains the field if self.middle_name is None and "middle_name" in self.model_fields_set: _dict['middleName'] = None - # set to None if user_type_id (nullable) is None + # set to None if user_type_details (nullable) is None # and model_fields_set contains the field - if self.user_type_id is None and "user_type_id" in self.model_fields_set: - _dict['userTypeId'] = None + if self.user_type_details is None and "user_type_details" in self.model_fields_set: + _dict['userTypeDetails'] = None - # set to None if user_type (nullable) is None + # set to None if org_details (nullable) is None # and model_fields_set contains the field - if self.user_type is None and "user_type" in self.model_fields_set: - _dict['userType'] = None + if self.org_details is None and "org_details" in self.model_fields_set: + _dict['orgDetails'] = None - # set to None if org_name (nullable) is None + # set to None if profile_pic (nullable) is None # and model_fields_set contains the field - if self.org_name is None and "org_name" in self.model_fields_set: - _dict['orgName'] = None + if self.profile_pic is None and "profile_pic" in self.model_fields_set: + _dict['profilePic'] = None # set to None if token (nullable) is None # and model_fields_set contains the field if self.token is None and "token" in self.model_fields_set: _dict['token'] = None - # set to None if token_expiry_at (nullable) is None - # and model_fields_set contains the field - if self.token_expiry_at is None and "token_expiry_at" in self.model_fields_set: - _dict['tokenExpiryAt'] = None - - # set to None if profile_pic (nullable) is None + # set to None if token_expiry_date (nullable) is None # and model_fields_set contains the field - if self.profile_pic is None and "profile_pic" in self.model_fields_set: - _dict['profilePic'] = None + if self.token_expiry_date is None and "token_expiry_date" in self.model_fields_set: + _dict['tokenExpiryDate'] = None return _dict @@ -132,6 +131,7 @@ class UserDetails(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "userName": obj.get("userName"), "firstName": obj.get("firstName"), "middleName": obj.get("middleName"), @@ -139,12 +139,11 @@ class UserDetails(BaseModel): "email": obj.get("email"), "userTypeId": obj.get("userTypeId"), "orgId": obj.get("orgId"), - "userId": obj.get("userId"), - "userType": obj.get("userType"), - "orgName": obj.get("orgName"), + "userTypeDetails": UserTypeDetails.from_dict(obj["userTypeDetails"]) if obj.get("userTypeDetails") is not None else None, + "orgDetails": OrganizationDetails.from_dict(obj["orgDetails"]) if obj.get("orgDetails") is not None else None, + "profilePic": obj.get("profilePic"), "token": obj.get("token"), - "tokenExpiryAt": obj.get("tokenExpiryAt"), - "profilePic": obj.get("profilePic") + "tokenExpiryDate": obj.get("tokenExpiryDate") }) return _obj diff --git a/openapi_client/models/student_details.py b/kf_sdk/models/user_type_details.py index e2e4a6f..10dc428 100644 --- a/openapi_client/models/student_details.py +++ b/kf_sdk/models/user_type_details.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -22,13 +22,13 @@ from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class StudentDetails(BaseModel): +class UserTypeDetails(BaseModel): """ - StudentDetails + UserTypeDetails """ # noqa: E501 - student_id: StrictInt = Field(alias="studentId") - student_name: StrictStr = Field(alias="studentName") - __properties: ClassVar[List[str]] = ["studentId", "studentName"] + user_type_id: StrictInt = Field(alias="userTypeId") + user_type: StrictStr = Field(alias="userType") + __properties: ClassVar[List[str]] = ["userTypeId", "userType"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ class StudentDetails(BaseModel): @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of StudentDetails from a JSON string""" + """Create an instance of UserTypeDetails from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ class StudentDetails(BaseModel): @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of StudentDetails from a dict""" + """Create an instance of UserTypeDetails from a dict""" if obj is None: return None @@ -81,8 +81,8 @@ class StudentDetails(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "studentId": obj.get("studentId"), - "studentName": obj.get("studentName") + "userTypeId": obj.get("userTypeId"), + "userType": obj.get("userType") }) return _obj diff --git a/openapi_client/models/validation_error.py b/kf_sdk/models/validation_error.py index 4b168f6..32d0004 100644 --- a/openapi_client/models/validation_error.py +++ b/kf_sdk/models/validation_error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner +from kappa_users.models.location_inner import LocationInner from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class ValidationError(BaseModel): """ ValidationError """ # noqa: E501 - loc: List[ValidationErrorLocInner] + loc: List[LocationInner] msg: StrictStr type: StrictStr __properties: ClassVar[List[str]] = ["loc", "msg", "type"] @@ -90,7 +90,7 @@ class ValidationError(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, + "loc": [LocationInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, "msg": obj.get("msg"), "type": obj.get("type") }) diff --git a/openapi_client/py.typed b/kf_sdk/py.typed index e69de29..e69de29 100644 --- a/openapi_client/py.typed +++ b/kf_sdk/py.typed diff --git a/openapi_client/rest.py b/kf_sdk/rest.py index ba1b0ec..24b6f94 100644 --- a/openapi_client/rest.py +++ b/kf_sdk/rest.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - FastAPI + Kappa-framework user microservices No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -19,7 +19,7 @@ import ssl import urllib3 -from openapi_client.exceptions import ApiException, ApiValueError +from kf_sdk.exceptions import ApiException, ApiValueError SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse diff --git a/openapi_client/__init__.py b/openapi_client/__init__.py deleted file mode 100644 index 2028487..0000000 --- a/openapi_client/__init__.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0" - -# import apis into sdk package -from openapi_client.api.dashboard_data_api import DashboardDataApi -from openapi_client.api.dataset_management_api import DatasetManagementApi -from openapi_client.api.location_management_api import LocationManagementApi -from openapi_client.api.session_management_api import SessionManagementApi -from openapi_client.api.users_management_api import UsersManagementApi - -# import ApiClient -from openapi_client.api_response import ApiResponse -from openapi_client.api_client import ApiClient -from openapi_client.configuration import Configuration -from openapi_client.exceptions import OpenApiException -from openapi_client.exceptions import ApiTypeError -from openapi_client.exceptions import ApiValueError -from openapi_client.exceptions import ApiKeyError -from openapi_client.exceptions import ApiAttributeError -from openapi_client.exceptions import ApiException - -# import models into sdk package -from openapi_client.models.dataset_details import DatasetDetails -from openapi_client.models.dataset_entity_details import DatasetEntityDetails -from openapi_client.models.delete_dataset_entities import DeleteDatasetEntities -from openapi_client.models.entity_file_details import EntityFileDetails -from openapi_client.models.forgot_password import ForgotPassword -from openapi_client.models.http_validation_error import HTTPValidationError -from openapi_client.models.location_details import LocationDetails -from openapi_client.models.new_dataset import NewDataset -from openapi_client.models.new_dataset_entity import NewDatasetEntity -from openapi_client.models.new_location import NewLocation -from openapi_client.models.new_session import NewSession -from openapi_client.models.new_student import NewStudent -from openapi_client.models.reset_password import ResetPassword -from openapi_client.models.student_details import StudentDetails -from openapi_client.models.update_dataset_entity import UpdateDatasetEntity -from openapi_client.models.update_location import UpdateLocation -from openapi_client.models.update_user import UpdateUser -from openapi_client.models.user_details import UserDetails -from openapi_client.models.validation_error import ValidationError -from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/openapi_client/api/__init__.py b/openapi_client/api/__init__.py deleted file mode 100644 index cda03b9..0000000 --- a/openapi_client/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# flake8: noqa - -# import apis into api package -from openapi_client.api.dashboard_data_api import DashboardDataApi -from openapi_client.api.dataset_management_api import DatasetManagementApi -from openapi_client.api.location_management_api import LocationManagementApi -from openapi_client.api.session_management_api import SessionManagementApi -from openapi_client.api.users_management_api import UsersManagementApi - diff --git a/openapi_client/api/dashboard_data_api.py b/openapi_client/api/dashboard_data_api.py deleted file mode 100644 index 393fe79..0000000 --- a/openapi_client/api/dashboard_data_api.py +++ /dev/null @@ -1,312 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictInt -from typing import Any - -from openapi_client.api_client import ApiClient, RequestSerialized -from openapi_client.api_response import ApiResponse -from openapi_client.rest import RESTResponseType - - -class DashboardDataApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def get_dashboard_data_dashboard_user_id_user_type_id_get( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Get Dashboard Data - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dashboard_data_dashboard_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_dashboard_data_dashboard_user_id_user_type_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Get Dashboard Data - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dashboard_data_dashboard_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_dashboard_data_dashboard_user_id_user_type_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Dashboard Data - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dashboard_data_dashboard_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_dashboard_data_dashboard_user_id_user_type_id_get_serialize( - self, - user_id, - user_type_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/dashboard/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/openapi_client/api/dataset_management_api.py b/openapi_client/api/dataset_management_api.py deleted file mode 100644 index 35d62bf..0000000 --- a/openapi_client/api/dataset_management_api.py +++ /dev/null @@ -1,3405 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBytes, StrictInt, StrictStr -from typing import Any, List, Tuple, Union -from openapi_client.models.dataset_details import DatasetDetails -from openapi_client.models.dataset_entity_details import DatasetEntityDetails -from openapi_client.models.delete_dataset_entities import DeleteDatasetEntities -from openapi_client.models.new_dataset import NewDataset -from openapi_client.models.new_dataset_entity import NewDatasetEntity -from openapi_client.models.update_dataset_entity import UpdateDatasetEntity - -from openapi_client.api_client import ApiClient, RequestSerialized -from openapi_client.api_response import ApiResponse -from openapi_client.rest import RESTResponseType - - -class DatasetManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete( - self, - user_id: StrictInt, - user_type_id: StrictInt, - delete_dataset_entities: DeleteDatasetEntities, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Delete Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param delete_dataset_entities: (required) - :type delete_dataset_entities: DeleteDatasetEntities - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, - delete_dataset_entities=delete_dataset_entities, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - delete_dataset_entities: DeleteDatasetEntities, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Delete Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param delete_dataset_entities: (required) - :type delete_dataset_entities: DeleteDatasetEntities - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, - delete_dataset_entities=delete_dataset_entities, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - delete_dataset_entities: DeleteDatasetEntities, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param delete_dataset_entities: (required) - :type delete_dataset_entities: DeleteDatasetEntities - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, - delete_dataset_entities=delete_dataset_entities, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete_serialize( - self, - user_id, - user_type_id, - delete_dataset_entities, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if delete_dataset_entities is not None: - _body_params = delete_dataset_entities - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete( - self, - user_id: StrictInt, - user_type_id: StrictInt, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Delete Entity Files - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param request_body: (required) - :type request_body: List[str] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Delete Entity Files - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param request_body: (required) - :type request_body: List[str] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete Entity Files - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param request_body: (required) - :type request_body: List[str] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_serialize( - user_id=user_id, - user_type_id=user_type_id, - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete_serialize( - self, - user_id, - user_type_id, - request_body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'request_body': '', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if request_body is not None: - _body_params = request_body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/datasets/datasetEntities/files/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[DatasetEntityDetails]: - """Get Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[DatasetEntityDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[DatasetEntityDetails]]: - """Get Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[DatasetEntityDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[DatasetEntityDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get_serialize( - self, - user_id, - user_type_id, - dataset_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - if dataset_id is not None: - _path_params['dataset_id'] = dataset_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}/{dataset_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - dataset_entity_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DatasetEntityDetails: - """Get Dataset Item - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param dataset_entity_id: (required) - :type dataset_entity_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - dataset_entity_id=dataset_entity_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetEntityDetails", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - dataset_entity_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DatasetEntityDetails]: - """Get Dataset Item - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param dataset_entity_id: (required) - :type dataset_entity_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - dataset_entity_id=dataset_entity_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetEntityDetails", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - dataset_entity_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Dataset Item - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param dataset_entity_id: (required) - :type dataset_entity_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - dataset_entity_id=dataset_entity_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetEntityDetails", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get_serialize( - self, - user_id, - user_type_id, - dataset_id, - dataset_entity_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - if dataset_id is not None: - _path_params['dataset_id'] = dataset_id - if dataset_entity_id is not None: - _path_params['dataset_entity_id'] = dataset_entity_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}/{dataset_id}/{dataset_entity_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - file_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Get Entity File - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param file_id: (required) - :type file_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - file_id=file_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - file_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Get Entity File - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param file_id: (required) - :type file_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - file_id=file_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - file_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Entity File - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param file_id: (required) - :type file_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - file_id=file_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get_serialize( - self, - user_id, - user_type_id, - dataset_id, - file_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - if dataset_id is not None: - _path_params['dataset_id'] = dataset_id - if file_id is not None: - _path_params['file_id'] = file_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/datasets/datasetEntities/files/{user_id}/{user_type_id}/{dataset_id}/{file_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - file_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Get Thumbnail - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param file_id: (required) - :type file_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - file_id=file_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - file_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Get Thumbnail - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param file_id: (required) - :type file_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - file_id=file_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - file_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Thumbnail - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param file_id: (required) - :type file_id: str - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - file_id=file_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get_serialize( - self, - user_id, - user_type_id, - dataset_id, - file_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - if dataset_id is not None: - _path_params['dataset_id'] = dataset_id - if file_id is not None: - _path_params['file_id'] = file_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/datasets/datasetEntities/thumbnail/{user_id}/{user_type_id}/{dataset_id}/{file_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_user_datasets_datasets_user_id_user_type_id_get( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[DatasetDetails]: - """Get User Datasets - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_datasets_datasets_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[DatasetDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_user_datasets_datasets_user_id_user_type_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[DatasetDetails]]: - """Get User Datasets - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_datasets_datasets_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[DatasetDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_user_datasets_datasets_user_id_user_type_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get User Datasets - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_datasets_datasets_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[DatasetDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_user_datasets_datasets_user_id_user_type_id_get_serialize( - self, - user_id, - user_type_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/datasets/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def new_dataset_datasets_user_id_user_type_id_post( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_dataset: NewDataset, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """New Dataset - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_dataset: (required) - :type new_dataset: NewDataset - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_dataset_datasets_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_dataset=new_dataset, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def new_dataset_datasets_user_id_user_type_id_post_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_dataset: NewDataset, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """New Dataset - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_dataset: (required) - :type new_dataset: NewDataset - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_dataset_datasets_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_dataset=new_dataset, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def new_dataset_datasets_user_id_user_type_id_post_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_dataset: NewDataset, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """New Dataset - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_dataset: (required) - :type new_dataset: NewDataset - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_dataset_datasets_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_dataset=new_dataset, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _new_dataset_datasets_user_id_user_type_id_post_serialize( - self, - user_id, - user_type_id, - new_dataset, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if new_dataset is not None: - _body_params = new_dataset - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/datasets/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_dataset_entity: NewDatasetEntity, - files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """New Dataset Entity - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_dataset_entity: (required) - :type new_dataset_entity: NewDatasetEntity - :param files: (required) - :type files: List[bytearray] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_dataset_entity=new_dataset_entity, - files=files, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_dataset_entity: NewDatasetEntity, - files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """New Dataset Entity - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_dataset_entity: (required) - :type new_dataset_entity: NewDatasetEntity - :param files: (required) - :type files: List[bytearray] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_dataset_entity=new_dataset_entity, - files=files, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_dataset_entity: NewDatasetEntity, - files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """New Dataset Entity - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_dataset_entity: (required) - :type new_dataset_entity: NewDatasetEntity - :param files: (required) - :type files: List[bytearray] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_dataset_entity=new_dataset_entity, - files=files, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post_serialize( - self, - user_id, - user_type_id, - new_dataset_entity, - files, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'files': 'csv', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - if new_dataset_entity is not None: - _form_params.append(('new_dataset_entity', new_dataset_entity)) - if files is not None: - _files['files'] = files - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'multipart/form-data' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post( - self, - user_id: StrictInt, - user_type_id: StrictInt, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Recover Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param request_body: (required) - :type request_body: List[str] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Recover Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param request_body: (required) - :type request_body: List[str] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Recover Dataset Entities - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param request_body: (required) - :type request_body: List[str] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post_serialize( - self, - user_id, - user_type_id, - request_body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'request_body': '', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if request_body is not None: - _body_params = request_body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/datasets/datasetEntities/recover/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - dataset_entity_id: StrictStr, - update_dataset_entity: UpdateDatasetEntity, - files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Update Dataset Entity - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param dataset_entity_id: (required) - :type dataset_entity_id: str - :param update_dataset_entity: (required) - :type update_dataset_entity: UpdateDatasetEntity - :param files: (required) - :type files: List[bytearray] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - dataset_entity_id=dataset_entity_id, - update_dataset_entity=update_dataset_entity, - files=files, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - dataset_entity_id: StrictStr, - update_dataset_entity: UpdateDatasetEntity, - files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Update Dataset Entity - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param dataset_entity_id: (required) - :type dataset_entity_id: str - :param update_dataset_entity: (required) - :type update_dataset_entity: UpdateDatasetEntity - :param files: (required) - :type files: List[bytearray] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - dataset_entity_id=dataset_entity_id, - update_dataset_entity=update_dataset_entity, - files=files, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - dataset_id: StrictInt, - dataset_entity_id: StrictStr, - update_dataset_entity: UpdateDatasetEntity, - files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update Dataset Entity - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param dataset_id: (required) - :type dataset_id: int - :param dataset_entity_id: (required) - :type dataset_entity_id: str - :param update_dataset_entity: (required) - :type update_dataset_entity: UpdateDatasetEntity - :param files: (required) - :type files: List[bytearray] - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - dataset_id=dataset_id, - dataset_entity_id=dataset_entity_id, - update_dataset_entity=update_dataset_entity, - files=files, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put_serialize( - self, - user_id, - user_type_id, - dataset_id, - dataset_entity_id, - update_dataset_entity, - files, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'files': 'csv', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - if dataset_id is not None: - _path_params['dataset_id'] = dataset_id - if dataset_entity_id is not None: - _path_params['dataset_entity_id'] = dataset_entity_id - # process the query parameters - # process the header parameters - # process the form parameters - if update_dataset_entity is not None: - _form_params.append(('update_dataset_entity', update_dataset_entity)) - if files is not None: - _files['files'] = files - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'multipart/form-data' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/datasets/datasetEntities/{user_id}/{user_type_id}/{dataset_id}/{dataset_entity_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/openapi_client/api/users_management_api.py b/openapi_client/api/users_management_api.py deleted file mode 100644 index 3a6f0d1..0000000 --- a/openapi_client/api/users_management_api.py +++ /dev/null @@ -1,2322 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBytes, StrictInt, StrictStr -from typing import Any, List, Tuple, Union -from openapi_client.models.forgot_password import ForgotPassword -from openapi_client.models.new_student import NewStudent -from openapi_client.models.reset_password import ResetPassword -from openapi_client.models.student_details import StudentDetails -from openapi_client.models.update_user import UpdateUser - -from openapi_client.api_client import ApiClient, RequestSerialized -from openapi_client.api_response import ApiResponse -from openapi_client.rest import RESTResponseType - - -class UsersManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def forgot_password_users_forgot_password_post( - self, - forgot_password: ForgotPassword, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Forgot Password - - - :param forgot_password: (required) - :type forgot_password: ForgotPassword - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._forgot_password_users_forgot_password_post_serialize( - forgot_password=forgot_password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def forgot_password_users_forgot_password_post_with_http_info( - self, - forgot_password: ForgotPassword, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Forgot Password - - - :param forgot_password: (required) - :type forgot_password: ForgotPassword - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._forgot_password_users_forgot_password_post_serialize( - forgot_password=forgot_password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def forgot_password_users_forgot_password_post_without_preload_content( - self, - forgot_password: ForgotPassword, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Forgot Password - - - :param forgot_password: (required) - :type forgot_password: ForgotPassword - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._forgot_password_users_forgot_password_post_serialize( - forgot_password=forgot_password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _forgot_password_users_forgot_password_post_serialize( - self, - forgot_password, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if forgot_password is not None: - _body_params = forgot_password - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/users/forgotPassword', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_profile_picture_users_profile_pic_user_id_user_type_id_get( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Get Profile Picture - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_profile_picture_users_profile_pic_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_profile_picture_users_profile_pic_user_id_user_type_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Get Profile Picture - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_profile_picture_users_profile_pic_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_profile_picture_users_profile_pic_user_id_user_type_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Profile Picture - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_profile_picture_users_profile_pic_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_profile_picture_users_profile_pic_user_id_user_type_id_get_serialize( - self, - user_id, - user_type_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/users/profilePic/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_user_locations_users_students_user_id_user_type_id_get( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[StudentDetails]: - """Get User Locations - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_locations_users_students_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[StudentDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_user_locations_users_students_user_id_user_type_id_get_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[StudentDetails]]: - """Get User Locations - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_locations_users_students_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[StudentDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_user_locations_users_students_user_id_user_type_id_get_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get User Locations - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_user_locations_users_students_user_id_user_type_id_get_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[StudentDetails]", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_user_locations_users_students_user_id_user_type_id_get_serialize( - self, - user_id, - user_type_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/users/students/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def new_student_users_students_user_id_user_type_id_post( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_student: NewStudent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """New Student - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_student: (required) - :type new_student: NewStudent - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_student_users_students_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_student=new_student, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def new_student_users_students_user_id_user_type_id_post_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_student: NewStudent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """New Student - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_student: (required) - :type new_student: NewStudent - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_student_users_students_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_student=new_student, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def new_student_users_students_user_id_user_type_id_post_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - new_student: NewStudent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """New Student - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param new_student: (required) - :type new_student: NewStudent - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._new_student_users_students_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - new_student=new_student, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _new_student_users_students_user_id_user_type_id_post_serialize( - self, - user_id, - user_type_id, - new_student, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if new_student is not None: - _body_params = new_student - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/users/students/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def reset_password_users_reset_password_post( - self, - reset_password: ResetPassword, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Reset Password - - - :param reset_password: (required) - :type reset_password: ResetPassword - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._reset_password_users_reset_password_post_serialize( - reset_password=reset_password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def reset_password_users_reset_password_post_with_http_info( - self, - reset_password: ResetPassword, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Reset Password - - - :param reset_password: (required) - :type reset_password: ResetPassword - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._reset_password_users_reset_password_post_serialize( - reset_password=reset_password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def reset_password_users_reset_password_post_without_preload_content( - self, - reset_password: ResetPassword, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Reset Password - - - :param reset_password: (required) - :type reset_password: ResetPassword - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._reset_password_users_reset_password_post_serialize( - reset_password=reset_password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _reset_password_users_reset_password_post_serialize( - self, - reset_password, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if reset_password is not None: - _body_params = reset_password - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/users/resetPassword', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def update_profile_picture_users_profile_pic_user_id_user_type_id_post( - self, - user_id: StrictInt, - user_type_id: StrictInt, - pic: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Update Profile Picture - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param pic: (required) - :type pic: bytearray - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_profile_picture_users_profile_pic_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - pic=pic, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def update_profile_picture_users_profile_pic_user_id_user_type_id_post_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - pic: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Update Profile Picture - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param pic: (required) - :type pic: bytearray - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_profile_picture_users_profile_pic_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - pic=pic, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def update_profile_picture_users_profile_pic_user_id_user_type_id_post_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - pic: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update Profile Picture - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param pic: (required) - :type pic: bytearray - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_profile_picture_users_profile_pic_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - pic=pic, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_profile_picture_users_profile_pic_user_id_user_type_id_post_serialize( - self, - user_id, - user_type_id, - pic, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - if pic is not None: - _files['pic'] = pic - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'multipart/form-data' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/users/profilePic/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def update_user_profile_users_user_id_user_type_id_put( - self, - user_id: StrictInt, - user_type_id: StrictInt, - update_user: UpdateUser, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Update User Profile - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param update_user: (required) - :type update_user: UpdateUser - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_user_profile_users_user_id_user_type_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - update_user=update_user, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def update_user_profile_users_user_id_user_type_id_put_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - update_user: UpdateUser, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Update User Profile - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param update_user: (required) - :type update_user: UpdateUser - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_user_profile_users_user_id_user_type_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - update_user=update_user, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def update_user_profile_users_user_id_user_type_id_put_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - update_user: UpdateUser, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update User Profile - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param update_user: (required) - :type update_user: UpdateUser - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_user_profile_users_user_id_user_type_id_put_serialize( - user_id=user_id, - user_type_id=user_type_id, - update_user=update_user, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_user_profile_users_user_id_user_type_id_put_serialize( - self, - user_id, - user_type_id, - update_user, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if update_user is not None: - _body_params = update_user - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/users/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def validate_user_sign_up_users_validate_user_id_user_type_id_post( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Validate User Sign Up - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._validate_user_sign_up_users_validate_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def validate_user_sign_up_users_validate_user_id_user_type_id_post_with_http_info( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Validate User Sign Up - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._validate_user_sign_up_users_validate_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def validate_user_sign_up_users_validate_user_id_user_type_id_post_without_preload_content( - self, - user_id: StrictInt, - user_type_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Validate User Sign Up - - - :param user_id: (required) - :type user_id: int - :param user_type_id: (required) - :type user_type_id: int - :param _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. - :type _request_timeout: int, tuple(int, int), optional - :param _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. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _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. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._validate_user_sign_up_users_validate_user_id_user_type_id_post_serialize( - user_id=user_id, - user_type_id=user_type_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _validate_user_sign_up_users_validate_user_id_user_type_id_post_serialize( - self, - user_id, - user_type_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id - if user_type_id is not None: - _path_params['user_type_id'] = user_type_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/users/validate/{user_id}/{user_type_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/openapi_client/models/__init__.py b/openapi_client/models/__init__.py deleted file mode 100644 index 87f2dee..0000000 --- a/openapi_client/models/__init__.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from openapi_client.models.dataset_details import DatasetDetails -from openapi_client.models.dataset_entity_details import DatasetEntityDetails -from openapi_client.models.delete_dataset_entities import DeleteDatasetEntities -from openapi_client.models.entity_file_details import EntityFileDetails -from openapi_client.models.forgot_password import ForgotPassword -from openapi_client.models.http_validation_error import HTTPValidationError -from openapi_client.models.location_details import LocationDetails -from openapi_client.models.new_dataset import NewDataset -from openapi_client.models.new_dataset_entity import NewDatasetEntity -from openapi_client.models.new_location import NewLocation -from openapi_client.models.new_session import NewSession -from openapi_client.models.new_student import NewStudent -from openapi_client.models.reset_password import ResetPassword -from openapi_client.models.student_details import StudentDetails -from openapi_client.models.update_dataset_entity import UpdateDatasetEntity -from openapi_client.models.update_location import UpdateLocation -from openapi_client.models.update_user import UpdateUser -from openapi_client.models.user_details import UserDetails -from openapi_client.models.validation_error import ValidationError -from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/openapi_client/models/dataset_entity_details.py b/openapi_client/models/dataset_entity_details.py deleted file mode 100644 index 3b69dfd..0000000 --- a/openapi_client/models/dataset_entity_details.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from openapi_client.models.entity_file_details import EntityFileDetails -from openapi_client.models.location_details import LocationDetails -from typing import Optional, Set -from typing_extensions import Self - -class DatasetEntityDetails(BaseModel): - """ - DatasetEntityDetails - """ # noqa: E501 - dataset_id: Optional[StrictInt] = Field(default=None, alias="datasetId") - user_id: Optional[StrictInt] = Field(default=None, alias="userId") - ds_entity_name: StrictStr = Field(alias="dsEntityName") - entity_source: Optional[StrictStr] = Field(alias="entitySource") - collected_on: datetime = Field(alias="collectedOn") - labeling_algo: StrictStr = Field(alias="labelingAlgo") - ds_entity_info: Dict[str, Any] = Field(alias="dsEntityInfo") - location_id: StrictInt = Field(alias="locationId") - ds_entity_id: StrictStr = Field(alias="dsEntityId") - ds_entity_status: StrictInt = Field(alias="dsEntityStatus") - entity_status_intrep: Optional[StrictStr] = Field(default=None, alias="entityStatusIntrep") - entity_verification_status: StrictInt = Field(alias="entityVerificationStatus") - verification_status_interp: Optional[StrictStr] = Field(default=None, alias="verificationStatusInterp") - created_on: datetime = Field(alias="createdOn") - modified_on: datetime = Field(alias="modifiedOn") - location_details: LocationDetails = Field(alias="locationDetails") - files: Optional[List[EntityFileDetails]] = None - __properties: ClassVar[List[str]] = ["datasetId", "userId", "dsEntityName", "entitySource", "collectedOn", "labelingAlgo", "dsEntityInfo", "locationId", "dsEntityId", "dsEntityStatus", "entityStatusIntrep", "entityVerificationStatus", "verificationStatusInterp", "createdOn", "modifiedOn", "locationDetails", "files"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DatasetEntityDetails from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of location_details - if self.location_details: - _dict['locationDetails'] = self.location_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in files (list) - _items = [] - if self.files: - for _item_files in self.files: - if _item_files: - _items.append(_item_files.to_dict()) - _dict['files'] = _items - # set to None if dataset_id (nullable) is None - # and model_fields_set contains the field - if self.dataset_id is None and "dataset_id" in self.model_fields_set: - _dict['datasetId'] = None - - # set to None if user_id (nullable) is None - # and model_fields_set contains the field - if self.user_id is None and "user_id" in self.model_fields_set: - _dict['userId'] = None - - # set to None if entity_source (nullable) is None - # and model_fields_set contains the field - if self.entity_source is None and "entity_source" in self.model_fields_set: - _dict['entitySource'] = None - - # set to None if entity_status_intrep (nullable) is None - # and model_fields_set contains the field - if self.entity_status_intrep is None and "entity_status_intrep" in self.model_fields_set: - _dict['entityStatusIntrep'] = None - - # set to None if verification_status_interp (nullable) is None - # and model_fields_set contains the field - if self.verification_status_interp is None and "verification_status_interp" in self.model_fields_set: - _dict['verificationStatusInterp'] = None - - # set to None if files (nullable) is None - # and model_fields_set contains the field - if self.files is None and "files" in self.model_fields_set: - _dict['files'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DatasetEntityDetails from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "datasetId": obj.get("datasetId"), - "userId": obj.get("userId"), - "dsEntityName": obj.get("dsEntityName"), - "entitySource": obj.get("entitySource"), - "collectedOn": obj.get("collectedOn"), - "labelingAlgo": obj.get("labelingAlgo"), - "dsEntityInfo": obj.get("dsEntityInfo"), - "locationId": obj.get("locationId"), - "dsEntityId": obj.get("dsEntityId"), - "dsEntityStatus": obj.get("dsEntityStatus"), - "entityStatusIntrep": obj.get("entityStatusIntrep"), - "entityVerificationStatus": obj.get("entityVerificationStatus"), - "verificationStatusInterp": obj.get("verificationStatusInterp"), - "createdOn": obj.get("createdOn"), - "modifiedOn": obj.get("modifiedOn"), - "locationDetails": LocationDetails.from_dict(obj["locationDetails"]) if obj.get("locationDetails") is not None else None, - "files": [EntityFileDetails.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None - }) - return _obj - - diff --git a/openapi_client/models/entity_file_details.py b/openapi_client/models/entity_file_details.py deleted file mode 100644 index 43c2f45..0000000 --- a/openapi_client/models/entity_file_details.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class EntityFileDetails(BaseModel): - """ - EntityFileDetails - """ # noqa: E501 - file_id: StrictStr = Field(alias="fileId") - file_name: StrictStr = Field(alias="fileName") - content_type: StrictStr = Field(alias="contentType") - thumbnail_file: StrictStr = Field(alias="thumbnailFile") - __properties: ClassVar[List[str]] = ["fileId", "fileName", "contentType", "thumbnailFile"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EntityFileDetails from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EntityFileDetails from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "fileId": obj.get("fileId"), - "fileName": obj.get("fileName"), - "contentType": obj.get("contentType"), - "thumbnailFile": obj.get("thumbnailFile") - }) - return _obj - - diff --git a/openapi_client/models/location_details.py b/openapi_client/models/location_details.py deleted file mode 100644 index b052361..0000000 --- a/openapi_client/models/location_details.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class LocationDetails(BaseModel): - """ - LocationDetails - """ # noqa: E501 - location_name: StrictStr = Field(alias="locationName") - user_id: Optional[StrictInt] = Field(default=None, alias="userId") - lat: Union[StrictFloat, StrictInt] - long: Union[StrictFloat, StrictInt] - details: Dict[str, Any] - location_id: StrictInt = Field(alias="locationId") - __properties: ClassVar[List[str]] = ["locationName", "userId", "lat", "long", "details", "locationId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of LocationDetails from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if user_id (nullable) is None - # and model_fields_set contains the field - if self.user_id is None and "user_id" in self.model_fields_set: - _dict['userId'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of LocationDetails from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "locationName": obj.get("locationName"), - "userId": obj.get("userId"), - "lat": obj.get("lat"), - "long": obj.get("long"), - "details": obj.get("details"), - "locationId": obj.get("locationId") - }) - return _obj - - diff --git a/openapi_client/models/new_dataset.py b/openapi_client/models/new_dataset.py deleted file mode 100644 index f3b06f6..0000000 --- a/openapi_client/models/new_dataset.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NewDataset(BaseModel): - """ - NewDataset - """ # noqa: E501 - user_id: Optional[StrictInt] = Field(default=0, alias="userId") - dataset_name: StrictStr = Field(alias="datasetName") - dataset_type: Optional[StrictInt] = Field(default=None, alias="datasetType") - dataset_short_info: Optional[StrictStr] = Field(default=None, alias="datasetShortInfo") - dataset_tags: Optional[StrictStr] = Field(default=None, alias="datasetTags") - __properties: ClassVar[List[str]] = ["userId", "datasetName", "datasetType", "datasetShortInfo", "datasetTags"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NewDataset from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if dataset_type (nullable) is None - # and model_fields_set contains the field - if self.dataset_type is None and "dataset_type" in self.model_fields_set: - _dict['datasetType'] = None - - # set to None if dataset_short_info (nullable) is None - # and model_fields_set contains the field - if self.dataset_short_info is None and "dataset_short_info" in self.model_fields_set: - _dict['datasetShortInfo'] = None - - # set to None if dataset_tags (nullable) is None - # and model_fields_set contains the field - if self.dataset_tags is None and "dataset_tags" in self.model_fields_set: - _dict['datasetTags'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NewDataset from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "userId": obj.get("userId") if obj.get("userId") is not None else 0, - "datasetName": obj.get("datasetName"), - "datasetType": obj.get("datasetType"), - "datasetShortInfo": obj.get("datasetShortInfo"), - "datasetTags": obj.get("datasetTags") - }) - return _obj - - diff --git a/openapi_client/models/new_location.py b/openapi_client/models/new_location.py deleted file mode 100644 index 0b46371..0000000 --- a/openapi_client/models/new_location.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class NewLocation(BaseModel): - """ - NewLocation - """ # noqa: E501 - location_name: StrictStr = Field(alias="locationName") - user_id: Optional[StrictInt] = Field(default=None, alias="userId") - lat: Union[StrictFloat, StrictInt] - long: Union[StrictFloat, StrictInt] - details: Dict[str, Any] - __properties: ClassVar[List[str]] = ["locationName", "userId", "lat", "long", "details"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NewLocation from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if user_id (nullable) is None - # and model_fields_set contains the field - if self.user_id is None and "user_id" in self.model_fields_set: - _dict['userId'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NewLocation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "locationName": obj.get("locationName"), - "userId": obj.get("userId"), - "lat": obj.get("lat"), - "long": obj.get("long"), - "details": obj.get("details") - }) - return _obj - - diff --git a/openapi_client/models/new_student.py b/openapi_client/models/new_student.py deleted file mode 100644 index 2753520..0000000 --- a/openapi_client/models/new_student.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NewStudent(BaseModel): - """ - NewStudent - """ # noqa: E501 - first_name: StrictStr = Field(alias="firstName") - middle_name: Optional[StrictStr] = Field(alias="middleName") - last_name: StrictStr = Field(alias="lastName") - email: StrictStr - __properties: ClassVar[List[str]] = ["firstName", "middleName", "lastName", "email"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NewStudent from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if middle_name (nullable) is None - # and model_fields_set contains the field - if self.middle_name is None and "middle_name" in self.model_fields_set: - _dict['middleName'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NewStudent from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "firstName": obj.get("firstName"), - "middleName": obj.get("middleName"), - "lastName": obj.get("lastName"), - "email": obj.get("email") - }) - return _obj - - diff --git a/openapi_client/models/update_dataset_entity.py b/openapi_client/models/update_dataset_entity.py deleted file mode 100644 index 0181ee6..0000000 --- a/openapi_client/models/update_dataset_entity.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateDatasetEntity(BaseModel): - """ - UpdateDatasetEntity - """ # noqa: E501 - ds_entity_name: Optional[StrictStr] = Field(default=None, alias="dsEntityName") - entity_source: Optional[StrictStr] = Field(default=None, alias="entitySource") - collected_on: Optional[datetime] = Field(default=None, alias="collectedOn") - labeling_algo: Optional[StrictStr] = Field(default=None, alias="labelingAlgo") - ds_entity_info: Optional[Dict[str, Any]] = Field(default=None, alias="dsEntityInfo") - location_id: Optional[StrictInt] = Field(default=None, alias="locationId") - remark: StrictStr - __properties: ClassVar[List[str]] = ["dsEntityName", "entitySource", "collectedOn", "labelingAlgo", "dsEntityInfo", "locationId", "remark"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateDatasetEntity from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if ds_entity_name (nullable) is None - # and model_fields_set contains the field - if self.ds_entity_name is None and "ds_entity_name" in self.model_fields_set: - _dict['dsEntityName'] = None - - # set to None if entity_source (nullable) is None - # and model_fields_set contains the field - if self.entity_source is None and "entity_source" in self.model_fields_set: - _dict['entitySource'] = None - - # set to None if collected_on (nullable) is None - # and model_fields_set contains the field - if self.collected_on is None and "collected_on" in self.model_fields_set: - _dict['collectedOn'] = None - - # set to None if labeling_algo (nullable) is None - # and model_fields_set contains the field - if self.labeling_algo is None and "labeling_algo" in self.model_fields_set: - _dict['labelingAlgo'] = None - - # set to None if ds_entity_info (nullable) is None - # and model_fields_set contains the field - if self.ds_entity_info is None and "ds_entity_info" in self.model_fields_set: - _dict['dsEntityInfo'] = None - - # set to None if location_id (nullable) is None - # and model_fields_set contains the field - if self.location_id is None and "location_id" in self.model_fields_set: - _dict['locationId'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateDatasetEntity from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dsEntityName": obj.get("dsEntityName"), - "entitySource": obj.get("entitySource"), - "collectedOn": obj.get("collectedOn"), - "labelingAlgo": obj.get("labelingAlgo"), - "dsEntityInfo": obj.get("dsEntityInfo"), - "locationId": obj.get("locationId"), - "remark": obj.get("remark") - }) - return _obj - - diff --git a/openapi_client/models/update_location.py b/openapi_client/models/update_location.py deleted file mode 100644 index 5b0fd14..0000000 --- a/openapi_client/models/update_location.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class UpdateLocation(BaseModel): - """ - UpdateLocation - """ # noqa: E501 - location_id: StrictInt = Field(alias="locationId") - lat: Optional[Union[StrictFloat, StrictInt]] = None - long: Optional[Union[StrictFloat, StrictInt]] = None - details: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = ["locationId", "lat", "long", "details"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateLocation from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if lat (nullable) is None - # and model_fields_set contains the field - if self.lat is None and "lat" in self.model_fields_set: - _dict['lat'] = None - - # set to None if long (nullable) is None - # and model_fields_set contains the field - if self.long is None and "long" in self.model_fields_set: - _dict['long'] = None - - # set to None if details (nullable) is None - # and model_fields_set contains the field - if self.details is None and "details" in self.model_fields_set: - _dict['details'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateLocation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "locationId": obj.get("locationId"), - "lat": obj.get("lat"), - "long": obj.get("long"), - "details": obj.get("details") - }) - return _obj - - diff --git a/openapi_client/models/update_user.py b/openapi_client/models/update_user.py deleted file mode 100644 index 6464fc3..0000000 --- a/openapi_client/models/update_user.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateUser(BaseModel): - """ - UpdateUser - """ # noqa: E501 - first_name: Optional[StrictStr] = Field(default=None, alias="firstName") - middle_name: Optional[StrictStr] = Field(default=None, alias="middleName") - last_name: Optional[StrictStr] = Field(default=None, alias="lastName") - passwd: Optional[StrictStr] = None - org_id: Optional[StrictInt] = Field(default=None, alias="orgId") - __properties: ClassVar[List[str]] = ["firstName", "middleName", "lastName", "passwd", "orgId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateUser from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if first_name (nullable) is None - # and model_fields_set contains the field - if self.first_name is None and "first_name" in self.model_fields_set: - _dict['firstName'] = None - - # set to None if middle_name (nullable) is None - # and model_fields_set contains the field - if self.middle_name is None and "middle_name" in self.model_fields_set: - _dict['middleName'] = None - - # set to None if last_name (nullable) is None - # and model_fields_set contains the field - if self.last_name is None and "last_name" in self.model_fields_set: - _dict['lastName'] = None - - # set to None if passwd (nullable) is None - # and model_fields_set contains the field - if self.passwd is None and "passwd" in self.model_fields_set: - _dict['passwd'] = None - - # set to None if org_id (nullable) is None - # and model_fields_set contains the field - if self.org_id is None and "org_id" in self.model_fields_set: - _dict['orgId'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateUser from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "firstName": obj.get("firstName"), - "middleName": obj.get("middleName"), - "lastName": obj.get("lastName"), - "passwd": obj.get("passwd"), - "orgId": obj.get("orgId") - }) - return _obj - - diff --git a/openapi_client/models/validation_error_loc_inner.py b/openapi_client/models/validation_error_loc_inner.py deleted file mode 100644 index 3908ab3..0000000 --- a/openapi_client/models/validation_error_loc_inner.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator -from typing import Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -VALIDATIONERRORLOCINNER_ANY_OF_SCHEMAS = ["int", "str"] - -class ValidationErrorLocInner(BaseModel): - """ - ValidationErrorLocInner - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: int - anyof_schema_2_validator: Optional[StrictInt] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[int, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "int", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = ValidationErrorLocInner.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: int - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into int - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into ValidationErrorLocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/test/test_dashboard_data_api.py b/test/test_dashboard_data_api.py deleted file mode 100644 index c0d3a3e..0000000 --- a/test/test_dashboard_data_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.api.dashboard_data_api import DashboardDataApi - - -class TestDashboardDataApi(unittest.TestCase): - """DashboardDataApi unit test stubs""" - - def setUp(self) -> None: - self.api = DashboardDataApi() - - def tearDown(self) -> None: - pass - - def test_get_dashboard_data_dashboard_user_id_user_type_id_get(self) -> None: - """Test case for get_dashboard_data_dashboard_user_id_user_type_id_get - - Get Dashboard Data - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_dataset_details.py b/test/test_dataset_details.py deleted file mode 100644 index 300a84a..0000000 --- a/test/test_dataset_details.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.dataset_details import DatasetDetails - -class TestDatasetDetails(unittest.TestCase): - """DatasetDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DatasetDetails: - """Test DatasetDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DatasetDetails` - """ - model = DatasetDetails() - if include_optional: - return DatasetDetails( - user_id = 56, - dataset_name = '', - dataset_type = 56, - dataset_short_info = '', - dataset_tags = '', - dataset_id = 56, - dataset_type_interp = '', - dataset_status = 56, - dataset_status_interp = '', - created_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modified_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return DatasetDetails( - dataset_name = '', - dataset_id = 56, - dataset_status = 56, - created_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modified_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testDatasetDetails(self): - """Test DatasetDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_dataset_entity_details.py b/test/test_dataset_entity_details.py deleted file mode 100644 index b6c5a2e..0000000 --- a/test/test_dataset_entity_details.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.dataset_entity_details import DatasetEntityDetails - -class TestDatasetEntityDetails(unittest.TestCase): - """DatasetEntityDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DatasetEntityDetails: - """Test DatasetEntityDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DatasetEntityDetails` - """ - model = DatasetEntityDetails() - if include_optional: - return DatasetEntityDetails( - dataset_id = 56, - user_id = 56, - ds_entity_name = '', - entity_source = '', - collected_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - labeling_algo = '', - ds_entity_info = openapi_client.models.dsentityinfo.Dsentityinfo(), - location_id = 56, - ds_entity_id = '', - ds_entity_status = 56, - entity_status_intrep = '', - entity_verification_status = 56, - verification_status_interp = '', - created_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modified_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - location_details = openapi_client.models.location_details.LocationDetails( - location_name = '', - user_id = 56, - lat = 1.337, - long = 1.337, - details = openapi_client.models.details.Details(), - location_id = 56, ), - files = [ - openapi_client.models.entity_file_details.EntityFileDetails( - file_id = '', - file_name = '', - content_type = '', - thumbnail_file = '', ) - ] - ) - else: - return DatasetEntityDetails( - ds_entity_name = '', - entity_source = '', - collected_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - labeling_algo = '', - ds_entity_info = openapi_client.models.dsentityinfo.Dsentityinfo(), - location_id = 56, - ds_entity_id = '', - ds_entity_status = 56, - entity_verification_status = 56, - created_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modified_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - location_details = openapi_client.models.location_details.LocationDetails( - location_name = '', - user_id = 56, - lat = 1.337, - long = 1.337, - details = openapi_client.models.details.Details(), - location_id = 56, ), - ) - """ - - def testDatasetEntityDetails(self): - """Test DatasetEntityDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_dataset_management_api.py b/test/test_dataset_management_api.py deleted file mode 100644 index 314db9c..0000000 --- a/test/test_dataset_management_api.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.api.dataset_management_api import DatasetManagementApi - - -class TestDatasetManagementApi(unittest.TestCase): - """DatasetManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = DatasetManagementApi() - - def tearDown(self) -> None: - pass - - def test_delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete(self) -> None: - """Test case for delete_dataset_entities_datasets_dataset_entities_user_id_user_type_id_delete - - Delete Dataset Entities - """ - pass - - def test_delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete(self) -> None: - """Test case for delete_entity_files_datasets_dataset_entities_files_user_id_user_type_id_delete - - Delete Entity Files - """ - pass - - def test_get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get(self) -> None: - """Test case for get_dataset_entities_datasets_dataset_entities_user_id_user_type_id_dataset_id_get - - Get Dataset Entities - """ - pass - - def test_get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get(self) -> None: - """Test case for get_dataset_item_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_get - - Get Dataset Item - """ - pass - - def test_get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get(self) -> None: - """Test case for get_entity_file_datasets_dataset_entities_files_user_id_user_type_id_dataset_id_file_id_get - - Get Entity File - """ - pass - - def test_get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get(self) -> None: - """Test case for get_thumbnail_datasets_dataset_entities_thumbnail_user_id_user_type_id_dataset_id_file_id_get - - Get Thumbnail - """ - pass - - def test_get_user_datasets_datasets_user_id_user_type_id_get(self) -> None: - """Test case for get_user_datasets_datasets_user_id_user_type_id_get - - Get User Datasets - """ - pass - - def test_new_dataset_datasets_user_id_user_type_id_post(self) -> None: - """Test case for new_dataset_datasets_user_id_user_type_id_post - - New Dataset - """ - pass - - def test_new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post(self) -> None: - """Test case for new_dataset_entity_datasets_dataset_entities_user_id_user_type_id_post - - New Dataset Entity - """ - pass - - def test_recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post(self) -> None: - """Test case for recover_dataset_entities_datasets_dataset_entities_recover_user_id_user_type_id_post - - Recover Dataset Entities - """ - pass - - def test_update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put(self) -> None: - """Test case for update_dataset_entity_datasets_dataset_entities_user_id_user_type_id_dataset_id_dataset_entity_id_put - - Update Dataset Entity - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_delete_dataset_entities.py b/test/test_delete_dataset_entities.py deleted file mode 100644 index de9d253..0000000 --- a/test/test_delete_dataset_entities.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.delete_dataset_entities import DeleteDatasetEntities - -class TestDeleteDatasetEntities(unittest.TestCase): - """DeleteDatasetEntities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeleteDatasetEntities: - """Test DeleteDatasetEntities - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DeleteDatasetEntities` - """ - model = DeleteDatasetEntities() - if include_optional: - return DeleteDatasetEntities( - dataset_entity_ids = [ - '' - ], - remark = '' - ) - else: - return DeleteDatasetEntities( - dataset_entity_ids = [ - '' - ], - remark = '', - ) - """ - - def testDeleteDatasetEntities(self): - """Test DeleteDatasetEntities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_entity_file_details.py b/test/test_entity_file_details.py deleted file mode 100644 index e79924b..0000000 --- a/test/test_entity_file_details.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.entity_file_details import EntityFileDetails - -class TestEntityFileDetails(unittest.TestCase): - """EntityFileDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EntityFileDetails: - """Test EntityFileDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EntityFileDetails` - """ - model = EntityFileDetails() - if include_optional: - return EntityFileDetails( - file_id = '', - file_name = '', - content_type = '', - thumbnail_file = '' - ) - else: - return EntityFileDetails( - file_id = '', - file_name = '', - content_type = '', - thumbnail_file = '', - ) - """ - - def testEntityFileDetails(self): - """Test EntityFileDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_forgot_password.py b/test/test_forgot_password.py deleted file mode 100644 index aca7a99..0000000 --- a/test/test_forgot_password.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.forgot_password import ForgotPassword - -class TestForgotPassword(unittest.TestCase): - """ForgotPassword unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ForgotPassword: - """Test ForgotPassword - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ForgotPassword` - """ - model = ForgotPassword() - if include_optional: - return ForgotPassword( - login_id = '' - ) - else: - return ForgotPassword( - login_id = '', - ) - """ - - def testForgotPassword(self): - """Test ForgotPassword""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_http_validation_error.py b/test/test_http_validation_error.py deleted file mode 100644 index d634230..0000000 --- a/test/test_http_validation_error.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.http_validation_error import HTTPValidationError - -class TestHTTPValidationError(unittest.TestCase): - """HTTPValidationError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HTTPValidationError: - """Test HTTPValidationError - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HTTPValidationError` - """ - model = HTTPValidationError() - if include_optional: - return HTTPValidationError( - detail = [ - openapi_client.models.validation_error.ValidationError( - loc = [ - null - ], - msg = '', - type = '', ) - ] - ) - else: - return HTTPValidationError( - ) - """ - - def testHTTPValidationError(self): - """Test HTTPValidationError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_location_details.py b/test/test_location_details.py deleted file mode 100644 index 986e216..0000000 --- a/test/test_location_details.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.location_details import LocationDetails - -class TestLocationDetails(unittest.TestCase): - """LocationDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LocationDetails: - """Test LocationDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LocationDetails` - """ - model = LocationDetails() - if include_optional: - return LocationDetails( - location_name = '', - user_id = 56, - lat = 1.337, - long = 1.337, - details = openapi_client.models.details.Details(), - location_id = 56 - ) - else: - return LocationDetails( - location_name = '', - lat = 1.337, - long = 1.337, - details = openapi_client.models.details.Details(), - location_id = 56, - ) - """ - - def testLocationDetails(self): - """Test LocationDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_location_management_api.py b/test/test_location_management_api.py deleted file mode 100644 index 9caffbb..0000000 --- a/test/test_location_management_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.api.location_management_api import LocationManagementApi - - -class TestLocationManagementApi(unittest.TestCase): - """LocationManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = LocationManagementApi() - - def tearDown(self) -> None: - pass - - def test_delete_location_locations_user_id_user_type_id_location_id_delete(self) -> None: - """Test case for delete_location_locations_user_id_user_type_id_location_id_delete - - Delete Location - """ - pass - - def test_get_user_locations_locations_user_id_user_type_id_get(self) -> None: - """Test case for get_user_locations_locations_user_id_user_type_id_get - - Get User Locations - """ - pass - - def test_new_location_locations_user_id_user_type_id_post(self) -> None: - """Test case for new_location_locations_user_id_user_type_id_post - - New Location - """ - pass - - def test_recover_location_locations_user_id_user_type_id_location_id_put(self) -> None: - """Test case for recover_location_locations_user_id_user_type_id_location_id_put - - Recover Location - """ - pass - - def test_update_location_locations_user_id_user_type_id_put(self) -> None: - """Test case for update_location_locations_user_id_user_type_id_put - - Update Location - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_new_dataset.py b/test/test_new_dataset.py deleted file mode 100644 index e0bba91..0000000 --- a/test/test_new_dataset.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.new_dataset import NewDataset - -class TestNewDataset(unittest.TestCase): - """NewDataset unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NewDataset: - """Test NewDataset - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NewDataset` - """ - model = NewDataset() - if include_optional: - return NewDataset( - user_id = 56, - dataset_name = '', - dataset_type = 56, - dataset_short_info = '', - dataset_tags = '' - ) - else: - return NewDataset( - dataset_name = '', - ) - """ - - def testNewDataset(self): - """Test NewDataset""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_new_dataset_entity.py b/test/test_new_dataset_entity.py deleted file mode 100644 index 982fa62..0000000 --- a/test/test_new_dataset_entity.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.new_dataset_entity import NewDatasetEntity - -class TestNewDatasetEntity(unittest.TestCase): - """NewDatasetEntity unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NewDatasetEntity: - """Test NewDatasetEntity - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NewDatasetEntity` - """ - model = NewDatasetEntity() - if include_optional: - return NewDatasetEntity( - dataset_id = 56, - user_id = 56, - ds_entity_name = '', - entity_source = '', - collected_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - labeling_algo = '', - ds_entity_info = openapi_client.models.dsentityinfo.Dsentityinfo(), - location_id = 56 - ) - else: - return NewDatasetEntity( - dataset_id = 56, - user_id = 56, - ds_entity_name = '', - collected_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ds_entity_info = openapi_client.models.dsentityinfo.Dsentityinfo(), - location_id = 56, - ) - """ - - def testNewDatasetEntity(self): - """Test NewDatasetEntity""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_new_location.py b/test/test_new_location.py deleted file mode 100644 index cd55e9e..0000000 --- a/test/test_new_location.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.new_location import NewLocation - -class TestNewLocation(unittest.TestCase): - """NewLocation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NewLocation: - """Test NewLocation - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NewLocation` - """ - model = NewLocation() - if include_optional: - return NewLocation( - location_name = '', - user_id = 56, - lat = 1.337, - long = 1.337, - details = openapi_client.models.details.Details() - ) - else: - return NewLocation( - location_name = '', - lat = 1.337, - long = 1.337, - details = openapi_client.models.details.Details(), - ) - """ - - def testNewLocation(self): - """Test NewLocation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_new_session.py b/test/test_new_session.py deleted file mode 100644 index 6f1e060..0000000 --- a/test/test_new_session.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.new_session import NewSession - -class TestNewSession(unittest.TestCase): - """NewSession unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NewSession: - """Test NewSession - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NewSession` - """ - model = NewSession() - if include_optional: - return NewSession( - login_id = '', - passwd = '', - ip_address = '127.0.0.1' - ) - else: - return NewSession( - login_id = '', - passwd = '', - ) - """ - - def testNewSession(self): - """Test NewSession""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_new_student.py b/test/test_new_student.py deleted file mode 100644 index 012aa8d..0000000 --- a/test/test_new_student.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.new_student import NewStudent - -class TestNewStudent(unittest.TestCase): - """NewStudent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NewStudent: - """Test NewStudent - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NewStudent` - """ - model = NewStudent() - if include_optional: - return NewStudent( - first_name = '', - middle_name = '', - last_name = '', - email = '' - ) - else: - return NewStudent( - first_name = '', - middle_name = '', - last_name = '', - email = '', - ) - """ - - def testNewStudent(self): - """Test NewStudent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_reset_password.py b/test/test_reset_password.py deleted file mode 100644 index dea4532..0000000 --- a/test/test_reset_password.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.reset_password import ResetPassword - -class TestResetPassword(unittest.TestCase): - """ResetPassword unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResetPassword: - """Test ResetPassword - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ResetPassword` - """ - model = ResetPassword() - if include_optional: - return ResetPassword( - login_id = '', - otp = '', - new_password = '' - ) - else: - return ResetPassword( - login_id = '', - otp = '', - new_password = '', - ) - """ - - def testResetPassword(self): - """Test ResetPassword""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_session_management_api.py b/test/test_session_management_api.py deleted file mode 100644 index a7e5334..0000000 --- a/test/test_session_management_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.api.session_management_api import SessionManagementApi - - -class TestSessionManagementApi(unittest.TestCase): - """SessionManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = SessionManagementApi() - - def tearDown(self) -> None: - pass - - def test_delete_session_session_logout_user_id_user_type_id_delete(self) -> None: - """Test case for delete_session_session_logout_user_id_user_type_id_delete - - Delete Session - """ - pass - - def test_new_session_session_login_post(self) -> None: - """Test case for new_session_session_login_post - - New Session - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_student_details.py b/test/test_student_details.py deleted file mode 100644 index 6bbe6cd..0000000 --- a/test/test_student_details.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.student_details import StudentDetails - -class TestStudentDetails(unittest.TestCase): - """StudentDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> StudentDetails: - """Test StudentDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `StudentDetails` - """ - model = StudentDetails() - if include_optional: - return StudentDetails( - student_id = 56, - student_name = '' - ) - else: - return StudentDetails( - student_id = 56, - student_name = '', - ) - """ - - def testStudentDetails(self): - """Test StudentDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update_dataset_entity.py b/test/test_update_dataset_entity.py deleted file mode 100644 index 4189546..0000000 --- a/test/test_update_dataset_entity.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.update_dataset_entity import UpdateDatasetEntity - -class TestUpdateDatasetEntity(unittest.TestCase): - """UpdateDatasetEntity unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateDatasetEntity: - """Test UpdateDatasetEntity - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateDatasetEntity` - """ - model = UpdateDatasetEntity() - if include_optional: - return UpdateDatasetEntity( - ds_entity_name = '', - entity_source = '', - collected_on = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - labeling_algo = '', - ds_entity_info = None, - location_id = 56, - remark = '' - ) - else: - return UpdateDatasetEntity( - remark = '', - ) - """ - - def testUpdateDatasetEntity(self): - """Test UpdateDatasetEntity""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update_location.py b/test/test_update_location.py deleted file mode 100644 index 65ad29c..0000000 --- a/test/test_update_location.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.update_location import UpdateLocation - -class TestUpdateLocation(unittest.TestCase): - """UpdateLocation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateLocation: - """Test UpdateLocation - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateLocation` - """ - model = UpdateLocation() - if include_optional: - return UpdateLocation( - location_id = 56, - lat = 1.337, - long = 1.337, - details = None - ) - else: - return UpdateLocation( - location_id = 56, - ) - """ - - def testUpdateLocation(self): - """Test UpdateLocation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update_user.py b/test/test_update_user.py deleted file mode 100644 index 7b14898..0000000 --- a/test/test_update_user.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.update_user import UpdateUser - -class TestUpdateUser(unittest.TestCase): - """UpdateUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateUser: - """Test UpdateUser - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateUser` - """ - model = UpdateUser() - if include_optional: - return UpdateUser( - first_name = '', - middle_name = '', - last_name = '', - passwd = '', - org_id = 56 - ) - else: - return UpdateUser( - ) - """ - - def testUpdateUser(self): - """Test UpdateUser""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_details.py b/test/test_user_details.py deleted file mode 100644 index 5f2ec93..0000000 --- a/test/test_user_details.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.user_details import UserDetails - -class TestUserDetails(unittest.TestCase): - """UserDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserDetails: - """Test UserDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserDetails` - """ - model = UserDetails() - if include_optional: - return UserDetails( - user_name = '', - first_name = '', - middle_name = '', - last_name = '', - email = '', - user_type_id = 56, - org_id = 56, - user_id = 56, - user_type = '', - org_name = '', - token = '', - token_expiry_at = '', - profile_pic = '' - ) - else: - return UserDetails( - user_name = '', - first_name = '', - middle_name = '', - last_name = '', - email = '', - user_type_id = 56, - org_id = 56, - user_id = 56, - ) - """ - - def testUserDetails(self): - """Test UserDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_users_management_api.py b/test/test_users_management_api.py deleted file mode 100644 index f060161..0000000 --- a/test/test_users_management_api.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.api.users_management_api import UsersManagementApi - - -class TestUsersManagementApi(unittest.TestCase): - """UsersManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = UsersManagementApi() - - def tearDown(self) -> None: - pass - - def test_forgot_password_users_forgot_password_post(self) -> None: - """Test case for forgot_password_users_forgot_password_post - - Forgot Password - """ - pass - - def test_get_profile_picture_users_profile_pic_user_id_user_type_id_get(self) -> None: - """Test case for get_profile_picture_users_profile_pic_user_id_user_type_id_get - - Get Profile Picture - """ - pass - - def test_get_user_locations_users_students_user_id_user_type_id_get(self) -> None: - """Test case for get_user_locations_users_students_user_id_user_type_id_get - - Get User Locations - """ - pass - - def test_new_student_users_students_user_id_user_type_id_post(self) -> None: - """Test case for new_student_users_students_user_id_user_type_id_post - - New Student - """ - pass - - def test_reset_password_users_reset_password_post(self) -> None: - """Test case for reset_password_users_reset_password_post - - Reset Password - """ - pass - - def test_update_profile_picture_users_profile_pic_user_id_user_type_id_post(self) -> None: - """Test case for update_profile_picture_users_profile_pic_user_id_user_type_id_post - - Update Profile Picture - """ - pass - - def test_update_user_profile_users_user_id_user_type_id_put(self) -> None: - """Test case for update_user_profile_users_user_id_user_type_id_put - - Update User Profile - """ - pass - - def test_validate_user_sign_up_users_validate_user_id_user_type_id_post(self) -> None: - """Test case for validate_user_sign_up_users_validate_user_id_user_type_id_post - - Validate User Sign Up - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_validation_error.py b/test/test_validation_error.py deleted file mode 100644 index b7f1fd7..0000000 --- a/test/test_validation_error.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.validation_error import ValidationError - -class TestValidationError(unittest.TestCase): - """ValidationError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationError: - """Test ValidationError - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidationError` - """ - model = ValidationError() - if include_optional: - return ValidationError( - loc = [ - null - ], - msg = '', - type = '' - ) - else: - return ValidationError( - loc = [ - null - ], - msg = '', - type = '', - ) - """ - - def testValidationError(self): - """Test ValidationError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_validation_error_loc_inner.py b/test/test_validation_error_loc_inner.py deleted file mode 100644 index 39ab25b..0000000 --- a/test/test_validation_error_loc_inner.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner - -class TestValidationErrorLocInner(unittest.TestCase): - """ValidationErrorLocInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationErrorLocInner: - """Test ValidationErrorLocInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidationErrorLocInner` - """ - model = ValidationErrorLocInner() - if include_optional: - return ValidationErrorLocInner( - ) - else: - return ValidationErrorLocInner( - ) - """ - - def testValidationErrorLocInner(self): - """Test ValidationErrorLocInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main()