# coding: utf-8

"""
    Healthbot APIs

    API interface for Healthbot application  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: healthbot-hackers@juniper.net
    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 jnpr.healthbot.swagger.api_client import ApiClient


class DefaultApi(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 create_files_helper_files_by_file_name(self, up_file, file_name, **kwargs):  # noqa: E501
        """Upload a helper-file.  # noqa: E501

        Upload the specified helper-file.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_files_helper_files_by_file_name(up_file, file_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param file up_file: File content (required)
        :param str file_name: File name (required)
        :param str input_path: Input path
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.create_files_helper_files_by_file_name_with_http_info(up_file, file_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_files_helper_files_by_file_name_with_http_info(up_file, file_name, **kwargs)  # noqa: E501
            return data

    def create_files_helper_files_by_file_name_with_http_info(self, up_file, file_name, **kwargs):  # noqa: E501
        """Upload a helper-file.  # noqa: E501

        Upload the specified helper-file.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.create_files_helper_files_by_file_name_with_http_info(up_file, file_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param file up_file: File content (required)
        :param str file_name: File name (required)
        :param str input_path: Input path
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['up_file', 'file_name', 'input_path']  # noqa: E501
        all_params.append('async')
        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_files_helper_files_by_file_name" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'up_file' is set
        if ('up_file' not in params or
                params['up_file'] is None):
            raise ValueError("Missing the required parameter `up_file` when calling `create_files_helper_files_by_file_name`")  # noqa: E501
        # verify the required parameter 'file_name' is set
        if ('file_name' not in params or
                params['file_name'] is None):
            raise ValueError("Missing the required parameter `file_name` when calling `create_files_helper_files_by_file_name`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'up_file' in params:
            local_var_files['up_file'] = params['up_file']  # noqa: E501

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/files/helper-files/{file_name}/', '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=params.get('async'),
            _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_files_helper_files_by_file_name(self, file_name, **kwargs):  # noqa: E501
        """Delete a helper-file.  # noqa: E501

        Delete the specified helper-file. Delete will not fail if the helper-file is being used by some service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_files_helper_files_by_file_name(file_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str file_name: File name (required)
        :param str input_path: Input path
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.delete_files_helper_files_by_file_name_with_http_info(file_name, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_files_helper_files_by_file_name_with_http_info(file_name, **kwargs)  # noqa: E501
            return data

    def delete_files_helper_files_by_file_name_with_http_info(self, file_name, **kwargs):  # noqa: E501
        """Delete a helper-file.  # noqa: E501

        Delete the specified helper-file. Delete will not fail if the helper-file is being used by some service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.delete_files_helper_files_by_file_name_with_http_info(file_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str file_name: File name (required)
        :param str input_path: Input path
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['file_name', 'input_path']  # noqa: E501
        all_params.append('async')
        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_files_helper_files_by_file_name" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'file_name' is set
        if ('file_name' not in params or
                params['file_name'] is None):
            raise ValueError("Missing the required parameter `file_name` when calling `delete_files_helper_files_by_file_name`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/files/helper-files/{file_name}/', 'DELETE',
            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=params.get('async'),
            _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 inspect_command_rpc_table_on_device(self, command_rpc_detail, **kwargs):  # noqa: E501
        """Inspect the given iAgent table.  # noqa: E501

        Inspect the given iAgent table on a device and return the results.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.inspect_command_rpc_table_on_device(command_rpc_detail, async=True)
        >>> result = thread.get()

        :param async bool
        :param CommandRpc command_rpc_detail: command-rpc object (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.inspect_command_rpc_table_on_device_with_http_info(command_rpc_detail, **kwargs)  # noqa: E501
        else:
            (data) = self.inspect_command_rpc_table_on_device_with_http_info(command_rpc_detail, **kwargs)  # noqa: E501
            return data

    def inspect_command_rpc_table_on_device_with_http_info(self, command_rpc_detail, **kwargs):  # noqa: E501
        """Inspect the given iAgent table.  # noqa: E501

        Inspect the given iAgent table on a device and return the results.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.inspect_command_rpc_table_on_device_with_http_info(command_rpc_detail, async=True)
        >>> result = thread.get()

        :param async bool
        :param CommandRpc command_rpc_detail: command-rpc object (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['command_rpc_detail']  # noqa: E501
        all_params.append('async')
        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 inspect_command_rpc_table_on_device" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'command_rpc_detail' is set
        if ('command_rpc_detail' not in params or
                params['command_rpc_detail'] is None):
            raise ValueError("Missing the required parameter `command_rpc_detail` when calling `inspect_command_rpc_table_on_device`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'command_rpc_detail' in params:
            body_params = params['command_rpc_detail']
        # 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(
            '/inspect/command-rpc/table/', '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=params.get('async'),
            _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 retrieve_configuration_jobs(self, **kwargs):  # noqa: E501
        """retrieve_configuration_jobs  # noqa: E501

        Return list of all the Commit Job ID's  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_configuration_jobs(async=True)
        >>> result = thread.get()

        :param async bool
        :param str job_id: Id of Job
        :param str job_status: Type of job
        :return: list[InlineResponse200]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_configuration_jobs_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_configuration_jobs_with_http_info(**kwargs)  # noqa: E501
            return data

    def retrieve_configuration_jobs_with_http_info(self, **kwargs):  # noqa: E501
        """retrieve_configuration_jobs  # noqa: E501

        Return list of all the Commit Job ID's  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_configuration_jobs_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param str job_id: Id of Job
        :param str job_status: Type of job
        :return: list[InlineResponse200]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['job_id', 'job_status']  # noqa: E501
        all_params.append('async')
        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 retrieve_configuration_jobs" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/configuration/jobs/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[InlineResponse200]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_data_database_table(self, **kwargs):  # noqa: E501
        """Get information about tables for a device of a device-group.  # noqa: E501

        Get information about different types of tables stored for a device of a device-group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_data_database_table(async=True)
        >>> result = thread.get()

        :param async bool
        :param str device_id: Name of device
        :param str device_group_name: Name of device-group
        :param str network_group_name: Name of network-group
        :return: list[TableSchema]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_data_database_table_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_data_database_table_with_http_info(**kwargs)  # noqa: E501
            return data

    def retrieve_data_database_table_with_http_info(self, **kwargs):  # noqa: E501
        """Get information about tables for a device of a device-group.  # noqa: E501

        Get information about different types of tables stored for a device of a device-group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_data_database_table_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param str device_id: Name of device
        :param str device_group_name: Name of device-group
        :param str network_group_name: Name of network-group
        :return: list[TableSchema]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['device_id', 'device_group_name', 'network_group_name']  # noqa: E501
        all_params.append('async')
        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 retrieve_data_database_table" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'device_id' in params:
            query_params.append(('device_id', params['device_id']))  # noqa: E501
        if 'device_group_name' in params:
            query_params.append(('device_group_name', params['device_group_name']))  # noqa: E501
        if 'network_group_name' in params:
            query_params.append(('network_group_name', params['network_group_name']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/data/database/table/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[TableSchema]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_data_database_table_column_by_table_name(self, table_name, **kwargs):  # noqa: E501
        """Get information about columns in a table.  # noqa: E501

        Get information about columns in a table.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_data_database_table_column_by_table_name(table_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str table_name: Name of table (required)
        :param str device_id: Name of device
        :param str device_group_name: Name of device-group
        :param str network_group_name: Name of network-group
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_data_database_table_column_by_table_name_with_http_info(table_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_data_database_table_column_by_table_name_with_http_info(table_name, **kwargs)  # noqa: E501
            return data

    def retrieve_data_database_table_column_by_table_name_with_http_info(self, table_name, **kwargs):  # noqa: E501
        """Get information about columns in a table.  # noqa: E501

        Get information about columns in a table.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_data_database_table_column_by_table_name_with_http_info(table_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str table_name: Name of table (required)
        :param str device_id: Name of device
        :param str device_group_name: Name of device-group
        :param str network_group_name: Name of network-group
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['table_name', 'device_id', 'device_group_name', 'network_group_name']  # noqa: E501
        all_params.append('async')
        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 retrieve_data_database_table_column_by_table_name" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'table_name' is set
        if ('table_name' not in params or
                params['table_name'] is None):
            raise ValueError("Missing the required parameter `table_name` when calling `retrieve_data_database_table_column_by_table_name`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'device_id' in params:
            query_params.append(('device_id', params['device_id']))  # noqa: E501
        if 'device_group_name' in params:
            query_params.append(('device_group_name', params['device_group_name']))  # noqa: E501
        if 'network_group_name' in params:
            query_params.append(('network_group_name', params['network_group_name']))  # noqa: E501
        if 'table_name' in params:
            query_params.append(('table_name', params['table_name']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/data/database/table/column/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[str]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_data_database_tags_by_table_name(self, table_name, **kwargs):  # noqa: E501
        """Get information about tags keys and values in a table.  # noqa: E501

        Get information about tags keys and values in a table.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_data_database_tags_by_table_name(table_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str table_name: Name of table (required)
        :param str device_id: Name of device
        :param str device_group_name: Name of device-group
        :param str network_group_name: Name of network-group
        :param str tag: Tag key for which values are requested.
        :param str where_clause: Where condition to select values for the requested key. This would not be processed if there is no `tag` query parameter. eg: `tag_key1=val1 AND tag_key2=val2`
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_data_database_tags_by_table_name_with_http_info(table_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_data_database_tags_by_table_name_with_http_info(table_name, **kwargs)  # noqa: E501
            return data

    def retrieve_data_database_tags_by_table_name_with_http_info(self, table_name, **kwargs):  # noqa: E501
        """Get information about tags keys and values in a table.  # noqa: E501

        Get information about tags keys and values in a table.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_data_database_tags_by_table_name_with_http_info(table_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str table_name: Name of table (required)
        :param str device_id: Name of device
        :param str device_group_name: Name of device-group
        :param str network_group_name: Name of network-group
        :param str tag: Tag key for which values are requested.
        :param str where_clause: Where condition to select values for the requested key. This would not be processed if there is no `tag` query parameter. eg: `tag_key1=val1 AND tag_key2=val2`
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['table_name', 'device_id', 'device_group_name', 'network_group_name', 'tag', 'where_clause']  # noqa: E501
        all_params.append('async')
        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 retrieve_data_database_tags_by_table_name" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'table_name' is set
        if ('table_name' not in params or
                params['table_name'] is None):
            raise ValueError("Missing the required parameter `table_name` when calling `retrieve_data_database_tags_by_table_name`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'device_id' in params:
            query_params.append(('device_id', params['device_id']))  # noqa: E501
        if 'device_group_name' in params:
            query_params.append(('device_group_name', params['device_group_name']))  # noqa: E501
        if 'network_group_name' in params:
            query_params.append(('network_group_name', params['network_group_name']))  # noqa: E501
        if 'table_name' in params:
            query_params.append(('table_name', params['table_name']))  # noqa: E501
        if 'tag' in params:
            query_params.append(('tag', params['tag']))  # noqa: E501
        if 'where_clause' in params:
            query_params.append(('where_clause', params['where_clause']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/data/database/table/tags/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[str]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_event(self, from_timestamp, device_id, **kwargs):  # noqa: E501
        """Get all events for a device.  # noqa: E501

        Get the list of events for a device. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event(from_timestamp, device_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime from_timestamp: Starting timestamp (required)
        :param str device_id: device-id of the device for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str device_group_name: Device group's device-group-name of which the device is part
        :param str granularity: Granularity of query
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_event_with_http_info(from_timestamp, device_id, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_event_with_http_info(from_timestamp, device_id, **kwargs)  # noqa: E501
            return data

    def retrieve_event_with_http_info(self, from_timestamp, device_id, **kwargs):  # noqa: E501
        """Get all events for a device.  # noqa: E501

        Get the list of events for a device. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_with_http_info(from_timestamp, device_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime from_timestamp: Starting timestamp (required)
        :param str device_id: device-id of the device for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str device_group_name: Device group's device-group-name of which the device is part
        :param str granularity: Granularity of query
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['from_timestamp', 'device_id', 'to_timestamp', 'device_group_name', 'granularity', 'color']  # noqa: E501
        all_params.append('async')
        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 retrieve_event" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'from_timestamp' is set
        if ('from_timestamp' not in params or
                params['from_timestamp'] is None):
            raise ValueError("Missing the required parameter `from_timestamp` when calling `retrieve_event`")  # noqa: E501
        # verify the required parameter 'device_id' is set
        if ('device_id' not in params or
                params['device_id'] is None):
            raise ValueError("Missing the required parameter `device_id` when calling `retrieve_event`")  # noqa: E501

        if 'granularity' in params and not re.search('^[0-9]*[\'ns\' | \'u\' | \'µ\' | \'ms\' | \'s\' | \'m\' | \'h\' | \'d\' | \'w\']$', params['granularity']):  # noqa: E501
            raise ValueError("Invalid value for parameter `granularity` when calling `retrieve_event`, must conform to the pattern `/^[0-9]*['ns' | 'u' | 'µ' | 'ms' | 's' | 'm' | 'h' | 'd' | 'w']$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'from_timestamp' in params:
            query_params.append(('from_timestamp', params['from_timestamp']))  # noqa: E501
        if 'to_timestamp' in params:
            query_params.append(('to_timestamp', params['to_timestamp']))  # noqa: E501
        if 'device_id' in params:
            query_params.append(('device_id', params['device_id']))  # noqa: E501
        if 'device_group_name' in params:
            query_params.append(('device_group_name', params['device_group_name']))  # noqa: E501
        if 'granularity' in params:
            query_params.append(('granularity', params['granularity']))  # noqa: E501
        if 'color' in params:
            query_params.append(('color', params['color']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/event/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Event]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_event_by_event_name(self, event_name, from_timestamp, device_id, **kwargs):  # noqa: E501
        """Get instances of a device event.  # noqa: E501

        Get instances of a specified device event. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_by_event_name(event_name, from_timestamp, device_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str event_name: Name of event (required)
        :param datetime from_timestamp: Starting timestamp (required)
        :param str device_id: device-id of the device for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str device_group_name: device-group-name of which the device is part
        :param str granularity: Granularity of query
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_event_by_event_name_with_http_info(event_name, from_timestamp, device_id, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_event_by_event_name_with_http_info(event_name, from_timestamp, device_id, **kwargs)  # noqa: E501
            return data

    def retrieve_event_by_event_name_with_http_info(self, event_name, from_timestamp, device_id, **kwargs):  # noqa: E501
        """Get instances of a device event.  # noqa: E501

        Get instances of a specified device event. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_by_event_name_with_http_info(event_name, from_timestamp, device_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str event_name: Name of event (required)
        :param datetime from_timestamp: Starting timestamp (required)
        :param str device_id: device-id of the device for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str device_group_name: device-group-name of which the device is part
        :param str granularity: Granularity of query
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['event_name', 'from_timestamp', 'device_id', 'to_timestamp', 'device_group_name', 'granularity', 'color']  # noqa: E501
        all_params.append('async')
        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 retrieve_event_by_event_name" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'event_name' is set
        if ('event_name' not in params or
                params['event_name'] is None):
            raise ValueError("Missing the required parameter `event_name` when calling `retrieve_event_by_event_name`")  # noqa: E501
        # verify the required parameter 'from_timestamp' is set
        if ('from_timestamp' not in params or
                params['from_timestamp'] is None):
            raise ValueError("Missing the required parameter `from_timestamp` when calling `retrieve_event_by_event_name`")  # noqa: E501
        # verify the required parameter 'device_id' is set
        if ('device_id' not in params or
                params['device_id'] is None):
            raise ValueError("Missing the required parameter `device_id` when calling `retrieve_event_by_event_name`")  # noqa: E501

        if 'granularity' in params and not re.search('^[0-9]*[\'ns\' | \'u\' | \'µ\' | \'ms\' | \'s\' | \'m\' | \'h\' | \'d\' | \'w\']$', params['granularity']):  # noqa: E501
            raise ValueError("Invalid value for parameter `granularity` when calling `retrieve_event_by_event_name`, must conform to the pattern `/^[0-9]*['ns' | 'u' | 'µ' | 'ms' | 's' | 'm' | 'h' | 'd' | 'w']$/`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'from_timestamp' in params:
            query_params.append(('from_timestamp', params['from_timestamp']))  # noqa: E501
        if 'to_timestamp' in params:
            query_params.append(('to_timestamp', params['to_timestamp']))  # noqa: E501
        if 'device_id' in params:
            query_params.append(('device_id', params['device_id']))  # noqa: E501
        if 'device_group_name' in params:
            query_params.append(('device_group_name', params['device_group_name']))  # noqa: E501
        if 'granularity' in params:
            query_params.append(('granularity', params['granularity']))  # noqa: E501
        if 'color' in params:
            query_params.append(('color', params['color']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/event/{event_name}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Event]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_event_by_event_name_device_group(self, event_name, from_timestamp, device_group_name, **kwargs):  # noqa: E501
        """Get instances of a device-group event.  # noqa: E501

        Get instances of a specified device-group event. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_by_event_name_device_group(event_name, from_timestamp, device_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str event_name: Name of event (required)
        :param datetime from_timestamp: Starting timestamp (required)
        :param str device_group_name: device_group_name of the device-group for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str granularity: Granularity of query
        :param list[str] device_id: list of devices under a device-group to be fetched
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_event_by_event_name_device_group_with_http_info(event_name, from_timestamp, device_group_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_event_by_event_name_device_group_with_http_info(event_name, from_timestamp, device_group_name, **kwargs)  # noqa: E501
            return data

    def retrieve_event_by_event_name_device_group_with_http_info(self, event_name, from_timestamp, device_group_name, **kwargs):  # noqa: E501
        """Get instances of a device-group event.  # noqa: E501

        Get instances of a specified device-group event. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_by_event_name_device_group_with_http_info(event_name, from_timestamp, device_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str event_name: Name of event (required)
        :param datetime from_timestamp: Starting timestamp (required)
        :param str device_group_name: device_group_name of the device-group for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str granularity: Granularity of query
        :param list[str] device_id: list of devices under a device-group to be fetched
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['event_name', 'from_timestamp', 'device_group_name', 'to_timestamp', 'granularity', 'device_id', 'color']  # noqa: E501
        all_params.append('async')
        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 retrieve_event_by_event_name_device_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'event_name' is set
        if ('event_name' not in params or
                params['event_name'] is None):
            raise ValueError("Missing the required parameter `event_name` when calling `retrieve_event_by_event_name_device_group`")  # noqa: E501
        # verify the required parameter 'from_timestamp' is set
        if ('from_timestamp' not in params or
                params['from_timestamp'] is None):
            raise ValueError("Missing the required parameter `from_timestamp` when calling `retrieve_event_by_event_name_device_group`")  # noqa: E501
        # verify the required parameter 'device_group_name' is set
        if ('device_group_name' not in params or
                params['device_group_name'] is None):
            raise ValueError("Missing the required parameter `device_group_name` when calling `retrieve_event_by_event_name_device_group`")  # noqa: E501

        if 'granularity' in params and not re.search('^[0-9]*[\'ns\' | \'u\' | \'µ\' | \'ms\' | \'s\' | \'m\' | \'h\' | \'d\' | \'w\']$', params['granularity']):  # noqa: E501
            raise ValueError("Invalid value for parameter `granularity` when calling `retrieve_event_by_event_name_device_group`, must conform to the pattern `/^[0-9]*['ns' | 'u' | 'µ' | 'ms' | 's' | 'm' | 'h' | 'd' | 'w']$/`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'from_timestamp' in params:
            query_params.append(('from_timestamp', params['from_timestamp']))  # noqa: E501
        if 'to_timestamp' in params:
            query_params.append(('to_timestamp', params['to_timestamp']))  # noqa: E501
        if 'device_group_name' in params:
            query_params.append(('device_group_name', params['device_group_name']))  # noqa: E501
        if 'granularity' in params:
            query_params.append(('granularity', params['granularity']))  # noqa: E501
        if 'device_id' in params:
            query_params.append(('device_id', params['device_id']))  # noqa: E501
            collection_formats['device_id'] = 'csv'  # noqa: E501
        if 'color' in params:
            query_params.append(('color', params['color']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/event/device-group/{event_name}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Event]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_event_by_event_name_network_group(self, event_name, from_timestamp, network_group_name, **kwargs):  # noqa: E501
        """Get instances of a network-group event.  # noqa: E501

        Get instances of a specified network-group event. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_by_event_name_network_group(event_name, from_timestamp, network_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str event_name: Name of event (required)
        :param datetime from_timestamp: Starting timestamp (required)
        :param str network_group_name: network_group_name of the network-group for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str granularity: Granularity of query
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_event_by_event_name_network_group_with_http_info(event_name, from_timestamp, network_group_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_event_by_event_name_network_group_with_http_info(event_name, from_timestamp, network_group_name, **kwargs)  # noqa: E501
            return data

    def retrieve_event_by_event_name_network_group_with_http_info(self, event_name, from_timestamp, network_group_name, **kwargs):  # noqa: E501
        """Get instances of a network-group event.  # noqa: E501

        Get instances of a specified network-group event. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_by_event_name_network_group_with_http_info(event_name, from_timestamp, network_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str event_name: Name of event (required)
        :param datetime from_timestamp: Starting timestamp (required)
        :param str network_group_name: network_group_name of the network-group for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str granularity: Granularity of query
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['event_name', 'from_timestamp', 'network_group_name', 'to_timestamp', 'granularity', 'color']  # noqa: E501
        all_params.append('async')
        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 retrieve_event_by_event_name_network_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'event_name' is set
        if ('event_name' not in params or
                params['event_name'] is None):
            raise ValueError("Missing the required parameter `event_name` when calling `retrieve_event_by_event_name_network_group`")  # noqa: E501
        # verify the required parameter 'from_timestamp' is set
        if ('from_timestamp' not in params or
                params['from_timestamp'] is None):
            raise ValueError("Missing the required parameter `from_timestamp` when calling `retrieve_event_by_event_name_network_group`")  # noqa: E501
        # verify the required parameter 'network_group_name' is set
        if ('network_group_name' not in params or
                params['network_group_name'] is None):
            raise ValueError("Missing the required parameter `network_group_name` when calling `retrieve_event_by_event_name_network_group`")  # noqa: E501

        if 'granularity' in params and not re.search('^[0-9]*[\'ns\' | \'u\' | \'µ\' | \'ms\' | \'s\' | \'m\' | \'h\' | \'d\' | \'w\']$', params['granularity']):  # noqa: E501
            raise ValueError("Invalid value for parameter `granularity` when calling `retrieve_event_by_event_name_network_group`, must conform to the pattern `/^[0-9]*['ns' | 'u' | 'µ' | 'ms' | 's' | 'm' | 'h' | 'd' | 'w']$/`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'from_timestamp' in params:
            query_params.append(('from_timestamp', params['from_timestamp']))  # noqa: E501
        if 'to_timestamp' in params:
            query_params.append(('to_timestamp', params['to_timestamp']))  # noqa: E501
        if 'network_group_name' in params:
            query_params.append(('network_group_name', params['network_group_name']))  # noqa: E501
        if 'granularity' in params:
            query_params.append(('granularity', params['granularity']))  # noqa: E501
        if 'color' in params:
            query_params.append(('color', params['color']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/event/network-group/{event_name}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Event]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_event_device_group(self, from_timestamp, device_group_name, **kwargs):  # noqa: E501
        """Get all events for a device-group.  # noqa: E501

        Get the list of events for a device-group. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_device_group(from_timestamp, device_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime from_timestamp: Starting timestamp (required)
        :param str device_group_name: device_group_name of the device-group for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str granularity: Granularity of query
        :param list[str] device_id: list of devices under a device-group to be fetched
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_event_device_group_with_http_info(from_timestamp, device_group_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_event_device_group_with_http_info(from_timestamp, device_group_name, **kwargs)  # noqa: E501
            return data

    def retrieve_event_device_group_with_http_info(self, from_timestamp, device_group_name, **kwargs):  # noqa: E501
        """Get all events for a device-group.  # noqa: E501

        Get the list of events for a device-group. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_device_group_with_http_info(from_timestamp, device_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime from_timestamp: Starting timestamp (required)
        :param str device_group_name: device_group_name of the device-group for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str granularity: Granularity of query
        :param list[str] device_id: list of devices under a device-group to be fetched
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['from_timestamp', 'device_group_name', 'to_timestamp', 'granularity', 'device_id', 'color']  # noqa: E501
        all_params.append('async')
        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 retrieve_event_device_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'from_timestamp' is set
        if ('from_timestamp' not in params or
                params['from_timestamp'] is None):
            raise ValueError("Missing the required parameter `from_timestamp` when calling `retrieve_event_device_group`")  # noqa: E501
        # verify the required parameter 'device_group_name' is set
        if ('device_group_name' not in params or
                params['device_group_name'] is None):
            raise ValueError("Missing the required parameter `device_group_name` when calling `retrieve_event_device_group`")  # noqa: E501

        if 'granularity' in params and not re.search('^[0-9]*[\'ns\' | \'u\' | \'µ\' | \'ms\' | \'s\' | \'m\' | \'h\' | \'d\' | \'w\']$', params['granularity']):  # noqa: E501
            raise ValueError("Invalid value for parameter `granularity` when calling `retrieve_event_device_group`, must conform to the pattern `/^[0-9]*['ns' | 'u' | 'µ' | 'ms' | 's' | 'm' | 'h' | 'd' | 'w']$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'from_timestamp' in params:
            query_params.append(('from_timestamp', params['from_timestamp']))  # noqa: E501
        if 'to_timestamp' in params:
            query_params.append(('to_timestamp', params['to_timestamp']))  # noqa: E501
        if 'device_group_name' in params:
            query_params.append(('device_group_name', params['device_group_name']))  # noqa: E501
        if 'granularity' in params:
            query_params.append(('granularity', params['granularity']))  # noqa: E501
        if 'device_id' in params:
            query_params.append(('device_id', params['device_id']))  # noqa: E501
            collection_formats['device_id'] = 'csv'  # noqa: E501
        if 'color' in params:
            query_params.append(('color', params['color']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/event/device-group/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Event]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_event_network_group(self, from_timestamp, network_group_name, **kwargs):  # noqa: E501
        """Get all events for a network-group.  # noqa: E501

        Get the list of events for a network-group. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_network_group(from_timestamp, network_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime from_timestamp: Starting timestamp (required)
        :param str network_group_name: network_group_name of the network-group for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str granularity: Granularity of query
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_event_network_group_with_http_info(from_timestamp, network_group_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_event_network_group_with_http_info(from_timestamp, network_group_name, **kwargs)  # noqa: E501
            return data

    def retrieve_event_network_group_with_http_info(self, from_timestamp, network_group_name, **kwargs):  # noqa: E501
        """Get all events for a network-group.  # noqa: E501

        Get the list of events for a network-group. Filtering is possible with the use of various query parameters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_event_network_group_with_http_info(from_timestamp, network_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param datetime from_timestamp: Starting timestamp (required)
        :param str network_group_name: network_group_name of the network-group for which events are requested (required)
        :param datetime to_timestamp: Ending timestamp
        :param str granularity: Granularity of query
        :param str color: Color of events.
        :return: list[Event]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['from_timestamp', 'network_group_name', 'to_timestamp', 'granularity', 'color']  # noqa: E501
        all_params.append('async')
        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 retrieve_event_network_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'from_timestamp' is set
        if ('from_timestamp' not in params or
                params['from_timestamp'] is None):
            raise ValueError("Missing the required parameter `from_timestamp` when calling `retrieve_event_network_group`")  # noqa: E501
        # verify the required parameter 'network_group_name' is set
        if ('network_group_name' not in params or
                params['network_group_name'] is None):
            raise ValueError("Missing the required parameter `network_group_name` when calling `retrieve_event_network_group`")  # noqa: E501

        if 'granularity' in params and not re.search('^[0-9]*[\'ns\' | \'u\' | \'µ\' | \'ms\' | \'s\' | \'m\' | \'h\' | \'d\' | \'w\']$', params['granularity']):  # noqa: E501
            raise ValueError("Invalid value for parameter `granularity` when calling `retrieve_event_network_group`, must conform to the pattern `/^[0-9]*['ns' | 'u' | 'µ' | 'ms' | 's' | 'm' | 'h' | 'd' | 'w']$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'from_timestamp' in params:
            query_params.append(('from_timestamp', params['from_timestamp']))  # noqa: E501
        if 'to_timestamp' in params:
            query_params.append(('to_timestamp', params['to_timestamp']))  # noqa: E501
        if 'network_group_name' in params:
            query_params.append(('network_group_name', params['network_group_name']))  # noqa: E501
        if 'granularity' in params:
            query_params.append(('granularity', params['granularity']))  # noqa: E501
        if 'color' in params:
            query_params.append(('color', params['color']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/event/network-group/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Event]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_files_helper_files(self, **kwargs):  # noqa: E501
        """Get all helper-file names.  # noqa: E501

        Get a list of all the helper-file file-names.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_files_helper_files(async=True)
        >>> result = thread.get()

        :param async bool
        :param str input_path: Input path
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_files_helper_files_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_files_helper_files_with_http_info(**kwargs)  # noqa: E501
            return data

    def retrieve_files_helper_files_with_http_info(self, **kwargs):  # noqa: E501
        """Get all helper-file names.  # noqa: E501

        Get a list of all the helper-file file-names.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_files_helper_files_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param str input_path: Input path
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['input_path']  # noqa: E501
        all_params.append('async')
        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 retrieve_files_helper_files" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/files/helper-files/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[str]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_files_helper_files_by_file_name(self, file_name, **kwargs):  # noqa: E501
        """Download a helper-file.  # noqa: E501

        Download the specified helper-file.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_files_helper_files_by_file_name(file_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str file_name: File name (required)
        :param str input_path: Input path
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_files_helper_files_by_file_name_with_http_info(file_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_files_helper_files_by_file_name_with_http_info(file_name, **kwargs)  # noqa: E501
            return data

    def retrieve_files_helper_files_by_file_name_with_http_info(self, file_name, **kwargs):  # noqa: E501
        """Download a helper-file.  # noqa: E501

        Download the specified helper-file.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_files_helper_files_by_file_name_with_http_info(file_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str file_name: File name (required)
        :param str input_path: Input path
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['file_name', 'input_path']  # noqa: E501
        all_params.append('async')
        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 retrieve_files_helper_files_by_file_name" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'file_name' is set
        if ('file_name' not in params or
                params['file_name'] is None):
            raise ValueError("Missing the required parameter `file_name` when calling `retrieve_files_helper_files_by_file_name`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/files/helper-files/{file_name}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='file',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_health_all(self, **kwargs):  # noqa: E501
        """Return a dict with health of devices in device groups and network groups  # noqa: E501

        Returns health of network-groups and devices in device-groups  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_health_all(async=True)
        >>> result = thread.get()

        :param async bool
        :return: HealthSchema
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_health_all_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_health_all_with_http_info(**kwargs)  # noqa: E501
            return data

    def retrieve_health_all_with_http_info(self, **kwargs):  # noqa: E501
        """Return a dict with health of devices in device groups and network groups  # noqa: E501

        Returns health of network-groups and devices in device-groups  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_health_all_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :return: HealthSchema
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # noqa: E501
        all_params.append('async')
        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 retrieve_health_all" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/health/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='HealthSchema',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_health_tree_by_device_group(self, device_group_name, **kwargs):  # noqa: E501
        """Get device-group health-tree.  # noqa: E501

        Get health-tree of a specified device-group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_health_tree_by_device_group(device_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str device_group_name: `device-group-name` of device-group (required)
        :param datetime timestamp: Timestamp at which health tree is requested. If not specified, current server timestamp is used.
        :param int tolerance: Timestamp tolerance in seconds. With this option, health-tree will contain latest data between `timestamp-2*tolerance` and `timestamp`. Default value is `2*frequency` where `frequency` is extracted from `trigger`.
        :param list[str] device: list of devices under a device-group to be fetched
        :return: DeviceGroupHealthTree
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_health_tree_by_device_group_with_http_info(device_group_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_health_tree_by_device_group_with_http_info(device_group_name, **kwargs)  # noqa: E501
            return data

    def retrieve_health_tree_by_device_group_with_http_info(self, device_group_name, **kwargs):  # noqa: E501
        """Get device-group health-tree.  # noqa: E501

        Get health-tree of a specified device-group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_health_tree_by_device_group_with_http_info(device_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str device_group_name: `device-group-name` of device-group (required)
        :param datetime timestamp: Timestamp at which health tree is requested. If not specified, current server timestamp is used.
        :param int tolerance: Timestamp tolerance in seconds. With this option, health-tree will contain latest data between `timestamp-2*tolerance` and `timestamp`. Default value is `2*frequency` where `frequency` is extracted from `trigger`.
        :param list[str] device: list of devices under a device-group to be fetched
        :return: DeviceGroupHealthTree
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['device_group_name', 'timestamp', 'tolerance', 'device']  # noqa: E501
        all_params.append('async')
        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 retrieve_health_tree_by_device_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'device_group_name' is set
        if ('device_group_name' not in params or
                params['device_group_name'] is None):
            raise ValueError("Missing the required parameter `device_group_name` when calling `retrieve_health_tree_by_device_group`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'timestamp' in params:
            query_params.append(('timestamp', params['timestamp']))  # noqa: E501
        if 'tolerance' in params:
            query_params.append(('tolerance', params['tolerance']))  # noqa: E501
        if 'device' in params:
            query_params.append(('device', params['device']))  # noqa: E501
            collection_formats['device'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/health-tree/device-group/{device_group_name}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeviceGroupHealthTree',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_health_tree_by_id(self, device_id, **kwargs):  # noqa: E501
        """Return a device&#39;s health-tree.  # noqa: E501

        Return health-tree of a specified device identified by `device-id`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_health_tree_by_id(device_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str device_id: `device-id` of device (required)
        :param datetime timestamp: Timestamp at which health tree is requested. If not specified, current server timestamp is used.
        :param int tolerance: Timestamp tolerance in seconds. With this option, health-tree will contain latest data between `timestamp-2*tolerance` and `timestamp`. Default value is `2*frequency` where `frequency` is extracted from `trigger`.
        :return: DeviceHealthTree
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_health_tree_by_id_with_http_info(device_id, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_health_tree_by_id_with_http_info(device_id, **kwargs)  # noqa: E501
            return data

    def retrieve_health_tree_by_id_with_http_info(self, device_id, **kwargs):  # noqa: E501
        """Return a device&#39;s health-tree.  # noqa: E501

        Return health-tree of a specified device identified by `device-id`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_health_tree_by_id_with_http_info(device_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str device_id: `device-id` of device (required)
        :param datetime timestamp: Timestamp at which health tree is requested. If not specified, current server timestamp is used.
        :param int tolerance: Timestamp tolerance in seconds. With this option, health-tree will contain latest data between `timestamp-2*tolerance` and `timestamp`. Default value is `2*frequency` where `frequency` is extracted from `trigger`.
        :return: DeviceHealthTree
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['device_id', 'timestamp', 'tolerance']  # noqa: E501
        all_params.append('async')
        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 retrieve_health_tree_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'device_id' is set
        if ('device_id' not in params or
                params['device_id'] is None):
            raise ValueError("Missing the required parameter `device_id` when calling `retrieve_health_tree_by_id`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/health-tree/{device_id}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeviceHealthTree',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_health_tree_by_network_group(self, network_group_name, **kwargs):  # noqa: E501
        """Get network-group health-tree.  # noqa: E501

        Get health-tree of a specified network-group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_health_tree_by_network_group(network_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str network_group_name: `network-group-name` of network-group (required)
        :param datetime timestamp: Timestamp at which health tree is requested. If not specified, current server timestamp is used.
        :param int tolerance: Timestamp tolerance in seconds. With this option, health-tree will contain latest data between `timestamp-2*tolerance` and `timestamp`. Default value is `2*frequency` where `frequency` is extracted from `trigger`.
        :return: NetworkHealthTree
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_health_tree_by_network_group_with_http_info(network_group_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_health_tree_by_network_group_with_http_info(network_group_name, **kwargs)  # noqa: E501
            return data

    def retrieve_health_tree_by_network_group_with_http_info(self, network_group_name, **kwargs):  # noqa: E501
        """Get network-group health-tree.  # noqa: E501

        Get health-tree of a specified network-group.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_health_tree_by_network_group_with_http_info(network_group_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str network_group_name: `network-group-name` of network-group (required)
        :param datetime timestamp: Timestamp at which health tree is requested. If not specified, current server timestamp is used.
        :param int tolerance: Timestamp tolerance in seconds. With this option, health-tree will contain latest data between `timestamp-2*tolerance` and `timestamp`. Default value is `2*frequency` where `frequency` is extracted from `trigger`.
        :return: NetworkHealthTree
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['network_group_name', 'timestamp', 'tolerance']  # noqa: E501
        all_params.append('async')
        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 retrieve_health_tree_by_network_group" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'network_group_name' is set
        if ('network_group_name' not in params or
                params['network_group_name'] is None):
            raise ValueError("Missing the required parameter `network_group_name` when calling `retrieve_health_tree_by_network_group`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/health-tree/network-group/{network_group_name}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='NetworkHealthTree',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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 retrieve_sensors(self, sensor_type, **kwargs):  # noqa: E501
        """List all OpenConfig sensors.  # noqa: E501

        Get a list of all the sensors for the filters provided. Filtering is possible with the use of query parameters. If you have a sensor `/1/2/3/4/5/6/` and `sensor_name=/1`and `depth=3`, the result would be `/2/3/4`. If you use `append=true`, then the result would be `/1/2/3/4`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_sensors(sensor_type, async=True)
        >>> result = thread.get()

        :param async bool
        :param str sensor_type: Sensor type (required)
        :param str sensor_name: Sensor name prefix.
        :param int depth: Relative depth to the `sensor_name`.
        :param bool append: Returns full path of the sensor.
        :param str snmp_table: Returns list of all the columns for the particular snmp_table
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.retrieve_sensors_with_http_info(sensor_type, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_sensors_with_http_info(sensor_type, **kwargs)  # noqa: E501
            return data

    def retrieve_sensors_with_http_info(self, sensor_type, **kwargs):  # noqa: E501
        """List all OpenConfig sensors.  # noqa: E501

        Get a list of all the sensors for the filters provided. Filtering is possible with the use of query parameters. If you have a sensor `/1/2/3/4/5/6/` and `sensor_name=/1`and `depth=3`, the result would be `/2/3/4`. If you use `append=true`, then the result would be `/1/2/3/4`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.retrieve_sensors_with_http_info(sensor_type, async=True)
        >>> result = thread.get()

        :param async bool
        :param str sensor_type: Sensor type (required)
        :param str sensor_name: Sensor name prefix.
        :param int depth: Relative depth to the `sensor_name`.
        :param bool append: Returns full path of the sensor.
        :param str snmp_table: Returns list of all the columns for the particular snmp_table
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['sensor_type', 'sensor_name', 'depth', 'append', 'snmp_table']  # noqa: E501
        all_params.append('async')
        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 retrieve_sensors" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'sensor_type' is set
        if ('sensor_type' not in params or
                params['sensor_type'] is None):
            raise ValueError("Missing the required parameter `sensor_type` when calling `retrieve_sensors`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'sensor_name' in params:
            query_params.append(('sensor_name', params['sensor_name']))  # noqa: E501
        if 'sensor_type' in params:
            query_params.append(('sensor_type', params['sensor_type']))  # noqa: E501
        if 'depth' in params:
            query_params.append(('depth', params['depth']))  # noqa: E501
        if 'append' in params:
            query_params.append(('append', params['append']))  # noqa: E501
        if 'snmp_table' in params:
            query_params.append(('snmp_table', params['snmp_table']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/sensors/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[str]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _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)
