# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    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 kps_api.api_client import ApiClient


class KialiApi(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 app_dashboard(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_dashboard  # noqa: E501

        Endpoint to fetch dashboard to be displayed, related to a single app  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.app_dashboard(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :return: MonitoringDashboard
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.app_dashboard_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.app_dashboard_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def app_dashboard_with_http_info(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_dashboard  # noqa: E501

        Endpoint to fetch dashboard to be displayed, related to a single app  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.app_dashboard_with_http_info(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :return: MonitoringDashboard
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app', 'namespace', 'service_domain', 'authorization', 'avg', 'by_labels', 'direction', 'duration', 'quantiles', 'rate_func', 'rate_interval', 'request_protocol', 'reporter', 'step']  # 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 app_dashboard" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app' is set
        if ('app' not in params or
                params['app'] is None):
            raise ValueError("Missing the required parameter `app` when calling `app_dashboard`")  # noqa: E501
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `app_dashboard`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `app_dashboard`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `app_dashboard`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'avg' in params:
            query_params.append(('avg', params['avg']))  # noqa: E501
        if 'by_labels' in params:
            query_params.append(('byLabels[]', params['by_labels']))  # noqa: E501
            collection_formats['byLabels[]'] = 'csv'  # noqa: E501
        if 'direction' in params:
            query_params.append(('direction', params['direction']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'quantiles' in params:
            query_params.append(('quantiles[]', params['quantiles']))  # noqa: E501
            collection_formats['quantiles[]'] = 'csv'  # noqa: E501
        if 'rate_func' in params:
            query_params.append(('rateFunc', params['rate_func']))  # noqa: E501
        if 'rate_interval' in params:
            query_params.append(('rateInterval', params['rate_interval']))  # noqa: E501
        if 'request_protocol' in params:
            query_params.append(('requestProtocol', params['request_protocol']))  # noqa: E501
        if 'reporter' in params:
            query_params.append(('reporter', params['reporter']))  # noqa: E501
        if 'step' in params:
            query_params.append(('step', params['step']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/apps/{app}/dashboard', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MonitoringDashboard',  # 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 app_details(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_details  # noqa: E501

        Endpoint to get the app 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.app_details(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: App
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.app_details_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.app_details_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def app_details_with_http_info(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_details  # noqa: E501

        Endpoint to get the app 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.app_details_with_http_info(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: App
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/apps/{app}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='App',  # 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 app_health(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_health  # noqa: E501

        Get health associated to the given app  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.app_health(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: AppHealth
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.app_health_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.app_health_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def app_health_with_http_info(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_health  # noqa: E501

        Get health associated to the given app  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.app_health_with_http_info(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: AppHealth
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/apps/{app}/health', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AppHealth',  # 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 app_list(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_list  # noqa: E501

        Endpoint to get the list of apps for a namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.app_list(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: AppList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.app_list_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.app_list_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def app_list_with_http_info(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_list  # noqa: E501

        Endpoint to get the list of apps for a namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.app_list_with_http_info(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: AppList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/apps', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AppList',  # 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 app_metrics(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_metrics  # noqa: E501

        Endpoint to fetch metrics to be displayed, related to a single app  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.app_metrics(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] filters: List of metrics to fetch. Fetch all metrics when empty. List entries are Kiali internal metric names.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :param str version: Filters metrics by the specified version.
        :return: KialiMetrics
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.app_metrics_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.app_metrics_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def app_metrics_with_http_info(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """app_metrics  # noqa: E501

        Endpoint to fetch metrics to be displayed, related to a single app  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.app_metrics_with_http_info(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] filters: List of metrics to fetch. Fetch all metrics when empty. List entries are Kiali internal metric names.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :param str version: Filters metrics by the specified version.
        :return: KialiMetrics
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app', 'namespace', 'service_domain', 'authorization', 'avg', 'by_labels', 'direction', 'duration', 'filters', 'quantiles', 'rate_func', 'rate_interval', 'request_protocol', 'reporter', 'step', 'version']  # 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 app_metrics" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app' is set
        if ('app' not in params or
                params['app'] is None):
            raise ValueError("Missing the required parameter `app` when calling `app_metrics`")  # noqa: E501
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `app_metrics`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `app_metrics`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `app_metrics`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'avg' in params:
            query_params.append(('avg', params['avg']))  # noqa: E501
        if 'by_labels' in params:
            query_params.append(('byLabels[]', params['by_labels']))  # noqa: E501
            collection_formats['byLabels[]'] = 'csv'  # noqa: E501
        if 'direction' in params:
            query_params.append(('direction', params['direction']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'filters' in params:
            query_params.append(('filters[]', params['filters']))  # noqa: E501
            collection_formats['filters[]'] = 'csv'  # noqa: E501
        if 'quantiles' in params:
            query_params.append(('quantiles[]', params['quantiles']))  # noqa: E501
            collection_formats['quantiles[]'] = 'csv'  # noqa: E501
        if 'rate_func' in params:
            query_params.append(('rateFunc', params['rate_func']))  # noqa: E501
        if 'rate_interval' in params:
            query_params.append(('rateInterval', params['rate_interval']))  # noqa: E501
        if 'request_protocol' in params:
            query_params.append(('requestProtocol', params['request_protocol']))  # noqa: E501
        if 'reporter' in params:
            query_params.append(('reporter', params['reporter']))  # noqa: E501
        if 'step' in params:
            query_params.append(('step', params['step']))  # noqa: E501
        if 'version' in params:
            query_params.append(('version', params['version']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/apps/{app}/metrics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='KialiMetrics',  # 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 error_traces(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """error_traces  # noqa: E501

        Endpoint to get the number of traces in error for a given 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.error_traces(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :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.error_traces_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.error_traces_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def error_traces_with_http_info(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """error_traces  # noqa: E501

        Endpoint to get the number of traces in error for a given 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.error_traces_with_http_info(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services/{service}/errortraces', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_config(self, service_domain, authorization, **kwargs):  # noqa: E501
        """get_config  # noqa: E501

        Endpoint to get the config of Kiali  # 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_config(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: StatusInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_config_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.get_config_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def get_config_with_http_info(self, service_domain, authorization, **kwargs):  # noqa: E501
        """get_config  # noqa: E501

        Endpoint to get the config of Kiali  # 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_config_with_http_info(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: StatusInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/config', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusInfo',  # 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_status(self, service_domain, authorization, **kwargs):  # noqa: E501
        """get_status  # noqa: E501

        Endpoint to get the status of Kiali  # 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_status(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: StatusInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_status_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.get_status_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def get_status_with_http_info(self, service_domain, authorization, **kwargs):  # noqa: E501
        """get_status  # noqa: E501

        Endpoint to get the status of Kiali  # 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_status_with_http_info(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: StatusInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/status', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusInfo',  # 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 graph_app(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """graph_app  # noqa: E501

        The backing JSON for an app node detail graph. (supported graphTypes: app | versionedApp)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_app(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str inject_service_nodes: Flag for injecting the requested service node between source and destination nodes.
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.graph_app_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.graph_app_with_http_info(app, namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def graph_app_with_http_info(self, app, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """graph_app  # noqa: E501

        The backing JSON for an app node detail graph. (supported graphTypes: app | versionedApp)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_app_with_http_info(app, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str inject_service_nodes: Flag for injecting the requested service node between source and destination nodes.
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app', 'namespace', 'service_domain', 'authorization', 'appenders', 'duration', 'graph_type', 'group_by', 'inject_service_nodes', 'query_time']  # 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 graph_app" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app' is set
        if ('app' not in params or
                params['app'] is None):
            raise ValueError("Missing the required parameter `app` when calling `graph_app`")  # noqa: E501
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `graph_app`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `graph_app`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `graph_app`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'appenders' in params:
            query_params.append(('appenders', params['appenders']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'graph_type' in params:
            query_params.append(('graphType', params['graph_type']))  # noqa: E501
        if 'group_by' in params:
            query_params.append(('groupBy', params['group_by']))  # noqa: E501
        if 'inject_service_nodes' in params:
            query_params.append(('injectServiceNodes', params['inject_service_nodes']))  # noqa: E501
        if 'query_time' in params:
            query_params.append(('queryTime', params['query_time']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/applications/{app}/graph', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GraphConfig',  # 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 graph_app_version(self, app, version, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """graph_app_version  # noqa: E501

        The backing JSON for a versioned app node detail graph. (supported graphTypes: app | versionedApp)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_app_version(app, version, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str version: The app version (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str inject_service_nodes: Flag for injecting the requested service node between source and destination nodes.
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.graph_app_version_with_http_info(app, version, namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.graph_app_version_with_http_info(app, version, namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def graph_app_version_with_http_info(self, app, version, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """graph_app_version  # noqa: E501

        The backing JSON for a versioned app node detail graph. (supported graphTypes: app | versionedApp)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_app_version_with_http_info(app, version, namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app: The app name (label value). (required)
        :param str version: The app version (label value). (required)
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str inject_service_nodes: Flag for injecting the requested service node between source and destination nodes.
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app', 'version', 'namespace', 'service_domain', 'authorization', 'appenders', 'duration', 'graph_type', 'group_by', 'inject_service_nodes', 'query_time']  # 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 graph_app_version" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app' is set
        if ('app' not in params or
                params['app'] is None):
            raise ValueError("Missing the required parameter `app` when calling `graph_app_version`")  # noqa: E501
        # verify the required parameter 'version' is set
        if ('version' not in params or
                params['version'] is None):
            raise ValueError("Missing the required parameter `version` when calling `graph_app_version`")  # noqa: E501
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `graph_app_version`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `graph_app_version`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `graph_app_version`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'app' in params:
            path_params['app'] = params['app']  # noqa: E501
        if 'version' in params:
            path_params['version'] = params['version']  # noqa: E501
        if 'namespace' in params:
            path_params['namespace'] = params['namespace']  # noqa: E501

        query_params = []
        if 'appenders' in params:
            query_params.append(('appenders', params['appenders']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'graph_type' in params:
            query_params.append(('graphType', params['graph_type']))  # noqa: E501
        if 'group_by' in params:
            query_params.append(('groupBy', params['group_by']))  # noqa: E501
        if 'inject_service_nodes' in params:
            query_params.append(('injectServiceNodes', params['inject_service_nodes']))  # noqa: E501
        if 'query_time' in params:
            query_params.append(('queryTime', params['query_time']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/applications/{app}/versions/{version}/graph', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GraphConfig',  # 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 graph_namespaces(self, namespaces, service_domain, authorization, **kwargs):  # noqa: E501
        """The backing JSON for a namespaces graph.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_namespaces(namespaces, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespaces: Comma-separated list of namespaces to include in the graph. The namespaces must be accessible to the client. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str inject_service_nodes: Flag for injecting the requested service node between source and destination nodes.
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.graph_namespaces_with_http_info(namespaces, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.graph_namespaces_with_http_info(namespaces, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def graph_namespaces_with_http_info(self, namespaces, service_domain, authorization, **kwargs):  # noqa: E501
        """The backing JSON for a namespaces graph.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_namespaces_with_http_info(namespaces, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespaces: Comma-separated list of namespaces to include in the graph. The namespaces must be accessible to the client. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str inject_service_nodes: Flag for injecting the requested service node between source and destination nodes.
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['namespaces', 'service_domain', 'authorization', 'appenders', 'duration', 'graph_type', 'group_by', 'inject_service_nodes', 'query_time']  # 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 graph_namespaces" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'namespaces' is set
        if ('namespaces' not in params or
                params['namespaces'] is None):
            raise ValueError("Missing the required parameter `namespaces` when calling `graph_namespaces`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `graph_namespaces`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `graph_namespaces`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'appenders' in params:
            query_params.append(('appenders', params['appenders']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'graph_type' in params:
            query_params.append(('graphType', params['graph_type']))  # noqa: E501
        if 'group_by' in params:
            query_params.append(('groupBy', params['group_by']))  # noqa: E501
        if 'inject_service_nodes' in params:
            query_params.append(('injectServiceNodes', params['inject_service_nodes']))  # noqa: E501
        if 'namespaces' in params:
            query_params.append(('namespaces', params['namespaces']))  # noqa: E501
        if 'query_time' in params:
            query_params.append(('queryTime', params['query_time']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/graph', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GraphConfig',  # 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 graph_service(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """The backing JSON for a service node detail graph.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_service(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.graph_service_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.graph_service_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def graph_service_with_http_info(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """The backing JSON for a service node detail graph.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_service_with_http_info(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['namespace', 'service', 'service_domain', 'authorization', 'appenders', 'duration', 'graph_type', 'group_by', 'query_time']  # 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 graph_service" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `graph_service`")  # noqa: E501
        # verify the required parameter 'service' is set
        if ('service' not in params or
                params['service'] is None):
            raise ValueError("Missing the required parameter `service` when calling `graph_service`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `graph_service`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `graph_service`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'appenders' in params:
            query_params.append(('appenders', params['appenders']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'graph_type' in params:
            query_params.append(('graphType', params['graph_type']))  # noqa: E501
        if 'group_by' in params:
            query_params.append(('groupBy', params['group_by']))  # noqa: E501
        if 'query_time' in params:
            query_params.append(('queryTime', params['query_time']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services/{service}/graph', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GraphConfig',  # 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 graph_workload(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """The backing JSON for a workload node detail graph.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_workload(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str inject_service_nodes: Flag for injecting the requested service node between source and destination nodes.
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.graph_workload_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.graph_workload_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def graph_workload_with_http_info(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """The backing JSON for a workload node detail graph.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.graph_workload_with_http_info(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str appenders: Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
        :param str duration: Query time-range duration (Golang string duration).
        :param str graph_type: Graph type. Available graph types: [app, service, versionedApp, workload].
        :param str group_by: App box grouping characteristic. Available groupings: [app, none, version].
        :param str inject_service_nodes: Flag for injecting the requested service node between source and destination nodes.
        :param str query_time: Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
        :return: GraphConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['namespace', 'workload', 'service_domain', 'authorization', 'appenders', 'duration', 'graph_type', 'group_by', 'inject_service_nodes', 'query_time']  # 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 graph_workload" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `graph_workload`")  # noqa: E501
        # verify the required parameter 'workload' is set
        if ('workload' not in params or
                params['workload'] is None):
            raise ValueError("Missing the required parameter `workload` when calling `graph_workload`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `graph_workload`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `graph_workload`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'appenders' in params:
            query_params.append(('appenders', params['appenders']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'graph_type' in params:
            query_params.append(('graphType', params['graph_type']))  # noqa: E501
        if 'group_by' in params:
            query_params.append(('groupBy', params['group_by']))  # noqa: E501
        if 'inject_service_nodes' in params:
            query_params.append(('injectServiceNodes', params['inject_service_nodes']))  # noqa: E501
        if 'query_time' in params:
            query_params.append(('queryTime', params['query_time']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/workloads/{workload}/graph', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GraphConfig',  # 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 istio_config_list(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """istio_config_list  # noqa: E501

        Endpoint to get the list of Istio Config of a namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.istio_config_list(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: IstioConfigList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.istio_config_list_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.istio_config_list_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def istio_config_list_with_http_info(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """istio_config_list  # noqa: E501

        Endpoint to get the list of Istio Config of a namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.istio_config_list_with_http_info(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: IstioConfigList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/istio', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='IstioConfigList',  # 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 istio_status(self, service_domain, authorization, **kwargs):  # noqa: E501
        """istio_status  # noqa: E501

        Get the status of each components needed in the control plane  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.istio_status(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: IstioComponentStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.istio_status_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.istio_status_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def istio_status_with_http_info(self, service_domain, authorization, **kwargs):  # noqa: E501
        """istio_status  # noqa: E501

        Get the status of each components needed in the control plane  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.istio_status_with_http_info(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: IstioComponentStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/istio/status', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='IstioComponentStatus',  # 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 namespace_health(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_health  # noqa: E501

        Get health for all objects in the given namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_health(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: NamespaceAppHealth
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.namespace_health_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.namespace_health_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def namespace_health_with_http_info(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_health  # noqa: E501

        Get health for all objects in the given namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_health_with_http_info(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: NamespaceAppHealth
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/health', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='NamespaceAppHealth',  # 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 namespace_list(self, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_list  # noqa: E501

        Endpoint to get the list of the available namespaces  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_list(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: list[Namespace]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.namespace_list_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.namespace_list_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def namespace_list_with_http_info(self, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_list  # noqa: E501

        Endpoint to get the list of the available namespaces  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_list_with_http_info(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: list[Namespace]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Namespace]',  # 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 namespace_metrics(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_metrics  # noqa: E501

        Endpoint to fetch metrics to be displayed, related to a namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_metrics(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: KialiMetrics
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.namespace_metrics_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.namespace_metrics_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def namespace_metrics_with_http_info(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_metrics  # noqa: E501

        Endpoint to fetch metrics to be displayed, related to a namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_metrics_with_http_info(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: KialiMetrics
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/metrics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='KialiMetrics',  # 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 namespace_tls(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_tls  # noqa: E501

        Get TLS status for the given namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_tls(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: MTLSStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.namespace_tls_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.namespace_tls_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def namespace_tls_with_http_info(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_tls  # noqa: E501

        Get TLS status for the given namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_tls_with_http_info(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: MTLSStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/tls', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MTLSStatus',  # 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 namespace_validations(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_validations  # noqa: E501

        Get validation summary for all objects in the given namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_validations(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: IstioValidationSummary
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.namespace_validations_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.namespace_validations_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def namespace_validations_with_http_info(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """namespace_validations  # noqa: E501

        Get validation summary for all objects in the given namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.namespace_validations_with_http_info(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: IstioValidationSummary
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/validations', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='IstioValidationSummary',  # 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 pod_details(self, namespace, pod, service_domain, authorization, **kwargs):  # noqa: E501
        """pod_details  # noqa: E501

        Endpoint to get pod 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.pod_details(namespace, pod, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str pod: The pod name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: Workload
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.pod_details_with_http_info(namespace, pod, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.pod_details_with_http_info(namespace, pod, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def pod_details_with_http_info(self, namespace, pod, service_domain, authorization, **kwargs):  # noqa: E501
        """pod_details  # noqa: E501

        Endpoint to get pod 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.pod_details_with_http_info(namespace, pod, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str pod: The pod name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: Workload
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/pods/{pod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Workload',  # 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 pod_logs(self, namespace, pod, service_domain, authorization, **kwargs):  # noqa: E501
        """pod_logs  # noqa: E501

        Endpoint to get pod logs  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.pod_logs(namespace, pod, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str pod: The pod name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str container: The pod container name. Optional for single-container pod. Otherwise required.
        :param str since_time: The start time for fetching logs. UNIX time in seconds. Default is all logs.
        :return: Workload
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.pod_logs_with_http_info(namespace, pod, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.pod_logs_with_http_info(namespace, pod, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def pod_logs_with_http_info(self, namespace, pod, service_domain, authorization, **kwargs):  # noqa: E501
        """pod_logs  # noqa: E501

        Endpoint to get pod logs  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.pod_logs_with_http_info(namespace, pod, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str pod: The pod name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param str container: The pod container name. Optional for single-container pod. Otherwise required.
        :param str since_time: The start time for fetching logs. UNIX time in seconds. Default is all logs.
        :return: Workload
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []
        if 'container' in params:
            query_params.append(('container', params['container']))  # noqa: E501
        if 'since_time' in params:
            query_params.append(('sinceTime', params['since_time']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/pods/{pod}/logs', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Workload',  # 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 root(self, service_domain, authorization, **kwargs):  # noqa: E501
        """root  # noqa: E501

        Endpoint to get the status of Kiali  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.root(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: StatusInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.root_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.root_with_http_info(service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def root_with_http_info(self, service_domain, authorization, **kwargs):  # noqa: E501
        """root  # noqa: E501

        Endpoint to get the status of Kiali  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.root_with_http_info(service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: StatusInfo
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StatusInfo',  # 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_dashboard(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """service_dashboard  # noqa: E501

        Endpoint to fetch dashboard to be displayed, related to a single 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.service_dashboard(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :return: MonitoringDashboard
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.service_dashboard_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.service_dashboard_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def service_dashboard_with_http_info(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """service_dashboard  # noqa: E501

        Endpoint to fetch dashboard to be displayed, related to a single 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.service_dashboard_with_http_info(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :return: MonitoringDashboard
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['namespace', 'service', 'service_domain', 'authorization', 'avg', 'by_labels', 'direction', 'duration', 'quantiles', 'rate_func', 'rate_interval', 'request_protocol', 'reporter', 'step']  # 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_dashboard" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `service_dashboard`")  # noqa: E501
        # verify the required parameter 'service' is set
        if ('service' not in params or
                params['service'] is None):
            raise ValueError("Missing the required parameter `service` when calling `service_dashboard`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `service_dashboard`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `service_dashboard`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'avg' in params:
            query_params.append(('avg', params['avg']))  # noqa: E501
        if 'by_labels' in params:
            query_params.append(('byLabels[]', params['by_labels']))  # noqa: E501
            collection_formats['byLabels[]'] = 'csv'  # noqa: E501
        if 'direction' in params:
            query_params.append(('direction', params['direction']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'quantiles' in params:
            query_params.append(('quantiles[]', params['quantiles']))  # noqa: E501
            collection_formats['quantiles[]'] = 'csv'  # noqa: E501
        if 'rate_func' in params:
            query_params.append(('rateFunc', params['rate_func']))  # noqa: E501
        if 'rate_interval' in params:
            query_params.append(('rateInterval', params['rate_interval']))  # noqa: E501
        if 'request_protocol' in params:
            query_params.append(('requestProtocol', params['request_protocol']))  # noqa: E501
        if 'reporter' in params:
            query_params.append(('reporter', params['reporter']))  # noqa: E501
        if 'step' in params:
            query_params.append(('step', params['step']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services/{service}/dashboard', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MonitoringDashboard',  # 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_details(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """service_details  # noqa: E501

        Endpoint to get the details of a given 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.service_details(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: ServiceDetails
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.service_details_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.service_details_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def service_details_with_http_info(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """service_details  # noqa: E501

        Endpoint to get the details of a given 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.service_details_with_http_info(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: ServiceDetails
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services/{service}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ServiceDetails',  # 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_health(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """service_health  # noqa: E501

        Get health associated to the given 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.service_health(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: ServiceHealth
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.service_health_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.service_health_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def service_health_with_http_info(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """service_health  # noqa: E501

        Get health associated to the given 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.service_health_with_http_info(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: ServiceHealth
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services/{service}/health', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ServiceHealth',  # 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_list(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """service_list  # noqa: E501

        Endpoint to get the details of a given 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.service_list(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: ServiceList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.service_list_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.service_list_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def service_list_with_http_info(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """service_list  # noqa: E501

        Endpoint to get the details of a given 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.service_list_with_http_info(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: ServiceList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ServiceList',  # 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_metrics(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """service_metrics  # noqa: E501

        Endpoint to fetch metrics to be displayed, related to a single 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.service_metrics(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] filters: List of metrics to fetch. Fetch all metrics when empty. List entries are Kiali internal metric names.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :param str version: Filters metrics by the specified version.
        :return: KialiMetrics
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.service_metrics_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.service_metrics_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def service_metrics_with_http_info(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """service_metrics  # noqa: E501

        Endpoint to fetch metrics to be displayed, related to a single 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.service_metrics_with_http_info(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] filters: List of metrics to fetch. Fetch all metrics when empty. List entries are Kiali internal metric names.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :param str version: Filters metrics by the specified version.
        :return: KialiMetrics
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['namespace', 'service', 'service_domain', 'authorization', 'avg', 'by_labels', 'direction', 'duration', 'filters', 'quantiles', 'rate_func', 'rate_interval', 'request_protocol', 'reporter', 'step', 'version']  # 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_metrics" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `service_metrics`")  # noqa: E501
        # verify the required parameter 'service' is set
        if ('service' not in params or
                params['service'] is None):
            raise ValueError("Missing the required parameter `service` when calling `service_metrics`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `service_metrics`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `service_metrics`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'avg' in params:
            query_params.append(('avg', params['avg']))  # noqa: E501
        if 'by_labels' in params:
            query_params.append(('byLabels[]', params['by_labels']))  # noqa: E501
            collection_formats['byLabels[]'] = 'csv'  # noqa: E501
        if 'direction' in params:
            query_params.append(('direction', params['direction']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'filters' in params:
            query_params.append(('filters[]', params['filters']))  # noqa: E501
            collection_formats['filters[]'] = 'csv'  # noqa: E501
        if 'quantiles' in params:
            query_params.append(('quantiles[]', params['quantiles']))  # noqa: E501
            collection_formats['quantiles[]'] = 'csv'  # noqa: E501
        if 'rate_func' in params:
            query_params.append(('rateFunc', params['rate_func']))  # noqa: E501
        if 'rate_interval' in params:
            query_params.append(('rateInterval', params['rate_interval']))  # noqa: E501
        if 'request_protocol' in params:
            query_params.append(('requestProtocol', params['request_protocol']))  # noqa: E501
        if 'reporter' in params:
            query_params.append(('reporter', params['reporter']))  # noqa: E501
        if 'step' in params:
            query_params.append(('step', params['step']))  # noqa: E501
        if 'version' in params:
            query_params.append(('version', params['version']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services/{service}/metrics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='KialiMetrics',  # 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 spans_list(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """spans_list  # noqa: E501

        Endpoint to get Jaeger spans for a given 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.spans_list(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: list[Span]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.spans_list_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.spans_list_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def spans_list_with_http_info(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """spans_list  # noqa: E501

        Endpoint to get Jaeger spans for a given 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.spans_list_with_http_info(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: list[Span]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services/{service}/spans', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Span]',  # 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 traces_detail(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """traces_detail  # noqa: E501

        Endpoint to get a specific trace of a given 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.traces_detail(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: list[Trace]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.traces_detail_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.traces_detail_with_http_info(namespace, service, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def traces_detail_with_http_info(self, namespace, service, service_domain, authorization, **kwargs):  # noqa: E501
        """traces_detail  # noqa: E501

        Endpoint to get a specific trace of a given 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.traces_detail_with_http_info(namespace, service, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service: The service name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: list[Trace]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/services/{service}/traces', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Trace]',  # 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 workload_dashboard(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_dashboard  # noqa: E501

        Endpoint to fetch dashboard to be displayed, related to a single workload  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.workload_dashboard(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :return: MonitoringDashboard
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.workload_dashboard_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.workload_dashboard_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def workload_dashboard_with_http_info(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_dashboard  # noqa: E501

        Endpoint to fetch dashboard to be displayed, related to a single workload  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.workload_dashboard_with_http_info(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :return: MonitoringDashboard
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['namespace', 'workload', 'service_domain', 'authorization', 'avg', 'by_labels', 'direction', 'duration', 'quantiles', 'rate_func', 'rate_interval', 'request_protocol', 'reporter', 'step']  # 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 workload_dashboard" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `workload_dashboard`")  # noqa: E501
        # verify the required parameter 'workload' is set
        if ('workload' not in params or
                params['workload'] is None):
            raise ValueError("Missing the required parameter `workload` when calling `workload_dashboard`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `workload_dashboard`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `workload_dashboard`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'avg' in params:
            query_params.append(('avg', params['avg']))  # noqa: E501
        if 'by_labels' in params:
            query_params.append(('byLabels[]', params['by_labels']))  # noqa: E501
            collection_formats['byLabels[]'] = 'csv'  # noqa: E501
        if 'direction' in params:
            query_params.append(('direction', params['direction']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'quantiles' in params:
            query_params.append(('quantiles[]', params['quantiles']))  # noqa: E501
            collection_formats['quantiles[]'] = 'csv'  # noqa: E501
        if 'rate_func' in params:
            query_params.append(('rateFunc', params['rate_func']))  # noqa: E501
        if 'rate_interval' in params:
            query_params.append(('rateInterval', params['rate_interval']))  # noqa: E501
        if 'request_protocol' in params:
            query_params.append(('requestProtocol', params['request_protocol']))  # noqa: E501
        if 'reporter' in params:
            query_params.append(('reporter', params['reporter']))  # noqa: E501
        if 'step' in params:
            query_params.append(('step', params['step']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/workloads/{workload}/dashboard', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MonitoringDashboard',  # 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 workload_details(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_details  # noqa: E501

        Endpoint to get the workload 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.workload_details(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: Workload
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.workload_details_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.workload_details_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def workload_details_with_http_info(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_details  # noqa: E501

        Endpoint to get the workload 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.workload_details_with_http_info(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: Workload
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/workloads/{workload}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Workload',  # 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 workload_health(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_health  # noqa: E501

        Get health associated to the given workload  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.workload_health(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: WorkloadHealth
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.workload_health_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.workload_health_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def workload_health_with_http_info(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_health  # noqa: E501

        Get health associated to the given workload  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.workload_health_with_http_info(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: WorkloadHealth
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/workloads/{workload}/health', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='WorkloadHealth',  # 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 workload_list(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_list  # noqa: E501

        Endpoint to get the list of workloads for a namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.workload_list(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: WorkloadList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.workload_list_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.workload_list_with_http_info(namespace, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def workload_list_with_http_info(self, namespace, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_list  # noqa: E501

        Endpoint to get the list of workloads for a namespace  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.workload_list_with_http_info(namespace, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :return: WorkloadList
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/workloads', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='WorkloadList',  # 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 workload_metrics(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_metrics  # noqa: E501

        Endpoint to fetch metrics to be displayed, related to a single workload  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.workload_metrics(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] filters: List of metrics to fetch. Fetch all metrics when empty. List entries are Kiali internal metric names.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :param str version: Filters metrics by the specified version.
        :return: KialiMetrics
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.workload_metrics_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
        else:
            (data) = self.workload_metrics_with_http_info(namespace, workload, service_domain, authorization, **kwargs)  # noqa: E501
            return data

    def workload_metrics_with_http_info(self, namespace, workload, service_domain, authorization, **kwargs):  # noqa: E501
        """workload_metrics  # noqa: E501

        Endpoint to fetch metrics to be displayed, related to a single workload  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.workload_metrics_with_http_info(namespace, workload, service_domain, authorization, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str namespace: The namespace name. (required)
        :param str workload: The workload name. (required)
        :param str service_domain: ID of ServiceDomain to access. (required)
        :param str authorization: Format: Bearer &lt;token>, with &lt;token> from login API response. (required)
        :param bool avg: Flag for fetching histogram average. Default is true.
        :param list[str] by_labels: List of labels to use for grouping metrics (via Prometheus 'by' clause).
        :param str direction: Traffic direction: 'inbound' or 'outbound'.
        :param int duration: Duration of the query period, in seconds.
        :param list[str] filters: List of metrics to fetch. Fetch all metrics when empty. List entries are Kiali internal metric names.
        :param list[str] quantiles: List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
        :param str rate_func: Prometheus function used to calculate rate: 'rate' or 'irate'.
        :param str rate_interval: Interval used for rate and histogram calculation.
        :param str request_protocol: Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
        :param str reporter: Istio telemetry reporter: 'source' or 'destination'.
        :param int step: Step between [graph] datapoints, in seconds.
        :param str version: Filters metrics by the specified version.
        :return: KialiMetrics
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['namespace', 'workload', 'service_domain', 'authorization', 'avg', 'by_labels', 'direction', 'duration', 'filters', 'quantiles', 'rate_func', 'rate_interval', 'request_protocol', 'reporter', 'step', 'version']  # 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 workload_metrics" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'namespace' is set
        if ('namespace' not in params or
                params['namespace'] is None):
            raise ValueError("Missing the required parameter `namespace` when calling `workload_metrics`")  # noqa: E501
        # verify the required parameter 'workload' is set
        if ('workload' not in params or
                params['workload'] is None):
            raise ValueError("Missing the required parameter `workload` when calling `workload_metrics`")  # noqa: E501
        # verify the required parameter 'service_domain' is set
        if ('service_domain' not in params or
                params['service_domain'] is None):
            raise ValueError("Missing the required parameter `service_domain` when calling `workload_metrics`")  # noqa: E501
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `workload_metrics`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'avg' in params:
            query_params.append(('avg', params['avg']))  # noqa: E501
        if 'by_labels' in params:
            query_params.append(('byLabels[]', params['by_labels']))  # noqa: E501
            collection_formats['byLabels[]'] = 'csv'  # noqa: E501
        if 'direction' in params:
            query_params.append(('direction', params['direction']))  # noqa: E501
        if 'duration' in params:
            query_params.append(('duration', params['duration']))  # noqa: E501
        if 'filters' in params:
            query_params.append(('filters[]', params['filters']))  # noqa: E501
            collection_formats['filters[]'] = 'csv'  # noqa: E501
        if 'quantiles' in params:
            query_params.append(('quantiles[]', params['quantiles']))  # noqa: E501
            collection_formats['quantiles[]'] = 'csv'  # noqa: E501
        if 'rate_func' in params:
            query_params.append(('rateFunc', params['rate_func']))  # noqa: E501
        if 'rate_interval' in params:
            query_params.append(('rateInterval', params['rate_interval']))  # noqa: E501
        if 'request_protocol' in params:
            query_params.append(('requestProtocol', params['request_protocol']))  # noqa: E501
        if 'reporter' in params:
            query_params.append(('reporter', params['reporter']))  # noqa: E501
        if 'step' in params:
            query_params.append(('step', params['step']))  # noqa: E501
        if 'version' in params:
            query_params.append(('version', params['version']))  # noqa: E501
        if 'service_domain' in params:
            query_params.append(('serviceDomain', params['service_domain']))  # noqa: E501

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

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1.0/kiali/namespaces/{namespace}/workloads/{workload}/metrics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='KialiMetrics',  # 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)
