# coding: utf-8

"""
    OpenSilex API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: INSTANCE-SNAPSHOT
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from opensilexClientToolsPython.api_client import ApiClient


class DevicesApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def count_device_data(self, uri, **kwargs):  # noqa: E501
        """Count device data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.count_device_data(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiment uris
        :param list[str] variable: Search by variables
        :param float min_confidence: Search by minimal confidence index
        :param float max_confidence: Search by maximal confidence index
        :param list[str] provenance: Search by provenance uri
        :param str metadata: Search by metadata
        :param str accept_language: Request accepted language
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.count_device_data_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.count_device_data_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def count_device_data_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Count device data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.count_device_data_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiment uris
        :param list[str] variable: Search by variables
        :param float min_confidence: Search by minimal confidence index
        :param float max_confidence: Search by maximal confidence index
        :param list[str] provenance: Search by provenance uri
        :param str metadata: Search by metadata
        :param str accept_language: Request accepted language
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', 'start_date', 'end_date', 'timezone', 'experiment', 'variable', 'min_confidence', 'max_confidence', 'provenance', 'metadata', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method count_device_data" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `count_device_data`")  # noqa: E501

        if 'min_confidence' in params and params['min_confidence'] > 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `min_confidence` when calling `count_device_data`, must be a value less than or equal to `1`")  # noqa: E501
        if 'min_confidence' in params and params['min_confidence'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `min_confidence` when calling `count_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'max_confidence' in params and params['max_confidence'] > 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `max_confidence` when calling `count_device_data`, must be a value less than or equal to `1`")  # noqa: E501
        if 'max_confidence' in params and params['max_confidence'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `max_confidence` when calling `count_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []
        if 'start_date' in params:
            query_params.append(('start_date', params['start_date']))  # noqa: E501
        if 'end_date' in params:
            query_params.append(('end_date', params['end_date']))  # noqa: E501
        if 'timezone' in params:
            query_params.append(('timezone', params['timezone']))  # noqa: E501
        if 'experiment' in params:
            query_params.append(('experiment', params['experiment']))  # noqa: E501
            collection_formats['experiment'] = 'multi'  # noqa: E501
        if 'variable' in params:
            query_params.append(('variable', params['variable']))  # noqa: E501
            collection_formats['variable'] = 'multi'  # noqa: E501
        if 'min_confidence' in params:
            query_params.append(('min_confidence', params['min_confidence']))  # noqa: E501
        if 'max_confidence' in params:
            query_params.append(('max_confidence', params['max_confidence']))  # noqa: E501
        if 'provenance' in params:
            query_params.append(('provenance', params['provenance']))  # noqa: E501
            collection_formats['provenance'] = 'multi'  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/data/count', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_device(self, **kwargs):  # noqa: E501
        """Create a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_device(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param DeviceCreationDTO body: Device description
        :param bool check_only: Checking only
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_device_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_device_with_http_info(**kwargs)  # noqa: E501
            return data

    def create_device_with_http_info(self, **kwargs):  # noqa: E501
        """Create a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_device_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param DeviceCreationDTO body: Device description
        :param bool check_only: Checking only
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'check_only', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_device" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'check_only' in params:
            query_params.append(('checkOnly', params['check_only']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectUriResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_device(self, uri, **kwargs):  # noqa: E501
        """Delete a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_device(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_device_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_device_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def delete_device_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Delete a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_device_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_device" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `delete_device`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectUriResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def export_devices(self, **kwargs):  # noqa: E501
        """export devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_devices(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param str rdf_type: RDF type filter
        :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types
        :param str name: Regex pattern for filtering by name
        :param int year: Search by year
        :param date existence_date: Date to filter device existence
        :param str brand: Regex pattern for filtering by brand
        :param str model: Regex pattern for filtering by model
        :param str serial_number: Regex pattern for filtering by serial number
        :param str metadata: Search by metadata
        :param str accept_language: Request accepted language
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.export_devices_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.export_devices_with_http_info(**kwargs)  # noqa: E501
            return data

    def export_devices_with_http_info(self, **kwargs):  # noqa: E501
        """export devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_devices_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param str rdf_type: RDF type filter
        :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types
        :param str name: Regex pattern for filtering by name
        :param int year: Search by year
        :param date existence_date: Date to filter device existence
        :param str brand: Regex pattern for filtering by brand
        :param str model: Regex pattern for filtering by model
        :param str serial_number: Regex pattern for filtering by serial number
        :param str metadata: Search by metadata
        :param str accept_language: Request accepted language
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['rdf_type', 'include_subtypes', 'name', 'year', 'existence_date', 'brand', 'model', 'serial_number', 'metadata', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method export_devices" % key
                )
            params[key] = val
        del params['kwargs']

        if 'year' in params and params['year'] > 10000:  # noqa: E501
            raise ValueError("Invalid value for parameter `year` when calling `export_devices`, must be a value less than or equal to `10000`")  # noqa: E501
        if 'year' in params and params['year'] < 999:  # noqa: E501
            raise ValueError("Invalid value for parameter `year` when calling `export_devices`, must be a value greater than or equal to `999`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'rdf_type' in params:
            query_params.append(('rdf_type', params['rdf_type']))  # noqa: E501
        if 'include_subtypes' in params:
            query_params.append(('include_subtypes', params['include_subtypes']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'year' in params:
            query_params.append(('year', params['year']))  # noqa: E501
        if 'existence_date' in params:
            query_params.append(('existence_date', params['existence_date']))  # noqa: E501
        if 'brand' in params:
            query_params.append(('brand', params['brand']))  # noqa: E501
        if 'model' in params:
            query_params.append(('model', params['model']))  # noqa: E501
        if 'serial_number' in params:
            query_params.append(('serial_number', params['serial_number']))  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['text/plain'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/export', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def export_list(self, **kwargs):  # noqa: E501
        """export devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_list(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param URIsListPostDTO body: List of device URI
        :param str accept_language: Request accepted language
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.export_list_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.export_list_with_http_info(**kwargs)  # noqa: E501
            return data

    def export_list_with_http_info(self, **kwargs):  # noqa: E501
        """export devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_list_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param URIsListPostDTO body: List of device URI
        :param str accept_language: Request accepted language
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method export_list" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['text/plain'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/export_by_uris', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device(self, uri, **kwargs):  # noqa: E501
        """Get device detail  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: DeviceGetDetailsDTO
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def get_device_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Get device detail  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: DeviceGetDetailsDTO
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `get_device`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeviceGetDetailsDTO',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device_by_uris(self, uris, **kwargs):  # noqa: E501
        """Get devices by uris  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_by_uris(uris, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] uris: Device URIs (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[DeviceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_by_uris_with_http_info(uris, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_by_uris_with_http_info(uris, **kwargs)  # noqa: E501
            return data

    def get_device_by_uris_with_http_info(self, uris, **kwargs):  # noqa: E501
        """Get devices by uris  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_by_uris_with_http_info(uris, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] uris: Device URIs (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[DeviceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uris', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device_by_uris" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uris' is set
        if ('uris' not in params or
                params['uris'] is None):
            raise ValueError("Missing the required parameter `uris` when calling `get_device_by_uris`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'uris' in params:
            query_params.append(('uris', params['uris']))  # noqa: E501
            collection_formats['uris'] = 'multi'  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/by_uris', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DeviceGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device_data_files_provenances(self, uri, **kwargs):  # noqa: E501
        """Get provenances of datafiles linked to this device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_data_files_provenances(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[ProvenanceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_data_files_provenances_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_data_files_provenances_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def get_device_data_files_provenances_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Get provenances of datafiles linked to this device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_data_files_provenances_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[ProvenanceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device_data_files_provenances" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `get_device_data_files_provenances`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/datafiles/provenances', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ProvenanceGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device_data_provenances(self, uri, **kwargs):  # noqa: E501
        """Get provenances of data that have been measured on this device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_data_provenances(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[ProvenanceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_data_provenances_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_data_provenances_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def get_device_data_provenances_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Get provenances of data that have been measured on this device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_data_provenances_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[ProvenanceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device_data_provenances" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `get_device_data_provenances`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/data/provenances', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ProvenanceGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device_variables(self, uri, **kwargs):  # noqa: E501
        """Get variables linked to the device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_variables(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[NamedResourceDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_variables_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_variables_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def get_device_variables_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Get variables linked to the device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_variables_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[NamedResourceDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device_variables" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `get_device_variables`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/variables', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[NamedResourceDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def search_device_data(self, uri, **kwargs):  # noqa: E501
        """Search device data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_device_data(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiment uris
        :param list[str] variable: Search by variables
        :param float min_confidence: Search by minimal confidence index
        :param float max_confidence: Search by maximal confidence index
        :param list[str] provenance: Search by provenance uri
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DataGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_device_data_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.search_device_data_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def search_device_data_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Search device data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_device_data_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiment uris
        :param list[str] variable: Search by variables
        :param float min_confidence: Search by minimal confidence index
        :param float max_confidence: Search by maximal confidence index
        :param list[str] provenance: Search by provenance uri
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DataGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', 'start_date', 'end_date', 'timezone', 'experiment', 'variable', 'min_confidence', 'max_confidence', 'provenance', 'metadata', 'order_by', 'page', 'page_size', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_device_data" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `search_device_data`")  # noqa: E501

        if 'min_confidence' in params and params['min_confidence'] > 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `min_confidence` when calling `search_device_data`, must be a value less than or equal to `1`")  # noqa: E501
        if 'min_confidence' in params and params['min_confidence'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `min_confidence` when calling `search_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'max_confidence' in params and params['max_confidence'] > 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `max_confidence` when calling `search_device_data`, must be a value less than or equal to `1`")  # noqa: E501
        if 'max_confidence' in params and params['max_confidence'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `max_confidence` when calling `search_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'page' in params and params['page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `search_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'page_size' in params and params['page_size'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page_size` when calling `search_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []
        if 'start_date' in params:
            query_params.append(('start_date', params['start_date']))  # noqa: E501
        if 'end_date' in params:
            query_params.append(('end_date', params['end_date']))  # noqa: E501
        if 'timezone' in params:
            query_params.append(('timezone', params['timezone']))  # noqa: E501
        if 'experiment' in params:
            query_params.append(('experiment', params['experiment']))  # noqa: E501
            collection_formats['experiment'] = 'multi'  # noqa: E501
        if 'variable' in params:
            query_params.append(('variable', params['variable']))  # noqa: E501
            collection_formats['variable'] = 'multi'  # noqa: E501
        if 'min_confidence' in params:
            query_params.append(('min_confidence', params['min_confidence']))  # noqa: E501
        if 'max_confidence' in params:
            query_params.append(('max_confidence', params['max_confidence']))  # noqa: E501
        if 'provenance' in params:
            query_params.append(('provenance', params['provenance']))  # noqa: E501
            collection_formats['provenance'] = 'multi'  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('order_by', params['order_by']))  # noqa: E501
            collection_formats['order_by'] = 'multi'  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/data', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DataGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def search_device_datafiles(self, uri, **kwargs):  # noqa: E501
        """Search device datafiles descriptions  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_device_datafiles(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str rdf_type: Search by rdf type uri
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiments
        :param list[str] scientific_objects: Search by object uris list
        :param list[str] provenances: Search by provenance uris list
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DataGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_device_datafiles_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.search_device_datafiles_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def search_device_datafiles_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Search device datafiles descriptions  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_device_datafiles_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str rdf_type: Search by rdf type uri
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiments
        :param list[str] scientific_objects: Search by object uris list
        :param list[str] provenances: Search by provenance uris list
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DataGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', 'rdf_type', 'start_date', 'end_date', 'timezone', 'experiment', 'scientific_objects', 'provenances', 'metadata', 'order_by', 'page', 'page_size', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_device_datafiles" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `search_device_datafiles`")  # noqa: E501

        if 'page' in params and params['page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `search_device_datafiles`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'page_size' in params and params['page_size'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page_size` when calling `search_device_datafiles`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []
        if 'rdf_type' in params:
            query_params.append(('rdf_type', params['rdf_type']))  # noqa: E501
        if 'start_date' in params:
            query_params.append(('start_date', params['start_date']))  # noqa: E501
        if 'end_date' in params:
            query_params.append(('end_date', params['end_date']))  # noqa: E501
        if 'timezone' in params:
            query_params.append(('timezone', params['timezone']))  # noqa: E501
        if 'experiment' in params:
            query_params.append(('experiment', params['experiment']))  # noqa: E501
            collection_formats['experiment'] = 'multi'  # noqa: E501
        if 'scientific_objects' in params:
            query_params.append(('scientific_objects', params['scientific_objects']))  # noqa: E501
            collection_formats['scientific_objects'] = 'multi'  # noqa: E501
        if 'provenances' in params:
            query_params.append(('provenances', params['provenances']))  # noqa: E501
            collection_formats['provenances'] = 'multi'  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('order_by', params['order_by']))  # noqa: E501
            collection_formats['order_by'] = 'multi'  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/datafiles', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DataGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def search_devices(self, **kwargs):  # noqa: E501
        """Search devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_devices(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param str rdf_type: RDF type filter
        :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types
        :param str name: Regex pattern for filtering by name
        :param int year: Search by year
        :param date existence_date: Date to filter device existence
        :param str brand: Regex pattern for filtering by brand
        :param str model: Regex pattern for filtering by model
        :param str serial_number: Regex pattern for filtering by serial number
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DeviceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_devices_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.search_devices_with_http_info(**kwargs)  # noqa: E501
            return data

    def search_devices_with_http_info(self, **kwargs):  # noqa: E501
        """Search devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_devices_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param str rdf_type: RDF type filter
        :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types
        :param str name: Regex pattern for filtering by name
        :param int year: Search by year
        :param date existence_date: Date to filter device existence
        :param str brand: Regex pattern for filtering by brand
        :param str model: Regex pattern for filtering by model
        :param str serial_number: Regex pattern for filtering by serial number
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DeviceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['rdf_type', 'include_subtypes', 'name', 'year', 'existence_date', 'brand', 'model', 'serial_number', 'metadata', 'order_by', 'page', 'page_size', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_devices" % key
                )
            params[key] = val
        del params['kwargs']

        if 'year' in params and params['year'] > 10000:  # noqa: E501
            raise ValueError("Invalid value for parameter `year` when calling `search_devices`, must be a value less than or equal to `10000`")  # noqa: E501
        if 'year' in params and params['year'] < 999:  # noqa: E501
            raise ValueError("Invalid value for parameter `year` when calling `search_devices`, must be a value greater than or equal to `999`")  # noqa: E501
        if 'page' in params and params['page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `search_devices`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'page_size' in params and params['page_size'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page_size` when calling `search_devices`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'rdf_type' in params:
            query_params.append(('rdf_type', params['rdf_type']))  # noqa: E501
        if 'include_subtypes' in params:
            query_params.append(('include_subtypes', params['include_subtypes']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'year' in params:
            query_params.append(('year', params['year']))  # noqa: E501
        if 'existence_date' in params:
            query_params.append(('existence_date', params['existence_date']))  # noqa: E501
        if 'brand' in params:
            query_params.append(('brand', params['brand']))  # noqa: E501
        if 'model' in params:
            query_params.append(('model', params['model']))  # noqa: E501
        if 'serial_number' in params:
            query_params.append(('serial_number', params['serial_number']))  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('order_by', params['order_by']))  # noqa: E501
            collection_formats['order_by'] = 'multi'  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DeviceGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_device(self, body, **kwargs):  # noqa: E501
        """Update a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_device(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param DeviceCreationDTO body: Device description (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_device_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.update_device_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def update_device_with_http_info(self, body, **kwargs):  # noqa: E501
        """Update a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_device_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param DeviceCreationDTO body: Device description (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_device" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_device`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectUriResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

# coding: utf-8

"""
    OpenSilex API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: INSTANCE-SNAPSHOT
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from opensilexClientToolsPython.api_client import ApiClient


class DevicesApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def count_device_data(self, uri, **kwargs):  # noqa: E501
        """Count device data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.count_device_data(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiment uris
        :param list[str] variable: Search by variables
        :param float min_confidence: Search by minimal confidence index
        :param float max_confidence: Search by maximal confidence index
        :param list[str] provenance: Search by provenance uri
        :param str metadata: Search by metadata
        :param str accept_language: Request accepted language
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.count_device_data_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.count_device_data_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def count_device_data_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Count device data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.count_device_data_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiment uris
        :param list[str] variable: Search by variables
        :param float min_confidence: Search by minimal confidence index
        :param float max_confidence: Search by maximal confidence index
        :param list[str] provenance: Search by provenance uri
        :param str metadata: Search by metadata
        :param str accept_language: Request accepted language
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', 'start_date', 'end_date', 'timezone', 'experiment', 'variable', 'min_confidence', 'max_confidence', 'provenance', 'metadata', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method count_device_data" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `count_device_data`")  # noqa: E501

        if 'min_confidence' in params and params['min_confidence'] > 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `min_confidence` when calling `count_device_data`, must be a value less than or equal to `1`")  # noqa: E501
        if 'min_confidence' in params and params['min_confidence'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `min_confidence` when calling `count_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'max_confidence' in params and params['max_confidence'] > 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `max_confidence` when calling `count_device_data`, must be a value less than or equal to `1`")  # noqa: E501
        if 'max_confidence' in params and params['max_confidence'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `max_confidence` when calling `count_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []
        if 'start_date' in params:
            query_params.append(('start_date', params['start_date']))  # noqa: E501
        if 'end_date' in params:
            query_params.append(('end_date', params['end_date']))  # noqa: E501
        if 'timezone' in params:
            query_params.append(('timezone', params['timezone']))  # noqa: E501
        if 'experiment' in params:
            query_params.append(('experiment', params['experiment']))  # noqa: E501
            collection_formats['experiment'] = 'multi'  # noqa: E501
        if 'variable' in params:
            query_params.append(('variable', params['variable']))  # noqa: E501
            collection_formats['variable'] = 'multi'  # noqa: E501
        if 'min_confidence' in params:
            query_params.append(('min_confidence', params['min_confidence']))  # noqa: E501
        if 'max_confidence' in params:
            query_params.append(('max_confidence', params['max_confidence']))  # noqa: E501
        if 'provenance' in params:
            query_params.append(('provenance', params['provenance']))  # noqa: E501
            collection_formats['provenance'] = 'multi'  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/data/count', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_device(self, **kwargs):  # noqa: E501
        """Create a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_device(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param DeviceCreationDTO body: Device description
        :param bool check_only: Checking only
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_device_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_device_with_http_info(**kwargs)  # noqa: E501
            return data

    def create_device_with_http_info(self, **kwargs):  # noqa: E501
        """Create a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_device_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param DeviceCreationDTO body: Device description
        :param bool check_only: Checking only
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'check_only', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_device" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'check_only' in params:
            query_params.append(('checkOnly', params['check_only']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectUriResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_device(self, uri, **kwargs):  # noqa: E501
        """Delete a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_device(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_device_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_device_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def delete_device_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Delete a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_device_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_device" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `delete_device`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectUriResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def export_devices(self, **kwargs):  # noqa: E501
        """export devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_devices(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param str rdf_type: RDF type filter
        :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types
        :param str name: Regex pattern for filtering by name
        :param int year: Search by year
        :param date existence_date: Date to filter device existence
        :param str brand: Regex pattern for filtering by brand
        :param str model: Regex pattern for filtering by model
        :param str serial_number: Regex pattern for filtering by serial number
        :param str metadata: Search by metadata
        :param str accept_language: Request accepted language
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.export_devices_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.export_devices_with_http_info(**kwargs)  # noqa: E501
            return data

    def export_devices_with_http_info(self, **kwargs):  # noqa: E501
        """export devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_devices_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param str rdf_type: RDF type filter
        :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types
        :param str name: Regex pattern for filtering by name
        :param int year: Search by year
        :param date existence_date: Date to filter device existence
        :param str brand: Regex pattern for filtering by brand
        :param str model: Regex pattern for filtering by model
        :param str serial_number: Regex pattern for filtering by serial number
        :param str metadata: Search by metadata
        :param str accept_language: Request accepted language
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['rdf_type', 'include_subtypes', 'name', 'year', 'existence_date', 'brand', 'model', 'serial_number', 'metadata', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method export_devices" % key
                )
            params[key] = val
        del params['kwargs']

        if 'year' in params and params['year'] > 10000:  # noqa: E501
            raise ValueError("Invalid value for parameter `year` when calling `export_devices`, must be a value less than or equal to `10000`")  # noqa: E501
        if 'year' in params and params['year'] < 999:  # noqa: E501
            raise ValueError("Invalid value for parameter `year` when calling `export_devices`, must be a value greater than or equal to `999`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'rdf_type' in params:
            query_params.append(('rdf_type', params['rdf_type']))  # noqa: E501
        if 'include_subtypes' in params:
            query_params.append(('include_subtypes', params['include_subtypes']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'year' in params:
            query_params.append(('year', params['year']))  # noqa: E501
        if 'existence_date' in params:
            query_params.append(('existence_date', params['existence_date']))  # noqa: E501
        if 'brand' in params:
            query_params.append(('brand', params['brand']))  # noqa: E501
        if 'model' in params:
            query_params.append(('model', params['model']))  # noqa: E501
        if 'serial_number' in params:
            query_params.append(('serial_number', params['serial_number']))  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['text/plain'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/export', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def export_list(self, **kwargs):  # noqa: E501
        """export devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_list(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param URIsListPostDTO body: List of device URI
        :param str accept_language: Request accepted language
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.export_list_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.export_list_with_http_info(**kwargs)  # noqa: E501
            return data

    def export_list_with_http_info(self, **kwargs):  # noqa: E501
        """export devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_list_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param URIsListPostDTO body: List of device URI
        :param str accept_language: Request accepted language
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method export_list" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['text/plain'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/export_by_uris', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device(self, uri, **kwargs):  # noqa: E501
        """Get device detail  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: DeviceGetDetailsDTO
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def get_device_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Get device detail  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: DeviceGetDetailsDTO
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `get_device`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeviceGetDetailsDTO',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device_by_uris(self, uris, **kwargs):  # noqa: E501
        """Get devices by uris  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_by_uris(uris, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] uris: Device URIs (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[DeviceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_by_uris_with_http_info(uris, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_by_uris_with_http_info(uris, **kwargs)  # noqa: E501
            return data

    def get_device_by_uris_with_http_info(self, uris, **kwargs):  # noqa: E501
        """Get devices by uris  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_by_uris_with_http_info(uris, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] uris: Device URIs (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[DeviceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uris', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device_by_uris" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uris' is set
        if ('uris' not in params or
                params['uris'] is None):
            raise ValueError("Missing the required parameter `uris` when calling `get_device_by_uris`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'uris' in params:
            query_params.append(('uris', params['uris']))  # noqa: E501
            collection_formats['uris'] = 'multi'  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/by_uris', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DeviceGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device_data_files_provenances(self, uri, **kwargs):  # noqa: E501
        """Get provenances of datafiles linked to this device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_data_files_provenances(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[ProvenanceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_data_files_provenances_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_data_files_provenances_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def get_device_data_files_provenances_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Get provenances of datafiles linked to this device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_data_files_provenances_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[ProvenanceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device_data_files_provenances" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `get_device_data_files_provenances`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/datafiles/provenances', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ProvenanceGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device_data_provenances(self, uri, **kwargs):  # noqa: E501
        """Get provenances of data that have been measured on this device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_data_provenances(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[ProvenanceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_data_provenances_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_data_provenances_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def get_device_data_provenances_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Get provenances of data that have been measured on this device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_data_provenances_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[ProvenanceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device_data_provenances" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `get_device_data_provenances`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/data/provenances', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ProvenanceGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_device_variables(self, uri, **kwargs):  # noqa: E501
        """Get variables linked to the device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_variables(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[NamedResourceDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_device_variables_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.get_device_variables_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def get_device_variables_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Get variables linked to the device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_device_variables_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: list[NamedResourceDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_device_variables" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `get_device_variables`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/variables', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[NamedResourceDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def search_device_data(self, uri, **kwargs):  # noqa: E501
        """Search device data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_device_data(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiment uris
        :param list[str] variable: Search by variables
        :param float min_confidence: Search by minimal confidence index
        :param float max_confidence: Search by maximal confidence index
        :param list[str] provenance: Search by provenance uri
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DataGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_device_data_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.search_device_data_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def search_device_data_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Search device data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_device_data_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiment uris
        :param list[str] variable: Search by variables
        :param float min_confidence: Search by minimal confidence index
        :param float max_confidence: Search by maximal confidence index
        :param list[str] provenance: Search by provenance uri
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DataGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', 'start_date', 'end_date', 'timezone', 'experiment', 'variable', 'min_confidence', 'max_confidence', 'provenance', 'metadata', 'order_by', 'page', 'page_size', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_device_data" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `search_device_data`")  # noqa: E501

        if 'min_confidence' in params and params['min_confidence'] > 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `min_confidence` when calling `search_device_data`, must be a value less than or equal to `1`")  # noqa: E501
        if 'min_confidence' in params and params['min_confidence'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `min_confidence` when calling `search_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'max_confidence' in params and params['max_confidence'] > 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `max_confidence` when calling `search_device_data`, must be a value less than or equal to `1`")  # noqa: E501
        if 'max_confidence' in params and params['max_confidence'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `max_confidence` when calling `search_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'page' in params and params['page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `search_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'page_size' in params and params['page_size'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page_size` when calling `search_device_data`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []
        if 'start_date' in params:
            query_params.append(('start_date', params['start_date']))  # noqa: E501
        if 'end_date' in params:
            query_params.append(('end_date', params['end_date']))  # noqa: E501
        if 'timezone' in params:
            query_params.append(('timezone', params['timezone']))  # noqa: E501
        if 'experiment' in params:
            query_params.append(('experiment', params['experiment']))  # noqa: E501
            collection_formats['experiment'] = 'multi'  # noqa: E501
        if 'variable' in params:
            query_params.append(('variable', params['variable']))  # noqa: E501
            collection_formats['variable'] = 'multi'  # noqa: E501
        if 'min_confidence' in params:
            query_params.append(('min_confidence', params['min_confidence']))  # noqa: E501
        if 'max_confidence' in params:
            query_params.append(('max_confidence', params['max_confidence']))  # noqa: E501
        if 'provenance' in params:
            query_params.append(('provenance', params['provenance']))  # noqa: E501
            collection_formats['provenance'] = 'multi'  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('order_by', params['order_by']))  # noqa: E501
            collection_formats['order_by'] = 'multi'  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/data', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DataGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def search_device_datafiles(self, uri, **kwargs):  # noqa: E501
        """Search device datafiles descriptions  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_device_datafiles(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str rdf_type: Search by rdf type uri
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiments
        :param list[str] scientific_objects: Search by object uris list
        :param list[str] provenances: Search by provenance uris list
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DataGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_device_datafiles_with_http_info(uri, **kwargs)  # noqa: E501
        else:
            (data) = self.search_device_datafiles_with_http_info(uri, **kwargs)  # noqa: E501
            return data

    def search_device_datafiles_with_http_info(self, uri, **kwargs):  # noqa: E501
        """Search device datafiles descriptions  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_device_datafiles_with_http_info(uri, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str uri: Device URI (required)
        :param str authorization: Authentication token (required)
        :param str rdf_type: Search by rdf type uri
        :param str start_date: Search by minimal date
        :param str end_date: Search by maximal date
        :param str timezone: Precise the timezone corresponding to the given dates
        :param list[str] experiment: Search by experiments
        :param list[str] scientific_objects: Search by object uris list
        :param list[str] provenances: Search by provenance uris list
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DataGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['uri', 'rdf_type', 'start_date', 'end_date', 'timezone', 'experiment', 'scientific_objects', 'provenances', 'metadata', 'order_by', 'page', 'page_size', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_device_datafiles" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'uri' is set
        if ('uri' not in params or
                params['uri'] is None):
            raise ValueError("Missing the required parameter `uri` when calling `search_device_datafiles`")  # noqa: E501

        if 'page' in params and params['page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `search_device_datafiles`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'page_size' in params and params['page_size'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page_size` when calling `search_device_datafiles`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'uri' in params:
            path_params['uri'] = params['uri']  # noqa: E501

        query_params = []
        if 'rdf_type' in params:
            query_params.append(('rdf_type', params['rdf_type']))  # noqa: E501
        if 'start_date' in params:
            query_params.append(('start_date', params['start_date']))  # noqa: E501
        if 'end_date' in params:
            query_params.append(('end_date', params['end_date']))  # noqa: E501
        if 'timezone' in params:
            query_params.append(('timezone', params['timezone']))  # noqa: E501
        if 'experiment' in params:
            query_params.append(('experiment', params['experiment']))  # noqa: E501
            collection_formats['experiment'] = 'multi'  # noqa: E501
        if 'scientific_objects' in params:
            query_params.append(('scientific_objects', params['scientific_objects']))  # noqa: E501
            collection_formats['scientific_objects'] = 'multi'  # noqa: E501
        if 'provenances' in params:
            query_params.append(('provenances', params['provenances']))  # noqa: E501
            collection_formats['provenances'] = 'multi'  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('order_by', params['order_by']))  # noqa: E501
            collection_formats['order_by'] = 'multi'  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices/{uri}/datafiles', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DataGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def search_devices(self, **kwargs):  # noqa: E501
        """Search devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_devices(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param str rdf_type: RDF type filter
        :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types
        :param str name: Regex pattern for filtering by name
        :param int year: Search by year
        :param date existence_date: Date to filter device existence
        :param str brand: Regex pattern for filtering by brand
        :param str model: Regex pattern for filtering by model
        :param str serial_number: Regex pattern for filtering by serial number
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DeviceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_devices_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.search_devices_with_http_info(**kwargs)  # noqa: E501
            return data

    def search_devices_with_http_info(self, **kwargs):  # noqa: E501
        """Search devices  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_devices_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: Authentication token (required)
        :param str rdf_type: RDF type filter
        :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types
        :param str name: Regex pattern for filtering by name
        :param int year: Search by year
        :param date existence_date: Date to filter device existence
        :param str brand: Regex pattern for filtering by brand
        :param str model: Regex pattern for filtering by model
        :param str serial_number: Regex pattern for filtering by serial number
        :param str metadata: Search by metadata
        :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc
        :param int page: Page number
        :param int page_size: Page size
        :param str accept_language: Request accepted language
        :return: list[DeviceGetDTO]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['rdf_type', 'include_subtypes', 'name', 'year', 'existence_date', 'brand', 'model', 'serial_number', 'metadata', 'order_by', 'page', 'page_size', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_devices" % key
                )
            params[key] = val
        del params['kwargs']

        if 'year' in params and params['year'] > 10000:  # noqa: E501
            raise ValueError("Invalid value for parameter `year` when calling `search_devices`, must be a value less than or equal to `10000`")  # noqa: E501
        if 'year' in params and params['year'] < 999:  # noqa: E501
            raise ValueError("Invalid value for parameter `year` when calling `search_devices`, must be a value greater than or equal to `999`")  # noqa: E501
        if 'page' in params and params['page'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `search_devices`, must be a value greater than or equal to `0`")  # noqa: E501
        if 'page_size' in params and params['page_size'] < 0:  # noqa: E501
            raise ValueError("Invalid value for parameter `page_size` when calling `search_devices`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'rdf_type' in params:
            query_params.append(('rdf_type', params['rdf_type']))  # noqa: E501
        if 'include_subtypes' in params:
            query_params.append(('include_subtypes', params['include_subtypes']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'year' in params:
            query_params.append(('year', params['year']))  # noqa: E501
        if 'existence_date' in params:
            query_params.append(('existence_date', params['existence_date']))  # noqa: E501
        if 'brand' in params:
            query_params.append(('brand', params['brand']))  # noqa: E501
        if 'model' in params:
            query_params.append(('model', params['model']))  # noqa: E501
        if 'serial_number' in params:
            query_params.append(('serial_number', params['serial_number']))  # noqa: E501
        if 'metadata' in params:
            query_params.append(('metadata', params['metadata']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('order_by', params['order_by']))  # noqa: E501
            collection_formats['order_by'] = 'multi'  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DeviceGetDTO]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_device(self, body, **kwargs):  # noqa: E501
        """Update a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_device(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param DeviceCreationDTO body: Device description (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_device_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.update_device_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def update_device_with_http_info(self, body, **kwargs):  # noqa: E501
        """Update a device  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_device_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param DeviceCreationDTO body: Device description (required)
        :param str authorization: Authentication token (required)
        :param str accept_language: Request accepted language
        :return: ObjectUriResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_device" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_device`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        #if 'authorization' in params:
        #    header_params['Authorization'] = params['authorization']  # noqa: E501
        #if 'accept_language' in params:
        #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/core/devices', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ObjectUriResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

# coding: utf-8 OpenSilex API      No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501      OpenAPI spec version: INSTANCE-SNAPSHOT          Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 # python 2 and python 3 compatibility library NOTE: This class is auto generated by the swagger code generator program.      Do not edit the class manually.     Ref: https://github.com/swagger-api/swagger-codegen # noqa: E501 Count device data  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.count_device_data(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str start_date: Search by minimal date         :param str end_date: Search by maximal date         :param str timezone: Precise the timezone corresponding to the given dates         :param list[str] experiment: Search by experiment uris         :param list[str] variable: Search by variables         :param float min_confidence: Search by minimal confidence index         :param float max_confidence: Search by maximal confidence index         :param list[str] provenance: Search by provenance uri         :param str metadata: Search by metadata         :param str accept_language: Request accepted language         :return: int                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Count device data  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.count_device_data_with_http_info(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str start_date: Search by minimal date         :param str end_date: Search by maximal date         :param str timezone: Precise the timezone corresponding to the given dates         :param list[str] experiment: Search by experiment uris         :param list[str] variable: Search by variables         :param float min_confidence: Search by minimal confidence index         :param float max_confidence: Search by maximal confidence index         :param list[str] provenance: Search by provenance uri         :param str metadata: Search by metadata         :param str accept_language: Request accepted language         :return: int                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uri' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Create a device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.create_device(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str authorization: Authentication token (required)         :param DeviceCreationDTO body: Device description         :param bool check_only: Checking only         :param str accept_language: Request accepted language         :return: ObjectUriResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Create a device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.create_device_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str authorization: Authentication token (required)         :param DeviceCreationDTO body: Device description         :param bool check_only: Checking only         :param str accept_language: Request accepted language         :return: ObjectUriResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Delete a device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.delete_device(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: ObjectUriResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Delete a device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.delete_device_with_http_info(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: ObjectUriResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uri' is set # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 export devices  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.export_devices(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str authorization: Authentication token (required)         :param str rdf_type: RDF type filter         :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types         :param str name: Regex pattern for filtering by name         :param int year: Search by year         :param date existence_date: Date to filter device existence         :param str brand: Regex pattern for filtering by brand         :param str model: Regex pattern for filtering by model         :param str serial_number: Regex pattern for filtering by serial number         :param str metadata: Search by metadata         :param str accept_language: Request accepted language         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 export devices  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.export_devices_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str authorization: Authentication token (required)         :param str rdf_type: RDF type filter         :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types         :param str name: Regex pattern for filtering by name         :param int year: Search by year         :param date existence_date: Date to filter device existence         :param str brand: Regex pattern for filtering by brand         :param str model: Regex pattern for filtering by model         :param str serial_number: Regex pattern for filtering by serial number         :param str metadata: Search by metadata         :param str accept_language: Request accepted language         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 export devices  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.export_list(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str authorization: Authentication token (required)         :param URIsListPostDTO body: List of device URI         :param str accept_language: Request accepted language         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 export devices  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.export_list_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str authorization: Authentication token (required)         :param URIsListPostDTO body: List of device URI         :param str accept_language: Request accepted language         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get device detail  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: DeviceGetDetailsDTO                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get device detail  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_with_http_info(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: DeviceGetDetailsDTO                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uri' is set # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get devices by uris  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_by_uris(uris, async_req=True)         >>> result = thread.get()          :param async_req bool         :param list[str] uris: Device URIs (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: list[DeviceGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get devices by uris  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_by_uris_with_http_info(uris, async_req=True)         >>> result = thread.get()          :param async_req bool         :param list[str] uris: Device URIs (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: list[DeviceGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uris' is set # noqa: E501 # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get provenances of datafiles linked to this device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_data_files_provenances(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: list[ProvenanceGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get provenances of datafiles linked to this device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_data_files_provenances_with_http_info(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: list[ProvenanceGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uri' is set # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get provenances of data that have been measured on this device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_data_provenances(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: list[ProvenanceGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get provenances of data that have been measured on this device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_data_provenances_with_http_info(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: list[ProvenanceGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uri' is set # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get variables linked to the device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_variables(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: list[NamedResourceDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get variables linked to the device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_device_variables_with_http_info(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: list[NamedResourceDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uri' is set # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Search device data  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.search_device_data(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str start_date: Search by minimal date         :param str end_date: Search by maximal date         :param str timezone: Precise the timezone corresponding to the given dates         :param list[str] experiment: Search by experiment uris         :param list[str] variable: Search by variables         :param float min_confidence: Search by minimal confidence index         :param float max_confidence: Search by maximal confidence index         :param list[str] provenance: Search by provenance uri         :param str metadata: Search by metadata         :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc         :param int page: Page number         :param int page_size: Page size         :param str accept_language: Request accepted language         :return: list[DataGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Search device data  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.search_device_data_with_http_info(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str start_date: Search by minimal date         :param str end_date: Search by maximal date         :param str timezone: Precise the timezone corresponding to the given dates         :param list[str] experiment: Search by experiment uris         :param list[str] variable: Search by variables         :param float min_confidence: Search by minimal confidence index         :param float max_confidence: Search by maximal confidence index         :param list[str] provenance: Search by provenance uri         :param str metadata: Search by metadata         :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc         :param int page: Page number         :param int page_size: Page size         :param str accept_language: Request accepted language         :return: list[DataGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uri' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Search device datafiles descriptions  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.search_device_datafiles(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str rdf_type: Search by rdf type uri         :param str start_date: Search by minimal date         :param str end_date: Search by maximal date         :param str timezone: Precise the timezone corresponding to the given dates         :param list[str] experiment: Search by experiments         :param list[str] scientific_objects: Search by object uris list         :param list[str] provenances: Search by provenance uris list         :param str metadata: Search by metadata         :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc         :param int page: Page number         :param int page_size: Page size         :param str accept_language: Request accepted language         :return: list[DataGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Search device datafiles descriptions  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.search_device_datafiles_with_http_info(uri, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str uri: Device URI (required)         :param str authorization: Authentication token (required)         :param str rdf_type: Search by rdf type uri         :param str start_date: Search by minimal date         :param str end_date: Search by maximal date         :param str timezone: Precise the timezone corresponding to the given dates         :param list[str] experiment: Search by experiments         :param list[str] scientific_objects: Search by object uris list         :param list[str] provenances: Search by provenance uris list         :param str metadata: Search by metadata         :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc         :param int page: Page number         :param int page_size: Page size         :param str accept_language: Request accepted language         :return: list[DataGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'uri' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Search devices  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.search_devices(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str authorization: Authentication token (required)         :param str rdf_type: RDF type filter         :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types         :param str name: Regex pattern for filtering by name         :param int year: Search by year         :param date existence_date: Date to filter device existence         :param str brand: Regex pattern for filtering by brand         :param str model: Regex pattern for filtering by model         :param str serial_number: Regex pattern for filtering by serial number         :param str metadata: Search by metadata         :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc         :param int page: Page number         :param int page_size: Page size         :param str accept_language: Request accepted language         :return: list[DeviceGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Search devices  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.search_devices_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str authorization: Authentication token (required)         :param str rdf_type: RDF type filter         :param bool include_subtypes: Set this param to true when filtering on rdf_type to also retrieve sub-types         :param str name: Regex pattern for filtering by name         :param int year: Search by year         :param date existence_date: Date to filter device existence         :param str brand: Regex pattern for filtering by brand         :param str model: Regex pattern for filtering by model         :param str serial_number: Regex pattern for filtering by serial number         :param str metadata: Search by metadata         :param list[str] order_by: List of fields to sort as an array of fieldName=asc|desc         :param int page: Page number         :param int page_size: Page size         :param str accept_language: Request accepted language         :return: list[DeviceGetDTO]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Update a device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.update_device(body, async_req=True)         >>> result = thread.get()          :param async_req bool         :param DeviceCreationDTO body: Device description (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: ObjectUriResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Update a device  # noqa: E501            # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.update_device_with_http_info(body, async_req=True)         >>> result = thread.get()          :param async_req bool         :param DeviceCreationDTO body: Device description (required)         :param str authorization: Authentication token (required)         :param str accept_language: Request accepted language         :return: ObjectUriResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'body' is set # noqa: E501 #if 'authorization' in params: #    header_params['Authorization'] = params['authorization']  # noqa: E501 #if 'accept_language' in params: #    header_params['Accept-Language'] = params['accept_language']  # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501