# coding: utf-8

"""
    result-analysis-service

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from dhicn_result_analysis_service.api_client import ApiClient
from dhicn_result_analysis_service.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class RiverApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def api_v1_result_river_dynamic_get(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道动态结果数据 Get 1D dynamic results of river  # noqa: E501

        获取河道水位、流量的动态变化结果 Get river dynamic results including water level, discharge of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_dynamic_get(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param str river_data_type: 河道结果类型 river result type:  0-WaterLevel;  1-Discharge
        :param int frequency: 提取结果的时间频率 time frequency used to get result
        :param str start_time: 提取结果的开始时间 start time used to get result
        :param str end_time: 提取结果的结束时间 end time used to get result
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: BaseDynamicOutput
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.api_v1_result_river_dynamic_get_with_http_info(scenario_id, **kwargs)  # noqa: E501

    def api_v1_result_river_dynamic_get_with_http_info(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道动态结果数据 Get 1D dynamic results of river  # noqa: E501

        获取河道水位、流量的动态变化结果 Get river dynamic results including water level, discharge of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_dynamic_get_with_http_info(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param str river_data_type: 河道结果类型 river result type:  0-WaterLevel;  1-Discharge
        :param int frequency: 提取结果的时间频率 time frequency used to get result
        :param str start_time: 提取结果的开始时间 start time used to get result
        :param str end_time: 提取结果的结束时间 end time used to get result
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: tuple(BaseDynamicOutput, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'scenario_id',
            'river_data_type',
            'frequency',
            'start_time',
            'end_time'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method api_v1_result_river_dynamic_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scenario_id' is set
        if self.api_client.client_side_validation and ('scenario_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['scenario_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scenario_id` when calling `api_v1_result_river_dynamic_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'river_data_type' in local_var_params and local_var_params['river_data_type'] is not None:  # noqa: E501
            query_params.append(('RiverDataType', local_var_params['river_data_type']))  # noqa: E501
        if 'frequency' in local_var_params and local_var_params['frequency'] is not None:  # noqa: E501
            query_params.append(('Frequency', local_var_params['frequency']))  # noqa: E501
        if 'start_time' in local_var_params and local_var_params['start_time'] is not None:  # noqa: E501
            query_params.append(('StartTime', local_var_params['start_time']))  # noqa: E501
        if 'end_time' in local_var_params and local_var_params['end_time'] is not None:  # noqa: E501
            query_params.append(('EndTime', local_var_params['end_time']))  # noqa: E501
        if 'scenario_id' in local_var_params and local_var_params['scenario_id'] is not None:  # noqa: E501
            query_params.append(('ScenarioId', local_var_params['scenario_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/result/river/dynamic', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BaseDynamicOutput',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def api_v1_result_river_gate_statistics_get(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道闸门的统计结果 Get statistic result of river gates  # noqa: E501

        获取河道闸门的统计结果数据，包括累计开启时长等 Get river structure gates statistic results, including gate accumulated open time, etc. of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_gate_statistics_get(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: list[GateStatisticsOutput]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.api_v1_result_river_gate_statistics_get_with_http_info(scenario_id, **kwargs)  # noqa: E501

    def api_v1_result_river_gate_statistics_get_with_http_info(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道闸门的统计结果 Get statistic result of river gates  # noqa: E501

        获取河道闸门的统计结果数据，包括累计开启时长等 Get river structure gates statistic results, including gate accumulated open time, etc. of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_gate_statistics_get_with_http_info(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: tuple(list[GateStatisticsOutput], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'scenario_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method api_v1_result_river_gate_statistics_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scenario_id' is set
        if self.api_client.client_side_validation and ('scenario_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['scenario_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scenario_id` when calling `api_v1_result_river_gate_statistics_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'scenario_id' in local_var_params and local_var_params['scenario_id'] is not None:  # noqa: E501
            query_params.append(('ScenarioId', local_var_params['scenario_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/result/river/gate-statistics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[GateStatisticsOutput]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def api_v1_result_river_profile_timeseries_get(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道剖面图数据 Get river profile plot data  # noqa: E501

        获取指定河段上的剖面图数据 Get profile plot data of a river branch of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_profile_timeseries_get(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param list[str] river_id: 河道ID
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: RiverProfile
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.api_v1_result_river_profile_timeseries_get_with_http_info(scenario_id, **kwargs)  # noqa: E501

    def api_v1_result_river_profile_timeseries_get_with_http_info(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道剖面图数据 Get river profile plot data  # noqa: E501

        获取指定河段上的剖面图数据 Get profile plot data of a river branch of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_profile_timeseries_get_with_http_info(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param list[str] river_id: 河道ID
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: tuple(RiverProfile, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'scenario_id',
            'river_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method api_v1_result_river_profile_timeseries_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scenario_id' is set
        if self.api_client.client_side_validation and ('scenario_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['scenario_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scenario_id` when calling `api_v1_result_river_profile_timeseries_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'river_id' in local_var_params and local_var_params['river_id'] is not None:  # noqa: E501
            query_params.append(('RiverID', local_var_params['river_id']))  # noqa: E501
            collection_formats['RiverID'] = 'multi'  # noqa: E501
        if 'scenario_id' in local_var_params and local_var_params['scenario_id'] is not None:  # noqa: E501
            query_params.append(('ScenarioId', local_var_params['scenario_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/result/river/profile-timeseries', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RiverProfile',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def api_v1_result_river_pump_statistics_get(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道泵站统计结果 Get statistic result of river pumps  # noqa: E501

        获取河道泵站的统计结果数据，包括累计流量、累计开启时长等 Get river structure pumps statistic results, including pump accumulated discharge, pump accumulated open time, etc. of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_pump_statistics_get(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: list[PumpStatisticsOutput]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.api_v1_result_river_pump_statistics_get_with_http_info(scenario_id, **kwargs)  # noqa: E501

    def api_v1_result_river_pump_statistics_get_with_http_info(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道泵站统计结果 Get statistic result of river pumps  # noqa: E501

        获取河道泵站的统计结果数据，包括累计流量、累计开启时长等 Get river structure pumps statistic results, including pump accumulated discharge, pump accumulated open time, etc. of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_pump_statistics_get_with_http_info(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: tuple(list[PumpStatisticsOutput], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'scenario_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method api_v1_result_river_pump_statistics_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scenario_id' is set
        if self.api_client.client_side_validation and ('scenario_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['scenario_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scenario_id` when calling `api_v1_result_river_pump_statistics_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'scenario_id' in local_var_params and local_var_params['scenario_id'] is not None:  # noqa: E501
            query_params.append(('ScenarioId', local_var_params['scenario_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/result/river/pump-statistics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[PumpStatisticsOutput]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def api_v1_result_river_pump_timeseries_get(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道泵站的时间序列结果 Get time-series result of river pumps  # noqa: E501

        获取河道泵站的水位、流量时间序列结果 Get water level or discharge time series result of a single river pump of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_pump_timeseries_get(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param str pump_id: 泵的ID pump ID
        :param str pump_data_type: 泵的数据类型 pump data type:  0-WaterLevel;  1-Discharge;
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: BaseTimeseriesOutput
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.api_v1_result_river_pump_timeseries_get_with_http_info(scenario_id, **kwargs)  # noqa: E501

    def api_v1_result_river_pump_timeseries_get_with_http_info(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道泵站的时间序列结果 Get time-series result of river pumps  # noqa: E501

        获取河道泵站的水位、流量时间序列结果 Get water level or discharge time series result of a single river pump of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_pump_timeseries_get_with_http_info(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param str pump_id: 泵的ID pump ID
        :param str pump_data_type: 泵的数据类型 pump data type:  0-WaterLevel;  1-Discharge;
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: tuple(BaseTimeseriesOutput, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'scenario_id',
            'pump_id',
            'pump_data_type'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method api_v1_result_river_pump_timeseries_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scenario_id' is set
        if self.api_client.client_side_validation and ('scenario_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['scenario_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scenario_id` when calling `api_v1_result_river_pump_timeseries_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'pump_id' in local_var_params and local_var_params['pump_id'] is not None:  # noqa: E501
            query_params.append(('PumpID', local_var_params['pump_id']))  # noqa: E501
        if 'pump_data_type' in local_var_params and local_var_params['pump_data_type'] is not None:  # noqa: E501
            query_params.append(('PumpDataType', local_var_params['pump_data_type']))  # noqa: E501
        if 'scenario_id' in local_var_params and local_var_params['scenario_id'] is not None:  # noqa: E501
            query_params.append(('ScenarioId', local_var_params['scenario_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/result/river/pump-timeseries', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BaseTimeseriesOutput',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def api_v1_result_river_static_get(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道静态结果数据 Get 1D static results of river  # noqa: E501

        获取河道统计结果，包括最大水位、流量，最小水位、流量 Get river statistic results including maximum and minimum of water level, discharge of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_static_get(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param str river_data_type: 河道结果类型 river result type:  0-WaterLevel;  1-Discharge;
        :param str statistic_type: 统计类型 statistic type:  0-Min;  1-Max
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: BaseStaticOutput
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.api_v1_result_river_static_get_with_http_info(scenario_id, **kwargs)  # noqa: E501

    def api_v1_result_river_static_get_with_http_info(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道静态结果数据 Get 1D static results of river  # noqa: E501

        获取河道统计结果，包括最大水位、流量，最小水位、流量 Get river statistic results including maximum and minimum of water level, discharge of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_static_get_with_http_info(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param str river_data_type: 河道结果类型 river result type:  0-WaterLevel;  1-Discharge;
        :param str statistic_type: 统计类型 statistic type:  0-Min;  1-Max
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: tuple(BaseStaticOutput, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'scenario_id',
            'river_data_type',
            'statistic_type'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method api_v1_result_river_static_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scenario_id' is set
        if self.api_client.client_side_validation and ('scenario_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['scenario_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scenario_id` when calling `api_v1_result_river_static_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'river_data_type' in local_var_params and local_var_params['river_data_type'] is not None:  # noqa: E501
            query_params.append(('RiverDataType', local_var_params['river_data_type']))  # noqa: E501
        if 'statistic_type' in local_var_params and local_var_params['statistic_type'] is not None:  # noqa: E501
            query_params.append(('StatisticType', local_var_params['statistic_type']))  # noqa: E501
        if 'scenario_id' in local_var_params and local_var_params['scenario_id'] is not None:  # noqa: E501
            query_params.append(('ScenarioId', local_var_params['scenario_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/result/river/static', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BaseStaticOutput',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def api_v1_result_river_timeseries_get(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道单点时间序列结果 Get single-point time-series result on the river  # noqa: E501

        获取指定河道计算点上的水位、流量时间序列结果数据 Get river water level or discharge time series result on a single river point of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_timeseries_get(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param str river_data_type: 河道结果类型 river result type:  0-WaterLevel;  1-Discharge
        :param str river_id: 河道ID river ID
        :param float chainage: 河道计算点里程 river point chainage
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: BaseTimeseriesOutput
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.api_v1_result_river_timeseries_get_with_http_info(scenario_id, **kwargs)  # noqa: E501

    def api_v1_result_river_timeseries_get_with_http_info(self, scenario_id, **kwargs):  # noqa: E501
        """获取河道单点时间序列结果 Get single-point time-series result on the river  # noqa: E501

        获取指定河道计算点上的水位、流量时间序列结果数据 Get river water level or discharge time series result on a single river point of a scenario.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_result_river_timeseries_get_with_http_info(scenario_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str scenario_id: 方案的ID scenario’s ID (required)
        :param str river_data_type: 河道结果类型 river result type:  0-WaterLevel;  1-Discharge
        :param str river_id: 河道ID river ID
        :param float chainage: 河道计算点里程 river point chainage
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: 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.
        :return: tuple(BaseTimeseriesOutput, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'scenario_id',
            'river_data_type',
            'river_id',
            'chainage'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method api_v1_result_river_timeseries_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'scenario_id' is set
        if self.api_client.client_side_validation and ('scenario_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['scenario_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scenario_id` when calling `api_v1_result_river_timeseries_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'river_data_type' in local_var_params and local_var_params['river_data_type'] is not None:  # noqa: E501
            query_params.append(('RiverDataType', local_var_params['river_data_type']))  # noqa: E501
        if 'river_id' in local_var_params and local_var_params['river_id'] is not None:  # noqa: E501
            query_params.append(('RiverId', local_var_params['river_id']))  # noqa: E501
        if 'chainage' in local_var_params and local_var_params['chainage'] is not None:  # noqa: E501
            query_params.append(('Chainage', local_var_params['chainage']))  # noqa: E501
        if 'scenario_id' in local_var_params and local_var_params['scenario_id'] is not None:  # noqa: E501
            query_params.append(('ScenarioId', local_var_params['scenario_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/result/river/timeseries', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BaseTimeseriesOutput',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
