# coding: utf-8

"""
    zrok

    zrok client access  # noqa: E501

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


class MetadataApi(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 configuration(self, **kwargs):  # noqa: E501
        """configuration  # noqa: E501

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

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

    def configuration_with_http_info(self, **kwargs):  # noqa: E501
        """configuration  # noqa: E501

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

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

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/configuration', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Configuration',  # 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_account_detail(self, **kwargs):  # noqa: E501
        """get_account_detail  # 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_account_detail(async_req=True)
        >>> result = thread.get()

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

    def get_account_detail_with_http_info(self, **kwargs):  # noqa: E501
        """get_account_detail  # 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_account_detail_with_http_info(async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/detail/account', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Environments',  # 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_account_metrics(self, **kwargs):  # noqa: E501
        """get_account_metrics  # 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_account_metrics(async_req=True)
        >>> result = thread.get()

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

    def get_account_metrics_with_http_info(self, **kwargs):  # noqa: E501
        """get_account_metrics  # 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_account_metrics_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = ['duration']  # 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_account_metrics" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/metrics/account', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Metrics',  # 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_environment_detail(self, env_zid, **kwargs):  # noqa: E501
        """get_environment_detail  # 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_environment_detail(env_zid, async_req=True)
        >>> result = thread.get()

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

    def get_environment_detail_with_http_info(self, env_zid, **kwargs):  # noqa: E501
        """get_environment_detail  # 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_environment_detail_with_http_info(env_zid, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/detail/environment/{envZId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EnvironmentAndResources',  # 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_environment_metrics(self, env_id, **kwargs):  # noqa: E501
        """get_environment_metrics  # 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_environment_metrics(env_id, async_req=True)
        >>> result = thread.get()

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

    def get_environment_metrics_with_http_info(self, env_id, **kwargs):  # noqa: E501
        """get_environment_metrics  # 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_environment_metrics_with_http_info(env_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str env_id: (required)
        :param str duration:
        :return: Metrics
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/metrics/environment/{envId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Metrics',  # 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_frontend_detail(self, fe_id, **kwargs):  # noqa: E501
        """get_frontend_detail  # 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_frontend_detail(fe_id, async_req=True)
        >>> result = thread.get()

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

    def get_frontend_detail_with_http_info(self, fe_id, **kwargs):  # noqa: E501
        """get_frontend_detail  # 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_frontend_detail_with_http_info(fe_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int fe_id: (required)
        :return: Frontend
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/detail/frontend/{feId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Frontend',  # 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_share_detail(self, shr_token, **kwargs):  # noqa: E501
        """get_share_detail  # 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_share_detail(shr_token, async_req=True)
        >>> result = thread.get()

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

    def get_share_detail_with_http_info(self, shr_token, **kwargs):  # noqa: E501
        """get_share_detail  # 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_share_detail_with_http_info(shr_token, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/detail/share/{shrToken}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Share',  # 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_share_metrics(self, shr_token, **kwargs):  # noqa: E501
        """get_share_metrics  # 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_share_metrics(shr_token, async_req=True)
        >>> result = thread.get()

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

    def get_share_metrics_with_http_info(self, shr_token, **kwargs):  # noqa: E501
        """get_share_metrics  # 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_share_metrics_with_http_info(shr_token, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str shr_token: (required)
        :param str duration:
        :return: Metrics
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/metrics/share/{shrToken}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Metrics',  # 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 overview(self, **kwargs):  # noqa: E501
        """overview  # noqa: E501

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

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

    def overview_with_http_info(self, **kwargs):  # noqa: E501
        """overview  # noqa: E501

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

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

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/overview', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Overview',  # 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 version(self, **kwargs):  # noqa: E501
        """version  # noqa: E501

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

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

    def version_with_http_info(self, **kwargs):  # noqa: E501
        """version  # noqa: E501

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

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

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/version', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Version',  # 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)
