# coding: utf-8

"""
    Insights.Api

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from elexonpy.api_client import ApiClient


class GenerationApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

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

    def generation_actual_per_type_day_total_get(self, **kwargs):  # noqa: E501
        """Current snapshot of actual generation by fuel type categories (AGPT/B1620)  # noqa: E501

        This endpoint provides aggregated AGPT (B1620) data. It returns totals and percentages  for the last half hour and 24 hours for each generation type.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_actual_per_type_day_total_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Response data format. Use json/xml to include metadata.
        :return: list[InsightsApiModelsResponsesTransparencyAgptSummaryData]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_actual_per_type_day_total_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.generation_actual_per_type_day_total_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def generation_actual_per_type_day_total_get_with_http_info(self, **kwargs):  # noqa: E501
        """Current snapshot of actual generation by fuel type categories (AGPT/B1620)  # noqa: E501

        This endpoint provides aggregated AGPT (B1620) data. It returns totals and percentages  for the last half hour and 24 hours for each generation type.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_actual_per_type_day_total_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Response data format. Use json/xml to include metadata.
        :return: list[InsightsApiModelsResponsesTransparencyAgptSummaryData]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/actual/per-type/day-total', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[InsightsApiModelsResponsesTransparencyAgptSummaryData]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generation_actual_per_type_get(self, _from, to, **kwargs):  # noqa: E501
        """Historic actual generation automatically down-sampled (AGPT/B1620)  # noqa: E501

        ⚠ This endpoint provides a down-sampled data summary intended for visualisation purposes.  Depending on the quantity of data requested, data returned may be averaged hourly, daily,  weekly or monthly. Quantities are rounded to the nearest MWh.  Use /datasets/AGPT for full access.                This endpoint provides actual aggregated generation data per Power System Resource type   (Fuel Type categories as defined by Commission Regulation (EU) No 543/2013).    This endpoint filters by startTime, and groups results by settlement period.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_actual_per_type_get(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param int settlement_period_from:
        :param int settlement_period_to:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyActualGenerationBySettlementPeriod
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_actual_per_type_get_with_http_info(_from, to, **kwargs)  # noqa: E501
        else:
            (data) = self.generation_actual_per_type_get_with_http_info(_from, to, **kwargs)  # noqa: E501
            return data

    def generation_actual_per_type_get_with_http_info(self, _from, to, **kwargs):  # noqa: E501
        """Historic actual generation automatically down-sampled (AGPT/B1620)  # noqa: E501

        ⚠ This endpoint provides a down-sampled data summary intended for visualisation purposes.  Depending on the quantity of data requested, data returned may be averaged hourly, daily,  weekly or monthly. Quantities are rounded to the nearest MWh.  Use /datasets/AGPT for full access.                This endpoint provides actual aggregated generation data per Power System Resource type   (Fuel Type categories as defined by Commission Regulation (EU) No 543/2013).    This endpoint filters by startTime, and groups results by settlement period.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_actual_per_type_get_with_http_info(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param int settlement_period_from:
        :param int settlement_period_to:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyActualGenerationBySettlementPeriod
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['_from', 'to', 'settlement_period_from', 'settlement_period_to', 'format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501
        if 'settlement_period_from' in params:
            query_params.append(('settlementPeriodFrom', params['settlement_period_from']))  # noqa: E501
        if 'settlement_period_to' in params:
            query_params.append(('settlementPeriodTo', params['settlement_period_to']))  # noqa: E501
        if 'format' in params:
            query_params.append(('format', params['format']))  # 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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/actual/per-type', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyActualGenerationBySettlementPeriod',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generation_actual_per_type_wind_and_solar_get(self, _from, to, **kwargs):  # noqa: E501
        """Historic actual or estimated wind and solar power generation (AGWS/B1630)  # noqa: E501

        This endpoint provides actual or estimated wind and solar power generation  per settlement period. It returns generation with Power System Resource type  Solar, Wind Onshore or Wind Offshore (Fuel Type categories as defined by  Commission Regulation (EU) No 543/2013).                This endpoint filters by startTime and provides a maximum data output range of 7 days.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_actual_per_type_wind_and_solar_get(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param int settlement_period_from:
        :param int settlement_period_to:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyActualGenerationWindSolar
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_actual_per_type_wind_and_solar_get_with_http_info(_from, to, **kwargs)  # noqa: E501
        else:
            (data) = self.generation_actual_per_type_wind_and_solar_get_with_http_info(_from, to, **kwargs)  # noqa: E501
            return data

    def generation_actual_per_type_wind_and_solar_get_with_http_info(self, _from, to, **kwargs):  # noqa: E501
        """Historic actual or estimated wind and solar power generation (AGWS/B1630)  # noqa: E501

        This endpoint provides actual or estimated wind and solar power generation  per settlement period. It returns generation with Power System Resource type  Solar, Wind Onshore or Wind Offshore (Fuel Type categories as defined by  Commission Regulation (EU) No 543/2013).                This endpoint filters by startTime and provides a maximum data output range of 7 days.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_actual_per_type_wind_and_solar_get_with_http_info(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param int settlement_period_from:
        :param int settlement_period_to:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyActualGenerationWindSolar
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['_from', 'to', 'settlement_period_from', 'settlement_period_to', 'format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501
        if 'settlement_period_from' in params:
            query_params.append(('settlementPeriodFrom', params['settlement_period_from']))  # noqa: E501
        if 'settlement_period_to' in params:
            query_params.append(('settlementPeriodTo', params['settlement_period_to']))  # noqa: E501
        if 'format' in params:
            query_params.append(('format', params['format']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/actual/per-type/wind-and-solar', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyActualGenerationWindSolar',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generation_outturn_current_get(self, **kwargs):  # noqa: E501
        """Current snapshot of generation by fuel type categories (FUELINST, FUELHH)  # noqa: E501

        This endpoint provides a snapshot view of the last 24 hours generation by individual fuel type categories including interconnector.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_current_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] fuel_type:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: list[InsightsApiModelsResponsesGenerationGenerationByFuelType]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_outturn_current_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.generation_outturn_current_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def generation_outturn_current_get_with_http_info(self, **kwargs):  # noqa: E501
        """Current snapshot of generation by fuel type categories (FUELINST, FUELHH)  # noqa: E501

        This endpoint provides a snapshot view of the last 24 hours generation by individual fuel type categories including interconnector.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_current_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] fuel_type:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: list[InsightsApiModelsResponsesGenerationGenerationByFuelType]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'fuel_type' in params:
            query_params.append(('fuelType', params['fuel_type']))  # noqa: E501
            collection_formats['fuelType'] = 'multi'  # noqa: E501
        if 'format' in params:
            query_params.append(('format', params['format']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/outturn/current', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[InsightsApiModelsResponsesGenerationGenerationByFuelType]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generation_outturn_fuelinsthhcur_get(self, **kwargs):  # noqa: E501
        """This endpoint is obsolete, and this location may be removed with no further notice.   # noqa: E501

        This endpoint has been moved to generation/outturn/current.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_fuelinsthhcur_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Response data format. Use json/xml to include metadata.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_outturn_fuelinsthhcur_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.generation_outturn_fuelinsthhcur_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def generation_outturn_fuelinsthhcur_get_with_http_info(self, **kwargs):  # noqa: E501
        """This endpoint is obsolete, and this location may be removed with no further notice.   # noqa: E501

        This endpoint has been moved to generation/outturn/current.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_fuelinsthhcur_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Response data format. Use json/xml to include metadata.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/outturn/FUELINSTHHCUR', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generation_outturn_get(self, **kwargs):  # noqa: E501
        """Total generation outturn (FUELINST)  # noqa: E501

        This endpoint provides the total generation outturn across all fuel types, derived by summing generation  of all categories from the Generation by Fuel Type report.                This data can be used as a proxy for rolling system demand.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from:
        :param datetime to:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesDemandOutturnRollingSystemDemand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_outturn_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.generation_outturn_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def generation_outturn_get_with_http_info(self, **kwargs):  # noqa: E501
        """Total generation outturn (FUELINST)  # noqa: E501

        This endpoint provides the total generation outturn across all fuel types, derived by summing generation  of all categories from the Generation by Fuel Type report.                This data can be used as a proxy for rolling system demand.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from:
        :param datetime to:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesDemandOutturnRollingSystemDemand
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/outturn', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesDemandOutturnRollingSystemDemand',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generation_outturn_half_hourly_interconnector_get(self, **kwargs):  # noqa: E501
        """This endpoint is obsolete, and this location may be removed with no further notice.   # noqa: E501

        This endpoint has been moved to generation/outturn/interconnectors.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_half_hourly_interconnector_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Response data format. Use json/xml to include metadata.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_outturn_half_hourly_interconnector_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.generation_outturn_half_hourly_interconnector_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def generation_outturn_half_hourly_interconnector_get_with_http_info(self, **kwargs):  # noqa: E501
        """This endpoint is obsolete, and this location may be removed with no further notice.   # noqa: E501

        This endpoint has been moved to generation/outturn/interconnectors.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_half_hourly_interconnector_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str format: Response data format. Use json/xml to include metadata.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/outturn/halfHourlyInterconnector', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generation_outturn_interconnectors_get(self, **kwargs):  # noqa: E501
        """Historic half-hourly interconnector flows (FUELINST)  # noqa: E501

        This endpoint provides the interconnector flows report derived from the Generation by Fuel Type (FUELINST)  data and shows both interconnector imports and exports; the data is updated every five minutes.                Settlement date parameters must be provided in the exact format yyyy-MM-dd.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_interconnectors_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime publish_date_time_from:
        :param datetime publish_date_time_to:
        :param date settlement_date_from: The settlement date from filter. This must be in the format yyyy-MM-dd.
        :param date settlement_date_to: The settlement date to filter. This must be in the format yyyy-MM-dd.
        :param list[int] settlement_period:
        :param list[str] interconnector_name:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesGenerationHalfHourlyInterconnectorOutturn
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_outturn_interconnectors_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.generation_outturn_interconnectors_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def generation_outturn_interconnectors_get_with_http_info(self, **kwargs):  # noqa: E501
        """Historic half-hourly interconnector flows (FUELINST)  # noqa: E501

        This endpoint provides the interconnector flows report derived from the Generation by Fuel Type (FUELINST)  data and shows both interconnector imports and exports; the data is updated every five minutes.                Settlement date parameters must be provided in the exact format yyyy-MM-dd.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_interconnectors_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime publish_date_time_from:
        :param datetime publish_date_time_to:
        :param date settlement_date_from: The settlement date from filter. This must be in the format yyyy-MM-dd.
        :param date settlement_date_to: The settlement date to filter. This must be in the format yyyy-MM-dd.
        :param list[int] settlement_period:
        :param list[str] interconnector_name:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesGenerationHalfHourlyInterconnectorOutturn
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['publish_date_time_from', 'publish_date_time_to', 'settlement_date_from', 'settlement_date_to', 'settlement_period', 'interconnector_name', 'format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'publish_date_time_from' in params:
            query_params.append(('publishDateTimeFrom', params['publish_date_time_from']))  # noqa: E501
        if 'publish_date_time_to' in params:
            query_params.append(('publishDateTimeTo', params['publish_date_time_to']))  # noqa: E501
        if 'settlement_date_from' in params:
            query_params.append(('settlementDateFrom', params['settlement_date_from']))  # noqa: E501
        if 'settlement_date_to' in params:
            query_params.append(('settlementDateTo', params['settlement_date_to']))  # noqa: E501
        if 'settlement_period' in params:
            query_params.append(('settlementPeriod', params['settlement_period']))  # noqa: E501
            collection_formats['settlementPeriod'] = 'multi'  # noqa: E501
        if 'interconnector_name' in params:
            query_params.append(('interconnectorName', params['interconnector_name']))  # noqa: E501
            collection_formats['interconnectorName'] = 'multi'  # noqa: E501
        if 'format' in params:
            query_params.append(('format', params['format']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/outturn/interconnectors', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesGenerationHalfHourlyInterconnectorOutturn',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def generation_outturn_summary_get(self, **kwargs):  # noqa: E501
        """Historic generation automatically down-sampled (FUELINST)  # noqa: E501

        ⚠ This endpoint provides a down-sampled data summary intended for visualisation purposes.  Use raw dataset endpoints under /datasets for full access.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_summary_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime start_time:
        :param datetime end_time:
        :param bool include_negative_generation:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: list[InsightsApiModelsResponsesGenerationOutturnGenerationBySettlementPeriod]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generation_outturn_summary_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.generation_outturn_summary_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def generation_outturn_summary_get_with_http_info(self, **kwargs):  # noqa: E501
        """Historic generation automatically down-sampled (FUELINST)  # noqa: E501

        ⚠ This endpoint provides a down-sampled data summary intended for visualisation purposes.  Use raw dataset endpoints under /datasets for full access.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.generation_outturn_summary_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime start_time:
        :param datetime end_time:
        :param bool include_negative_generation:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: list[InsightsApiModelsResponsesGenerationOutturnGenerationBySettlementPeriod]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'include_negative_generation', 'format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('startTime', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('endTime', params['end_time']))  # noqa: E501
        if 'include_negative_generation' in params:
            query_params.append(('includeNegativeGeneration', params['include_negative_generation']))  # noqa: E501
        if 'format' in params:
            query_params.append(('format', params['format']))  # 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', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/generation/outturn/summary', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[InsightsApiModelsResponsesGenerationOutturnGenerationBySettlementPeriod]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
