示例#1
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_permissions(
            self,
            **kwargs
        ):
            """List permissions  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_permissions(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                limit (int): The numbers of items to return.. [optional] if omitted the server will use the default value of 100
                offset (int): The number of items to skip before starting to collect the result set.. [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                ActionCollection
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_permissions = _Endpoint(
            settings={
                'response_type': (ActionCollection,),
                'auth': [
                    'Basic',
                    'Kerberos'
                ],
                'endpoint_path': '/permissions',
                'operation_id': 'get_permissions',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'limit',
                    'offset',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'offset',
                ]
            },
            root_map={
                'validations': {
                    ('offset',): {

                        'inclusive_minimum': 0,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'limit':
                        (int,),
                    'offset':
                        (int,),
                },
                'attribute_map': {
                    'limit': 'limit',
                    'offset': 'offset',
                },
                'location_map': {
                    'limit': 'query',
                    'offset': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_permissions
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_extra_links(
            self,
            dag_id,
            dag_run_id,
            task_id,
            **kwargs
        ):
            """List extra links  # noqa: E501

            List extra links for task instance.   # 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_extra_links(dag_id, dag_run_id, task_id, async_req=True)
            >>> result = thread.get()

            Args:
                dag_id (str): The DAG ID.
                dag_run_id (str): The DAG run ID.
                task_id (str): The task ID.

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                ExtraLinkCollection
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['dag_id'] = \
                dag_id
            kwargs['dag_run_id'] = \
                dag_run_id
            kwargs['task_id'] = \
                task_id
            return self.call_with_http_info(**kwargs)

        self.get_extra_links = _Endpoint(
            settings={
                'response_type': (ExtraLinkCollection,),
                'auth': [
                    'Basic',
                    'Kerberos'
                ],
                'endpoint_path': '/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/links',
                'operation_id': 'get_extra_links',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                ],
                'required': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'dag_id':
                        (str,),
                    'dag_run_id':
                        (str,),
                    'task_id':
                        (str,),
                },
                'attribute_map': {
                    'dag_id': 'dag_id',
                    'dag_run_id': 'dag_run_id',
                    'task_id': 'task_id',
                },
                'location_map': {
                    'dag_id': 'path',
                    'dag_run_id': 'path',
                    'task_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_extra_links
        )

        def __get_log(
            self,
            dag_id,
            dag_run_id,
            task_id,
            task_try_number,
            **kwargs
        ):
            """Get logs  # noqa: E501

            Get logs for a specific task instance and its try number.  # 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_log(dag_id, dag_run_id, task_id, task_try_number, async_req=True)
            >>> result = thread.get()

            Args:
                dag_id (str): The DAG ID.
                dag_run_id (str): The DAG run ID.
                task_id (str): The task ID.
                task_try_number (int): The task try number.

            Keyword Args:
                full_content (bool): A full content will be returned. By default, only the first fragment will be returned. . [optional]
                token (str): A token that allows you to continue fetching logs. If passed, it will specify the location from which the download should be continued. . [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                InlineResponse200
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['dag_id'] = \
                dag_id
            kwargs['dag_run_id'] = \
                dag_run_id
            kwargs['task_id'] = \
                task_id
            kwargs['task_try_number'] = \
                task_try_number
            return self.call_with_http_info(**kwargs)

        self.get_log = _Endpoint(
            settings={
                'response_type': (InlineResponse200,),
                'auth': [
                    'Basic',
                    'Kerberos'
                ],
                'endpoint_path': '/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/logs/{task_try_number}',
                'operation_id': 'get_log',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                    'task_try_number',
                    'full_content',
                    'token',
                ],
                'required': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                    'task_try_number',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'dag_id':
                        (str,),
                    'dag_run_id':
                        (str,),
                    'task_id':
                        (str,),
                    'task_try_number':
                        (int,),
                    'full_content':
                        (bool,),
                    'token':
                        (str,),
                },
                'attribute_map': {
                    'dag_id': 'dag_id',
                    'dag_run_id': 'dag_run_id',
                    'task_id': 'task_id',
                    'task_try_number': 'task_try_number',
                    'full_content': 'full_content',
                    'token': 'token',
                },
                'location_map': {
                    'dag_id': 'path',
                    'dag_run_id': 'path',
                    'task_id': 'path',
                    'task_try_number': 'path',
                    'full_content': 'query',
                    'token': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/plain'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_log
        )

        def __get_task_instance(
            self,
            dag_id,
            dag_run_id,
            task_id,
            **kwargs
        ):
            """Get a task instance  # 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_task_instance(dag_id, dag_run_id, task_id, async_req=True)
            >>> result = thread.get()

            Args:
                dag_id (str): The DAG ID.
                dag_run_id (str): The DAG run ID.
                task_id (str): The task ID.

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                TaskInstance
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['dag_id'] = \
                dag_id
            kwargs['dag_run_id'] = \
                dag_run_id
            kwargs['task_id'] = \
                task_id
            return self.call_with_http_info(**kwargs)

        self.get_task_instance = _Endpoint(
            settings={
                'response_type': (TaskInstance,),
                'auth': [
                    'Basic',
                    'Kerberos'
                ],
                'endpoint_path': '/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}',
                'operation_id': 'get_task_instance',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                ],
                'required': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'dag_id':
                        (str,),
                    'dag_run_id':
                        (str,),
                    'task_id':
                        (str,),
                },
                'attribute_map': {
                    'dag_id': 'dag_id',
                    'dag_run_id': 'dag_run_id',
                    'task_id': 'task_id',
                },
                'location_map': {
                    'dag_id': 'path',
                    'dag_run_id': 'path',
                    'task_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_task_instance
        )

        def __get_task_instances(
            self,
            dag_id,
            dag_run_id,
            **kwargs
        ):
            """List task instances  # noqa: E501

            This endpoint allows specifying `~` as the dag_id, dag_run_id to retrieve DAG runs for all DAGs and DAG runs.   # 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_task_instances(dag_id, dag_run_id, async_req=True)
            >>> result = thread.get()

            Args:
                dag_id (str): The DAG ID.
                dag_run_id (str): The DAG run ID.

            Keyword Args:
                execution_date_gte (datetime): Returns objects greater or equal to the specified date.  This can be combined with execution_date_lte parameter to receive only the selected period. . [optional]
                execution_date_lte (datetime): Returns objects less than or equal to the specified date.  This can be combined with execution_date_gte parameter to receive only the selected period. . [optional]
                start_date_gte (datetime): Returns objects greater or equal the specified date.  This can be combined with start_date_lte parameter to receive only the selected period. . [optional]
                start_date_lte (datetime): Returns objects less or equal the specified date.  This can be combined with start_date_gte parameter to receive only the selected period. . [optional]
                end_date_gte (datetime): Returns objects greater or equal the specified date.  This can be combined with start_date_lte parameter to receive only the selected period. . [optional]
                end_date_lte (datetime): Returns objects less than or equal to the specified date.  This can be combined with start_date_gte parameter to receive only the selected period. . [optional]
                duration_gte (float): Returns objects greater than or equal to the specified values.  This can be combined with duration_lte parameter to receive only the selected period. . [optional]
                duration_lte (float): Returns objects less than or equal to the specified values.  This can be combined with duration_gte parameter to receive only the selected range. . [optional]
                state ([str]): The value can be repeated to retrieve multiple matching values (OR condition).. [optional]
                pool ([str]): The value can be repeated to retrieve multiple matching values (OR condition).. [optional]
                queue ([str]): The value can be repeated to retrieve multiple matching values (OR condition).. [optional]
                limit (int): The numbers of items to return.. [optional] if omitted the server will use the default value of 100
                offset (int): The number of items to skip before starting to collect the result set.. [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                TaskInstanceCollection
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['dag_id'] = \
                dag_id
            kwargs['dag_run_id'] = \
                dag_run_id
            return self.call_with_http_info(**kwargs)

        self.get_task_instances = _Endpoint(
            settings={
                'response_type': (TaskInstanceCollection,),
                'auth': [
                    'Basic',
                    'Kerberos'
                ],
                'endpoint_path': '/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances',
                'operation_id': 'get_task_instances',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'dag_id',
                    'dag_run_id',
                    'execution_date_gte',
                    'execution_date_lte',
                    'start_date_gte',
                    'start_date_lte',
                    'end_date_gte',
                    'end_date_lte',
                    'duration_gte',
                    'duration_lte',
                    'state',
                    'pool',
                    'queue',
                    'limit',
                    'offset',
                ],
                'required': [
                    'dag_id',
                    'dag_run_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'offset',
                ]
            },
            root_map={
                'validations': {
                    ('offset',): {

                        'inclusive_minimum': 0,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'dag_id':
                        (str,),
                    'dag_run_id':
                        (str,),
                    'execution_date_gte':
                        (datetime,),
                    'execution_date_lte':
                        (datetime,),
                    'start_date_gte':
                        (datetime,),
                    'start_date_lte':
                        (datetime,),
                    'end_date_gte':
                        (datetime,),
                    'end_date_lte':
                        (datetime,),
                    'duration_gte':
                        (float,),
                    'duration_lte':
                        (float,),
                    'state':
                        ([str],),
                    'pool':
                        ([str],),
                    'queue':
                        ([str],),
                    'limit':
                        (int,),
                    'offset':
                        (int,),
                },
                'attribute_map': {
                    'dag_id': 'dag_id',
                    'dag_run_id': 'dag_run_id',
                    'execution_date_gte': 'execution_date_gte',
                    'execution_date_lte': 'execution_date_lte',
                    'start_date_gte': 'start_date_gte',
                    'start_date_lte': 'start_date_lte',
                    'end_date_gte': 'end_date_gte',
                    'end_date_lte': 'end_date_lte',
                    'duration_gte': 'duration_gte',
                    'duration_lte': 'duration_lte',
                    'state': 'state',
                    'pool': 'pool',
                    'queue': 'queue',
                    'limit': 'limit',
                    'offset': 'offset',
                },
                'location_map': {
                    'dag_id': 'path',
                    'dag_run_id': 'path',
                    'execution_date_gte': 'query',
                    'execution_date_lte': 'query',
                    'start_date_gte': 'query',
                    'start_date_lte': 'query',
                    'end_date_gte': 'query',
                    'end_date_lte': 'query',
                    'duration_gte': 'query',
                    'duration_lte': 'query',
                    'state': 'query',
                    'pool': 'query',
                    'queue': 'query',
                    'limit': 'query',
                    'offset': 'query',
                },
                'collection_format_map': {
                    'state': 'multi',
                    'pool': 'multi',
                    'queue': 'multi',
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_task_instances
        )

        def __get_task_instances_batch(
            self,
            list_task_instance_form,
            **kwargs
        ):
            """List task instances (batch)  # noqa: E501

            List task instances from all DAGs and DAG runs. This endpoint is a POST to allow filtering across a large number of DAG IDs, where as a GET it would run in to maximum HTTP request URL length limits.   # 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_task_instances_batch(list_task_instance_form, async_req=True)
            >>> result = thread.get()

            Args:
                list_task_instance_form (ListTaskInstanceForm):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                TaskInstanceCollection
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['list_task_instance_form'] = \
                list_task_instance_form
            return self.call_with_http_info(**kwargs)

        self.get_task_instances_batch = _Endpoint(
            settings={
                'response_type': (TaskInstanceCollection,),
                'auth': [
                    'Basic',
                    'Kerberos'
                ],
                'endpoint_path': '/dags/~/dagRuns/~/taskInstances/list',
                'operation_id': 'get_task_instances_batch',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'list_task_instance_form',
                ],
                'required': [
                    'list_task_instance_form',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'list_task_instance_form':
                        (ListTaskInstanceForm,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'list_task_instance_form': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__get_task_instances_batch
        )
示例#3
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __delete_role(self, role_name, **kwargs):
            """Delete a role  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.delete_role(role_name, async_req=True)
            >>> result = thread.get()

            Args:
                role_name (str): The role name

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['role_name'] = \
                role_name
            return self.call_with_http_info(**kwargs)

        self.delete_role = _Endpoint(settings={
            'response_type': None,
            'auth': ['Basic', 'Kerberos'],
            'endpoint_path': '/roles/{role_name}',
            'operation_id': 'delete_role',
            'http_method': 'DELETE',
            'servers': None,
        },
                                     params_map={
                                         'all': [
                                             'role_name',
                                         ],
                                         'required': [
                                             'role_name',
                                         ],
                                         'nullable': [],
                                         'enum': [],
                                         'validation': []
                                     },
                                     root_map={
                                         'validations': {},
                                         'allowed_values': {},
                                         'openapi_types': {
                                             'role_name': (str, ),
                                         },
                                         'attribute_map': {
                                             'role_name': 'role_name',
                                         },
                                         'location_map': {
                                             'role_name': 'path',
                                         },
                                         'collection_format_map': {}
                                     },
                                     headers_map={
                                         'accept': ['application/json'],
                                         'content_type': [],
                                     },
                                     api_client=api_client,
                                     callable=__delete_role)

        def __get_role(self, role_name, **kwargs):
            """Get a role  # 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_role(role_name, async_req=True)
            >>> result = thread.get()

            Args:
                role_name (str): The role name

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                Role
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['role_name'] = \
                role_name
            return self.call_with_http_info(**kwargs)

        self.get_role = _Endpoint(settings={
            'response_type': (Role, ),
            'auth': ['Basic', 'Kerberos'],
            'endpoint_path': '/roles/{role_name}',
            'operation_id': 'get_role',
            'http_method': 'GET',
            'servers': None,
        },
                                  params_map={
                                      'all': [
                                          'role_name',
                                      ],
                                      'required': [
                                          'role_name',
                                      ],
                                      'nullable': [],
                                      'enum': [],
                                      'validation': []
                                  },
                                  root_map={
                                      'validations': {},
                                      'allowed_values': {},
                                      'openapi_types': {
                                          'role_name': (str, ),
                                      },
                                      'attribute_map': {
                                          'role_name': 'role_name',
                                      },
                                      'location_map': {
                                          'role_name': 'path',
                                      },
                                      'collection_format_map': {}
                                  },
                                  headers_map={
                                      'accept': ['application/json'],
                                      'content_type': [],
                                  },
                                  api_client=api_client,
                                  callable=__get_role)

        def __get_roles(self, **kwargs):
            """List roles  # 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_roles(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                limit (int): The numbers of items to return.. [optional] if omitted the server will use the default value of 100
                offset (int): The number of items to skip before starting to collect the result set.. [optional]
                order_by (str): The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order. . [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                RoleCollection
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_roles = _Endpoint(settings={
            'response_type': (RoleCollection, ),
            'auth': ['Basic', 'Kerberos'],
            'endpoint_path': '/roles',
            'operation_id': 'get_roles',
            'http_method': 'GET',
            'servers': None,
        },
                                   params_map={
                                       'all': [
                                           'limit',
                                           'offset',
                                           'order_by',
                                       ],
                                       'required': [],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': [
                                           'offset',
                                       ]
                                   },
                                   root_map={
                                       'validations': {
                                           ('offset', ): {
                                               'inclusive_minimum': 0,
                                           },
                                       },
                                       'allowed_values': {},
                                       'openapi_types': {
                                           'limit': (int, ),
                                           'offset': (int, ),
                                           'order_by': (str, ),
                                       },
                                       'attribute_map': {
                                           'limit': 'limit',
                                           'offset': 'offset',
                                           'order_by': 'order_by',
                                       },
                                       'location_map': {
                                           'limit': 'query',
                                           'offset': 'query',
                                           'order_by': 'query',
                                       },
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': [],
                                   },
                                   api_client=api_client,
                                   callable=__get_roles)

        def __patch_role(self, role_name, role, **kwargs):
            """Update a role  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.patch_role(role_name, role, async_req=True)
            >>> result = thread.get()

            Args:
                role_name (str): The role name
                role (Role):

            Keyword Args:
                update_mask ([str]): The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields. . [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                Role
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['role_name'] = \
                role_name
            kwargs['role'] = \
                role
            return self.call_with_http_info(**kwargs)

        self.patch_role = _Endpoint(settings={
            'response_type': (Role, ),
            'auth': ['Basic', 'Kerberos'],
            'endpoint_path': '/roles/{role_name}',
            'operation_id': 'patch_role',
            'http_method': 'PATCH',
            'servers': None,
        },
                                    params_map={
                                        'all': [
                                            'role_name',
                                            'role',
                                            'update_mask',
                                        ],
                                        'required': [
                                            'role_name',
                                            'role',
                                        ],
                                        'nullable': [],
                                        'enum': [],
                                        'validation': []
                                    },
                                    root_map={
                                        'validations': {},
                                        'allowed_values': {},
                                        'openapi_types': {
                                            'role_name': (str, ),
                                            'role': (Role, ),
                                            'update_mask': ([str], ),
                                        },
                                        'attribute_map': {
                                            'role_name': 'role_name',
                                            'update_mask': 'update_mask',
                                        },
                                        'location_map': {
                                            'role_name': 'path',
                                            'role': 'body',
                                            'update_mask': 'query',
                                        },
                                        'collection_format_map': {
                                            'update_mask': 'csv',
                                        }
                                    },
                                    headers_map={
                                        'accept': ['application/json'],
                                        'content_type': ['application/json']
                                    },
                                    api_client=api_client,
                                    callable=__patch_role)

        def __post_role(self, role, **kwargs):
            """Create a role  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.post_role(role, async_req=True)
            >>> result = thread.get()

            Args:
                role (Role):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                Role
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['role'] = \
                role
            return self.call_with_http_info(**kwargs)

        self.post_role = _Endpoint(settings={
            'response_type': (Role, ),
            'auth': ['Basic', 'Kerberos'],
            'endpoint_path': '/roles',
            'operation_id': 'post_role',
            'http_method': 'POST',
            'servers': None,
        },
                                   params_map={
                                       'all': [
                                           'role',
                                       ],
                                       'required': [
                                           'role',
                                       ],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': []
                                   },
                                   root_map={
                                       'validations': {},
                                       'allowed_values': {},
                                       'openapi_types': {
                                           'role': (Role, ),
                                       },
                                       'attribute_map': {},
                                       'location_map': {
                                           'role': 'body',
                                       },
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': ['application/json']
                                   },
                                   api_client=api_client,
                                   callable=__post_role)
示例#4
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_xcom_entries(
            self,
            dag_id,
            dag_run_id,
            task_id,
            **kwargs
        ):
            """List XCom entries  # noqa: E501

            This endpoint allows specifying `~` as the dag_id, dag_run_id, task_id to retrieve XCOM entries for for all DAGs, DAG runs and task instances. XCom values won't be returned as they can be large. Use this endpoint to get a list of XCom entries and then fetch individual entry to get value.  # 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_xcom_entries(dag_id, dag_run_id, task_id, async_req=True)
            >>> result = thread.get()

            Args:
                dag_id (str): The DAG ID.
                dag_run_id (str): The DAG run ID.
                task_id (str): The task ID.

            Keyword Args:
                limit (int): The numbers of items to return.. [optional] if omitted the server will use the default value of 100
                offset (int): The number of items to skip before starting to collect the result set.. [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                XComCollection
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['dag_id'] = \
                dag_id
            kwargs['dag_run_id'] = \
                dag_run_id
            kwargs['task_id'] = \
                task_id
            return self.call_with_http_info(**kwargs)

        self.get_xcom_entries = _Endpoint(
            settings={
                'response_type': (XComCollection,),
                'auth': [
                    'Basic',
                    'Kerberos'
                ],
                'endpoint_path': '/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries',
                'operation_id': 'get_xcom_entries',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                    'limit',
                    'offset',
                ],
                'required': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'offset',
                ]
            },
            root_map={
                'validations': {
                    ('offset',): {

                        'inclusive_minimum': 0,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'dag_id':
                        (str,),
                    'dag_run_id':
                        (str,),
                    'task_id':
                        (str,),
                    'limit':
                        (int,),
                    'offset':
                        (int,),
                },
                'attribute_map': {
                    'dag_id': 'dag_id',
                    'dag_run_id': 'dag_run_id',
                    'task_id': 'task_id',
                    'limit': 'limit',
                    'offset': 'offset',
                },
                'location_map': {
                    'dag_id': 'path',
                    'dag_run_id': 'path',
                    'task_id': 'path',
                    'limit': 'query',
                    'offset': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_xcom_entries
        )

        def __get_xcom_entry(
            self,
            dag_id,
            dag_run_id,
            task_id,
            xcom_key,
            **kwargs
        ):
            """Get an XCom entry  # 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_xcom_entry(dag_id, dag_run_id, task_id, xcom_key, async_req=True)
            >>> result = thread.get()

            Args:
                dag_id (str): The DAG ID.
                dag_run_id (str): The DAG run ID.
                task_id (str): The task ID.
                xcom_key (str): The XCom key.

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                XCom
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['dag_id'] = \
                dag_id
            kwargs['dag_run_id'] = \
                dag_run_id
            kwargs['task_id'] = \
                task_id
            kwargs['xcom_key'] = \
                xcom_key
            return self.call_with_http_info(**kwargs)

        self.get_xcom_entry = _Endpoint(
            settings={
                'response_type': (XCom,),
                'auth': [
                    'Basic',
                    'Kerberos'
                ],
                'endpoint_path': '/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}',
                'operation_id': 'get_xcom_entry',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                    'xcom_key',
                ],
                'required': [
                    'dag_id',
                    'dag_run_id',
                    'task_id',
                    'xcom_key',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'dag_id':
                        (str,),
                    'dag_run_id':
                        (str,),
                    'task_id':
                        (str,),
                    'xcom_key':
                        (str,),
                },
                'attribute_map': {
                    'dag_id': 'dag_id',
                    'dag_run_id': 'dag_run_id',
                    'task_id': 'task_id',
                    'xcom_key': 'xcom_key',
                },
                'location_map': {
                    'dag_id': 'path',
                    'dag_run_id': 'path',
                    'task_id': 'path',
                    'xcom_key': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_xcom_entry
        )
示例#5
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_health(self, **kwargs):
            """Get instance status  # noqa: E501

            Get the status of Airflow's metadatabase and scheduler. It includes info about metadatabase and last heartbeat of scheduler.   # 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_health(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                HealthInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_health = _Endpoint(settings={
            'response_type': (HealthInfo, ),
            'auth': ['Basic', 'Kerberos'],
            'endpoint_path': '/health',
            'operation_id': 'get_health',
            'http_method': 'GET',
            'servers': None,
        },
                                    params_map={
                                        'all': [],
                                        'required': [],
                                        'nullable': [],
                                        'enum': [],
                                        'validation': []
                                    },
                                    root_map={
                                        'validations': {},
                                        'allowed_values': {},
                                        'openapi_types': {},
                                        'attribute_map': {},
                                        'location_map': {},
                                        'collection_format_map': {}
                                    },
                                    headers_map={
                                        'accept': ['application/json'],
                                        'content_type': [],
                                    },
                                    api_client=api_client,
                                    callable=__get_health)

        def __get_version(self, **kwargs):
            """Get version information  # 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_version(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                VersionInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_version = _Endpoint(settings={
            'response_type': (VersionInfo, ),
            'auth': ['Basic', 'Kerberos'],
            'endpoint_path': '/version',
            'operation_id': 'get_version',
            'http_method': 'GET',
            'servers': None,
        },
                                     params_map={
                                         'all': [],
                                         'required': [],
                                         'nullable': [],
                                         'enum': [],
                                         'validation': []
                                     },
                                     root_map={
                                         'validations': {},
                                         'allowed_values': {},
                                         'openapi_types': {},
                                         'attribute_map': {},
                                         'location_map': {},
                                         'collection_format_map': {}
                                     },
                                     headers_map={
                                         'accept': ['application/json'],
                                         'content_type': [],
                                     },
                                     api_client=api_client,
                                     callable=__get_version)