# 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 ServicesResourceApi(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, cluster_name, service_name, **kwargs):  # noqa: E501
        """Attach tags to the service.  # noqa: E501

        Attach tags to the service. 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the service (required)
        :param list[ApiEntityTag] body: List of tags to add to the service
        :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(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.add_tags_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def add_tags_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Attach tags to the service.  # noqa: E501

        Attach tags to the service. 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

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

        all_params = ['cluster_name', 'service_name', '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 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `add_tags`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `add_tags`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/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 collect_yarn_application_diagnostics(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Collect the Diagnostics data for Yarn applications.  # noqa: E501

        Collect the Diagnostics data for Yarn applications <p> Available since API v8.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.collect_yarn_application_diagnostics(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the YARN service on which to run the command. (required)
        :param ApiYarnApplicationDiagnosticsCollectionArgs body: Arguments used for collecting diagnostics data for Yarn applications
        :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.collect_yarn_application_diagnostics_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.collect_yarn_application_diagnostics_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def collect_yarn_application_diagnostics_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Collect the Diagnostics data for Yarn applications.  # noqa: E501

        Collect the Diagnostics data for Yarn applications <p> Available since API v8.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.collect_yarn_application_diagnostics_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the YARN service on which to run the command. (required)
        :param ApiYarnApplicationDiagnosticsCollectionArgs body: Arguments used for collecting diagnostics data for Yarn applications
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/yarnApplicationDiagnosticsCollection', '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 copy_hdfs_file(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Copies source HDFS file to destination cluster HDFS.  # noqa: E501

        Copies source HDFS file to destination cluster HDFS  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.copy_hdfs_file(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The source HDFS service (required)
        :param ApiServiceRef body: ApiServiceRef for the destination
        :param str destination_path: HDFS full path at destination
        :param str source_path: HDFS full path at source
        :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.copy_hdfs_file_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.copy_hdfs_file_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def copy_hdfs_file_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Copies source HDFS file to destination cluster HDFS.  # noqa: E501

        Copies source HDFS file to destination cluster HDFS  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.copy_hdfs_file_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The source HDFS service (required)
        :param ApiServiceRef body: ApiServiceRef for the destination
        :param str destination_path: HDFS full path at destination
        :param str source_path: HDFS full path at source
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'body', 'destination_path', 'source_path']  # 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 copy_hdfs_file" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `copy_hdfs_file`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `copy_hdfs_file`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'destination_path' in params:
            query_params.append(('destinationPath', params['destination_path']))  # noqa: E501
        if 'source_path' in params:
            query_params.append(('sourcePath', params['source_path']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/copyHdfsFile', '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 create_beeswax_warehouse_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Beeswax role's Hive warehouse directory, on Hue services.  # noqa: E501

        Create the Beeswax role's Hive warehouse directory, on Hue services.  # 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_beeswax_warehouse_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hue service name. (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.create_beeswax_warehouse_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_beeswax_warehouse_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_beeswax_warehouse_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Beeswax role's Hive warehouse directory, on Hue services.  # noqa: E501

        Create the Beeswax role's Hive warehouse directory, on Hue services.  # 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_beeswax_warehouse_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hue service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hueCreateHiveWarehouse', '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 create_h_base_root_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the root directory of an HBase service.  # noqa: E501

        Creates the root directory of an HBase service.  # 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_h_base_root_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HBase service name. (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.create_h_base_root_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_h_base_root_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_h_base_root_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the root directory of an HBase service.  # noqa: E501

        Creates the root directory of an HBase service.  # 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_h_base_root_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HBase service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseCreateRoot', '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 create_hdfs_file(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """create_hdfs_file  # 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_hdfs_file(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name (required)
        :param str body: Content to be put in the file to be created
        :param bool overwrite: If true overwrite the file
        :param str path: full path to the HDFS file to be created
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_hdfs_file_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_hdfs_file_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_hdfs_file_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """create_hdfs_file  # 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_hdfs_file_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name (required)
        :param str body: Content to be put in the file to be created
        :param bool overwrite: If true overwrite the file
        :param str path: full path to the HDFS file to be created
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'body', 'overwrite', 'path']  # 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_hdfs_file" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `create_hdfs_file`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `create_hdfs_file`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'overwrite' in params:
            query_params.append(('overwrite', params['overwrite']))  # noqa: E501
        if 'path' in params:
            query_params.append(('path', params['path']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/createHdfsFile', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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_hive_user_dir_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive user directory.  # noqa: E501

        Create the Hive user directory <p> Available since API v4. </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_hive_user_dir_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hive service name. (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.create_hive_user_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_hive_user_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_hive_user_dir_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive user directory.  # noqa: E501

        Create the Hive user directory <p> Available since API v4. </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_hive_user_dir_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hive service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveUserDir', '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 create_hive_warehouse_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive warehouse directory, on Hive services.  # noqa: E501

        Create the Hive warehouse directory, on Hive services. <p> Available since API v3. </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_hive_warehouse_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hive service name. (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.create_hive_warehouse_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_hive_warehouse_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_hive_warehouse_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive warehouse directory, on Hive services.  # noqa: E501

        Create the Hive warehouse directory, on Hive services. <p> Available since API v3. </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_hive_warehouse_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hive service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveWarehouse', '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 create_hive_warehouse_external_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive warehouse external directory for Private Cloud.  # noqa: E501

        Create the Hive warehouse external directory for Private Cloud.  # 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_hive_warehouse_external_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hive service name. (required)
        :param str directory: Name of the warehouse external directory.
        :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.create_hive_warehouse_external_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_hive_warehouse_external_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_hive_warehouse_external_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive warehouse external directory for Private Cloud.  # noqa: E501

        Create the Hive warehouse external directory for Private Cloud.  # 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_hive_warehouse_external_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hive service name. (required)
        :param str directory: Name of the warehouse external directory.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'directory' in params:
            query_params.append(('directory', params['directory']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveWarehouseExternal', '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 create_impala_user_dir_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Impala user directory.  # noqa: E501

        Create the Impala user directory <p> Available since API v6. </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_impala_user_dir_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Impala service name. (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.create_impala_user_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_impala_user_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_impala_user_dir_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Impala user directory.  # noqa: E501

        Create the Impala user directory <p> Available since API v6. </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_impala_user_dir_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Impala service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/impalaCreateUserDir', '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 create_oozie_db(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the Oozie Database Schema in the configured database.  # noqa: E501

        Creates the Oozie Database Schema in the configured database. This command does not create database. This command creates only tables required by Oozie. To create database, please refer to oozieCreateEmbeddedDatabase()  <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.create_oozie_db(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Oozie service on which to run the command. (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.create_oozie_db_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_oozie_db_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_oozie_db_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the Oozie Database Schema in the configured database.  # noqa: E501

        Creates the Oozie Database Schema in the configured database. This command does not create database. This command creates only tables required by Oozie. To create database, please refer to oozieCreateEmbeddedDatabase()  <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.create_oozie_db_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Oozie service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/createOozieDb', '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 create_services(self, cluster_name, **kwargs):  # noqa: E501
        """Creates a list of services.  # noqa: E501

        Creates a list of services. <p> There are typically two service creation strategies: <ol> <li> The caller may choose to set up a new service piecemeal, by first creating the service itself (without any roles or configuration), and then create the roles, and then specify configuration. </li> <li> Alternatively, the caller can pack all the information in one call, by fully specifying the fields in the com.cloudera.api.model.ApiService object, with <ul> <li>service config and role type config, and</li> <li>role to host assignment.</li> </ul> </li> </ol>  <table> <thead> <tr> <th>Cluster Version</th> <th>Available Service Types</th> </tr> </thead> <tbody> <tr> <td>CDH4</td> <td>HDFS, MAPREDUCE, HBASE, OOZIE, ZOOKEEPER, HUE, YARN, IMPALA, FLUME, HIVE, SOLR, SQOOP, KS_INDEXER</td> </tr> <tr> <td>CDH5</td> <td>HDFS, MAPREDUCE, HBASE, OOZIE, ZOOKEEPER, HUE, YARN, IMPALA, FLUME, HIVE, SOLR, SQOOP, KS_INDEXER, SQOOP_CLIENT, SENTRY, ACCUMULO16, KMS, SPARK_ON_YARN, KAFKA </td> </tr> </tbody> </table>  As of V6, GET /{clusterName}/serviceTypes should be used to get the service types available to the cluster.  # 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_services(cluster_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param ApiServiceList body: Details of the services to create.
        :return: ApiServiceList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_services_with_http_info(cluster_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_services_with_http_info(cluster_name, **kwargs)  # noqa: E501
            return data

    def create_services_with_http_info(self, cluster_name, **kwargs):  # noqa: E501
        """Creates a list of services.  # noqa: E501

        Creates a list of services. <p> There are typically two service creation strategies: <ol> <li> The caller may choose to set up a new service piecemeal, by first creating the service itself (without any roles or configuration), and then create the roles, and then specify configuration. </li> <li> Alternatively, the caller can pack all the information in one call, by fully specifying the fields in the com.cloudera.api.model.ApiService object, with <ul> <li>service config and role type config, and</li> <li>role to host assignment.</li> </ul> </li> </ol>  <table> <thead> <tr> <th>Cluster Version</th> <th>Available Service Types</th> </tr> </thead> <tbody> <tr> <td>CDH4</td> <td>HDFS, MAPREDUCE, HBASE, OOZIE, ZOOKEEPER, HUE, YARN, IMPALA, FLUME, HIVE, SOLR, SQOOP, KS_INDEXER</td> </tr> <tr> <td>CDH5</td> <td>HDFS, MAPREDUCE, HBASE, OOZIE, ZOOKEEPER, HUE, YARN, IMPALA, FLUME, HIVE, SOLR, SQOOP, KS_INDEXER, SQOOP_CLIENT, SENTRY, ACCUMULO16, KMS, SPARK_ON_YARN, KAFKA </td> </tr> </tbody> </table>  As of V6, GET /{clusterName}/serviceTypes should be used to get the service types available to the cluster.  # 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_services_with_http_info(cluster_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param ApiServiceList body: Details of the services to create.
        :return: ApiServiceList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # 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(
            '/clusters/{clusterName}/services', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiServiceList',  # 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_solr_hdfs_home_dir_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the home directory of a Solr service in HDFS.  # noqa: E501

        Creates the home directory of a Solr service in HDFS.  <p> Available since API v4.  # 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_solr_hdfs_home_dir_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Solr service name. (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.create_solr_hdfs_home_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_solr_hdfs_home_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_solr_hdfs_home_dir_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the home directory of a Solr service in HDFS.  # noqa: E501

        Creates the home directory of a Solr service in HDFS.  <p> Available since API v4.  # 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_solr_hdfs_home_dir_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Solr service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/createSolrHdfsHomeDir', '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 create_sqoop_user_dir_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the user directory of a Sqoop service in HDFS.  # noqa: E501

        Creates the user directory of a Sqoop service in HDFS.  <p> Available since API v4.  # 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_sqoop_user_dir_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Sqoop service name. (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.create_sqoop_user_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_sqoop_user_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_sqoop_user_dir_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the user directory of a Sqoop service in HDFS.  # noqa: E501

        Creates the user directory of a Sqoop service in HDFS.  <p> Available since API v4.  # 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_sqoop_user_dir_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Sqoop service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/createSqoopUserDir', '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 create_yarn_cm_container_usage_input_dir_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the HDFS directory where YARN container usage metrics are stored by NodeManagers for CM to read and aggregate into app usage metrics.  # noqa: E501

        Creates the HDFS directory where YARN container usage metrics are stored by NodeManagers for CM to read and aggregate into app usage metrics. <p> Available since API v13. </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_yarn_cm_container_usage_input_dir_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (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.create_yarn_cm_container_usage_input_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_yarn_cm_container_usage_input_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_yarn_cm_container_usage_input_dir_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates the HDFS directory where YARN container usage metrics are stored by NodeManagers for CM to read and aggregate into app usage metrics.  # noqa: E501

        Creates the HDFS directory where YARN container usage metrics are stored by NodeManagers for CM to read and aggregate into app usage metrics. <p> Available since API v13. </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_yarn_cm_container_usage_input_dir_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/yarnCreateCmContainerUsageInputDirCommand', '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 create_yarn_job_history_dir_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Yarn job history directory.  # noqa: E501

        Create the Yarn job history directory <p> Available since API v6. </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_yarn_job_history_dir_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (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.create_yarn_job_history_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_yarn_job_history_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_yarn_job_history_dir_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Yarn job history directory.  # noqa: E501

        Create the Yarn job history directory <p> Available since API v6. </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_yarn_job_history_dir_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/yarnCreateJobHistoryDirCommand', '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 create_yarn_node_manager_remote_app_log_dir_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Yarn NodeManager remote application log directory.  # noqa: E501

        Create the Yarn NodeManager remote application log directory <p> Available since API v6. </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_yarn_node_manager_remote_app_log_dir_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (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.create_yarn_node_manager_remote_app_log_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.create_yarn_node_manager_remote_app_log_dir_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def create_yarn_node_manager_remote_app_log_dir_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Yarn NodeManager remote application log directory.  # noqa: E501

        Create the Yarn NodeManager remote application log directory <p> Available since API v6. </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_yarn_node_manager_remote_app_log_dir_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/yarnNodeManagerRemoteAppLogDirCommand', '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 decommission_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Decommission roles of a service.  # noqa: E501

        Decommission roles of a service. <p> For HBase services, the list should contain names of RegionServers to decommission. <p> For HDFS services, the list should contain names of DataNodes to decommission.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.decommission_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HBase service name. (required)
        :param ApiRoleNameList body: List of role names to decommision.
        :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.decommission_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.decommission_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def decommission_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Decommission roles of a service.  # noqa: E501

        Decommission roles of a service. <p> For HBase services, the list should contain names of RegionServers to decommission. <p> For HDFS services, the list should contain names of DataNodes to decommission.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.decommission_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HBase service name. (required)
        :param ApiRoleNameList body: List of role names to decommision.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/decommission', '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 delete_hdfs_path(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Deletes the file or directory, specified by the given path, on the given HDFS service.  # noqa: E501

        Deletes the file or directory, specified by the given path, on the given HDFS service.  # 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_hdfs_path(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name (required)
        :param str path: path of the file or directory to be deleted
        :param bool recursive: If the path is a directory and this is set to true, then deletes the directory and its contents, otherwise the call will fail if the directory is not empty
        :return: DeleteHdfsPathResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_hdfs_path_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_hdfs_path_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def delete_hdfs_path_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Deletes the file or directory, specified by the given path, on the given HDFS service.  # noqa: E501

        Deletes the file or directory, specified by the given path, on the given HDFS service.  # 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_hdfs_path_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name (required)
        :param str path: path of the file or directory to be deleted
        :param bool recursive: If the path is a directory and this is set to true, then deletes the directory and its contents, otherwise the call will fail if the directory is not empty
        :return: DeleteHdfsPathResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'path', 'recursive']  # 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_hdfs_path" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `delete_hdfs_path`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `delete_hdfs_path`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'path' in params:
            query_params.append(('path', params['path']))  # noqa: E501
        if 'recursive' in params:
            query_params.append(('recursive', params['recursive']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/deleteHdfsPath', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeleteHdfsPathResult',  # 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_service(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Deletes a service from the system.  # noqa: E501

        Deletes a service 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_service(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service to delete. (required)
        :return: ApiService
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_service_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_service_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def delete_service_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Deletes a service from the system.  # noqa: E501

        Deletes a service 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_service_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service to delete. (required)
        :return: ApiService
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiService',  # 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, cluster_name, service_name, **kwargs):  # noqa: E501
        """Remove the tags associated with the service.  # noqa: E501

        Remove the tags associated with the service. 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the service to remove tags from (required)
        :param list[ApiEntityTag] body: List of tags to remove from the service
        :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(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_tags_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def delete_tags_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Remove the tags associated with the service.  # noqa: E501

        Remove the tags associated with the service. 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

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

        all_params = ['cluster_name', 'service_name', '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 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `delete_tags`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `delete_tags`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/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 deploy_client_config_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Deploy a service's client configuration.  # noqa: E501

        Deploy a service's client configuration. <p> The client configuration is deployed to the hosts where the given roles are running. <p/> Added in v3: passing null for the role name list will deploy client configs to all known service roles. Added in v6: passing an empty role name list will deploy client configs to all known service roles. <p/> In Cloudera Manager 5.3 and newer, client configurations are fully managed, meaning that the server maintains state about which client configurations should exist and be managed by alternatives, and the agents actively rectify their hosts with this state. Consequently, if this API call is made with a specific set of roles, Cloudera Manager will deactivate, from alternatives, any deployed client configs from any non-gateway roles that are <em>not</em> specified as arguments. Gateway roles are always preserved, and calling this API with an empty or null argument continues to deploy to all roles. <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.deploy_client_config_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param ApiRoleNameList body: List of role names.
        :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.deploy_client_config_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.deploy_client_config_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def deploy_client_config_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Deploy a service's client configuration.  # noqa: E501

        Deploy a service's client configuration. <p> The client configuration is deployed to the hosts where the given roles are running. <p/> Added in v3: passing null for the role name list will deploy client configs to all known service roles. Added in v6: passing an empty role name list will deploy client configs to all known service roles. <p/> In Cloudera Manager 5.3 and newer, client configurations are fully managed, meaning that the server maintains state about which client configurations should exist and be managed by alternatives, and the agents actively rectify their hosts with this state. Consequently, if this API call is made with a specific set of roles, Cloudera Manager will deactivate, from alternatives, any deployed client configs from any non-gateway roles that are <em>not</em> specified as arguments. Gateway roles are always preserved, and calling this API with an empty or null argument continues to deploy to all roles. <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.deploy_client_config_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param ApiRoleNameList body: List of role names.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/deployClientConfig', '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 disable_catalog_statestore_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for Catalog and Statestore service.  # noqa: E501

        Disable high availability (HA) for Catalog and Statestore service. <p> This command only applies to CDH 7.1.9SP1+ Impala Catalog and Statestore services. <p> The command will keep exactly one Catalog and Statestore server on the specified host. <p> All services that depend on Impala will be restarted after disabling Catalog and Statestore HA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_catalog_statestore_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Impala service name. (required)
        :param ApiDisableCatalogStatestoreHaArguments body: An instance of ApiDisableCatalogStatestoreHaArguments
representing the arguments to 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.disable_catalog_statestore_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.disable_catalog_statestore_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def disable_catalog_statestore_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for Catalog and Statestore service.  # noqa: E501

        Disable high availability (HA) for Catalog and Statestore service. <p> This command only applies to CDH 7.1.9SP1+ Impala Catalog and Statestore services. <p> The command will keep exactly one Catalog and Statestore server on the specified host. <p> All services that depend on Impala will be restarted after disabling Catalog and Statestore HA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_catalog_statestore_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Impala service name. (required)
        :param ApiDisableCatalogStatestoreHaArguments body: An instance of ApiDisableCatalogStatestoreHaArguments
representing the arguments to the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/disableCatalogStatestoreHa', '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 disable_jt_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for JobTracker.  # noqa: E501

        Disable high availability (HA) for JobTracker.  As part of disabling HA, any services that depend on the MapReduce service being modified will be stopped. The command arguments provide options to specify name of JobTracker that will be preserved. The Command will redeploy the client configurations for services of the cluster after HA has been disabled.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_jt_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The MapReduce service name. (required)
        :param ApiDisableJtHaArguments 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.disable_jt_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.disable_jt_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def disable_jt_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for JobTracker.  # noqa: E501

        Disable high availability (HA) for JobTracker.  As part of disabling HA, any services that depend on the MapReduce service being modified will be stopped. The command arguments provide options to specify name of JobTracker that will be preserved. The Command will redeploy the client configurations for services of the cluster after HA has been disabled.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_jt_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The MapReduce service name. (required)
        :param ApiDisableJtHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/disableJtHa', '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 disable_llama_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Not Supported.  # noqa: E501

        Not Supported. Llama was removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_llama_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiDisableLlamaHaArguments 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.disable_llama_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.disable_llama_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def disable_llama_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Not Supported.  # noqa: E501

        Not Supported. Llama was removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_llama_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiDisableLlamaHaArguments body:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/impalaDisableLlamaHa', '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 disable_llama_rm_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Not Supported.  # noqa: E501

        Not Supported. Llama was removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_llama_rm_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (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.disable_llama_rm_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.disable_llama_rm_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def disable_llama_rm_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Not Supported.  # noqa: E501

        Not Supported. Llama was removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_llama_rm_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/impalaDisableLlamaRm', '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 disable_oozie_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for Oozie.  # noqa: E501

        Disable high availability (HA) for Oozie.  As part of disabling HA, any services that depend on the Oozie service being modified will be stopped. The command arguments provide options to specify name of Oozie Server that will be preserved. After deleting, other Oozie servers, all the services that were stopped are restarted.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_oozie_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Oozie service name. (required)
        :param ApiDisableOozieHaArguments 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.disable_oozie_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.disable_oozie_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def disable_oozie_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for Oozie.  # noqa: E501

        Disable high availability (HA) for Oozie.  As part of disabling HA, any services that depend on the Oozie service being modified will be stopped. The command arguments provide options to specify name of Oozie Server that will be preserved. After deleting, other Oozie servers, all the services that were stopped are restarted.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_oozie_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Oozie service name. (required)
        :param ApiDisableOozieHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/oozieDisableHa', '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 disable_rm_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for ResourceManager.  # noqa: E501

        Disable high availability (HA) for ResourceManager.  As part of disabling HA, any services that depend on the YARN service being modified will be stopped. The command arguments provide options to specify name of ResourceManager that will be preserved. The command will redeploy the client configurations for services of the cluster after HA has been disabled.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_rm_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (required)
        :param ApiDisableRmHaArguments 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.disable_rm_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.disable_rm_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def disable_rm_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for ResourceManager.  # noqa: E501

        Disable high availability (HA) for ResourceManager.  As part of disabling HA, any services that depend on the YARN service being modified will be stopped. The command arguments provide options to specify name of ResourceManager that will be preserved. The command will redeploy the client configurations for services of the cluster after HA has been disabled.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_rm_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (required)
        :param ApiDisableRmHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/disableRmHa', '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 disable_sentry_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for Sentry service.  # noqa: E501

        Disable high availability (HA) for Sentry service. <p> This command only applies to CDH 5.13+ Sentry services. <p> The command will keep exactly one Sentry server, on the specified host, and update the ZooKeeper configs needed for Sentry. <p> All services that depend on HDFS will be restarted after enabling Sentry HA. <p> Note: Sentry doesn't support Rolling Restart.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_sentry_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Sentry service name. (required)
        :param ApiDisableSentryHaArgs body: An instance of ApiDisableSentryHaArgs
representing the arguments to 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.disable_sentry_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.disable_sentry_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def disable_sentry_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for Sentry service.  # noqa: E501

        Disable high availability (HA) for Sentry service. <p> This command only applies to CDH 5.13+ Sentry services. <p> The command will keep exactly one Sentry server, on the specified host, and update the ZooKeeper configs needed for Sentry. <p> All services that depend on HDFS will be restarted after enabling Sentry HA. <p> Note: Sentry doesn't support Rolling Restart.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.disable_sentry_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Sentry service name. (required)
        :param ApiDisableSentryHaArgs body: An instance of ApiDisableSentryHaArgs
representing the arguments to the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/disableSentryHa', '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 ecs_upgrade_audit(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """ecs_upgrade_audit  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ecs_upgrade_audit(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiStringList 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.ecs_upgrade_audit_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.ecs_upgrade_audit_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def ecs_upgrade_audit_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """ecs_upgrade_audit  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ecs_upgrade_audit_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiStringList body:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/ecsUpgradeAudit', '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 enable_catalog_statestore_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for Catalog and Statestore service.  # noqa: E501

        Enable high availability (HA) for Catalog and Statestore service. <p> This command only applies to CDH 7.1.9SP1+ Impala Catalog and Statestore services. <p> The command will create a new Catalog and Statestore server on the specified host for Catalog and Statestore HA. <p> All services that depend on Impala will be restarted after enabling Catalog and Statestore HA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_catalog_statestore_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Impala service name. (required)
        :param ApiEnableCatalogStatestoreHaArguments body: An instance of ApiEnableCatalogStatestoreHaArguments
representing the arguments to 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.enable_catalog_statestore_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.enable_catalog_statestore_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def enable_catalog_statestore_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for Catalog and Statestore service.  # noqa: E501

        Enable high availability (HA) for Catalog and Statestore service. <p> This command only applies to CDH 7.1.9SP1+ Impala Catalog and Statestore services. <p> The command will create a new Catalog and Statestore server on the specified host for Catalog and Statestore HA. <p> All services that depend on Impala will be restarted after enabling Catalog and Statestore HA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_catalog_statestore_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Impala service name. (required)
        :param ApiEnableCatalogStatestoreHaArguments body: An instance of ApiEnableCatalogStatestoreHaArguments
representing the arguments to the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/enableCatalogStatestoreHa', '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 enable_jt_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for a JobTracker.  # noqa: E501

        Enable high availability (HA) for a JobTracker. <p> This command only applies to CDH4 MapReduce services. <p> The command will create a new JobTracker on the specified host and then create an active/standby pair with the existing JobTracker. Autofailover will be enabled using ZooKeeper. A ZNode will be created for this purpose. Command arguments provide option to forcefully create this ZNode if one already exists. A node may already exists if JobTracker was previously enabled in HA mode but HA mode was disabled later on. The ZNode is not deleted when HA is disabled. <p> As part of enabling HA, any services that depends on the MapReduce service being modified will be stopped. Command will redeploy the client configurations for services of the cluster after HA has been 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.enable_jt_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The MapReduce service name. (required)
        :param ApiEnableJtHaArguments 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.enable_jt_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.enable_jt_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def enable_jt_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for a JobTracker.  # noqa: E501

        Enable high availability (HA) for a JobTracker. <p> This command only applies to CDH4 MapReduce services. <p> The command will create a new JobTracker on the specified host and then create an active/standby pair with the existing JobTracker. Autofailover will be enabled using ZooKeeper. A ZNode will be created for this purpose. Command arguments provide option to forcefully create this ZNode if one already exists. A node may already exists if JobTracker was previously enabled in HA mode but HA mode was disabled later on. The ZNode is not deleted when HA is disabled. <p> As part of enabling HA, any services that depends on the MapReduce service being modified will be stopped. Command will redeploy the client configurations for services of the cluster after HA has been 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.enable_jt_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The MapReduce service name. (required)
        :param ApiEnableJtHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/enableJtHa', '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 enable_llama_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Not Supported.  # noqa: E501

        Not Supported. Llama was removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_llama_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiEnableLlamaHaArguments 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.enable_llama_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.enable_llama_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def enable_llama_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Not Supported.  # noqa: E501

        Not Supported. Llama was removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_llama_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiEnableLlamaHaArguments body:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/impalaEnableLlamaHa', '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 enable_llama_rm_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Not Supported.  # noqa: E501

        Not Supported. Llama was removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_llama_rm_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiEnableLlamaRmArguments 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.enable_llama_rm_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.enable_llama_rm_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def enable_llama_rm_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Not Supported.  # noqa: E501

        Not Supported. Llama was removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_llama_rm_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiEnableLlamaRmArguments body:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/impalaEnableLlamaRm', '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 enable_oozie_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for Oozie service.  # noqa: E501

        Enable high availability (HA) for Oozie service. <p> This command only applies to CDH5+ Oozie services. <p> The command will create new Oozie Servers on the specified hosts and set the ZooKeeper and Load Balancer configs needed for Oozie HA. <p> As part of enabling HA, any services that depends on the Oozie service being modified will be stopped and restarted after enabling Oozie HA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_oozie_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Oozie service name. (required)
        :param ApiEnableOozieHaArguments 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.enable_oozie_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.enable_oozie_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def enable_oozie_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for Oozie service.  # noqa: E501

        Enable high availability (HA) for Oozie service. <p> This command only applies to CDH5+ Oozie services. <p> The command will create new Oozie Servers on the specified hosts and set the ZooKeeper and Load Balancer configs needed for Oozie HA. <p> As part of enabling HA, any services that depends on the Oozie service being modified will be stopped and restarted after enabling Oozie HA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_oozie_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Oozie service name. (required)
        :param ApiEnableOozieHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/oozieEnableHa', '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 enable_rm_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for a YARN ResourceManager.  # noqa: E501

        Enable high availability (HA) for a YARN ResourceManager. <p> This command only applies to CDH5+ YARN services. <p> The command will create a new ResourceManager on the specified host and then create an active/standby pair with the existing ResourceManager. Autofailover will be enabled using ZooKeeper. <p> As part of enabling HA, any services that depends on the YARN service being modified will be stopped. Command will redeploy the client configurations for services of the cluster after HA has been 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.enable_rm_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (required)
        :param ApiEnableRmHaArguments 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.enable_rm_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.enable_rm_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def enable_rm_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for a YARN ResourceManager.  # noqa: E501

        Enable high availability (HA) for a YARN ResourceManager. <p> This command only applies to CDH5+ YARN services. <p> The command will create a new ResourceManager on the specified host and then create an active/standby pair with the existing ResourceManager. Autofailover will be enabled using ZooKeeper. <p> As part of enabling HA, any services that depends on the YARN service being modified will be stopped. Command will redeploy the client configurations for services of the cluster after HA has been 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.enable_rm_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (required)
        :param ApiEnableRmHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/enableRmHa', '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 enable_sentry_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for Sentry service.  # noqa: E501

        Enable high availability (HA) for Sentry service. <p> This command only applies to CDH 5.13+ Sentry services. <p> The command will create a new Sentry server on the specified host and set the ZooKeeper configs needed for Sentry HA. <p> As part of enabling HA, all services that depend on HDFS will be restarted after enabling Sentry HA. <p> Note: Sentry doesn't support Rolling Restart.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_sentry_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Sentry service name. (required)
        :param ApiEnableSentryHaArgs body: An instance of ApiEnableSentryHaArgs
representing the arguments to 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.enable_sentry_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.enable_sentry_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def enable_sentry_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for Sentry service.  # noqa: E501

        Enable high availability (HA) for Sentry service. <p> This command only applies to CDH 5.13+ Sentry services. <p> The command will create a new Sentry server on the specified host and set the ZooKeeper configs needed for Sentry HA. <p> As part of enabling HA, all services that depend on HDFS will be restarted after enabling Sentry HA. <p> Note: Sentry doesn't support Rolling Restart.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.enable_sentry_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Sentry service name. (required)
        :param ApiEnableSentryHaArgs body: An instance of ApiEnableSentryHaArgs
representing the arguments to the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/enableSentryHa', '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 enter_maintenance_mode(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Put the service into maintenance mode.  # noqa: E501

        Put the service 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (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(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.enter_maintenance_mode_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def enter_maintenance_mode_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Put the service into maintenance mode.  # noqa: E501

        Put the service 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name']  # 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 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `enter_maintenance_mode`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `enter_maintenance_mode`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/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, cluster_name, service_name, **kwargs):  # noqa: E501
        """Take the service out of maintenance mode.  # noqa: E501

        Take the service 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (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(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.exit_maintenance_mode_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

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

        Take the service 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name']  # 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 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `exit_maintenance_mode`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `exit_maintenance_mode`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/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 export_sentry_permissions_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Export Sentry Permissions.  # noqa: E501

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

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (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.export_sentry_permissions_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.export_sentry_permissions_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def export_sentry_permissions_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Export Sentry Permissions.  # noqa: E501

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

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/exportSentryPermissions', '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 first_run(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Prepare and start a service.  # noqa: E501

        Prepare and start a service.  <p> Perform all the steps needed to prepare the service and start it. </p>  <p> Available since API v7. </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.first_run(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the cluster. (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.first_run_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.first_run_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def first_run_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Prepare and start a service.  # noqa: E501

        Prepare and start a service.  <p> Perform all the steps needed to prepare the service and start it. </p>  <p> Available since API v7. </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.first_run_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the cluster. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/firstRun', '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_client_config(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Download a zip-compressed archive of the client configuration, of a specific service.  # noqa: E501

        Download a zip-compressed archive of the client configuration, of a specific service. This resource does not require any authentication.  # 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_client_config(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_client_config_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_client_config_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_client_config_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Download a zip-compressed archive of the client configuration, of a specific service.  # noqa: E501

        Download a zip-compressed archive of the client configuration, of a specific service. This resource does not require any authentication.  # 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_client_config_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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/octet-stream'])  # noqa: E501

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

        return self.api_client.call_api(
            '/clusters/{clusterName}/services/{serviceName}/clientConfig', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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_hdfs_usage_report(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Fetch the HDFS usage report.  # noqa: E501

        Fetch the HDFS usage report. For the requested time range, at the specified aggregation intervals, the report shows HDFS disk usages per user. <p> This call supports returning JSON or CSV, as determined by the \"Accept\" header of application/json or text/csv. <p> Available since API v4. Only available with Cloudera Manager Enterprise Edition.  # 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_hdfs_usage_report(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param str aggregation: The (optional) aggregation period for the data. Supports \"hourly\", \"daily\" (default) and \"weekly\".
        :param str _from: The (optional) start time of the report in ISO 8601 format ( defaults to 24 hours before \"to\" time).
        :param str nameservice: The (optional) HDFS nameservice. Required for HA setup.
        :param str to: The (optional) end time of the report in ISO 8601 format ( defaults to now).
        :return: ApiHdfsUsageReport
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_hdfs_usage_report_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_hdfs_usage_report_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_hdfs_usage_report_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Fetch the HDFS usage report.  # noqa: E501

        Fetch the HDFS usage report. For the requested time range, at the specified aggregation intervals, the report shows HDFS disk usages per user. <p> This call supports returning JSON or CSV, as determined by the \"Accept\" header of application/json or text/csv. <p> Available since API v4. Only available with Cloudera Manager Enterprise Edition.  # 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_hdfs_usage_report_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param str aggregation: The (optional) aggregation period for the data. Supports \"hourly\", \"daily\" (default) and \"weekly\".
        :param str _from: The (optional) start time of the report in ISO 8601 format ( defaults to 24 hours before \"to\" time).
        :param str nameservice: The (optional) HDFS nameservice. Required for HA setup.
        :param str to: The (optional) end time of the report in ISO 8601 format ( defaults to now).
        :return: ApiHdfsUsageReport
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'aggregation', '_from', 'nameservice', 'to']  # 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_hdfs_usage_report" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_hdfs_usage_report`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_hdfs_usage_report`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'aggregation' in params:
            query_params.append(('aggregation', params['aggregation']))  # noqa: E501
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'nameservice' in params:
            query_params.append(('nameservice', params['nameservice']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/clusters/{clusterName}/services/{serviceName}/reports/hdfsUsageReport', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiHdfsUsageReport',  # 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_iceberg_replication_access_status(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Retrieves the access status for the given path.  # noqa: E501

        Retrieves the access status for the given path.  # 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_iceberg_replication_access_status(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the ICEBERG_REPLICATION service. (required)
        :param str hms_warehouse_dir: The hmsWarehouseDir whose status is required.
        :param str path: The cloudPath whose status is required in conjunction with hmsWarehouseDir.
        :param str source_cluster: The name of the cluster on remote.
        :param str source_peer: The name of the peer.
        :param str source_service: The name of the ICEBERG_REPLICATION service on remote.
        :return: ApiIcebergReplicationAccessStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_iceberg_replication_access_status_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_iceberg_replication_access_status_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_iceberg_replication_access_status_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Retrieves the access status for the given path.  # noqa: E501

        Retrieves the access status for the given path.  # 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_iceberg_replication_access_status_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the ICEBERG_REPLICATION service. (required)
        :param str hms_warehouse_dir: The hmsWarehouseDir whose status is required.
        :param str path: The cloudPath whose status is required in conjunction with hmsWarehouseDir.
        :param str source_cluster: The name of the cluster on remote.
        :param str source_peer: The name of the peer.
        :param str source_service: The name of the ICEBERG_REPLICATION service on remote.
        :return: ApiIcebergReplicationAccessStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'hms_warehouse_dir', 'path', 'source_cluster', 'source_peer', 'source_service']  # 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_iceberg_replication_access_status" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_iceberg_replication_access_status`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_iceberg_replication_access_status`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'hms_warehouse_dir' in params:
            query_params.append(('hmsWarehouseDir', params['hms_warehouse_dir']))  # noqa: E501
        if 'path' in params:
            query_params.append(('path', params['path']))  # noqa: E501
        if 'source_cluster' in params:
            query_params.append(('sourceCluster', params['source_cluster']))  # noqa: E501
        if 'source_peer' in params:
            query_params.append(('sourcePeer', params['source_peer']))  # noqa: E501
        if 'source_service' in params:
            query_params.append(('sourceService', params['source_service']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/icebergReplicationCheckAccess', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiIcebergReplicationAccessStatus',  # 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_impala_utilization(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Provides the resource utilization of the Impala service as well as the resource utilization per tenant.  # noqa: E501

        Provides the resource utilization of the Impala service as well as the resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.  # 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_impala_utilization(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: service name (required)
        :param list[str] days_of_week: The days of the week for which the user wants to report utilization. Days is a list of number between 1 to 7, where 1 corresponds to Mon. and 7 corresponds to Sun. All 7 days are included if this is not specified.
        :param int end_hour_of_day: The end hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 23 if this is not specified.
        :param str _from: Start of the time range to report utilization in ISO 8601 format.
        :param int start_hour_of_day: The start hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 0 if this is not specified.
        :param str tenant_type: The type of the tenant (POOL or USER).
        :param str to: End of the the time range to report utilization in ISO 8601 format (defaults to now).
        :return: ApiImpalaUtilization
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_impala_utilization_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_impala_utilization_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_impala_utilization_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Provides the resource utilization of the Impala service as well as the resource utilization per tenant.  # noqa: E501

        Provides the resource utilization of the Impala service as well as the resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.  # 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_impala_utilization_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: service name (required)
        :param list[str] days_of_week: The days of the week for which the user wants to report utilization. Days is a list of number between 1 to 7, where 1 corresponds to Mon. and 7 corresponds to Sun. All 7 days are included if this is not specified.
        :param int end_hour_of_day: The end hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 23 if this is not specified.
        :param str _from: Start of the time range to report utilization in ISO 8601 format.
        :param int start_hour_of_day: The start hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 0 if this is not specified.
        :param str tenant_type: The type of the tenant (POOL or USER).
        :param str to: End of the the time range to report utilization in ISO 8601 format (defaults to now).
        :return: ApiImpalaUtilization
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'days_of_week', 'end_hour_of_day', '_from', 'start_hour_of_day', 'tenant_type', 'to']  # 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_impala_utilization" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_impala_utilization`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_impala_utilization`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'days_of_week' in params:
            query_params.append(('daysOfWeek', params['days_of_week']))  # noqa: E501
            collection_formats['daysOfWeek'] = 'multi'  # noqa: E501
        if 'end_hour_of_day' in params:
            query_params.append(('endHourOfDay', params['end_hour_of_day']))  # noqa: E501
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'start_hour_of_day' in params:
            query_params.append(('startHourOfDay', params['start_hour_of_day']))  # noqa: E501
        if 'tenant_type' in params:
            query_params.append(('tenantType', params['tenant_type']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/impalaUtilization', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiImpalaUtilization',  # 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, cluster_name, service_name, **kwargs):  # noqa: E501
        """Fetch metric readings for a particular service.  # noqa: E501

        Fetch metric readings for a particular service. <p> By default, this call will look up all metrics available for the service. 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 service, even if no readings are available in the requested window. <p> HDFS services that have more than one nameservice will not expose any metrics. Instead, the nameservices should be queried separately. <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.get_metrics(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service. (required)
        :param str _from: Start of the period to query.
        :param list[str] metrics: Filter for which metrics to query.
        :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(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_metrics_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_metrics_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Fetch metric readings for a particular service.  # noqa: E501

        Fetch metric readings for a particular service. <p> By default, this call will look up all metrics available for the service. 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 service, even if no readings are available in the requested window. <p> HDFS services that have more than one nameservice will not expose any metrics. Instead, the nameservices should be queried separately. <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.get_metrics_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service. (required)
        :param str _from: Start of the period to query.
        :param list[str] metrics: Filter for which metrics to query.
        :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 = ['cluster_name', 'service_name', '_from', 'metrics', '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 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_metrics`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_metrics`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'metrics' in params:
            query_params.append(('metrics', params['metrics']))  # noqa: E501
            collection_formats['metrics'] = '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(
            '/clusters/{clusterName}/services/{serviceName}/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 get_mr_usage_report(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Fetch the MR usage report.  # noqa: E501

        Fetch the MR usage report. For the requested time range, at the specified aggregation intervals, the report shows job CPU usages (and other metrics) per user. <p> This call supports returning JSON or CSV, as determined by the \"Accept\" header of application/json or text/csv. <p> Available since API v4. Only available with Cloudera Manager Enterprise Edition.  # 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_mr_usage_report(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The MR service name. (required)
        :param str aggregation: The (optional) aggregation period for the data. Supports \"hourly\", \"daily\" (default) and \"weekly\".
        :param str _from: The (optional) start time of the report in ISO 8601 format (defaults to 24 hours before \"to\" time).
        :param str to: The (optional) end time of the report in ISO 8601 format (defaults to now).
        :return: ApiMrUsageReport
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_mr_usage_report_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_mr_usage_report_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_mr_usage_report_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Fetch the MR usage report.  # noqa: E501

        Fetch the MR usage report. For the requested time range, at the specified aggregation intervals, the report shows job CPU usages (and other metrics) per user. <p> This call supports returning JSON or CSV, as determined by the \"Accept\" header of application/json or text/csv. <p> Available since API v4. Only available with Cloudera Manager Enterprise Edition.  # 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_mr_usage_report_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The MR service name. (required)
        :param str aggregation: The (optional) aggregation period for the data. Supports \"hourly\", \"daily\" (default) and \"weekly\".
        :param str _from: The (optional) start time of the report in ISO 8601 format (defaults to 24 hours before \"to\" time).
        :param str to: The (optional) end time of the report in ISO 8601 format (defaults to now).
        :return: ApiMrUsageReport
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'aggregation', '_from', 'to']  # 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_mr_usage_report" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_mr_usage_report`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_mr_usage_report`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'aggregation' in params:
            query_params.append(('aggregation', params['aggregation']))  # noqa: E501
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/clusters/{clusterName}/services/{serviceName}/reports/mrUsageReport', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiMrUsageReport',  # 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_policies_from_ranger(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Collects information about the policies defined in the local Ranger service.  # noqa: E501

        Collects information about the policies defined in the local Ranger service. <p> Optionally if sourcePeer, sourceCluster, sourceUser are provided, then it will call the same API endpoint on that given source CM peer, and merges the result of the local (ApiRangerPolicyList#getPolicies()) and remote (ApiRangerPolicyList#getPolicies()) Ranger policies.  # 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_policies_from_ranger(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: the name of the local Ranger service. (required)
        :param str source_cluster: optional: the source CM cluster name.
        :param str source_peer: optional: the source CM peer name.
        :param str source_service: optional: the Ranger service name on the source CM.
        :return: ApiRangerPolicyList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_policies_from_ranger_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_policies_from_ranger_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_policies_from_ranger_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Collects information about the policies defined in the local Ranger service.  # noqa: E501

        Collects information about the policies defined in the local Ranger service. <p> Optionally if sourcePeer, sourceCluster, sourceUser are provided, then it will call the same API endpoint on that given source CM peer, and merges the result of the local (ApiRangerPolicyList#getPolicies()) and remote (ApiRangerPolicyList#getPolicies()) Ranger policies.  # 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_policies_from_ranger_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: the name of the local Ranger service. (required)
        :param str source_cluster: optional: the source CM cluster name.
        :param str source_peer: optional: the source CM peer name.
        :param str source_service: optional: the Ranger service name on the source CM.
        :return: ApiRangerPolicyList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'source_cluster', 'source_peer', 'source_service']  # 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_policies_from_ranger" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_policies_from_ranger`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_policies_from_ranger`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'source_cluster' in params:
            query_params.append(('sourceCluster', params['source_cluster']))  # noqa: E501
        if 'source_peer' in params:
            query_params.append(('sourcePeer', params['source_peer']))  # noqa: E501
        if 'source_service' in params:
            query_params.append(('sourceService', params['source_service']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/getPoliciesFromRanger', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiRangerPolicyList',  # 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_services_from_ranger(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Collects information about the services defined in the local Ranger service.  # noqa: E501

        Collects information about the services defined in the local Ranger service. <p> Optionally if sourcePeer, sourceCluster, sourceService are provided, then it will call the same API endpoint on that given source CM peer, and merges the result of the local (ApiRangerServiceList#getServices()) and remote (ApiRangerServiceList#getRemoteServices()) Ranger services.  # 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_services_from_ranger(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: the name of the local Ranger service. (required)
        :param str source_cluster: optional: the source CM cluster name.
        :param str source_peer: optional: the source CM peer name.
        :param str source_service: optional: the Ranger service name on the source CM.
        :return: ApiRangerServiceList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_services_from_ranger_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_services_from_ranger_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_services_from_ranger_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Collects information about the services defined in the local Ranger service.  # noqa: E501

        Collects information about the services defined in the local Ranger service. <p> Optionally if sourcePeer, sourceCluster, sourceService are provided, then it will call the same API endpoint on that given source CM peer, and merges the result of the local (ApiRangerServiceList#getServices()) and remote (ApiRangerServiceList#getRemoteServices()) Ranger services.  # 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_services_from_ranger_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: the name of the local Ranger service. (required)
        :param str source_cluster: optional: the source CM cluster name.
        :param str source_peer: optional: the source CM peer name.
        :param str source_service: optional: the Ranger service name on the source CM.
        :return: ApiRangerServiceList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'source_cluster', 'source_peer', 'source_service']  # 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_services_from_ranger" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_services_from_ranger`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_services_from_ranger`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'source_cluster' in params:
            query_params.append(('sourceCluster', params['source_cluster']))  # noqa: E501
        if 'source_peer' in params:
            query_params.append(('sourcePeer', params['source_peer']))  # noqa: E501
        if 'source_service' in params:
            query_params.append(('sourceService', params['source_service']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/getServicesFromRanger', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiRangerServiceList',  # 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_users_from_ranger(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Collects information about the users defined in the local Ranger service.  # noqa: E501

        Collects information about the users defined in the local Ranger service. <p> Optionally if sourcePeer, sourceCluster, sourceUser are provided, then it will call the same API endpoint on that given source CM peer, and merges the result of the local (ApiRangerUserList#getUsers()) and remote (ApiRangerUserList#getRemoteUsers()) Ranger users.  # 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_users_from_ranger(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: the name of the local Ranger service. (required)
        :param str source_cluster: optional: the source CM cluster name.
        :param str source_peer: optional: the source CM peer name.
        :param str source_service: optional: the Ranger service name on the source CM.
        :return: ApiRangerUserList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_users_from_ranger_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_users_from_ranger_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_users_from_ranger_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Collects information about the users defined in the local Ranger service.  # noqa: E501

        Collects information about the users defined in the local Ranger service. <p> Optionally if sourcePeer, sourceCluster, sourceUser are provided, then it will call the same API endpoint on that given source CM peer, and merges the result of the local (ApiRangerUserList#getUsers()) and remote (ApiRangerUserList#getRemoteUsers()) Ranger users.  # 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_users_from_ranger_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: the name of the local Ranger service. (required)
        :param str source_cluster: optional: the source CM cluster name.
        :param str source_peer: optional: the source CM peer name.
        :param str source_service: optional: the Ranger service name on the source CM.
        :return: ApiRangerUserList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'source_cluster', 'source_peer', 'source_service']  # 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_users_from_ranger" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_users_from_ranger`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_users_from_ranger`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'source_cluster' in params:
            query_params.append(('sourceCluster', params['source_cluster']))  # noqa: E501
        if 'source_peer' in params:
            query_params.append(('sourcePeer', params['source_peer']))  # noqa: E501
        if 'source_service' in params:
            query_params.append(('sourceService', params['source_service']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/getUsersFromRanger', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiRangerUserList',  # 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_yarn_utilization(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Provides the resource utilization of the yarn service as well as the resource utilization per tenant.  # noqa: E501

        Provides the resource utilization of the yarn service as well as the resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.  # 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_yarn_utilization(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: service name (required)
        :param list[str] days_of_week: The days of the week for which the user wants to report utilization. Days is a list of number between 1 to 7, where 1 corresponds to Mon. and 7 corresponds to Sun. All 7 days are included if this is not specified.
        :param int end_hour_of_day: The end hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 23 if this is not specified.
        :param str _from: Start of the time range to report utilization in ISO 8601 format.
        :param int start_hour_of_day: The start hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 0 if this is not specified.
        :param str tenant_type: The type of the tenant (POOL or USER).
        :param str to: End of the the time range to report utilization in ISO 8601 format (defaults to now).
        :return: ApiYarnUtilization
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_yarn_utilization_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.get_yarn_utilization_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def get_yarn_utilization_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Provides the resource utilization of the yarn service as well as the resource utilization per tenant.  # noqa: E501

        Provides the resource utilization of the yarn service as well as the resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.  # 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_yarn_utilization_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: service name (required)
        :param list[str] days_of_week: The days of the week for which the user wants to report utilization. Days is a list of number between 1 to 7, where 1 corresponds to Mon. and 7 corresponds to Sun. All 7 days are included if this is not specified.
        :param int end_hour_of_day: The end hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 23 if this is not specified.
        :param str _from: Start of the time range to report utilization in ISO 8601 format.
        :param int start_hour_of_day: The start hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 0 if this is not specified.
        :param str tenant_type: The type of the tenant (POOL or USER).
        :param str to: End of the the time range to report utilization in ISO 8601 format (defaults to now).
        :return: ApiYarnUtilization
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'days_of_week', 'end_hour_of_day', '_from', 'start_hour_of_day', 'tenant_type', 'to']  # 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_yarn_utilization" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `get_yarn_utilization`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `get_yarn_utilization`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'days_of_week' in params:
            query_params.append(('daysOfWeek', params['days_of_week']))  # noqa: E501
            collection_formats['daysOfWeek'] = 'multi'  # noqa: E501
        if 'end_hour_of_day' in params:
            query_params.append(('endHourOfDay', params['end_hour_of_day']))  # noqa: E501
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'start_hour_of_day' in params:
            query_params.append(('startHourOfDay', params['start_hour_of_day']))  # noqa: E501
        if 'tenant_type' in params:
            query_params.append(('tenantType', params['tenant_type']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/yarnUtilization', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiYarnUtilization',  # 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 hbase_replication_create_user_directory(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the HBase user directory (usually /user/hbase).  # noqa: E501

        Create the HBase user directory (usually /user/hbase).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_create_user_directory(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (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.hbase_replication_create_user_directory_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_create_user_directory_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_create_user_directory_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the HBase user directory (usually /user/hbase).  # noqa: E501

        Create the HBase user directory (usually /user/hbase).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_create_user_directory_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseCreateUserDirectory', '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 hbase_replication_first_time_setup_automatic(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts an automatic HBase replication first time setup.  # noqa: E501

        Starts an automatic HBase replication first time setup. After doing some configuration (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), it restarts both the source and target clusters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_automatic(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiHBaseReplicationSetupCommandArgs body: Replication setup parameters such as
the source peer, source service, passphrase for the keystore, and
optionally the RestartType
for both source and target (default is rolling restart)
        :param bool force: If true, perform setup even if already setup. (Default false)
        :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.hbase_replication_first_time_setup_automatic_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_automatic_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_automatic_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts an automatic HBase replication first time setup.  # noqa: E501

        Starts an automatic HBase replication first time setup. After doing some configuration (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), it restarts both the source and target clusters.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_automatic_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiHBaseReplicationSetupCommandArgs body: Replication setup parameters such as
the source peer, source service, passphrase for the keystore, and
optionally the RestartType
for both source and target (default is rolling restart)
        :param bool force: If true, perform setup even if already setup. (Default false)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'force' in params:
            query_params.append(('force', params['force']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupAutomatic', '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 hbase_replication_first_time_setup_clean_and_reset(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Cleans and resets the HBase replication first time setup on the given source and target:.  # noqa: E501

        Cleans and resets the HBase replication first time setup on the given source and target: <ul> <li> clears the HBase replication auxiliary info and deletes the JCEKS files </li> <li> Optionally restarts HBase services </li> <li> Resets the HBase replication first time setup status </li> </ul>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_clean_and_reset(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiHBaseReplicationSetupCleanAndResetArgs body: contains the source peer, source cluster, source service, and
the restart type of source and target HBase services.
Also, if user wants to reset the HBase replication first time setup
status on the source, then the cmPeerNameOnRemote field should be provided:
The peer name of the local CM in the given source CM peer
        :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.hbase_replication_first_time_setup_clean_and_reset_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_clean_and_reset_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_clean_and_reset_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Cleans and resets the HBase replication first time setup on the given source and target:.  # noqa: E501

        Cleans and resets the HBase replication first time setup on the given source and target: <ul> <li> clears the HBase replication auxiliary info and deletes the JCEKS files </li> <li> Optionally restarts HBase services </li> <li> Resets the HBase replication first time setup status </li> </ul>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_clean_and_reset_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiHBaseReplicationSetupCleanAndResetArgs body: contains the source peer, source cluster, source service, and
the restart type of source and target HBase services.
Also, if user wants to reset the HBase replication first time setup
status on the source, then the cmPeerNameOnRemote field should be provided:
The peer name of the local CM in the given source CM peer
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupCleanAndReset', '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 hbase_replication_first_time_setup_for_already_paired_clusters(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts an HBase replication first time setup for the source and target.  # noqa: E501

        Starts an HBase replication first time setup for the source and target. <p> Before using this API endpoint, it's assumed that the source and target (local) HBase services already have the HBase replication first time setup executed but with different peers. It starts a command, that checks if the necessary configurations are in place on both source and target (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)). If everything matches, then it sets the setup status to READY.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_for_already_paired_clusters(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local (target) HBase service name (required)
        :param ApiServiceRef body: contains the source peer, source cluster, source HBase service name
        :param bool force: If true, perform setup even if already setup. (Default false)
        :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.hbase_replication_first_time_setup_for_already_paired_clusters_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_for_already_paired_clusters_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_for_already_paired_clusters_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts an HBase replication first time setup for the source and target.  # noqa: E501

        Starts an HBase replication first time setup for the source and target. <p> Before using this API endpoint, it's assumed that the source and target (local) HBase services already have the HBase replication first time setup executed but with different peers. It starts a command, that checks if the necessary configurations are in place on both source and target (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)). If everything matches, then it sets the setup status to READY.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_for_already_paired_clusters_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local (target) HBase service name (required)
        :param ApiServiceRef body: contains the source peer, source cluster, source HBase service name
        :param bool force: If true, perform setup even if already setup. (Default false)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'force' in params:
            query_params.append(('force', params['force']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupForAlreadyPairedClusters', '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 hbase_replication_first_time_setup_for_source_only(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts an HBase replication first time setup for the source only.  # noqa: E501

        Starts an HBase replication first time setup for the source only. <p> Before using this API endpoint, it's assumed that the target (local) HBase service already has HBase replication first time setup executed with another peer's HBase. It starts a command, that does some configuration only on the source (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), then restarts source HBase service if needed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_for_source_only(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local (target) HBase service name (required)
        :param ApiHBaseReplicationSetupOneClusterOnlyCmdArgs body: Replication setup parameters such as
the source peer, source cluster, source service, HBase replication user,
and optionally the RestartType for the source HBase service.
If RestartType is:
<ul>
<li>
<b>provided</b>, then restarts source HBase service accordingly.
This is equivalent to the automatic first time setup:
#hbaseReplicationFirstTimeSetupAutomatic(String, boolean, ApiHBaseReplicationSetupCommandArgs)
</li>
<li>
<b>not provided</b>, then the source HBase service must be restarted manually.
This is equivalent to the manual first time setup:
#hbaseReplicationFirstTimeSetupManual(String, boolean, ApiHBaseReplicationSetupCommandArgs).
Similarly, after the source HBase service has been restarted,
the first time setup can be finished by calling:
#hbaseReplicationFirstTimeSetupManualContinue(String, ApiServiceRef)
</li>
</ul>
        :param bool force: If true, perform setup even if already setup. (Default false)
        :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.hbase_replication_first_time_setup_for_source_only_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_for_source_only_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_for_source_only_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts an HBase replication first time setup for the source only.  # noqa: E501

        Starts an HBase replication first time setup for the source only. <p> Before using this API endpoint, it's assumed that the target (local) HBase service already has HBase replication first time setup executed with another peer's HBase. It starts a command, that does some configuration only on the source (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), then restarts source HBase service if needed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_for_source_only_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local (target) HBase service name (required)
        :param ApiHBaseReplicationSetupOneClusterOnlyCmdArgs body: Replication setup parameters such as
the source peer, source cluster, source service, HBase replication user,
and optionally the RestartType for the source HBase service.
If RestartType is:
<ul>
<li>
<b>provided</b>, then restarts source HBase service accordingly.
This is equivalent to the automatic first time setup:
#hbaseReplicationFirstTimeSetupAutomatic(String, boolean, ApiHBaseReplicationSetupCommandArgs)
</li>
<li>
<b>not provided</b>, then the source HBase service must be restarted manually.
This is equivalent to the manual first time setup:
#hbaseReplicationFirstTimeSetupManual(String, boolean, ApiHBaseReplicationSetupCommandArgs).
Similarly, after the source HBase service has been restarted,
the first time setup can be finished by calling:
#hbaseReplicationFirstTimeSetupManualContinue(String, ApiServiceRef)
</li>
</ul>
        :param bool force: If true, perform setup even if already setup. (Default false)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'force' in params:
            query_params.append(('force', params['force']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupForSourceOnly', '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 hbase_replication_first_time_setup_for_target_only(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts an HBase replication first time setup for the target only.  # noqa: E501

        Starts an HBase replication first time setup for the target only. <p> Before using this API endpoint, it's assumed that the given source HBase service, given by ApiHBaseReplicationSetupOneClusterOnlyCmdArgs, already has HBase replication first time setup executed with another peer's HBase. It starts a command, that does some configuration only on the target (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), then restarts target HBase service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_for_target_only(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiHBaseReplicationSetupOneClusterOnlyCmdArgs body: Replication setup parameters such as
the source peer, source cluster, source service, HBase replication user,
and optionally the RestartType for the local HBase service
(default is rolling restart)
        :param bool force: If true, perform setup even if already setup. (Default false)
        :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.hbase_replication_first_time_setup_for_target_only_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_for_target_only_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_for_target_only_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts an HBase replication first time setup for the target only.  # noqa: E501

        Starts an HBase replication first time setup for the target only. <p> Before using this API endpoint, it's assumed that the given source HBase service, given by ApiHBaseReplicationSetupOneClusterOnlyCmdArgs, already has HBase replication first time setup executed with another peer's HBase. It starts a command, that does some configuration only on the target (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), then restarts target HBase service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_for_target_only_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiHBaseReplicationSetupOneClusterOnlyCmdArgs body: Replication setup parameters such as
the source peer, source cluster, source service, HBase replication user,
and optionally the RestartType for the local HBase service
(default is rolling restart)
        :param bool force: If true, perform setup even if already setup. (Default false)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'force' in params:
            query_params.append(('force', params['force']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupForTargetOnly', '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 hbase_replication_first_time_setup_force_ready(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Force sets the HBase replication first time setup status to be READY for the given source and target.  # noqa: E501

        Force sets the HBase replication first time setup status to be READY for the given source and target. Note that after this operation, the pending HBase replication policies, which have the waitForHBaseReplicationSetup flag set to true, will NOT be completed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_force_ready(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiServiceRef body: contains the source peer, source cluster, source sourceService
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.hbase_replication_first_time_setup_force_ready_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_force_ready_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_force_ready_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Force sets the HBase replication first time setup status to be READY for the given source and target.  # noqa: E501

        Force sets the HBase replication first time setup status to be READY for the given source and target. Note that after this operation, the pending HBase replication policies, which have the waitForHBaseReplicationSetup flag set to true, will NOT be completed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_force_ready_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiServiceRef body: contains the source peer, source cluster, source sourceService
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupForceReady', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def hbase_replication_first_time_setup_manual(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts a manual HBase replication first time setup.  # noqa: E501

        Starts a manual HBase replication first time setup. After doing some configuration (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), it restarts the target cluster only. Source cluster has to be restarted manually, after which the #hbaseReplicationFirstTimeSetupManualContinue(String, ApiServiceRef) API endpoint should be called to finish the HBase replication first time setup.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_manual(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiHBaseReplicationSetupCommandArgs body: Replication setup parameters such as
the source peer, source service, passphrase for the keystore, and
optionally the RestartType
for the target (default is rolling restart)
        :param bool force: If true, perform setup even if already setup. (Default false)
        :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.hbase_replication_first_time_setup_manual_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_manual_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_manual_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Starts a manual HBase replication first time setup.  # noqa: E501

        Starts a manual HBase replication first time setup. After doing some configuration (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), it restarts the target cluster only. Source cluster has to be restarted manually, after which the #hbaseReplicationFirstTimeSetupManualContinue(String, ApiServiceRef) API endpoint should be called to finish the HBase replication first time setup.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_manual_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiHBaseReplicationSetupCommandArgs body: Replication setup parameters such as
the source peer, source service, passphrase for the keystore, and
optionally the RestartType
for the target (default is rolling restart)
        :param bool force: If true, perform setup even if already setup. (Default false)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'force' in params:
            query_params.append(('force', params['force']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupManual', '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 hbase_replication_first_time_setup_manual_continue(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Should be called after #hbaseReplicationFirstTimeSetupManual(String, ApiHBaseReplicationSetupCommandArgs) to finish the manual HBase replication first time setup.  # noqa: E501

        Should be called after #hbaseReplicationFirstTimeSetupManual(String, ApiHBaseReplicationSetupCommandArgs) to finish the manual HBase replication first time setup.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_manual_continue(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiServiceRef body: contains the source peer, source cluster, source service
        :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.hbase_replication_first_time_setup_manual_continue_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_manual_continue_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_manual_continue_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Should be called after #hbaseReplicationFirstTimeSetupManual(String, ApiHBaseReplicationSetupCommandArgs) to finish the manual HBase replication first time setup.  # noqa: E501

        Should be called after #hbaseReplicationFirstTimeSetupManual(String, ApiHBaseReplicationSetupCommandArgs) to finish the manual HBase replication first time setup.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_manual_continue_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiServiceRef body: contains the source peer, source cluster, source service
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupManualContinue', '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 hbase_replication_first_time_setup_reset(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Resets/removes the HBase replication first time setup status for the given source and target.  # noqa: E501

        Resets/removes the HBase replication first time setup status for the given source and target.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_reset(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiServiceRef body: contains the source peer, source cluster, source sourceService
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.hbase_replication_first_time_setup_reset_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_reset_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_reset_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Resets/removes the HBase replication first time setup status for the given source and target.  # noqa: E501

        Resets/removes the HBase replication first time setup status for the given source and target.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_reset_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param ApiServiceRef body: contains the source peer, source cluster, source sourceService
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupReset', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def hbase_replication_first_time_setup_status(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """hbase_replication_first_time_setup_status  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_status(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param str source_cluster: The source cluster's name
        :param str source_peer: The source peer's name
        :param str source_service: The source service's name
        :return: ApiHBaseReplicationSetupStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.hbase_replication_first_time_setup_status_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_first_time_setup_status_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_first_time_setup_status_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """hbase_replication_first_time_setup_status  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_first_time_setup_status_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The local HBase service name (required)
        :param str source_cluster: The source cluster's name
        :param str source_peer: The source peer's name
        :param str source_service: The source service's name
        :return: ApiHBaseReplicationSetupStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'source_cluster', 'source_peer', 'source_service']  # 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 hbase_replication_first_time_setup_status" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `hbase_replication_first_time_setup_status`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `hbase_replication_first_time_setup_status`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'source_cluster' in params:
            query_params.append(('sourceCluster', params['source_cluster']))  # noqa: E501
        if 'source_peer' in params:
            query_params.append(('sourcePeer', params['source_peer']))  # noqa: E501
        if 'source_service' in params:
            query_params.append(('sourceService', params['source_service']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupStatus', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiHBaseReplicationSetupStatus',  # 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 hbase_replication_setup(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Perform one time setup for HBase replication.  # noqa: E501

        Perform one time setup for HBase replication.  Generate the a keystore to HDFS for use by replication and transfer the keystore to HDFS on the the peer.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_setup(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param ApiHBaseReplicationSetupCommandArgs body:
        :param bool force: If true, perform setup even if already setup. (Default false)
        :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.hbase_replication_setup_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_setup_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_setup_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Perform one time setup for HBase replication.  # noqa: E501

        Perform one time setup for HBase replication.  Generate the a keystore to HDFS for use by replication and transfer the keystore to HDFS on the the peer.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_setup_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param ApiHBaseReplicationSetupCommandArgs body:
        :param bool force: If true, perform setup even if already setup. (Default false)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'force' in params:
            query_params.append(('force', params['force']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationSetup', '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 hbase_replication_setup_admin(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """hbase_replication_setup_admin  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_setup_admin(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param str cm_peer_definition:
        :param str op:
        :param str path:
        :param str user:
        :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.hbase_replication_setup_admin_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_replication_setup_admin_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_replication_setup_admin_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """hbase_replication_setup_admin  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_replication_setup_admin_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param str cm_peer_definition:
        :param str op:
        :param str path:
        :param str user:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'cm_peer_definition', 'op', 'path', 'user']  # 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 hbase_replication_setup_admin" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `hbase_replication_setup_admin`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `hbase_replication_setup_admin`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'cm_peer_definition' in params:
            query_params.append(('cmPeerDefinition', params['cm_peer_definition']))  # noqa: E501
        if 'op' in params:
            query_params.append(('op', params['op']))  # noqa: E501
        if 'path' in params:
            query_params.append(('path', params['path']))  # noqa: E501
        if 'user' in params:
            query_params.append(('user', params['user']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationSetupAdmin', '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 hbase_shell_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Execute a hbase shell command.  # noqa: E501

        Execute a hbase shell command  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_shell_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HBase service name (required)
        :param ApiHBaseShellCommand body: hbase shell command to be executed
        :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.hbase_shell_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_shell_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_shell_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Execute a hbase shell command.  # noqa: E501

        Execute a hbase shell command  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_shell_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HBase service name (required)
        :param ApiHBaseShellCommand body: hbase shell command to be executed
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseShellCommand', '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 hbase_upgrade_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5.  # noqa: E501

        Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5. <p/> This is required in order to run HBase after upgrade. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_upgrade_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HBase service name. (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.hbase_upgrade_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hbase_upgrade_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hbase_upgrade_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5.  # noqa: E501

        Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5. <p/> This is required in order to run HBase after upgrade. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hbase_upgrade_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HBase service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hbaseUpgrade', '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 hdfs_add_sbnnto_ns_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """hdfs_add_sbnnto_ns_command  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_add_sbnnto_ns_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiAddSBNNToNSArguments 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.hdfs_add_sbnnto_ns_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_add_sbnnto_ns_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_add_sbnnto_ns_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """hdfs_add_sbnnto_ns_command  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_add_sbnnto_ns_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiAddSBNNToNSArguments body:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsAddSBNNToNS', '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 hdfs_create_tmp_dir(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates a tmp directory on the HDFS filesystem.  # noqa: E501

        Creates a tmp directory on the HDFS filesystem. <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.hdfs_create_tmp_dir(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the HDFS service on which to run the command. (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.hdfs_create_tmp_dir_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_create_tmp_dir_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_create_tmp_dir_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates a tmp directory on the HDFS filesystem.  # noqa: E501

        Creates a tmp directory on the HDFS filesystem. <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.hdfs_create_tmp_dir_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the HDFS service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsCreateTmpDir', '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 hdfs_disable_auto_failover_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable auto-failover for a highly available HDFS nameservice.  # noqa: E501

        Disable auto-failover for a highly available HDFS nameservice. <p> The command will modify the nameservice's NameNodes configuration to disable automatic failover, and delete the existing failover controllers. <p> The ZooKeeper dependency of the service will not be removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_disable_auto_failover_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param str body: The nameservice name.
        :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.hdfs_disable_auto_failover_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_disable_auto_failover_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_disable_auto_failover_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable auto-failover for a highly available HDFS nameservice.  # noqa: E501

        Disable auto-failover for a highly available HDFS nameservice. <p> The command will modify the nameservice's NameNodes configuration to disable automatic failover, and delete the existing failover controllers. <p> The ZooKeeper dependency of the service will not be removed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_disable_auto_failover_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param str body: The nameservice name.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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
            ['text/plain', 'application/json'])  # noqa: E501

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

        return self.api_client.call_api(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableAutoFailover', '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 hdfs_disable_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for an HDFS NameNode.  # noqa: E501

        Disable high availability (HA) for an HDFS NameNode. <p> The NameNode to be kept must be running before HA can be disabled. <p> As part of disabling HA, any services that depend on the HDFS service being modified will be stopped. The command arguments provide options to re-start these services and to re-deploy the client configurations for services of the cluster after HA has been disabled.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_disable_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiHdfsDisableHaArguments 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.hdfs_disable_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_disable_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_disable_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable high availability (HA) for an HDFS NameNode.  # noqa: E501

        Disable high availability (HA) for an HDFS NameNode. <p> The NameNode to be kept must be running before HA can be disabled. <p> As part of disabling HA, any services that depend on the HDFS service being modified will be stopped. The command arguments provide options to re-start these services and to re-deploy the client configurations for services of the cluster after HA has been disabled.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_disable_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiHdfsDisableHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableHa', '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 hdfs_disable_nn_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable High Availability (HA) with Automatic Failover for an HDFS NameNode.  # noqa: E501

        Disable High Availability (HA) with Automatic Failover for an HDFS NameNode. <p> As part of disabling HA, any services that depend on the HDFS service being modified will be stopped. The command will delete the Standby NameNode associated with the specified NameNode. Any FailoverControllers associated with the NameNode's nameservice are also deleted. A SecondaryNameNode is created on the host specified by the arugments. <p> If no nameservices uses Quorum Journal after HA is disabled for the specified nameservice, then all JournalNodes are also deleted. <p> Then, HDFS service is restarted and all services that were stopped are started again afterwards. Finally, client configs for HDFS and its depedents will be re-deployed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_disable_nn_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiDisableNnHaArguments 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.hdfs_disable_nn_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_disable_nn_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_disable_nn_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Disable High Availability (HA) with Automatic Failover for an HDFS NameNode.  # noqa: E501

        Disable High Availability (HA) with Automatic Failover for an HDFS NameNode. <p> As part of disabling HA, any services that depend on the HDFS service being modified will be stopped. The command will delete the Standby NameNode associated with the specified NameNode. Any FailoverControllers associated with the NameNode's nameservice are also deleted. A SecondaryNameNode is created on the host specified by the arugments. <p> If no nameservices uses Quorum Journal after HA is disabled for the specified nameservice, then all JournalNodes are also deleted. <p> Then, HDFS service is restarted and all services that were stopped are started again afterwards. Finally, client configs for HDFS and its depedents will be re-deployed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_disable_nn_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiDisableNnHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableNnHa', '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 hdfs_enable_auto_failover_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable auto-failover for an HDFS nameservice.  # noqa: E501

        Enable auto-failover for an HDFS nameservice. <p> This command requires that the nameservice exists, and HA has been configured for that nameservice. <p> The command will create the needed failover controllers, perform the needed initialization and configuration, and will start the new roles. The existing NameNodes which are part of the nameservice will be re-started in the process. <p> This process may require changing the service's configuration, to add a dependency on the provided ZooKeeper service. This will be done if such a dependency has not been configured yet, and will cause roles that are not affected by this command to show an \"outdated configuration\" status. <p> If a ZooKeeper dependency has already been set up by some other means, it does not need to be provided in the command arguments.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_enable_auto_failover_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiHdfsFailoverArguments 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.hdfs_enable_auto_failover_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_enable_auto_failover_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_enable_auto_failover_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable auto-failover for an HDFS nameservice.  # noqa: E501

        Enable auto-failover for an HDFS nameservice. <p> This command requires that the nameservice exists, and HA has been configured for that nameservice. <p> The command will create the needed failover controllers, perform the needed initialization and configuration, and will start the new roles. The existing NameNodes which are part of the nameservice will be re-started in the process. <p> This process may require changing the service's configuration, to add a dependency on the provided ZooKeeper service. This will be done if such a dependency has not been configured yet, and will cause roles that are not affected by this command to show an \"outdated configuration\" status. <p> If a ZooKeeper dependency has already been set up by some other means, it does not need to be provided in the command arguments.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_enable_auto_failover_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiHdfsFailoverArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableAutoFailover', '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 hdfs_enable_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for an HDFS NameNode.  # noqa: E501

        Enable high availability (HA) for an HDFS NameNode. <p> The command will set up the given \"active\" and \"stand-by\" NameNodes as an HA pair. Both nodes need to already exist. <p> If there is a SecondaryNameNode associated with either given NameNode instance, it will be deleted. <p> Note that while the shared edits path may be different for both nodes, they need to point to the same underlying storage (e.g., an NFS share). <p> As part of enabling HA, any services that depend on the HDFS service being modified will be stopped. The command arguments provide options to re-start these services and to re-deploy the client configurations for services of the cluster after HA has been 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.hdfs_enable_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiHdfsHaArguments 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.hdfs_enable_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_enable_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_enable_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable high availability (HA) for an HDFS NameNode.  # noqa: E501

        Enable high availability (HA) for an HDFS NameNode. <p> The command will set up the given \"active\" and \"stand-by\" NameNodes as an HA pair. Both nodes need to already exist. <p> If there is a SecondaryNameNode associated with either given NameNode instance, it will be deleted. <p> Note that while the shared edits path may be different for both nodes, they need to point to the same underlying storage (e.g., an NFS share). <p> As part of enabling HA, any services that depend on the HDFS service being modified will be stopped. The command arguments provide options to re-start these services and to re-deploy the client configurations for services of the cluster after HA has been 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.hdfs_enable_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiHdfsHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableHa', '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 hdfs_enable_nn_ha_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable High Availability (HA) with Automatic Failover for an HDFS NameNode.  # noqa: E501

        Enable High Availability (HA) with Automatic Failover for an HDFS NameNode. <p> The command will create a Standby NameNode for the given nameservice and create FailoverControllers for both Active and Standby NameNodes. The SecondaryNameNode associated with the Active NameNode will be deleted. <p> The command will also create JournalNodes needed for HDFS HA if they do not already exist. <p> As part of enabling HA, any services that depend on the HDFS service being modified will be stopped. They will be restarted after HA has been enabled. Finally, client configs for HDFS and its depedents will be re-deployed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_enable_nn_ha_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiEnableNnHaArguments 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.hdfs_enable_nn_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_enable_nn_ha_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_enable_nn_ha_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Enable High Availability (HA) with Automatic Failover for an HDFS NameNode.  # noqa: E501

        Enable High Availability (HA) with Automatic Failover for an HDFS NameNode. <p> The command will create a Standby NameNode for the given nameservice and create FailoverControllers for both Active and Standby NameNodes. The SecondaryNameNode associated with the Active NameNode will be deleted. <p> The command will also create JournalNodes needed for HDFS HA if they do not already exist. <p> As part of enabling HA, any services that depend on the HDFS service being modified will be stopped. They will be restarted after HA has been enabled. Finally, client configs for HDFS and its depedents will be re-deployed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_enable_nn_ha_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiEnableNnHaArguments body: Arguments for the command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableNnHa', '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 hdfs_failover_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Initiate a failover in an HDFS HA NameNode pair.  # noqa: E501

        Initiate a failover in an HDFS HA NameNode pair. <p> The arguments should contain the names of the two NameNodes in the HA pair. The first one should be the currently active NameNode, the second one the NameNode to be made active.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_failover_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiRoleNameList body: Names of the NameNodes in the HA pair.
        :param bool force: Whether to force failover.
        :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.hdfs_failover_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_failover_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_failover_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Initiate a failover in an HDFS HA NameNode pair.  # noqa: E501

        Initiate a failover in an HDFS HA NameNode pair. <p> The arguments should contain the names of the two NameNodes in the HA pair. The first one should be the currently active NameNode, the second one the NameNode to be made active.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_failover_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiRoleNameList body: Names of the NameNodes in the HA pair.
        :param bool force: Whether to force failover.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'force' in params:
            query_params.append(('force', params['force']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsFailover', '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 hdfs_finalize_rolling_upgrade(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Finalizes the rolling upgrade for HDFS by updating the NameNode metadata permanently to the next version.  # noqa: E501

        Finalizes the rolling upgrade for HDFS by updating the NameNode metadata permanently to the next version. Should be done after doing a rolling upgrade to a CDH version >= 5.2.0. <p> Available since API v8.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_finalize_rolling_upgrade(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (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.hdfs_finalize_rolling_upgrade_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_finalize_rolling_upgrade_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_finalize_rolling_upgrade_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Finalizes the rolling upgrade for HDFS by updating the NameNode metadata permanently to the next version.  # noqa: E501

        Finalizes the rolling upgrade for HDFS by updating the NameNode metadata permanently to the next version. Should be done after doing a rolling upgrade to a CDH version >= 5.2.0. <p> Available since API v8.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_finalize_rolling_upgrade_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsFinalizeRollingUpgrade', '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 hdfs_roll_edits_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Roll the edits of an HDFS NameNode or Nameservice.  # noqa: E501

        Roll the edits of an HDFS NameNode or Nameservice. <p> Available since API v3.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_roll_edits_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiRollEditsArgs body: Arguments to the Roll Edits 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.hdfs_roll_edits_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_roll_edits_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_roll_edits_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Roll the edits of an HDFS NameNode or Nameservice.  # noqa: E501

        Roll the edits of an HDFS NameNode or Nameservice. <p> Available since API v3.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_roll_edits_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :param ApiRollEditsArgs body: Arguments to the Roll Edits command.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsRollEdits', '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 hdfs_upgrade_metadata_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade HDFS Metadata as part of a major version upgrade.  # noqa: E501

        Upgrade HDFS Metadata as part of a major version upgrade. <p/> When doing a major version upgrade for HDFS, it is necessary to start HDFS in a special mode where it will do any necessary upgrades of stored metadata. Trying to start HDFS normally will result in an error message and the NameNode(s) failing to start. <p/> The metadata upgrade must eventually be finalized, using the hdfsFinalizeMetadataUpgrade command on the NameNode. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_upgrade_metadata_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (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.hdfs_upgrade_metadata_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hdfs_upgrade_metadata_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hdfs_upgrade_metadata_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade HDFS Metadata as part of a major version upgrade.  # noqa: E501

        Upgrade HDFS Metadata as part of a major version upgrade. <p/> When doing a major version upgrade for HDFS, it is necessary to start HDFS in a special mode where it will do any necessary upgrades of stored metadata. Trying to start HDFS normally will result in an error message and the NameNode(s) failing to start. <p/> The metadata upgrade must eventually be finalized, using the hdfsFinalizeMetadataUpgrade command on the NameNode. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hdfs_upgrade_metadata_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The HDFS service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hdfsUpgradeMetadata', '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 hive_create_metastore_database_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive Metastore Database.  # noqa: E501

        Create the Hive Metastore Database. Only works with embedded postgresql database. <p> This command is to be run whenever a new user and database needs to be created in the embedded postgresql database for a Hive service. This command should usually be followed by a call to hiveCreateMetastoreDatabaseTables. <p> Available since API v4.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_create_metastore_database_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Hive service on which to run the command. (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.hive_create_metastore_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hive_create_metastore_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hive_create_metastore_database_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive Metastore Database.  # noqa: E501

        Create the Hive Metastore Database. Only works with embedded postgresql database. <p> This command is to be run whenever a new user and database needs to be created in the embedded postgresql database for a Hive service. This command should usually be followed by a call to hiveCreateMetastoreDatabaseTables. <p> Available since API v4.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_create_metastore_database_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Hive service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hiveCreateMetastoreDatabase', '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 hive_create_metastore_database_tables_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive Metastore Database tables.  # noqa: E501

        Create the Hive Metastore Database tables. <p> This command is to be run whenever a new database has been specified. Will do nothing if tables already exist. Will not perform an upgrade. Only Available when all Hive Metastore Servers are stopped. <p> Available since API v3.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_create_metastore_database_tables_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Hive service on which to run the command. (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.hive_create_metastore_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hive_create_metastore_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hive_create_metastore_database_tables_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Hive Metastore Database tables.  # noqa: E501

        Create the Hive Metastore Database tables. <p> This command is to be run whenever a new database has been specified. Will do nothing if tables already exist. Will not perform an upgrade. Only Available when all Hive Metastore Servers are stopped. <p> Available since API v3.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_create_metastore_database_tables_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Hive service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hiveCreateMetastoreDatabaseTables', '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 hive_update_metastore_namenodes_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Update Hive Metastore to point to a NameNode's Nameservice name instead of hostname.  # noqa: E501

        Update Hive Metastore to point to a NameNode's Nameservice name instead of hostname. <p> <strong>Back up the Hive Metastore Database before running this command.</strong> <p> This command is to be run after enabling HDFS High Availability. Only available when all Hive Metastore Servers are stopped. <p> Available since API v4.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_update_metastore_namenodes_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Hive service on which to run the command. (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.hive_update_metastore_namenodes_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hive_update_metastore_namenodes_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hive_update_metastore_namenodes_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Update Hive Metastore to point to a NameNode's Nameservice name instead of hostname.  # noqa: E501

        Update Hive Metastore to point to a NameNode's Nameservice name instead of hostname. <p> <strong>Back up the Hive Metastore Database before running this command.</strong> <p> This command is to be run after enabling HDFS High Availability. Only available when all Hive Metastore Servers are stopped. <p> Available since API v4.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_update_metastore_namenodes_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Hive service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hiveUpdateMetastoreNamenodes', '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 hive_upgrade_metastore_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade Hive Metastore as part of a major version upgrade.  # noqa: E501

        Upgrade Hive Metastore as part of a major version upgrade. <p/> When doing a major version upgrade for Hive, it is necessary to upgrade data in the metastore database. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_upgrade_metastore_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hive service name. (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.hive_upgrade_metastore_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hive_upgrade_metastore_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hive_upgrade_metastore_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade Hive Metastore as part of a major version upgrade.  # noqa: E501

        Upgrade Hive Metastore as part of a major version upgrade. <p/> When doing a major version upgrade for Hive, it is necessary to upgrade data in the metastore database. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_upgrade_metastore_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Hive service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hiveUpgradeMetastore', '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 hive_validate_metastore_schema_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Validate the Hive Metastore Schema.  # noqa: E501

        Validate the Hive Metastore Schema. <p> This command checks the Hive metastore schema for any errors and corruptions. This command is to be run on two instances: <li>After the Hive Metastore database tables are created.</li> <li>Both before and after upgrading the Hive metastore database schema./li> * <p> Available since API v17.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_validate_metastore_schema_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Hive service on which to run the command. (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.hive_validate_metastore_schema_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hive_validate_metastore_schema_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hive_validate_metastore_schema_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Validate the Hive Metastore Schema.  # noqa: E501

        Validate the Hive Metastore Schema. <p> This command checks the Hive metastore schema for any errors and corruptions. This command is to be run on two instances: <li>After the Hive Metastore database tables are created.</li> <li>Both before and after upgrading the Hive metastore database schema./li> * <p> Available since API v17.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.hive_validate_metastore_schema_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Hive service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hiveValidateMetastoreSchema', '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 hue_dump_db_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Runs Hue's dumpdata command.  # noqa: E501

        Runs Hue's dumpdata command.  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.hue_dump_db_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (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.hue_dump_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hue_dump_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hue_dump_db_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Runs Hue's dumpdata command.  # noqa: E501

        Runs Hue's dumpdata command.  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.hue_dump_db_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hueDumpDb', '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 hue_load_db_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Runs Hue's loaddata command.  # noqa: E501

        Runs Hue's loaddata command.  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.hue_load_db_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (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.hue_load_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hue_load_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hue_load_db_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Runs Hue's loaddata command.  # noqa: E501

        Runs Hue's loaddata command.  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.hue_load_db_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hueLoadDb', '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 hue_sync_db_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Runs Hue's syncdb command.  # noqa: E501

        Runs Hue's syncdb command.  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.hue_sync_db_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (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.hue_sync_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.hue_sync_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def hue_sync_db_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Runs Hue's syncdb command.  # noqa: E501

        Runs Hue's syncdb command.  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.hue_sync_db_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/hueSyncDb', '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 iceberg_replication_test_access(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Executes IcebergReplicationTestAccess command for the given path.  # noqa: E501

        Executes IcebergReplicationTestAccess command for the given path.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.iceberg_replication_test_access(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the ICEBERG_REPLICATION service. (required)
        :param str hms_warehouse_dir: The HMS warehouseDir path to test access.
        :param str path: The cloudPath to test access.
        :param str source_cluster: The name of the cluster on remote.
        :param str source_peer: The name of the peer.
        :param str source_service: The name of the ICEBERG_REPLICATION service on remote.
        :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.iceberg_replication_test_access_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.iceberg_replication_test_access_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def iceberg_replication_test_access_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Executes IcebergReplicationTestAccess command for the given path.  # noqa: E501

        Executes IcebergReplicationTestAccess command for the given path.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.iceberg_replication_test_access_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the ICEBERG_REPLICATION service. (required)
        :param str hms_warehouse_dir: The HMS warehouseDir path to test access.
        :param str path: The cloudPath to test access.
        :param str source_cluster: The name of the cluster on remote.
        :param str source_peer: The name of the peer.
        :param str source_service: The name of the ICEBERG_REPLICATION service on remote.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cluster_name', 'service_name', 'hms_warehouse_dir', 'path', 'source_cluster', 'source_peer', 'source_service']  # 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 iceberg_replication_test_access" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `iceberg_replication_test_access`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `iceberg_replication_test_access`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'hms_warehouse_dir' in params:
            query_params.append(('hmsWarehouseDir', params['hms_warehouse_dir']))  # noqa: E501
        if 'path' in params:
            query_params.append(('path', params['path']))  # noqa: E501
        if 'source_cluster' in params:
            query_params.append(('sourceCluster', params['source_cluster']))  # noqa: E501
        if 'source_peer' in params:
            query_params.append(('sourcePeer', params['source_peer']))  # noqa: E501
        if 'source_service' in params:
            query_params.append(('sourceService', params['source_service']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/icebergReplicationTestAccess', '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 impala_create_catalog_database_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <strong>Not needed in CM 5.0.0 Release, since Impala Catalog Database is not yet available in CDH as of this release.</strong> Create the Impala Catalog Database. Only works with embedded postgresql database. <p> This command is to be run whenever a new user and database needs to be created in the embedded postgresql database for the Impala Catalog Server. This command should usually be followed by a call to impalaCreateCatalogDatabaseTables. <p> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.impala_create_catalog_database_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Impala service on which to run the command. (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.impala_create_catalog_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.impala_create_catalog_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def impala_create_catalog_database_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <strong>Not needed in CM 5.0.0 Release, since Impala Catalog Database is not yet available in CDH as of this release.</strong> Create the Impala Catalog Database. Only works with embedded postgresql database. <p> This command is to be run whenever a new user and database needs to be created in the embedded postgresql database for the Impala Catalog Server. This command should usually be followed by a call to impalaCreateCatalogDatabaseTables. <p> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.impala_create_catalog_database_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Impala service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/impalaCreateCatalogDatabase', '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 impala_create_catalog_database_tables_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <strong>Not needed in CM 5.0.0 Release, since Impala Catalog Database is not yet available in CDH as of this release.</strong> Create the Impala Catalog Database tables. <p> This command is to be run whenever a new database has been specified. Will do nothing if tables already exist. Will not perform an upgrade. Only available when all Impala Catalog Servers are stopped. <p> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.impala_create_catalog_database_tables_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Impala service on which to run the command. (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.impala_create_catalog_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.impala_create_catalog_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def impala_create_catalog_database_tables_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """.  # noqa: E501

        <strong>Not needed in CM 5.0.0 Release, since Impala Catalog Database is not yet available in CDH as of this release.</strong> Create the Impala Catalog Database tables. <p> This command is to be run whenever a new database has been specified. Will do nothing if tables already exist. Will not perform an upgrade. Only available when all Impala Catalog Servers are stopped. <p> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.impala_create_catalog_database_tables_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Impala service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/impalaCreateCatalogDatabaseTables', '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 import_mr_configs_into_yarn(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Import MapReduce configuration into Yarn, overwriting Yarn configuration.  # noqa: E501

        Import MapReduce configuration into Yarn, overwriting Yarn configuration. <p> You will lose existing Yarn configuration. Read all MapReduce configuration, role assignments, and role configuration groups and update Yarn with corresponding values. MR1 configuration will be converted into the equivalent MR2 configuration. <p> Before running this command, Yarn must be stopped and MapReduce must exist with valid configuration. <p> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.import_mr_configs_into_yarn(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Yarn service on which to run the command. (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.import_mr_configs_into_yarn_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.import_mr_configs_into_yarn_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def import_mr_configs_into_yarn_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Import MapReduce configuration into Yarn, overwriting Yarn configuration.  # noqa: E501

        Import MapReduce configuration into Yarn, overwriting Yarn configuration. <p> You will lose existing Yarn configuration. Read all MapReduce configuration, role assignments, and role configuration groups and update Yarn with corresponding values. MR1 configuration will be converted into the equivalent MR2 configuration. <p> Before running this command, Yarn must be stopped and MapReduce must exist with valid configuration. <p> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.import_mr_configs_into_yarn_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Yarn service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/importMrConfigsIntoYarn', '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 init_solr_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Initializes the Solr service in Zookeeper.  # noqa: E501

        Initializes the Solr service in Zookeeper.  <p> Available since API v4.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.init_solr_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Solr service name. (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.init_solr_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.init_solr_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def init_solr_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Initializes the Solr service in Zookeeper.  # noqa: E501

        Initializes the Solr service in Zookeeper.  <p> Available since API v4.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.init_solr_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Solr service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/initSolr', '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 install_mr_framework_jars(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates an HDFS directory to hold the MapReduce2 framework JARs (if necessary), and uploads the framework JARs to it.  # noqa: E501

        Creates an HDFS directory to hold the MapReduce2 framework JARs (if necessary), and uploads the framework JARs to it. <p> This command is run automatically when starting a YARN service for the first time, or when upgrading an existing YARN service. It can also be run manually to ensure that the latest version of the framework JARS is installed. <p> Available since API v30. <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.install_mr_framework_jars(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the YARN service on which to run the command. (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.install_mr_framework_jars_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.install_mr_framework_jars_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def install_mr_framework_jars_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates an HDFS directory to hold the MapReduce2 framework JARs (if necessary), and uploads the framework JARs to it.  # noqa: E501

        Creates an HDFS directory to hold the MapReduce2 framework JARs (if necessary), and uploads the framework JARs to it. <p> This command is run automatically when starting a YARN service for the first time, or when upgrading an existing YARN service. It can also be run manually to ensure that the latest version of the framework JARS is installed. <p> Available since API v30. <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.install_mr_framework_jars_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the YARN service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/installMrFrameworkJars', '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 install_oozie_share_lib(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates directory for Oozie user in HDFS and installs the ShareLib in it.  # noqa: E501

        Creates directory for Oozie user in HDFS and installs the ShareLib in it. <p/> This command should be re-run after a major version upgrade to refresh the ShareLib to the latest version. <p/> Available since API v3. <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.install_oozie_share_lib(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Oozie service on which to run the command. (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.install_oozie_share_lib_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.install_oozie_share_lib_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def install_oozie_share_lib_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Creates directory for Oozie user in HDFS and installs the ShareLib in it.  # noqa: E501

        Creates directory for Oozie user in HDFS and installs the ShareLib in it. <p/> This command should be re-run after a major version upgrade to refresh the ShareLib to the latest version. <p/> Available since API v3. <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.install_oozie_share_lib_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Oozie service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/installOozieShareLib', '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 ks_migrate_to_sentry(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Migrates the HBase Indexer policy-based permissions to Sentry, by invoking the SentryConfigToolIndexer.  # noqa: E501

        Migrates the HBase Indexer policy-based permissions to Sentry, by invoking the SentryConfigToolIndexer. <p> Note: <li> <ul>KeyStore Indexer service should be in Stopped state.</ul> <ul>This is only needed for upgrading to CDH6.0.</ul> <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ks_migrate_to_sentry(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the KeyStore Indexer service name. (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.ks_migrate_to_sentry_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.ks_migrate_to_sentry_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def ks_migrate_to_sentry_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Migrates the HBase Indexer policy-based permissions to Sentry, by invoking the SentryConfigToolIndexer.  # noqa: E501

        Migrates the HBase Indexer policy-based permissions to Sentry, by invoking the SentryConfigToolIndexer. <p> Note: <li> <ul>KeyStore Indexer service should be in Stopped state.</ul> <ul>This is only needed for upgrading to CDH6.0.</ul> <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.ks_migrate_to_sentry_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the KeyStore Indexer service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/migrateToSentry', '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 list_active_commands(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """List active service commands.  # noqa: E501

        List active service commands.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_active_commands(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to which the role belongs. (required)
        :param str command_name: the command name, unique for the command class HdfsCreateSnapshotCommand#COMMAND_NAME
        :param str view: The view of the data to materialize, either \"summary\" or \"full\".
        :return: ApiCommandList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_active_commands_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.list_active_commands_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def list_active_commands_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """List active service commands.  # noqa: E501

        List active service commands.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_active_commands_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to which the role belongs. (required)
        :param str command_name: the command name, unique for the command class HdfsCreateSnapshotCommand#COMMAND_NAME
        :param str view: The view of the data to materialize, either \"summary\" or \"full\".
        :return: ApiCommandList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'command_name' in params:
            query_params.append(('commandName', params['command_name']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiCommandList',  # 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 list_role_types(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """List the supported role types for a service.  # noqa: E501

        List the supported role types for a service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_role_types(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to modify. (required)
        :return: ApiRoleTypeList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_role_types_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.list_role_types_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def list_role_types_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """List the supported role types for a service.  # noqa: E501

        List the supported role types for a service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_role_types_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to modify. (required)
        :return: ApiRoleTypeList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/roleTypes', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiRoleTypeList',  # 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 list_service_commands(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Lists all the commands (for CSD based services only) that can be executed by name on the provided service.  # noqa: E501

        Lists all the commands (for CSD based services only) that can be executed by name on the provided service.  <p> Available since API v6. </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.list_service_commands(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :return: ApiCommandMetadataList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_service_commands_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.list_service_commands_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def list_service_commands_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Lists all the commands (for CSD based services only) that can be executed by name on the provided service.  # noqa: E501

        Lists all the commands (for CSD based services only) that can be executed by name on the provided service.  <p> Available since API v6. </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.list_service_commands_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :return: ApiCommandMetadataList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commandsByName', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiCommandMetadataList',  # 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 offline_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Offline roles of a service.  # noqa: E501

        Offline roles of a service. <p> Currently the offline operation is only supported by HDFS. <p> For HDFS, the offline operation will put DataNodes into <em>HDFS IN MAINTENANCE</em> state which prevents unnecessary re-replication which could occur if decommissioned. <p> The <em>timeout</em> parameter is used to specify a timeout for offline. For HDFS, when the timeout expires, the DataNode will automatically transition out of <em>HDFS IN MAINTENANCE</em> state, back to <em>HDFS IN SERVICE</em> state. <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.offline_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param ApiRoleNameList body: List of role names to offline.
        :param int timeout: Offline timeout in seconds. Offlined roles will automatically transition from offline state to normal state after timeout. Specify as null to get the default timeout (4 hours).
        :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.offline_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.offline_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def offline_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Offline roles of a service.  # noqa: E501

        Offline roles of a service. <p> Currently the offline operation is only supported by HDFS. <p> For HDFS, the offline operation will put DataNodes into <em>HDFS IN MAINTENANCE</em> state which prevents unnecessary re-replication which could occur if decommissioned. <p> The <em>timeout</em> parameter is used to specify a timeout for offline. For HDFS, when the timeout expires, the DataNode will automatically transition out of <em>HDFS IN MAINTENANCE</em> state, back to <em>HDFS IN SERVICE</em> state. <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.offline_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param ApiRoleNameList body: List of role names to offline.
        :param int timeout: Offline timeout in seconds. Offlined roles will automatically transition from offline state to normal state after timeout. Specify as null to get the default timeout (4 hours).
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # noqa: E501

        query_params = []
        if 'timeout' in params:
            query_params.append(('timeout', params['timeout']))  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/offline', '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 oozie_create_embedded_database_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Oozie Server Database.  # noqa: E501

        Create the Oozie Server Database. Only works with embedded postgresql database. <p> This command is to be run whenever a new user and database need to be created in the embedded postgresql database for an Oozie service. This command should usually be followed by a call to createOozieDb. <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.oozie_create_embedded_database_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Oozie service on which to run the command. (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.oozie_create_embedded_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.oozie_create_embedded_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def oozie_create_embedded_database_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Oozie Server Database.  # noqa: E501

        Create the Oozie Server Database. Only works with embedded postgresql database. <p> This command is to be run whenever a new user and database need to be created in the embedded postgresql database for an Oozie service. This command should usually be followed by a call to createOozieDb. <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.oozie_create_embedded_database_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Oozie service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/oozieCreateEmbeddedDatabase', '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 oozie_dump_database_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Dump the Oozie Server Database.  # noqa: E501

        Dump the Oozie Server Database.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.oozie_dump_database_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (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.oozie_dump_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.oozie_dump_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def oozie_dump_database_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Dump the Oozie Server Database.  # noqa: E501

        Dump the Oozie Server Database.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.oozie_dump_database_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/oozieDumpDatabase', '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 oozie_load_database_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Load the Oozie Server Database from dump.  # noqa: E501

        Load the Oozie Server Database from dump.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.oozie_load_database_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (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.oozie_load_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.oozie_load_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def oozie_load_database_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Load the Oozie Server Database from dump.  # noqa: E501

        Load the Oozie Server Database from dump.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.oozie_load_database_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/oozieLoadDatabase', '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 oozie_upgrade_db_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade Oozie Database schema as part of a major version upgrade.  # noqa: E501

        Upgrade Oozie Database schema as part of a major version upgrade. <p/> When doing a major version upgrade for Oozie, it is necessary to upgrade the schema of its database before Oozie can run successfully. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.oozie_upgrade_db_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Oozie service name. (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.oozie_upgrade_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.oozie_upgrade_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def oozie_upgrade_db_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade Oozie Database schema as part of a major version upgrade.  # noqa: E501

        Upgrade Oozie Database schema as part of a major version upgrade. <p/> When doing a major version upgrade for Oozie, it is necessary to upgrade the schema of its database before Oozie can run successfully. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.oozie_upgrade_db_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Oozie service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/oozieUpgradeDb', '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_service(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Retrieves details information about a service.  # noqa: E501

        Retrieves details information about a service.  # 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_service(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param str view: DataView to materialize. Defaults to 'full'.
        :return: ApiService
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.read_service_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.read_service_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def read_service_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Retrieves details information about a service.  # noqa: E501

        Retrieves details information about a service.  # 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_service_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param str view: DataView to materialize. Defaults to 'full'.
        :return: ApiService
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiService',  # 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_service_config(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Retrieves the configuration of a specific service.  # noqa: E501

        Retrieves the configuration of a specific service. <p> The \"summary\" view contains only the configured parameters, and configuration for role types that contain configured parameters. <p> The \"full\" view contains all available configuration parameters for the service and its role types. This mode performs validation on the configuration, which could take a few seconds on a large cluster (around 500 nodes or more).  # 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_service_config(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

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

    def read_service_config_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Retrieves the configuration of a specific service.  # noqa: E501

        Retrieves the configuration of a specific service. <p> The \"summary\" view contains only the configured parameters, and configuration for role types that contain configured parameters. <p> The \"full\" view contains all available configuration parameters for the service and its role types. This mode performs validation on the configuration, which could take a few seconds on a large cluster (around 500 nodes or more).  # 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_service_config_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to query. (required)
        :param str view: The view of the data to materialize, either \"summary\" or \"full\".
        :return: ApiServiceConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/config', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiServiceConfig',  # 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_services(self, cluster_name, **kwargs):  # noqa: E501
        """Lists all services registered in the cluster.  # noqa: E501

        Lists all services registered in the cluster.  # 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_services(cluster_name, async_req=True)
        >>> result = thread.get()

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

    def read_services_with_http_info(self, cluster_name, **kwargs):  # noqa: E501
        """Lists all services registered in the cluster.  # noqa: E501

        Lists all services registered in the cluster.  # 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_services_with_http_info(cluster_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str view:
        :return: ApiServiceList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # 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(
            '/clusters/{clusterName}/services', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiServiceList',  # 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, cluster_name, service_name, **kwargs):  # noqa: E501
        """Returns the tags associated with this service.  # noqa: E501

        Returns the tags associated with this service. 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (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(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.read_tags_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

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

        Returns the tags associated with this service. 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(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the service (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 = ['cluster_name', 'service_name', '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 'cluster_name' is set
        if ('cluster_name' not in params or
                params['cluster_name'] is None):
            raise ValueError("Missing the required parameter `cluster_name` when calling `read_tags`")  # noqa: E501
        # verify the required parameter 'service_name' is set
        if ('service_name' not in params or
                params['service_name'] is None):
            raise ValueError("Missing the required parameter `service_name` when calling `read_tags`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/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 recommission_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Recommission roles of a service.  # noqa: E501

        Recommission roles of a service. <p> The list should contain names of slave roles to recommission. </p>  <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.recommission_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the service on which to run the command. (required)
        :param ApiRoleNameList body: List of role names to recommision.
        :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.recommission_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.recommission_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def recommission_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Recommission roles of a service.  # noqa: E501

        Recommission roles of a service. <p> The list should contain names of slave roles to recommission. </p>  <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.recommission_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the service on which to run the command. (required)
        :param ApiRoleNameList body: List of role names to recommision.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/recommission', '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 recommission_with_start_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Start and recommission roles of a service.  # noqa: E501

        Start and recommission roles of a service. <p> The list should contain names of slave roles to start and recommission. </p>  <p> Warning: Evolving. This method may change in the future and does not offer standard compatibility guarantees. Only support by HDFS. Do not use without guidance from Cloudera. </p>  <p> Available since API v15. </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.recommission_with_start_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the service on which to run the command. (required)
        :param ApiRoleNameList body: List of role names to recommision.
        :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.recommission_with_start_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.recommission_with_start_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def recommission_with_start_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Start and recommission roles of a service.  # noqa: E501

        Start and recommission roles of a service. <p> The list should contain names of slave roles to start and recommission. </p>  <p> Warning: Evolving. This method may change in the future and does not offer standard compatibility guarantees. Only support by HDFS. Do not use without guidance from Cloudera. </p>  <p> Available since API v15. </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.recommission_with_start_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the service on which to run the command. (required)
        :param ApiRoleNameList body: List of role names to recommision.
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/recommissionWithStart', '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 restart_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Restart the service.  # noqa: E501

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

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to start. (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.restart_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.restart_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def restart_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Restart the service.  # noqa: E501

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

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to start. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/restart', '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 rolling_restart(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Command to run rolling restart of roles in a service.  # noqa: E501

        Command to run rolling restart of roles in a service. The sequence is: <ol> <li>Restart all the non-slave roles <li>If slaves are present restart them in batches of size specified in RollingRestartCmdArgs <li>Perform any post-command needed after rolling restart </ol> <p> Available since API v3. Only available with Cloudera Manager Enterprise Edition.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rolling_restart(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiRollingRestartArgs 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.rolling_restart_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.rolling_restart_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def rolling_restart_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Command to run rolling restart of roles in a service.  # noqa: E501

        Command to run rolling restart of roles in a service. The sequence is: <ol> <li>Restart all the non-slave roles <li>If slaves are present restart them in batches of size specified in RollingRestartCmdArgs <li>Perform any post-command needed after rolling restart </ol> <p> Available since API v3. Only available with Cloudera Manager Enterprise Edition.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rolling_restart_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: (required)
        :param ApiRollingRestartArgs body:
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/rollingRestart', '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 rotate_ecs_certificates(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Rotate ECS Internal Certificates.  # noqa: E501

        Rotate ECS Internal Certificates. <p> This command will rotate the TLS/SSL certificates used by Vault, Embedded DB, and Tolerations Webhook. It also rotates the ingress controller certificate if it is using the default certificate. </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.rotate_ecs_certificates(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: the name of the ECS service (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.rotate_ecs_certificates_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.rotate_ecs_certificates_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def rotate_ecs_certificates_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Rotate ECS Internal Certificates.  # noqa: E501

        Rotate ECS Internal Certificates. <p> This command will rotate the TLS/SSL certificates used by Vault, Embedded DB, and Tolerations Webhook. It also rotates the ingress controller certificate if it is using the default certificate. </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.rotate_ecs_certificates_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: the name of the ECS service (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/rotateEcsCertificates', '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 sentry_create_database_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Sentry Server Database.  # noqa: E501

        Create the Sentry Server Database. Only works with embedded postgresql database. <p> This command is to be run whenever a new user and database need to be created in the embedded postgresql database for a Sentry service. This command should usually be followed by a call to sentryCreateDatabaseTables. <p> Available since API v7.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.sentry_create_database_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Sentry service on which to run the command. (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.sentry_create_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.sentry_create_database_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def sentry_create_database_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Sentry Server Database.  # noqa: E501

        Create the Sentry Server Database. Only works with embedded postgresql database. <p> This command is to be run whenever a new user and database need to be created in the embedded postgresql database for a Sentry service. This command should usually be followed by a call to sentryCreateDatabaseTables. <p> Available since API v7.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.sentry_create_database_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Sentry service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/sentryCreateDatabase', '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 sentry_create_database_tables_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Sentry Server Database tables.  # noqa: E501

        Create the Sentry Server Database tables. <p> This command is to be run whenever a new database has been specified. Will do nothing if tables already exist. Will not perform an upgrade. Only Available when Sentry Server is stopped. <p> Available since API v7.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.sentry_create_database_tables_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Sentry service on which to run the command. (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.sentry_create_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.sentry_create_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def sentry_create_database_tables_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Sentry Server Database tables.  # noqa: E501

        Create the Sentry Server Database tables. <p> This command is to be run whenever a new database has been specified. Will do nothing if tables already exist. Will not perform an upgrade. Only Available when Sentry Server is stopped. <p> Available since API v7.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.sentry_create_database_tables_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Sentry service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/sentryCreateDatabaseTables', '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 sentry_upgrade_database_tables_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade the Sentry Server Database tables.  # noqa: E501

        Upgrade the Sentry Server Database tables. <p> This command is to be run whenever Sentry requires an upgrade to its database tables. <p> Available since API v8.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.sentry_upgrade_database_tables_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Sentry service on which to run the command. (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.sentry_upgrade_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.sentry_upgrade_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def sentry_upgrade_database_tables_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade the Sentry Server Database tables.  # noqa: E501

        Upgrade the Sentry Server Database tables. <p> This command is to be run whenever Sentry requires an upgrade to its database tables. <p> Available since API v8.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.sentry_upgrade_database_tables_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Sentry service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/sentryUpgradeDatabaseTables', '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 service_command_by_name(self, cluster_name, command_name, service_name, **kwargs):  # noqa: E501
        """Executes a command on the service specified by name.  # noqa: E501

        Executes a command on the service specified by name. <p> Available since API v6. </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.service_command_by_name(cluster_name, command_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str command_name: The command name. (required)
        :param str service_name: The service name. (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.service_command_by_name_with_http_info(cluster_name, command_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.service_command_by_name_with_http_info(cluster_name, command_name, service_name, **kwargs)  # noqa: E501
            return data

    def service_command_by_name_with_http_info(self, cluster_name, command_name, service_name, **kwargs):  # noqa: E501
        """Executes a command on the service specified by name.  # noqa: E501

        Executes a command on the service specified by name. <p> Available since API v6. </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.service_command_by_name_with_http_info(cluster_name, command_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str command_name: The command name. (required)
        :param str service_name: The service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'command_name' in params:
            path_params['commandName'] = params['command_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/{commandName}', '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 solr_bootstrap_collections_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Bootstraps Solr Collections after the CDH upgrade.  # noqa: E501

        Bootstraps Solr Collections after the CDH upgrade. <p> Note: This is only needed for upgrading to CDH6.0. <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_bootstrap_collections_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (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.solr_bootstrap_collections_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.solr_bootstrap_collections_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def solr_bootstrap_collections_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Bootstraps Solr Collections after the CDH upgrade.  # noqa: E501

        Bootstraps Solr Collections after the CDH upgrade. <p> Note: This is only needed for upgrading to CDH6.0. <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_bootstrap_collections_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/solrBootstrapCollections', '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 solr_bootstrap_config_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Bootstraps Solr config during the CDH upgrade.  # noqa: E501

        Bootstraps Solr config during the CDH upgrade. <p> Note: This is only needed for upgrading to CDH6.0. <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_bootstrap_config_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (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.solr_bootstrap_config_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.solr_bootstrap_config_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def solr_bootstrap_config_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Bootstraps Solr config during the CDH upgrade.  # noqa: E501

        Bootstraps Solr config during the CDH upgrade. <p> Note: This is only needed for upgrading to CDH6.0. <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_bootstrap_config_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/solrBootstrapConfig', '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 solr_config_backup_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Backs up Solr configuration metadata before CDH upgrade.  # noqa: E501

        Backs up Solr configuration metadata before CDH upgrade. <p> Note: <li> <ul>Solr service should be in Stopped state.</ul> <ul>HDFS and Zookeeper services should in Running state.</ul> <ul>This is only needed for upgrading to CDH6.0.</ul> </p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_config_backup_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (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.solr_config_backup_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.solr_config_backup_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def solr_config_backup_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Backs up Solr configuration metadata before CDH upgrade.  # noqa: E501

        Backs up Solr configuration metadata before CDH upgrade. <p> Note: <li> <ul>Solr service should be in Stopped state.</ul> <ul>HDFS and Zookeeper services should in Running state.</ul> <ul>This is only needed for upgrading to CDH6.0.</ul> </p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_config_backup_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/solrConfigBackup', '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 solr_migrate_sentry_privileges_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Migrates Sentry privileges to new model compatible to support more granular permissions if Solr is configured with a Sentry service.  # noqa: E501

        Migrates Sentry privileges to new model compatible to support more granular permissions if Solr is configured with a Sentry service. <p> Note: <li> <ul>Solr service should be in Stopped state.</ul> <ul>HDFS, Zookeeper, and Sentry services should in Running state.</ul> <ul>This is only needed for upgrading to CDH6.0.</ul> <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_migrate_sentry_privileges_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (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.solr_migrate_sentry_privileges_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.solr_migrate_sentry_privileges_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def solr_migrate_sentry_privileges_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Migrates Sentry privileges to new model compatible to support more granular permissions if Solr is configured with a Sentry service.  # noqa: E501

        Migrates Sentry privileges to new model compatible to support more granular permissions if Solr is configured with a Sentry service. <p> Note: <li> <ul>Solr service should be in Stopped state.</ul> <ul>HDFS, Zookeeper, and Sentry services should in Running state.</ul> <ul>This is only needed for upgrading to CDH6.0.</ul> <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_migrate_sentry_privileges_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/solrMigrateSentryPrivilegesCommand', '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 solr_reinitialize_state_for_upgrade_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Reinitializes the Solr state by clearing the Solr HDFS data directory, the Solr data directory, and the Zookeeper state.  # noqa: E501

        Reinitializes the Solr state by clearing the Solr HDFS data directory, the Solr data directory, and the Zookeeper state. <p> Note: <li> <ul>Solr service should be in Stopped state.</ul> <ul>HDFS and Zookeeper services should in Running state.</ul> <ul>This is only needed for upgrading to CDH6.0.</ul> <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_reinitialize_state_for_upgrade_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (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.solr_reinitialize_state_for_upgrade_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.solr_reinitialize_state_for_upgrade_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def solr_reinitialize_state_for_upgrade_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Reinitializes the Solr state by clearing the Solr HDFS data directory, the Solr data directory, and the Zookeeper state.  # noqa: E501

        Reinitializes the Solr state by clearing the Solr HDFS data directory, the Solr data directory, and the Zookeeper state. <p> Note: <li> <ul>Solr service should be in Stopped state.</ul> <ul>HDFS and Zookeeper services should in Running state.</ul> <ul>This is only needed for upgrading to CDH6.0.</ul> <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_reinitialize_state_for_upgrade_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/solrReinitializeStateForUpgrade', '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 solr_validate_metadata_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Validates Solr metadata and configurations.  # noqa: E501

        Validates Solr metadata and configurations. <p> Note: This is only needed for upgrading to CDH6.0. <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_validate_metadata_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (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.solr_validate_metadata_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.solr_validate_metadata_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def solr_validate_metadata_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Validates Solr metadata and configurations.  # noqa: E501

        Validates Solr metadata and configurations. <p> Note: This is only needed for upgrading to CDH6.0. <p> Available since API v30.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.solr_validate_metadata_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: A String representing the Solr service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/solrValidateMetadata', '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 sqoop_create_database_tables_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Sqoop2 Server Database tables.  # noqa: E501

        Create the Sqoop2 Server Database tables. <p> This command is to be run whenever a new database has been specified. Will do nothing if tables already exist. Will not perform an upgrade. Only available when Sqoop2 Server is stopped. <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.sqoop_create_database_tables_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Sentry service on which to run the command. (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.sqoop_create_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.sqoop_create_database_tables_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def sqoop_create_database_tables_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Create the Sqoop2 Server Database tables.  # noqa: E501

        Create the Sqoop2 Server Database tables. <p> This command is to be run whenever a new database has been specified. Will do nothing if tables already exist. Will not perform an upgrade. Only available when Sqoop2 Server is stopped. <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.sqoop_create_database_tables_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Sentry service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/sqoopCreateDatabaseTables', '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 sqoop_upgrade_db_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade Sqoop Database schema as part of a major version upgrade.  # noqa: E501

        Upgrade Sqoop Database schema as part of a major version upgrade. <p/> When doing a major version upgrade for Sqoop, it is necessary to upgrade the schema of its database before Sqoop can run successfully. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.sqoop_upgrade_db_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Sqoop service name. (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.sqoop_upgrade_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.sqoop_upgrade_db_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def sqoop_upgrade_db_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Upgrade Sqoop Database schema as part of a major version upgrade.  # noqa: E501

        Upgrade Sqoop Database schema as part of a major version upgrade. <p/> When doing a major version upgrade for Sqoop, it is necessary to upgrade the schema of its database before Sqoop can run successfully. <p/> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.sqoop_upgrade_db_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The Sqoop service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/sqoopUpgradeDb', '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 start_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Start the service.  # noqa: E501

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

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to start. (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.start_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.start_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def start_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Start the service.  # noqa: E501

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

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to start. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/start', '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_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Stop the service.  # noqa: E501

        Stop the service.  # 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_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to stop. (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_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.stop_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def stop_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Stop the service.  # noqa: E501

        Stop the service.  # 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_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to stop. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/stop', '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 switch_to_mr2(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Change the cluster to use MR2 instead of MR1.  # noqa: E501

        Change the cluster to use MR2 instead of MR1. Services will be restarted. <p> Will perform the following steps: <ul> <li>Update all services that depend on MapReduce to instead depend on Yarn. </li> <li>Stop MapReduce</li> <li>Start Yarn (MR2 Included)</li> <li>Deploy Yarn (MR2) Client Configuration</li> </ul> <p> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.switch_to_mr2(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Yarn service on which to run the command. (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.switch_to_mr2_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.switch_to_mr2_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def switch_to_mr2_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Change the cluster to use MR2 instead of MR1.  # noqa: E501

        Change the cluster to use MR2 instead of MR1. Services will be restarted. <p> Will perform the following steps: <ul> <li>Update all services that depend on MapReduce to instead depend on Yarn. </li> <li>Stop MapReduce</li> <li>Start Yarn (MR2 Included)</li> <li>Deploy Yarn (MR2) Client Configuration</li> </ul> <p> Available since API v6.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.switch_to_mr2_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: Name of the Yarn service on which to run the command. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/switchToMr2', '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_ecs_ingress_controller_cert(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Updates the certificate used by the ECS Ingress Controller.  # noqa: E501

        Updates the certificate used by the ECS Ingress Controller. <p> This API facilitates the updating of the certificate utilized by the ECS Ingress Controller, enabling automation of certificate pipelines.  # 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_ecs_ingress_controller_cert(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the ECS service. (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.update_ecs_ingress_controller_cert_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.update_ecs_ingress_controller_cert_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def update_ecs_ingress_controller_cert_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Updates the certificate used by the ECS Ingress Controller.  # noqa: E501

        Updates the certificate used by the ECS Ingress Controller. <p> This API facilitates the updating of the certificate utilized by the ECS Ingress Controller, enabling automation of certificate pipelines.  # 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_ecs_ingress_controller_cert_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The name of the ECS service. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/updateEcsIngressControllerCert', '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_service(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Updates service information.  # noqa: E501

        Updates service information. <p/> This method will update only writable fields of the service information. Currently this only includes the service display name. <p/> Available since API v3.  # 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_service(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param ApiService body: Updated service information.
        :return: ApiService
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_service_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.update_service_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def update_service_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Updates service information.  # noqa: E501

        Updates service information. <p/> This method will update only writable fields of the service information. Currently this only includes the service display name. <p/> Available since API v3.  # 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_service_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service name. (required)
        :param ApiService body: Updated service information.
        :return: ApiService
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiService',  # 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_service_config(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Updates the service configuration with the given values.  # noqa: E501

        Updates the service configuration with the given values. <p> If a value is set in the given configuration, it will be added to the service'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_service_config(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to modify. (required)
        :param ApiServiceConfig body: Configuration changes.
        :param str message: Optional message describing the changes.
        :return: ApiServiceConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_service_config_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.update_service_config_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def update_service_config_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Updates the service configuration with the given values.  # noqa: E501

        Updates the service configuration with the given values. <p> If a value is set in the given configuration, it will be added to the service'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_service_config_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to modify. (required)
        :param ApiServiceConfig body: Configuration changes.
        :param str message: Optional message describing the changes.
        :return: ApiServiceConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/config', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiServiceConfig',  # 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 yarn_format_state_store(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Formats the state store in ZooKeeper used for Resource Manager High Availability.  # noqa: E501

        Formats the state store in ZooKeeper used for Resource Manager High Availability. Typically used while moving from non-secure to secure cluster or vice-versa. <p> Available since API v8.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.yarn_format_state_store(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (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.yarn_format_state_store_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.yarn_format_state_store_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def yarn_format_state_store_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Formats the state store in ZooKeeper used for Resource Manager High Availability.  # noqa: E501

        Formats the state store in ZooKeeper used for Resource Manager High Availability. Typically used while moving from non-secure to secure cluster or vice-versa. <p> Available since API v8.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.yarn_format_state_store_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The YARN service name. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/yarnFormatStateStore', '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 zoo_keeper_cleanup_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Clean up all running server instances of a ZooKeeper service.  # noqa: E501

        Clean up all running server instances of a ZooKeeper service. <p> This command removes snapshots and transaction log files kept by ZooKeeper for backup purposes. Refer to the ZooKeeper documentation for more details.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.zoo_keeper_cleanup_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to start. (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.zoo_keeper_cleanup_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.zoo_keeper_cleanup_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def zoo_keeper_cleanup_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Clean up all running server instances of a ZooKeeper service.  # noqa: E501

        Clean up all running server instances of a ZooKeeper service. <p> This command removes snapshots and transaction log files kept by ZooKeeper for backup purposes. Refer to the ZooKeeper documentation for more details.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.zoo_keeper_cleanup_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to start. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/zooKeeperCleanup', '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 zoo_keeper_init_command(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Initializes all the server instances of a ZooKeeper service.  # noqa: E501

        Initializes all the server instances of a ZooKeeper service. <p> ZooKeeper server roles need to be initialized before they can be used.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.zoo_keeper_init_command(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to start. (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.zoo_keeper_init_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
        else:
            (data) = self.zoo_keeper_init_command_with_http_info(cluster_name, service_name, **kwargs)  # noqa: E501
            return data

    def zoo_keeper_init_command_with_http_info(self, cluster_name, service_name, **kwargs):  # noqa: E501
        """Initializes all the server instances of a ZooKeeper service.  # noqa: E501

        Initializes all the server instances of a ZooKeeper service. <p> ZooKeeper server roles need to be initialized before they can be used.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.zoo_keeper_init_command_with_http_info(cluster_name, service_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cluster_name: (required)
        :param str service_name: The service to start. (required)
        :return: ApiCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'cluster_name' in params:
            path_params['clusterName'] = params['cluster_name']  # noqa: E501
        if 'service_name' in params:
            path_params['serviceName'] = params['service_name']  # 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(
            '/clusters/{clusterName}/services/{serviceName}/commands/zooKeeperInit', '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)
