# coding: utf-8

"""
    ICAT+ API

    ICAT+ RESTful API with Swagger

    The version of the OpenAPI document: 1.0.0
    Contact: demariaa@esrf.fr
    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 Field, StrictFloat, StrictInt, StrictStr, field_validator
from typing import List, Optional, Union
from typing_extensions import Annotated
from icat_plus_client.models.dataacquisition_api_key_base64_post_request import DataacquisitionApiKeyBase64PostRequest
from icat_plus_client.models.dataacquisition_api_key_dataset_restore_post_request import DataacquisitionApiKeyDatasetRestorePostRequest
from icat_plus_client.models.dataacquisition_api_key_mint_post200_response import DataacquisitionApiKeyMintPost200Response
from icat_plus_client.models.dataacquisition_api_key_mint_post_request import DataacquisitionApiKeyMintPostRequest
from icat_plus_client.models.dataset import Dataset
from icat_plus_client.models.datasetaccess import Datasetaccess
from icat_plus_client.models.event import Event
from icat_plus_client.models.investigation import Investigation
from icat_plus_client.models.modified_object import ModifiedObject

from icat_plus_client.api_client import ApiClient, RequestSerialized
from icat_plus_client.api_response import ApiResponse
from icat_plus_client.rest import RESTResponseType


class DataAcquisitionApi:
    """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 dataacquisition_api_key_base64_post(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataacquisition_api_key_base64_post_request: Annotated[DataacquisitionApiKeyBase64PostRequest, Field(description="Encoded image")],
        investigation_name: Annotated[Optional[StrictStr], Field(description="proposal's name")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="name of the instrument")] = 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,
    ) -> Event:
        """Uploads an image in base64 format to the investigation electronic logbook


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataacquisition_api_key_base64_post_request: Encoded image (required)
        :type dataacquisition_api_key_base64_post_request: DataacquisitionApiKeyBase64PostRequest
        :param investigation_name: proposal's name
        :type investigation_name: str
        :param instrument_name: name of the instrument
        :type instrument_name: 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._dataacquisition_api_key_base64_post_serialize(
            api_key=api_key,
            dataacquisition_api_key_base64_post_request=dataacquisition_api_key_base64_post_request,
            investigation_name=investigation_name,
            instrument_name=instrument_name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "str",
            '401': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_base64_post_with_http_info(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataacquisition_api_key_base64_post_request: Annotated[DataacquisitionApiKeyBase64PostRequest, Field(description="Encoded image")],
        investigation_name: Annotated[Optional[StrictStr], Field(description="proposal's name")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="name of the instrument")] = 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[Event]:
        """Uploads an image in base64 format to the investigation electronic logbook


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataacquisition_api_key_base64_post_request: Encoded image (required)
        :type dataacquisition_api_key_base64_post_request: DataacquisitionApiKeyBase64PostRequest
        :param investigation_name: proposal's name
        :type investigation_name: str
        :param instrument_name: name of the instrument
        :type instrument_name: 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._dataacquisition_api_key_base64_post_serialize(
            api_key=api_key,
            dataacquisition_api_key_base64_post_request=dataacquisition_api_key_base64_post_request,
            investigation_name=investigation_name,
            instrument_name=instrument_name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "str",
            '401': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_base64_post_without_preload_content(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataacquisition_api_key_base64_post_request: Annotated[DataacquisitionApiKeyBase64PostRequest, Field(description="Encoded image")],
        investigation_name: Annotated[Optional[StrictStr], Field(description="proposal's name")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="name of the instrument")] = 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:
        """Uploads an image in base64 format to the investigation electronic logbook


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataacquisition_api_key_base64_post_request: Encoded image (required)
        :type dataacquisition_api_key_base64_post_request: DataacquisitionApiKeyBase64PostRequest
        :param investigation_name: proposal's name
        :type investigation_name: str
        :param instrument_name: name of the instrument
        :type instrument_name: 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._dataacquisition_api_key_base64_post_serialize(
            api_key=api_key,
            dataacquisition_api_key_base64_post_request=dataacquisition_api_key_base64_post_request,
            investigation_name=investigation_name,
            instrument_name=instrument_name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "str",
            '401': "str",
            '403': "str",
            '500': "str",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _dataacquisition_api_key_base64_post_serialize(
        self,
        api_key,
        dataacquisition_api_key_base64_post_request,
        investigation_name,
        instrument_name,
        _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]] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if api_key is not None:
            _path_params['apiKey'] = api_key
        # process the query parameters
        if investigation_name is not None:
            
            _query_params.append(('investigationName', investigation_name))
            
        if instrument_name is not None:
            
            _query_params.append(('instrumentName', instrument_name))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if dataacquisition_api_key_base64_post_request is not None:
            _body_params = dataacquisition_api_key_base64_post_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json', 
                    'text/plain'
                ]
            )

        # 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='/dataacquisition/{apiKey}/base64',
            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 dataacquisition_api_key_dataset_get(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        investigation_id: Annotated[Optional[StrictStr], Field(description="Identifier of the investigation")] = None,
        limit: Annotated[Optional[StrictStr], Field(description="limit the number of entities retrieved")] = None,
        skip: Annotated[Optional[StrictStr], Field(description="the number of entities that will be skipped")] = None,
        search: Annotated[Optional[StrictStr], Field(description="text to be used for filtering the entities")] = None,
        sort_by: Annotated[Optional[StrictStr], Field(description="field to be sorted by")] = None,
        sort_order: Annotated[Optional[StrictStr], Field(description="order applied to the sorting (-1 or 1) (ascending or descending)")] = 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,
    ) -> List[Dataset]:
        """Gets datasets

        Gets datasets for a given investigationId

        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param investigation_id: Identifier of the investigation
        :type investigation_id: str
        :param limit: limit the number of entities retrieved
        :type limit: str
        :param skip: the number of entities that will be skipped
        :type skip: str
        :param search: text to be used for filtering the entities
        :type search: str
        :param sort_by: field to be sorted by
        :type sort_by: str
        :param sort_order: order applied to the sorting (-1 or 1) (ascending or descending)
        :type sort_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._dataacquisition_api_key_dataset_get_serialize(
            api_key=api_key,
            investigation_id=investigation_id,
            limit=limit,
            skip=skip,
            search=search,
            sort_by=sort_by,
            sort_order=sort_order,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Dataset]",
            '401': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_dataset_get_with_http_info(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        investigation_id: Annotated[Optional[StrictStr], Field(description="Identifier of the investigation")] = None,
        limit: Annotated[Optional[StrictStr], Field(description="limit the number of entities retrieved")] = None,
        skip: Annotated[Optional[StrictStr], Field(description="the number of entities that will be skipped")] = None,
        search: Annotated[Optional[StrictStr], Field(description="text to be used for filtering the entities")] = None,
        sort_by: Annotated[Optional[StrictStr], Field(description="field to be sorted by")] = None,
        sort_order: Annotated[Optional[StrictStr], Field(description="order applied to the sorting (-1 or 1) (ascending or descending)")] = 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[List[Dataset]]:
        """Gets datasets

        Gets datasets for a given investigationId

        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param investigation_id: Identifier of the investigation
        :type investigation_id: str
        :param limit: limit the number of entities retrieved
        :type limit: str
        :param skip: the number of entities that will be skipped
        :type skip: str
        :param search: text to be used for filtering the entities
        :type search: str
        :param sort_by: field to be sorted by
        :type sort_by: str
        :param sort_order: order applied to the sorting (-1 or 1) (ascending or descending)
        :type sort_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._dataacquisition_api_key_dataset_get_serialize(
            api_key=api_key,
            investigation_id=investigation_id,
            limit=limit,
            skip=skip,
            search=search,
            sort_by=sort_by,
            sort_order=sort_order,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Dataset]",
            '401': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_dataset_get_without_preload_content(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        investigation_id: Annotated[Optional[StrictStr], Field(description="Identifier of the investigation")] = None,
        limit: Annotated[Optional[StrictStr], Field(description="limit the number of entities retrieved")] = None,
        skip: Annotated[Optional[StrictStr], Field(description="the number of entities that will be skipped")] = None,
        search: Annotated[Optional[StrictStr], Field(description="text to be used for filtering the entities")] = None,
        sort_by: Annotated[Optional[StrictStr], Field(description="field to be sorted by")] = None,
        sort_order: Annotated[Optional[StrictStr], Field(description="order applied to the sorting (-1 or 1) (ascending or descending)")] = 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:
        """Gets datasets

        Gets datasets for a given investigationId

        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param investigation_id: Identifier of the investigation
        :type investigation_id: str
        :param limit: limit the number of entities retrieved
        :type limit: str
        :param skip: the number of entities that will be skipped
        :type skip: str
        :param search: text to be used for filtering the entities
        :type search: str
        :param sort_by: field to be sorted by
        :type sort_by: str
        :param sort_order: order applied to the sorting (-1 or 1) (ascending or descending)
        :type sort_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._dataacquisition_api_key_dataset_get_serialize(
            api_key=api_key,
            investigation_id=investigation_id,
            limit=limit,
            skip=skip,
            search=search,
            sort_by=sort_by,
            sort_order=sort_order,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Dataset]",
            '401': "str",
            '500': "str",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _dataacquisition_api_key_dataset_get_serialize(
        self,
        api_key,
        investigation_id,
        limit,
        skip,
        search,
        sort_by,
        sort_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]] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if api_key is not None:
            _path_params['apiKey'] = api_key
        # process the query parameters
        if investigation_id is not None:
            
            _query_params.append(('investigationId', investigation_id))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if skip is not None:
            
            _query_params.append(('skip', skip))
            
        if search is not None:
            
            _query_params.append(('search', search))
            
        if sort_by is not None:
            
            _query_params.append(('sortBy', sort_by))
            
        if sort_order is not None:
            
            _query_params.append(('sortOrder', sort_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', 
                    'text/plain'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/dataacquisition/{apiKey}/dataset',
            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 dataacquisition_api_key_dataset_restore_post(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataset_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="datasetId")] = None,
        dataacquisition_api_key_dataset_restore_post_request: Annotated[Optional[DataacquisitionApiKeyDatasetRestorePostRequest], Field(description="restoration status")] = 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,
    ) -> List[Datasetaccess]:
        """Update the restore status of a dataset access and send an email to the users who asked for the restoration


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataset_id: datasetId
        :type dataset_id: float
        :param dataacquisition_api_key_dataset_restore_post_request: restoration status
        :type dataacquisition_api_key_dataset_restore_post_request: DataacquisitionApiKeyDatasetRestorePostRequest
        :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._dataacquisition_api_key_dataset_restore_post_serialize(
            api_key=api_key,
            dataset_id=dataset_id,
            dataacquisition_api_key_dataset_restore_post_request=dataacquisition_api_key_dataset_restore_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Datasetaccess]",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_dataset_restore_post_with_http_info(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataset_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="datasetId")] = None,
        dataacquisition_api_key_dataset_restore_post_request: Annotated[Optional[DataacquisitionApiKeyDatasetRestorePostRequest], Field(description="restoration status")] = 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[List[Datasetaccess]]:
        """Update the restore status of a dataset access and send an email to the users who asked for the restoration


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataset_id: datasetId
        :type dataset_id: float
        :param dataacquisition_api_key_dataset_restore_post_request: restoration status
        :type dataacquisition_api_key_dataset_restore_post_request: DataacquisitionApiKeyDatasetRestorePostRequest
        :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._dataacquisition_api_key_dataset_restore_post_serialize(
            api_key=api_key,
            dataset_id=dataset_id,
            dataacquisition_api_key_dataset_restore_post_request=dataacquisition_api_key_dataset_restore_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Datasetaccess]",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_dataset_restore_post_without_preload_content(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataset_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="datasetId")] = None,
        dataacquisition_api_key_dataset_restore_post_request: Annotated[Optional[DataacquisitionApiKeyDatasetRestorePostRequest], Field(description="restoration status")] = 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:
        """Update the restore status of a dataset access and send an email to the users who asked for the restoration


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataset_id: datasetId
        :type dataset_id: float
        :param dataacquisition_api_key_dataset_restore_post_request: restoration status
        :type dataacquisition_api_key_dataset_restore_post_request: DataacquisitionApiKeyDatasetRestorePostRequest
        :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._dataacquisition_api_key_dataset_restore_post_serialize(
            api_key=api_key,
            dataset_id=dataset_id,
            dataacquisition_api_key_dataset_restore_post_request=dataacquisition_api_key_dataset_restore_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Datasetaccess]",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _dataacquisition_api_key_dataset_restore_post_serialize(
        self,
        api_key,
        dataset_id,
        dataacquisition_api_key_dataset_restore_post_request,
        _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]] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if api_key is not None:
            _path_params['apiKey'] = api_key
        # process the query parameters
        if dataset_id is not None:
            
            _query_params.append(('datasetId', dataset_id))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if dataacquisition_api_key_dataset_restore_post_request is not None:
            _body_params = dataacquisition_api_key_dataset_restore_post_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json', 
                    'text/plain'
                ]
            )

        # 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='/dataacquisition/{apiKey}/dataset/restore',
            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 dataacquisition_api_key_events_move_post(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        source_investigation_id: Annotated[Union[StrictFloat, StrictInt], Field(description="investigationId of the source event")],
        destination_investigation_id: Annotated[Union[StrictFloat, StrictInt], Field(description="investigationId of the destination event")],
        _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,
    ) -> ModifiedObject:
        """move the events from one investigation to another


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param source_investigation_id: investigationId of the source event (required)
        :type source_investigation_id: float
        :param destination_investigation_id: investigationId of the destination event (required)
        :type destination_investigation_id: float
        :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._dataacquisition_api_key_events_move_post_serialize(
            api_key=api_key,
            source_investigation_id=source_investigation_id,
            destination_investigation_id=destination_investigation_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ModifiedObject",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_events_move_post_with_http_info(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        source_investigation_id: Annotated[Union[StrictFloat, StrictInt], Field(description="investigationId of the source event")],
        destination_investigation_id: Annotated[Union[StrictFloat, StrictInt], Field(description="investigationId of the destination event")],
        _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[ModifiedObject]:
        """move the events from one investigation to another


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param source_investigation_id: investigationId of the source event (required)
        :type source_investigation_id: float
        :param destination_investigation_id: investigationId of the destination event (required)
        :type destination_investigation_id: float
        :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._dataacquisition_api_key_events_move_post_serialize(
            api_key=api_key,
            source_investigation_id=source_investigation_id,
            destination_investigation_id=destination_investigation_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ModifiedObject",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_events_move_post_without_preload_content(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        source_investigation_id: Annotated[Union[StrictFloat, StrictInt], Field(description="investigationId of the source event")],
        destination_investigation_id: Annotated[Union[StrictFloat, StrictInt], Field(description="investigationId of the destination event")],
        _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:
        """move the events from one investigation to another


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param source_investigation_id: investigationId of the source event (required)
        :type source_investigation_id: float
        :param destination_investigation_id: investigationId of the destination event (required)
        :type destination_investigation_id: float
        :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._dataacquisition_api_key_events_move_post_serialize(
            api_key=api_key,
            source_investigation_id=source_investigation_id,
            destination_investigation_id=destination_investigation_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ModifiedObject",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _dataacquisition_api_key_events_move_post_serialize(
        self,
        api_key,
        source_investigation_id,
        destination_investigation_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]] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if api_key is not None:
            _path_params['apiKey'] = api_key
        # process the query parameters
        if source_investigation_id is not None:
            
            _query_params.append(('sourceInvestigationId', source_investigation_id))
            
        if destination_investigation_id is not None:
            
            _query_params.append(('destinationInvestigationId', destination_investigation_id))
            
        # 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', 
                    'text/plain'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/dataacquisition/{apiKey}/events/move',
            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 dataacquisition_api_key_investigation_get(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        filter: Annotated[Optional[StrictStr], Field(description="Filters the investigations attached to an user")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="It filters the investigations by instrument name")] = None,
        start_date: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which startDate or endDate is after this startDate - not combined with ids")] = None,
        end_date: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which startDate is lower than this endDate - not combined with ids")] = None,
        limit: Annotated[Optional[StrictStr], Field(description="limit the number of entities retrieved")] = None,
        skip: Annotated[Optional[StrictStr], Field(description="the number of entities that will be skipped")] = None,
        search: Annotated[Optional[StrictStr], Field(description="text to be used for filtering the entities")] = None,
        sort_by: Annotated[Optional[StrictStr], Field(description="field to be sorted by")] = None,
        sort_order: Annotated[Optional[StrictStr], Field(description="order applied to the sorting (-1 or 1) (ascending or descending)")] = None,
        investigation_name: Annotated[Optional[StrictStr], Field(description="It is the name of the proposal or investigation")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="Comma separated investigation identifiers list")] = None,
        time: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which time is between startDate and endDate")] = 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,
    ) -> List[Investigation]:
        """Get investigations

        If ids, it returns the investigations corresponding to these ids. If filter is embargoed, it returns all investigations which are under embargoed, ie. with releaseDate is after today. If filter is released, it returns all investigations which are open, ie. with releaseDate is before today and with a DOI. If filter is instrumentscientist, it returns all investigations where user is instrumentScientitst. If filter is partipant, it returns all investigations where user has reading permissions. If no filter, it returns all user's investigations.  Instrument allows to filter investigations by instrument name.  StartDate and EndDate allows to filter investigations which occur during this period. 

        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param filter: Filters the investigations attached to an user
        :type filter: str
        :param instrument_name: It filters the investigations by instrument name
        :type instrument_name: str
        :param start_date: It filters the investigations for which startDate or endDate is after this startDate - not combined with ids
        :type start_date: str
        :param end_date: It filters the investigations for which startDate is lower than this endDate - not combined with ids
        :type end_date: str
        :param limit: limit the number of entities retrieved
        :type limit: str
        :param skip: the number of entities that will be skipped
        :type skip: str
        :param search: text to be used for filtering the entities
        :type search: str
        :param sort_by: field to be sorted by
        :type sort_by: str
        :param sort_order: order applied to the sorting (-1 or 1) (ascending or descending)
        :type sort_order: str
        :param investigation_name: It is the name of the proposal or investigation
        :type investigation_name: str
        :param ids: Comma separated investigation identifiers list
        :type ids: str
        :param time: It filters the investigations for which time is between startDate and endDate
        :type time: 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._dataacquisition_api_key_investigation_get_serialize(
            api_key=api_key,
            filter=filter,
            instrument_name=instrument_name,
            start_date=start_date,
            end_date=end_date,
            limit=limit,
            skip=skip,
            search=search,
            sort_by=sort_by,
            sort_order=sort_order,
            investigation_name=investigation_name,
            ids=ids,
            time=time,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Investigation]",
            '400': "str",
        }
        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 dataacquisition_api_key_investigation_get_with_http_info(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        filter: Annotated[Optional[StrictStr], Field(description="Filters the investigations attached to an user")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="It filters the investigations by instrument name")] = None,
        start_date: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which startDate or endDate is after this startDate - not combined with ids")] = None,
        end_date: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which startDate is lower than this endDate - not combined with ids")] = None,
        limit: Annotated[Optional[StrictStr], Field(description="limit the number of entities retrieved")] = None,
        skip: Annotated[Optional[StrictStr], Field(description="the number of entities that will be skipped")] = None,
        search: Annotated[Optional[StrictStr], Field(description="text to be used for filtering the entities")] = None,
        sort_by: Annotated[Optional[StrictStr], Field(description="field to be sorted by")] = None,
        sort_order: Annotated[Optional[StrictStr], Field(description="order applied to the sorting (-1 or 1) (ascending or descending)")] = None,
        investigation_name: Annotated[Optional[StrictStr], Field(description="It is the name of the proposal or investigation")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="Comma separated investigation identifiers list")] = None,
        time: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which time is between startDate and endDate")] = 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[List[Investigation]]:
        """Get investigations

        If ids, it returns the investigations corresponding to these ids. If filter is embargoed, it returns all investigations which are under embargoed, ie. with releaseDate is after today. If filter is released, it returns all investigations which are open, ie. with releaseDate is before today and with a DOI. If filter is instrumentscientist, it returns all investigations where user is instrumentScientitst. If filter is partipant, it returns all investigations where user has reading permissions. If no filter, it returns all user's investigations.  Instrument allows to filter investigations by instrument name.  StartDate and EndDate allows to filter investigations which occur during this period. 

        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param filter: Filters the investigations attached to an user
        :type filter: str
        :param instrument_name: It filters the investigations by instrument name
        :type instrument_name: str
        :param start_date: It filters the investigations for which startDate or endDate is after this startDate - not combined with ids
        :type start_date: str
        :param end_date: It filters the investigations for which startDate is lower than this endDate - not combined with ids
        :type end_date: str
        :param limit: limit the number of entities retrieved
        :type limit: str
        :param skip: the number of entities that will be skipped
        :type skip: str
        :param search: text to be used for filtering the entities
        :type search: str
        :param sort_by: field to be sorted by
        :type sort_by: str
        :param sort_order: order applied to the sorting (-1 or 1) (ascending or descending)
        :type sort_order: str
        :param investigation_name: It is the name of the proposal or investigation
        :type investigation_name: str
        :param ids: Comma separated investigation identifiers list
        :type ids: str
        :param time: It filters the investigations for which time is between startDate and endDate
        :type time: 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._dataacquisition_api_key_investigation_get_serialize(
            api_key=api_key,
            filter=filter,
            instrument_name=instrument_name,
            start_date=start_date,
            end_date=end_date,
            limit=limit,
            skip=skip,
            search=search,
            sort_by=sort_by,
            sort_order=sort_order,
            investigation_name=investigation_name,
            ids=ids,
            time=time,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Investigation]",
            '400': "str",
        }
        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 dataacquisition_api_key_investigation_get_without_preload_content(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        filter: Annotated[Optional[StrictStr], Field(description="Filters the investigations attached to an user")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="It filters the investigations by instrument name")] = None,
        start_date: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which startDate or endDate is after this startDate - not combined with ids")] = None,
        end_date: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which startDate is lower than this endDate - not combined with ids")] = None,
        limit: Annotated[Optional[StrictStr], Field(description="limit the number of entities retrieved")] = None,
        skip: Annotated[Optional[StrictStr], Field(description="the number of entities that will be skipped")] = None,
        search: Annotated[Optional[StrictStr], Field(description="text to be used for filtering the entities")] = None,
        sort_by: Annotated[Optional[StrictStr], Field(description="field to be sorted by")] = None,
        sort_order: Annotated[Optional[StrictStr], Field(description="order applied to the sorting (-1 or 1) (ascending or descending)")] = None,
        investigation_name: Annotated[Optional[StrictStr], Field(description="It is the name of the proposal or investigation")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="Comma separated investigation identifiers list")] = None,
        time: Annotated[Optional[StrictStr], Field(description="It filters the investigations for which time is between startDate and endDate")] = 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 investigations

        If ids, it returns the investigations corresponding to these ids. If filter is embargoed, it returns all investigations which are under embargoed, ie. with releaseDate is after today. If filter is released, it returns all investigations which are open, ie. with releaseDate is before today and with a DOI. If filter is instrumentscientist, it returns all investigations where user is instrumentScientitst. If filter is partipant, it returns all investigations where user has reading permissions. If no filter, it returns all user's investigations.  Instrument allows to filter investigations by instrument name.  StartDate and EndDate allows to filter investigations which occur during this period. 

        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param filter: Filters the investigations attached to an user
        :type filter: str
        :param instrument_name: It filters the investigations by instrument name
        :type instrument_name: str
        :param start_date: It filters the investigations for which startDate or endDate is after this startDate - not combined with ids
        :type start_date: str
        :param end_date: It filters the investigations for which startDate is lower than this endDate - not combined with ids
        :type end_date: str
        :param limit: limit the number of entities retrieved
        :type limit: str
        :param skip: the number of entities that will be skipped
        :type skip: str
        :param search: text to be used for filtering the entities
        :type search: str
        :param sort_by: field to be sorted by
        :type sort_by: str
        :param sort_order: order applied to the sorting (-1 or 1) (ascending or descending)
        :type sort_order: str
        :param investigation_name: It is the name of the proposal or investigation
        :type investigation_name: str
        :param ids: Comma separated investigation identifiers list
        :type ids: str
        :param time: It filters the investigations for which time is between startDate and endDate
        :type time: 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._dataacquisition_api_key_investigation_get_serialize(
            api_key=api_key,
            filter=filter,
            instrument_name=instrument_name,
            start_date=start_date,
            end_date=end_date,
            limit=limit,
            skip=skip,
            search=search,
            sort_by=sort_by,
            sort_order=sort_order,
            investigation_name=investigation_name,
            ids=ids,
            time=time,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Investigation]",
            '400': "str",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _dataacquisition_api_key_investigation_get_serialize(
        self,
        api_key,
        filter,
        instrument_name,
        start_date,
        end_date,
        limit,
        skip,
        search,
        sort_by,
        sort_order,
        investigation_name,
        ids,
        time,
        _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]] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if api_key is not None:
            _path_params['apiKey'] = api_key
        # process the query parameters
        if filter is not None:
            
            _query_params.append(('filter', filter))
            
        if instrument_name is not None:
            
            _query_params.append(('instrumentName', instrument_name))
            
        if start_date is not None:
            
            _query_params.append(('startDate', start_date))
            
        if end_date is not None:
            
            _query_params.append(('endDate', end_date))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if skip is not None:
            
            _query_params.append(('skip', skip))
            
        if search is not None:
            
            _query_params.append(('search', search))
            
        if sort_by is not None:
            
            _query_params.append(('sortBy', sort_by))
            
        if sort_order is not None:
            
            _query_params.append(('sortOrder', sort_order))
            
        if investigation_name is not None:
            
            _query_params.append(('investigationName', investigation_name))
            
        if ids is not None:
            
            _query_params.append(('ids', ids))
            
        if time is not None:
            
            _query_params.append(('time', time))
            
        # 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', 
                    'text/plain'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/dataacquisition/{apiKey}/investigation',
            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 dataacquisition_api_key_mint_post(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataacquisition_api_key_mint_post_request: Annotated[DataacquisitionApiKeyMintPostRequest, Field(description="DOi information")],
        _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,
    ) -> DataacquisitionApiKeyMintPost200Response:
        """It mints a DOI


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataacquisition_api_key_mint_post_request: DOi information (required)
        :type dataacquisition_api_key_mint_post_request: DataacquisitionApiKeyMintPostRequest
        :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._dataacquisition_api_key_mint_post_serialize(
            api_key=api_key,
            dataacquisition_api_key_mint_post_request=dataacquisition_api_key_mint_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DataacquisitionApiKeyMintPost200Response",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_mint_post_with_http_info(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataacquisition_api_key_mint_post_request: Annotated[DataacquisitionApiKeyMintPostRequest, Field(description="DOi information")],
        _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[DataacquisitionApiKeyMintPost200Response]:
        """It mints a DOI


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataacquisition_api_key_mint_post_request: DOi information (required)
        :type dataacquisition_api_key_mint_post_request: DataacquisitionApiKeyMintPostRequest
        :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._dataacquisition_api_key_mint_post_serialize(
            api_key=api_key,
            dataacquisition_api_key_mint_post_request=dataacquisition_api_key_mint_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DataacquisitionApiKeyMintPost200Response",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_mint_post_without_preload_content(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        dataacquisition_api_key_mint_post_request: Annotated[DataacquisitionApiKeyMintPostRequest, Field(description="DOi information")],
        _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:
        """It mints a DOI


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param dataacquisition_api_key_mint_post_request: DOi information (required)
        :type dataacquisition_api_key_mint_post_request: DataacquisitionApiKeyMintPostRequest
        :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._dataacquisition_api_key_mint_post_serialize(
            api_key=api_key,
            dataacquisition_api_key_mint_post_request=dataacquisition_api_key_mint_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DataacquisitionApiKeyMintPost200Response",
            '400': "str",
            '403': "str",
            '500': "str",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _dataacquisition_api_key_mint_post_serialize(
        self,
        api_key,
        dataacquisition_api_key_mint_post_request,
        _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]] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if api_key is not None:
            _path_params['apiKey'] = api_key
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if dataacquisition_api_key_mint_post_request is not None:
            _body_params = dataacquisition_api_key_mint_post_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json', 
                    'text/plain'
                ]
            )

        # 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='/dataacquisition/{apiKey}/mint',
            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 dataacquisition_api_key_notification_post(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        investigation_id: Annotated[Optional[StrictStr], Field(description="Metadata catalogue investigation identifier")] = None,
        investigation_name: Annotated[Optional[StrictStr], Field(description="the name of the investigation")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="the name of the instrument or instrument (comma separated)")] = None,
        event: Annotated[Optional[Event], Field(description="New event to create")] = 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,
    ) -> Event:
        """Adds an event to the logbook (for an investigation or beamline logbook). It could also be a machine event


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param investigation_id: Metadata catalogue investigation identifier
        :type investigation_id: str
        :param investigation_name: the name of the investigation
        :type investigation_name: str
        :param instrument_name: the name of the instrument or instrument (comma separated)
        :type instrument_name: str
        :param event: New event to create
        :type event: Event
        :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._dataacquisition_api_key_notification_post_serialize(
            api_key=api_key,
            investigation_id=investigation_id,
            investigation_name=investigation_name,
            instrument_name=instrument_name,
            event=event,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "str",
            '401': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_notification_post_with_http_info(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        investigation_id: Annotated[Optional[StrictStr], Field(description="Metadata catalogue investigation identifier")] = None,
        investigation_name: Annotated[Optional[StrictStr], Field(description="the name of the investigation")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="the name of the instrument or instrument (comma separated)")] = None,
        event: Annotated[Optional[Event], Field(description="New event to create")] = 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[Event]:
        """Adds an event to the logbook (for an investigation or beamline logbook). It could also be a machine event


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param investigation_id: Metadata catalogue investigation identifier
        :type investigation_id: str
        :param investigation_name: the name of the investigation
        :type investigation_name: str
        :param instrument_name: the name of the instrument or instrument (comma separated)
        :type instrument_name: str
        :param event: New event to create
        :type event: Event
        :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._dataacquisition_api_key_notification_post_serialize(
            api_key=api_key,
            investigation_id=investigation_id,
            investigation_name=investigation_name,
            instrument_name=instrument_name,
            event=event,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "str",
            '401': "str",
            '403': "str",
            '500': "str",
        }
        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 dataacquisition_api_key_notification_post_without_preload_content(
        self,
        api_key: Annotated[StrictStr, Field(description="API key is a simple encrypted string that identifies an application without any principal.")],
        investigation_id: Annotated[Optional[StrictStr], Field(description="Metadata catalogue investigation identifier")] = None,
        investigation_name: Annotated[Optional[StrictStr], Field(description="the name of the investigation")] = None,
        instrument_name: Annotated[Optional[StrictStr], Field(description="the name of the instrument or instrument (comma separated)")] = None,
        event: Annotated[Optional[Event], Field(description="New event to create")] = 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:
        """Adds an event to the logbook (for an investigation or beamline logbook). It could also be a machine event


        :param api_key: API key is a simple encrypted string that identifies an application without any principal. (required)
        :type api_key: str
        :param investigation_id: Metadata catalogue investigation identifier
        :type investigation_id: str
        :param investigation_name: the name of the investigation
        :type investigation_name: str
        :param instrument_name: the name of the instrument or instrument (comma separated)
        :type instrument_name: str
        :param event: New event to create
        :type event: Event
        :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._dataacquisition_api_key_notification_post_serialize(
            api_key=api_key,
            investigation_id=investigation_id,
            investigation_name=investigation_name,
            instrument_name=instrument_name,
            event=event,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "str",
            '401': "str",
            '403': "str",
            '500': "str",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _dataacquisition_api_key_notification_post_serialize(
        self,
        api_key,
        investigation_id,
        investigation_name,
        instrument_name,
        event,
        _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]] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if api_key is not None:
            _path_params['apiKey'] = api_key
        # process the query parameters
        if investigation_id is not None:
            
            _query_params.append(('investigationId', investigation_id))
            
        if investigation_name is not None:
            
            _query_params.append(('investigationName', investigation_name))
            
        if instrument_name is not None:
            
            _query_params.append(('instrumentName', instrument_name))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if event is not None:
            _body_params = event


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json', 
                    'text/plain'
                ]
            )

        # 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='/dataacquisition/{apiKey}/notification',
            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
        )


