# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>  # noqa: E501

    OpenAPI spec version: 7.13.1
    
    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 cm_client.api_client import ApiClient


class HostsResourceApi(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 add_tags(self, hostname, **kwargs):  # noqa: E501
        """Attach tags to the host.  # noqa: E501

        Attach tags to the host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_tags(hostname, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str hostname: Name of the host (required)
        :param list[ApiEntityTag] body: List of tags to add to the host
        :return: list[ApiEntityTag]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.add_tags_with_http_info(hostname, **kwargs)  # noqa: E501
        else:
            (data) = self.add_tags_with_http_info(hostname, **kwargs)  # noqa: E501
            return data

    def add_tags_with_http_info(self, hostname, **kwargs):  # noqa: E501
        """Attach tags to the host.  # noqa: E501

        Attach tags to the host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_tags_with_http_info(hostname, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str hostname: Name of the host (required)
        :param list[ApiEntityTag] body: List of tags to add to the host
        :return: list[ApiEntityTag]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostname}/tags', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ApiEntityTag]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_hosts(self, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <p>Create one or more hosts.</p> <p>You must specify at least the hostname and ipAddress in the request objects. If no hostId is specified, it will be set to the hostname.  It is an error to try and create host with the same hostId as another host.</p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_hosts(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiHostList body: The list of hosts to create
        :return: ApiHostList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_hosts_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_hosts_with_http_info(**kwargs)  # noqa: E501
            return data

    def create_hosts_with_http_info(self, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <p>Create one or more hosts.</p> <p>You must specify at least the hostname and ipAddress in the request objects. If no hostId is specified, it will be set to the hostname.  It is an error to try and create host with the same hostId as another host.</p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_hosts_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiHostList body: The list of hosts to create
        :return: ApiHostList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def delete_all_hosts(self, **kwargs):  # noqa: E501
        """Delete all hosts in the system.  # noqa: E501

        Delete all hosts in the system  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_all_hosts(async_req=True)
        >>> result = thread.get()

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

    def delete_all_hosts_with_http_info(self, **kwargs):  # noqa: E501
        """Delete all hosts in the system.  # noqa: E501

        Delete all hosts in the system  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_all_hosts_with_http_info(async_req=True)
        >>> result = thread.get()

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

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_all_hosts" % 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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def delete_host(self, host_id, **kwargs):  # noqa: E501
        """Delete a host from the system.  # noqa: E501

        Delete a host from the system  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_host(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host to remove (required)
        :return: ApiHost
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_host_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_host_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def delete_host_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Delete a host from the system.  # noqa: E501

        Delete a host from the system  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_host_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host to remove (required)
        :return: ApiHost
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def delete_tags(self, hostname, **kwargs):  # noqa: E501
        """Remove the tags associated with the host.  # noqa: E501

        Remove the tags associated with the host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_tags(hostname, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str hostname: Name of the host to remove tags from (required)
        :param list[ApiEntityTag] body: List of tags to remove from the host
        :return: list[ApiEntityTag]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_tags_with_http_info(hostname, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_tags_with_http_info(hostname, **kwargs)  # noqa: E501
            return data

    def delete_tags_with_http_info(self, hostname, **kwargs):  # noqa: E501
        """Remove the tags associated with the host.  # noqa: E501

        Remove the tags associated with the host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_tags_with_http_info(hostname, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str hostname: Name of the host to remove tags from (required)
        :param list[ApiEntityTag] body: List of tags to remove from the host
        :return: list[ApiEntityTag]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostname}/tags', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ApiEntityTag]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def enter_maintenance_mode(self, host_id, **kwargs):  # noqa: E501
        """Put the host into maintenance mode.  # noqa: E501

        Put the host into maintenance mode. This is a synchronous command. The result is known immediately upon return.  <p>Available since API v2.</p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enter_maintenance_mode(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.enter_maintenance_mode_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.enter_maintenance_mode_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def enter_maintenance_mode_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Put the host into maintenance mode.  # noqa: E501

        Put the host into maintenance mode. This is a synchronous command. The result is known immediately upon return.  <p>Available since API v2.</p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enter_maintenance_mode_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostId}/commands/enterMaintenanceMode', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiCommand',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def exit_maintenance_mode(self, host_id, **kwargs):  # noqa: E501
        """Take the host out of maintenance mode.  # noqa: E501

        Take the host out of maintenance mode. This is a synchronous command. The result is known immediately upon return.  <p> Available since API v2. </p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.exit_maintenance_mode(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.exit_maintenance_mode_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.exit_maintenance_mode_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def exit_maintenance_mode_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Take the host out of maintenance mode.  # noqa: E501

        Take the host out of maintenance mode. This is a synchronous command. The result is known immediately upon return.  <p> Available since API v2. </p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.exit_maintenance_mode_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostId}/commands/exitMaintenanceMode', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiCommand',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generate_host_certs(self, host_id, **kwargs):  # noqa: E501
        """Generates (or regenerates) a key and certificate for this host if Auto-TLS is enabled.  # noqa: E501

        Generates (or regenerates) a key and certificate for this host if Auto-TLS is enabled.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generate_host_certs(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host to generate a certificate for. (required)
        :param ApiGenerateHostCertsArguments body:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generate_host_certs_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.generate_host_certs_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def generate_host_certs_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Generates (or regenerates) a key and certificate for this host if Auto-TLS is enabled.  # noqa: E501

        Generates (or regenerates) a key and certificate for this host if Auto-TLS is enabled.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generate_host_certs_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host to generate a certificate for. (required)
        :param ApiGenerateHostCertsArguments body:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostId}/commands/generateHostCerts', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiCommand',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_host_components(self, host_id, **kwargs):  # noqa: E501
        """Returns the list of Component details on the requested host.  # noqa: E501

        Returns the list of Component details on the requested host.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_host_components(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host. (required)
        :return: list[ApiComponentInfo]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_host_components_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_host_components_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def get_host_components_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Returns the list of Component details on the requested host.  # noqa: E501

        Returns the list of Component details on the requested host.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_host_components_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host. (required)
        :return: list[ApiComponentInfo]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def get_metrics(self, host_id, **kwargs):  # noqa: E501
        """Fetch metric readings for a host.  # noqa: E501

        Fetch metric readings for a host. <p> By default, this call will look up all metrics available for the host. If only specific metrics are desired, use the <i>metrics</i> parameter. <p> By default, the returned results correspond to a 5 minute window based on the provided end time (which defaults to the current server time). The <i>from</i> and <i>to</i> parameters can be used to control the window being queried. A maximum window of 3 hours is enforced. <p> When requesting a \"full\" view, aside from the extended properties of the returned metric data, the collection will also contain information about all metrics available for the role, even if no readings are available in the requested window. <p> Host metrics also include per-network interface and per-storage device metrics. Since collecting this data incurs in more overhead, query parameters can be used to choose which network interfaces and storage devices to query, or to these metrics altogether. <p> Storage metrics are collected at different levels; for example, per-disk and per-partition metrics are available. The \"storageIds\" parameter can be used to filter specific storage IDs. <p> In the returned data, the network interfaces and storage IDs can be identified by looking at the \"context\" property of the metric objects.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_metrics(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The host's ID. (required)
        :param str _from: Start of the period to query.
        :param list[str] ifs: Network interfaces to query for metrics (default = all).
        :param list[str] metrics: Filter for which metrics to query.
        :param bool query_nw: Whether to query for network interface metrics.
        :param bool query_storage: Whether to query for storage metrics.
        :param list[str] storage_ids: Storage context IDs to query for metrics (default = all).
        :param str to: End of the period to query.
        :param str view: The view of the data to materialize, either \"summary\" or \"full\".
        :return: ApiMetricList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_metrics_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_metrics_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def get_metrics_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Fetch metric readings for a host.  # noqa: E501

        Fetch metric readings for a host. <p> By default, this call will look up all metrics available for the host. If only specific metrics are desired, use the <i>metrics</i> parameter. <p> By default, the returned results correspond to a 5 minute window based on the provided end time (which defaults to the current server time). The <i>from</i> and <i>to</i> parameters can be used to control the window being queried. A maximum window of 3 hours is enforced. <p> When requesting a \"full\" view, aside from the extended properties of the returned metric data, the collection will also contain information about all metrics available for the role, even if no readings are available in the requested window. <p> Host metrics also include per-network interface and per-storage device metrics. Since collecting this data incurs in more overhead, query parameters can be used to choose which network interfaces and storage devices to query, or to these metrics altogether. <p> Storage metrics are collected at different levels; for example, per-disk and per-partition metrics are available. The \"storageIds\" parameter can be used to filter specific storage IDs. <p> In the returned data, the network interfaces and storage IDs can be identified by looking at the \"context\" property of the metric objects.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_metrics_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The host's ID. (required)
        :param str _from: Start of the period to query.
        :param list[str] ifs: Network interfaces to query for metrics (default = all).
        :param list[str] metrics: Filter for which metrics to query.
        :param bool query_nw: Whether to query for network interface metrics.
        :param bool query_storage: Whether to query for storage metrics.
        :param list[str] storage_ids: Storage context IDs to query for metrics (default = all).
        :param str to: End of the period to query.
        :param str view: The view of the data to materialize, either \"summary\" or \"full\".
        :return: ApiMetricList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['host_id', '_from', 'ifs', 'metrics', 'query_nw', 'query_storage', 'storage_ids', 'to', 'view']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'ifs' in params:
            query_params.append(('ifs', params['ifs']))  # noqa: E501
            collection_formats['ifs'] = 'multi'  # noqa: E501
        if 'metrics' in params:
            query_params.append(('metrics', params['metrics']))  # noqa: E501
            collection_formats['metrics'] = 'multi'  # noqa: E501
        if 'query_nw' in params:
            query_params.append(('queryNw', params['query_nw']))  # noqa: E501
        if 'query_storage' in params:
            query_params.append(('queryStorage', params['query_storage']))  # noqa: E501
        if 'storage_ids' in params:
            query_params.append(('storageIds', params['storage_ids']))  # noqa: E501
            collection_formats['storageIds'] = 'multi'  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501
        if 'view' in params:
            query_params.append(('view', params['view']))  # 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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def hosts_enter_maintenance_mode(self, **kwargs):  # noqa: E501
        """Puts a set of hosts into Maintenance mode.  # noqa: E501

        Puts a set of hosts into Maintenance mode  <p> Available since API v49. Since this is a bulk API, the response may contain partial failures. The returned list contains a list of responses indicating the status of the maintenance mode of the hosts. </p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hosts_enter_maintenance_mode(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiHostNameList body: The List of Host Names that needs to go into the maintenance mode.
        :return: ApiHostMaintenanceResponseList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.hosts_enter_maintenance_mode_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.hosts_enter_maintenance_mode_with_http_info(**kwargs)  # noqa: E501
            return data

    def hosts_enter_maintenance_mode_with_http_info(self, **kwargs):  # noqa: E501
        """Puts a set of hosts into Maintenance mode.  # noqa: E501

        Puts a set of hosts into Maintenance mode  <p> Available since API v49. Since this is a bulk API, the response may contain partial failures. The returned list contains a list of responses indicating the status of the maintenance mode of the hosts. </p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hosts_enter_maintenance_mode_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiHostNameList body: The List of Host Names that needs to go into the maintenance mode.
        :return: ApiHostMaintenanceResponseList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def migrate_roles(self, host_id, **kwargs):  # noqa: E501
        """Migrate roles to a different host.  # noqa: E501

        Migrate roles to a different host. <p> This command applies only to HDFS NameNode, JournalNode, and Failover Controller roles. In order to migrate these roles: <ul> <li>HDFS High Availability must be enabled, using quorum-based storage.</li> <li>HDFS must not be configured to use a federated nameservice.</li> </ul> <b>Migrating a NameNode or JournalNode role requires cluster downtime</b>. HDFS, along with all of its dependent services, will be stopped at the beginning of the migration process, and restarted at its conclusion. <p>If the active NameNode is selected for migration, a manual failover will be performed before the role is migrated. The role will remain in standby mode after the migration is complete. <p>When migrating a NameNode role, the co-located Failover Controller role must be migrated as well if automatic failover is enabled. The Failover Controller role name must be included in the list of role names to migrate specified in the arguments to this command (it will not be included implicitly). This command does not allow a Failover Controller role to be moved by itself, although it is possible to move a JournalNode independently. <p> Available since API v10.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.migrate_roles(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host on which the roles to migrate currently reside (required)
        :param ApiMigrateRolesArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.migrate_roles_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.migrate_roles_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def migrate_roles_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Migrate roles to a different host.  # noqa: E501

        Migrate roles to a different host. <p> This command applies only to HDFS NameNode, JournalNode, and Failover Controller roles. In order to migrate these roles: <ul> <li>HDFS High Availability must be enabled, using quorum-based storage.</li> <li>HDFS must not be configured to use a federated nameservice.</li> </ul> <b>Migrating a NameNode or JournalNode role requires cluster downtime</b>. HDFS, along with all of its dependent services, will be stopped at the beginning of the migration process, and restarted at its conclusion. <p>If the active NameNode is selected for migration, a manual failover will be performed before the role is migrated. The role will remain in standby mode after the migration is complete. <p>When migrating a NameNode role, the co-located Failover Controller role must be migrated as well if automatic failover is enabled. The Failover Controller role name must be included in the list of role names to migrate specified in the arguments to this command (it will not be included implicitly). This command does not allow a Failover Controller role to be moved by itself, although it is possible to move a JournalNode independently. <p> Available since API v10.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.migrate_roles_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host on which the roles to migrate currently reside (required)
        :param ApiMigrateRolesArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostId}/commands/migrateRoles', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiCommand',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def read_host(self, host_id, **kwargs):  # noqa: E501
        """Returns a specific Host in the system.  # noqa: E501

        Returns a specific Host in the system.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.read_host(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host to read. (required)
        :param str view: The view to materialize. Defaults to 'full'.
        :return: ApiHost
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.read_host_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.read_host_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def read_host_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Returns a specific Host in the system.  # noqa: E501

        Returns a specific Host in the system.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.read_host_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host to read. (required)
        :param str view: The view to materialize. Defaults to 'full'.
        :return: ApiHost
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []
        if 'view' in params:
            query_params.append(('view', params['view']))  # 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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def read_host_config(self, host_id, **kwargs):  # noqa: E501
        """Retrieves the configuration of a specific host.  # noqa: E501

        Retrieves the configuration of a specific host.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.read_host_config(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host. (required)
        :param str view: The view of the data to materialize, either \"summary\" or \"full\".
        :return: ApiConfigList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.read_host_config_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.read_host_config_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def read_host_config_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Retrieves the configuration of a specific host.  # noqa: E501

        Retrieves the configuration of a specific host.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.read_host_config_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host. (required)
        :param str view: The view of the data to materialize, either \"summary\" or \"full\".
        :return: ApiConfigList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []
        if 'view' in params:
            query_params.append(('view', params['view']))  # 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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def read_hosts(self, **kwargs):  # noqa: E501
        """Returns hosts in the system filtered by optional host configuration parameters, if specified.  # noqa: E501

        Returns hosts in the system filtered by optional host configuration parameters, if specified.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.read_hosts(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str config_name: Optional host config name to filter hosts by. Available from v40.
        :param str config_value: host config value associated with config name. Available from v40.
        :param str view: The view to materialize
        :return: ApiHostList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.read_hosts_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.read_hosts_with_http_info(**kwargs)  # noqa: E501
            return data

    def read_hosts_with_http_info(self, **kwargs):  # noqa: E501
        """Returns hosts in the system filtered by optional host configuration parameters, if specified.  # noqa: E501

        Returns hosts in the system filtered by optional host configuration parameters, if specified.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.read_hosts_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str config_name: Optional host config name to filter hosts by. Available from v40.
        :param str config_value: host config value associated with config name. Available from v40.
        :param str view: The view to materialize
        :return: ApiHostList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'config_name' in params:
            query_params.append(('configName', params['config_name']))  # noqa: E501
        if 'config_value' in params:
            query_params.append(('configValue', params['config_value']))  # noqa: E501
        if 'view' in params:
            query_params.append(('view', params['view']))  # 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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def read_tags(self, hostname, **kwargs):  # noqa: E501
        """Returns the tags associated with this host.  # noqa: E501

        Returns the tags associated with this host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.read_tags(hostname, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str hostname: The name of the host (required)
        :param int limit: Number of tags
        :param int offset: Index of the first tag to retrieve
        :return: list[ApiEntityTag]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.read_tags_with_http_info(hostname, **kwargs)  # noqa: E501
        else:
            (data) = self.read_tags_with_http_info(hostname, **kwargs)  # noqa: E501
            return data

    def read_tags_with_http_info(self, hostname, **kwargs):  # noqa: E501
        """Returns the tags associated with this host.  # noqa: E501

        Returns the tags associated with this host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.read_tags_with_http_info(hostname, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str hostname: The name of the host (required)
        :param int limit: Number of tags
        :param int offset: Index of the first tag to retrieve
        :return: list[ApiEntityTag]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # 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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def reallocate_memory(self, **kwargs):  # noqa: E501
        """Performs memory reallocation on set of hosts.  # noqa: E501

        Performs memory reallocation on set of hosts  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reallocate_memory(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiHostNameList body: A list of hosts identified by
hostnames to perform reallocation on.
        :return: ApiGenericResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.reallocate_memory_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.reallocate_memory_with_http_info(**kwargs)  # noqa: E501
            return data

    def reallocate_memory_with_http_info(self, **kwargs):  # noqa: E501
        """Performs memory reallocation on set of hosts.  # noqa: E501

        Performs memory reallocation on set of hosts  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reallocate_memory_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiHostNameList body: A list of hosts identified by
hostnames to perform reallocation on.
        :return: ApiGenericResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def remove_hosts_from_cluster(self, **kwargs):  # noqa: E501
        """Decommissions and deletes all non management roles from the list of hosts and removes the hosts from the cluster.  # noqa: E501

        Decommissions and deletes all non management roles from the list of hosts and removes the hosts from the cluster. Also additionally delete the hosts if deleteHosts is set to true.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remove_hosts_from_cluster(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiHostsToRemoveArgs body: The list of hosts to remove from cluster or delete from CM
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.remove_hosts_from_cluster_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.remove_hosts_from_cluster_with_http_info(**kwargs)  # noqa: E501
            return data

    def remove_hosts_from_cluster_with_http_info(self, **kwargs):  # noqa: E501
        """Decommissions and deletes all non management roles from the list of hosts and removes the hosts from the cluster.  # noqa: E501

        Decommissions and deletes all non management roles from the list of hosts and removes the hosts from the cluster. Also additionally delete the hosts if deleteHosts is set to true.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remove_hosts_from_cluster_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiHostsToRemoveArgs body: The list of hosts to remove from cluster or delete from CM
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def reset_host_id(self, host_id, **kwargs):  # noqa: E501
        """Forces agent on specified host to switch to reporting a different host id.  # noqa: E501

        Forces agent on specified host to switch to reporting a different host id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reset_host_id(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host that should be affected. (required)
        :param str new_host_id: New ID the the host should report.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.reset_host_id_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.reset_host_id_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def reset_host_id_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Forces agent on specified host to switch to reporting a different host id.  # noqa: E501

        Forces agent on specified host to switch to reporting a different host id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reset_host_id_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host that should be affected. (required)
        :param str new_host_id: New ID the the host should report.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []
        if 'new_host_id' in params:
            query_params.append(('newHostId', params['new_host_id']))  # 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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostId}/commands/resetHostId', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiCommand',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def stop_all_roles_on_node_gracefully(self, hostname, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <p></p>Gracefully stops all roles that support it; otherwise, performs a simple stop on the provided host.</p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.stop_all_roles_on_node_gracefully(hostname, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str hostname: The name of the host on which all the roles needs to be stopped. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.stop_all_roles_on_node_gracefully_with_http_info(hostname, **kwargs)  # noqa: E501
        else:
            (data) = self.stop_all_roles_on_node_gracefully_with_http_info(hostname, **kwargs)  # noqa: E501
            return data

    def stop_all_roles_on_node_gracefully_with_http_info(self, hostname, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <p></p>Gracefully stops all roles that support it; otherwise, performs a simple stop on the provided host.</p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.stop_all_roles_on_node_gracefully_with_http_info(hostname, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str hostname: The name of the host on which all the roles needs to be stopped. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        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'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostname}/commands/stopAllRolesGracefully', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiCommand',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_host(self, host_id, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <p>Update an existing host in the system.</p> <p>Currently, only updating the rackId is supported.  All other fields of the host will be ignored.</p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_host(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The hostId to update (required)
        :param ApiHost body: The updated host object.
        :return: ApiHost
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_host_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_host_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def update_host_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <p>Update an existing host in the system.</p> <p>Currently, only updating the rackId is supported.  All other fields of the host will be ignored.</p>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_host_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The hostId to update (required)
        :param ApiHost body: The updated host object.
        :return: ApiHost
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

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

    def update_host_config(self, host_id, **kwargs):  # noqa: E501
        """Updates the host configuration with the given values.  # noqa: E501

        Updates the host configuration with the given values. <p> If a value is set in the given configuration, it will be added to the host's configuration, replacing any existing entries. If a value is unset (its value is null), the existing configuration for the attribute will be erased, if any. <p> Attributes that are not listed in the input will maintain their current values in the configuration.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_host_config(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host. (required)
        :param ApiConfigList body: Configuration changes.
        :param str message: Optional message describing the changes.
        :return: ApiConfigList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_host_config_with_http_info(host_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_host_config_with_http_info(host_id, **kwargs)  # noqa: E501
            return data

    def update_host_config_with_http_info(self, host_id, **kwargs):  # noqa: E501
        """Updates the host configuration with the given values.  # noqa: E501

        Updates the host configuration with the given values. <p> If a value is set in the given configuration, it will be added to the host's configuration, replacing any existing entries. If a value is unset (its value is null), the existing configuration for the attribute will be erased, if any. <p> Attributes that are not listed in the input will maintain their current values in the configuration.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_host_config_with_http_info(host_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str host_id: The ID of the host. (required)
        :param ApiConfigList body: Configuration changes.
        :param str message: Optional message describing the changes.
        :return: ApiConfigList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/hosts/{hostId}/config', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiConfigList',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
