# 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 IndicativeImbalanceSettlementApi(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 balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_get(self, settlement_date, bid_offer, **kwargs):  # noqa: E501
        """Acceptance volumes by settlement date (BOAV)  # noqa: E501

        Returns the settlement acceptance volumes for the requested settlement date.    For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_get(settlement_date, bid_offer, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param str bid_offer: (required)
        :param list[str] bm_unit: Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementAcceptanceVolumeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_get_with_http_info(settlement_date, bid_offer, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_get_with_http_info(settlement_date, bid_offer, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_get_with_http_info(self, settlement_date, bid_offer, **kwargs):  # noqa: E501
        """Acceptance volumes by settlement date (BOAV)  # noqa: E501

        Returns the settlement acceptance volumes for the requested settlement date.    For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_get_with_http_info(settlement_date, bid_offer, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param str bid_offer: (required)
        :param list[str] bm_unit: Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementAcceptanceVolumeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501
        if 'bid_offer' in params:
            path_params['bidOffer'] = params['bid_offer']  # noqa: E501

        query_params = []
        if 'bm_unit' in params:
            query_params.append(('bmUnit', params['bm_unit']))  # noqa: E501
            collection_formats['bmUnit'] = '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(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/balancing/settlement/acceptance/volumes/all/{bidOffer}/{settlementDate}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementAcceptanceVolumeResponse',  # 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 balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_settlement_period_get(self, settlement_period, settlement_date, bid_offer, **kwargs):  # noqa: E501
        """Acceptance volumes by settlement period (BOAV)  # noqa: E501

        Returns the settlement acceptance volumes for the requested settlement period.    Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_settlement_period_get(settlement_period, settlement_date, bid_offer, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param str bid_offer: (required)
        :param list[str] bm_unit: Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementAcceptanceVolumeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, bid_offer, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, bid_offer, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_settlement_period_get_with_http_info(self, settlement_period, settlement_date, bid_offer, **kwargs):  # noqa: E501
        """Acceptance volumes by settlement period (BOAV)  # noqa: E501

        Returns the settlement acceptance volumes for the requested settlement period.    Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_acceptance_volumes_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, bid_offer, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param str bid_offer: (required)
        :param list[str] bm_unit: Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementAcceptanceVolumeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501
        if 'bid_offer' in params:
            path_params['bidOffer'] = params['bid_offer']  # noqa: E501

        query_params = []
        if 'bm_unit' in params:
            query_params.append(('bmUnit', params['bm_unit']))  # noqa: E501
            collection_formats['bmUnit'] = '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(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/balancing/settlement/acceptance/volumes/all/{bidOffer}/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementAcceptanceVolumeResponse',  # 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 balancing_settlement_acceptances_all_settlement_date_settlement_period_get(self, settlement_date, settlement_period, **kwargs):  # noqa: E501
        """Historic acceptances by settlement period (ISPSTACK, BOALF, BOD)  # noqa: E501

        Returns the bid and offer prices for acceptances, with the acceptance number and acceptance time. Results are sorted by descending acceptance time.                Settlement date parameter 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.balancing_settlement_acceptances_all_settlement_date_settlement_period_get(settlement_date, settlement_period, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param int settlement_period: The settlement period to filter. This should be an integer from 1-50 inclusive. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementHistoricAcceptanceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_acceptances_all_settlement_date_settlement_period_get_with_http_info(settlement_date, settlement_period, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_acceptances_all_settlement_date_settlement_period_get_with_http_info(settlement_date, settlement_period, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_acceptances_all_settlement_date_settlement_period_get_with_http_info(self, settlement_date, settlement_period, **kwargs):  # noqa: E501
        """Historic acceptances by settlement period (ISPSTACK, BOALF, BOD)  # noqa: E501

        Returns the bid and offer prices for acceptances, with the acceptance number and acceptance time. Results are sorted by descending acceptance time.                Settlement date parameter 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.balancing_settlement_acceptances_all_settlement_date_settlement_period_get_with_http_info(settlement_date, settlement_period, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param int settlement_period: The settlement period to filter. This should be an integer from 1-50 inclusive. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementHistoricAcceptanceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501

        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(
            '/balancing/settlement/acceptances/all/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementHistoricAcceptanceResponse',  # 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 balancing_settlement_default_notices_get(self, **kwargs):  # noqa: E501
        """Default notices (CDN)  # noqa: E501

        This endpoint provides a subset of CDN data received from EC. It returns the defaults that are in force and defaults that have closed within the last 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.balancing_settlement_default_notices_get(async_req=True)
        >>> result = thread.get()

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

    def balancing_settlement_default_notices_get_with_http_info(self, **kwargs):  # noqa: E501
        """Default notices (CDN)  # noqa: E501

        This endpoint provides a subset of CDN data received from EC. It returns the defaults that are in force and defaults that have closed within the last 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.balancing_settlement_default_notices_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: InsightsApiModelsResponsesDatasetResponse1InsightsApiModelsResponsesBalancingCreditDefaultNoticeResponse
                 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 balancing_settlement_default_notices_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(
            '/balancing/settlement/default-notices', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesDatasetResponse1InsightsApiModelsResponsesBalancingCreditDefaultNoticeResponse',  # 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 balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_get(self, bid_offer, settlement_date, **kwargs):  # noqa: E501
        """Indicative period BMU cashflows by settlement date (EBOCF)  # noqa: E501

        Returns derived indicative cashflow data generated by the latest calculation run for a given settlement date.                For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_get(bid_offer, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str bid_offer: Filter if bid or offer data is to be returned. (required)
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param list[str] bm_unit: The BM Units to query. Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeCashflowResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_get_with_http_info(bid_offer, settlement_date, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_get_with_http_info(bid_offer, settlement_date, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_get_with_http_info(self, bid_offer, settlement_date, **kwargs):  # noqa: E501
        """Indicative period BMU cashflows by settlement date (EBOCF)  # noqa: E501

        Returns derived indicative cashflow data generated by the latest calculation run for a given settlement date.                For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_get_with_http_info(bid_offer, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str bid_offer: Filter if bid or offer data is to be returned. (required)
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param list[str] bm_unit: The BM Units to query. Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeCashflowResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'bid_offer' in params:
            path_params['bidOffer'] = params['bid_offer']  # noqa: E501
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501

        query_params = []
        if 'bm_unit' in params:
            query_params.append(('bmUnit', params['bm_unit']))  # noqa: E501
            collection_formats['bmUnit'] = '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(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/balancing/settlement/indicative/cashflows/all/{bidOffer}/{settlementDate}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeCashflowResponse',  # 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 balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_settlement_period_get(self, settlement_period, bid_offer, settlement_date, **kwargs):  # noqa: E501
        """Indicative period BMU cashflows by settlement period (EBOCF)  # noqa: E501

        Returns derived indicative cashflow data generated by the latest calculation run for a given settlement period.                Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_settlement_period_get(settlement_period, bid_offer, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: The settlement period for the filter. (required)
        :param str bid_offer: Filter if bid or offer data is to be returned. (required)
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param list[str] bm_unit: The BM Units to query. Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeCashflowResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, bid_offer, settlement_date, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, bid_offer, settlement_date, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_settlement_period_get_with_http_info(self, settlement_period, bid_offer, settlement_date, **kwargs):  # noqa: E501
        """Indicative period BMU cashflows by settlement period (EBOCF)  # noqa: E501

        Returns derived indicative cashflow data generated by the latest calculation run for a given settlement period.                Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_indicative_cashflows_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, bid_offer, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: The settlement period for the filter. (required)
        :param str bid_offer: Filter if bid or offer data is to be returned. (required)
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param list[str] bm_unit: The BM Units to query. Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeCashflowResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501
        if 'bid_offer' in params:
            path_params['bidOffer'] = params['bid_offer']  # noqa: E501
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501

        query_params = []
        if 'bm_unit' in params:
            query_params.append(('bmUnit', params['bm_unit']))  # noqa: E501
            collection_formats['bmUnit'] = '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(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/balancing/settlement/indicative/cashflows/all/{bidOffer}/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeCashflowResponse',  # 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 balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_get(self, settlement_date, bid_offer, **kwargs):  # noqa: E501
        """Indicative volumes by settlement date (DISPTAV)  # noqa: E501

        Returns the settlement indicative volumes for the requested settlement date.    For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_get(settlement_date, bid_offer, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param str bid_offer: (required)
        :param list[str] bm_unit: Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeVolumeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_get_with_http_info(settlement_date, bid_offer, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_get_with_http_info(settlement_date, bid_offer, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_get_with_http_info(self, settlement_date, bid_offer, **kwargs):  # noqa: E501
        """Indicative volumes by settlement date (DISPTAV)  # noqa: E501

        Returns the settlement indicative volumes for the requested settlement date.    For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_get_with_http_info(settlement_date, bid_offer, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param str bid_offer: (required)
        :param list[str] bm_unit: Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeVolumeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501
        if 'bid_offer' in params:
            path_params['bidOffer'] = params['bid_offer']  # noqa: E501

        query_params = []
        if 'bm_unit' in params:
            query_params.append(('bmUnit', params['bm_unit']))  # noqa: E501
            collection_formats['bmUnit'] = '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(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/balancing/settlement/indicative/volumes/all/{bidOffer}/{settlementDate}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeVolumeResponse',  # 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 balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_settlement_period_get(self, settlement_period, settlement_date, bid_offer, **kwargs):  # noqa: E501
        """Indicative volumes by settlement period (DISPTAV)  # noqa: E501

        Returns the settlement indicative volumes for the requested settlement period.    Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_settlement_period_get(settlement_period, settlement_date, bid_offer, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param str bid_offer: (required)
        :param list[str] bm_unit: Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeVolumeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, bid_offer, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, bid_offer, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_settlement_period_get_with_http_info(self, settlement_period, settlement_date, bid_offer, **kwargs):  # noqa: E501
        """Indicative volumes by settlement period (DISPTAV)  # noqa: E501

        Returns the settlement indicative volumes for the requested settlement period.    Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_indicative_volumes_all_bid_offer_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, bid_offer, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param str bid_offer: (required)
        :param list[str] bm_unit: Elexon or NGC BMU IDs can be used. If omitted, results for all BM units will be returned.
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeVolumeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501
        if 'bid_offer' in params:
            path_params['bidOffer'] = params['bid_offer']  # noqa: E501

        query_params = []
        if 'bm_unit' in params:
            query_params.append(('bmUnit', params['bm_unit']))  # noqa: E501
            collection_formats['bmUnit'] = '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(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/balancing/settlement/indicative/volumes/all/{bidOffer}/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementIndicativeVolumeResponse',  # 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 balancing_settlement_market_depth_settlement_date_get(self, settlement_date, **kwargs):  # noqa: E501
        """Market depth by settlement date (IMBALNGC, BOD, DISEBSP, DISPTAV)  # noqa: E501

        Returns market depth data for a given day.  Imbalance (MW) is retrieved from IMBALNGC.  Bid/offer volumes (MWh) are calculated by summing bid/offer volumes from BOD.  Total acceptance volumes (MWh) are retrieved from DISEBSP.  Priced acceptance volumes (MWh) are calculated by summing bid/offer accepted volumes with data type Original from DISPTAV.                Settlement date parameter 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.balancing_settlement_market_depth_settlement_date_get(settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementMarketDepthResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_market_depth_settlement_date_get_with_http_info(settlement_date, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_market_depth_settlement_date_get_with_http_info(settlement_date, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_market_depth_settlement_date_get_with_http_info(self, settlement_date, **kwargs):  # noqa: E501
        """Market depth by settlement date (IMBALNGC, BOD, DISEBSP, DISPTAV)  # noqa: E501

        Returns market depth data for a given day.  Imbalance (MW) is retrieved from IMBALNGC.  Bid/offer volumes (MWh) are calculated by summing bid/offer volumes from BOD.  Total acceptance volumes (MWh) are retrieved from DISEBSP.  Priced acceptance volumes (MWh) are calculated by summing bid/offer accepted volumes with data type Original from DISPTAV.                Settlement date parameter 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.balancing_settlement_market_depth_settlement_date_get_with_http_info(settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementMarketDepthResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        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(
            '/balancing/settlement/market-depth/{settlementDate}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementMarketDepthResponse',  # 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 balancing_settlement_market_depth_settlement_date_settlement_period_get(self, settlement_period, settlement_date, **kwargs):  # noqa: E501
        """Market depth by settlement period (IMBALNGC, BOD, DISEBSP, DISPTAV)  # noqa: E501

        Returns market depth data for a given settlement period.  Imbalance (MW) is retrieved from IMBALNGC.  Bid/offer volumes (MWh) are calculated by summing bid/offer volumes from BOD.  Total acceptance volumes (MWh) are retrieved from DISEBSP.  Priced acceptance volumes (MWh) are calculated by summing bid/offer accepted volumes with data type Original from DISPTAV.                Settlement date parameter 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.balancing_settlement_market_depth_settlement_date_settlement_period_get(settlement_period, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: The settlement period to filter. This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementMarketDepthResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_market_depth_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_market_depth_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_market_depth_settlement_date_settlement_period_get_with_http_info(self, settlement_period, settlement_date, **kwargs):  # noqa: E501
        """Market depth by settlement period (IMBALNGC, BOD, DISEBSP, DISPTAV)  # noqa: E501

        Returns market depth data for a given settlement period.  Imbalance (MW) is retrieved from IMBALNGC.  Bid/offer volumes (MWh) are calculated by summing bid/offer volumes from BOD.  Total acceptance volumes (MWh) are retrieved from DISEBSP.  Priced acceptance volumes (MWh) are calculated by summing bid/offer accepted volumes with data type Original from DISPTAV.                Settlement date parameter 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.balancing_settlement_market_depth_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: The settlement period to filter. This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementMarketDepthResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501

        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(
            '/balancing/settlement/market-depth/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementMarketDepthResponse',  # 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 balancing_settlement_messages_settlement_date_get(self, settlement_date, **kwargs):  # noqa: E501
        """Settlement messages by settlement date (SMSG)  # noqa: E501

        Returns settlement messages generated by the SAA for a given settlement day, relating to the data  for a settlement run.                For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_messages_settlement_date_get(settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: The settlement date to filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementMessageResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_messages_settlement_date_get_with_http_info(settlement_date, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_messages_settlement_date_get_with_http_info(settlement_date, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_messages_settlement_date_get_with_http_info(self, settlement_date, **kwargs):  # noqa: E501
        """Settlement messages by settlement date (SMSG)  # noqa: E501

        Returns settlement messages generated by the SAA for a given settlement day, relating to the data  for a settlement run.                For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_messages_settlement_date_get_with_http_info(settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: The settlement date to filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementMessageResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        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(
            '/balancing/settlement/messages/{settlementDate}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementMessageResponse',  # 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 balancing_settlement_messages_settlement_date_settlement_period_get(self, settlement_period, settlement_date, **kwargs):  # noqa: E501
        """Settlement messages by settlement date and period (SMSG)  # noqa: E501

        Returns settlement messages generated by the SAA for a given settlement period, relating to the data  for a settlement run.                Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_messages_settlement_date_settlement_period_get(settlement_period, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: The settlement period to filter. This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: The settlement date to filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementMessageResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_messages_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_messages_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_messages_settlement_date_settlement_period_get_with_http_info(self, settlement_period, settlement_date, **kwargs):  # noqa: E501
        """Settlement messages by settlement date and period (SMSG)  # noqa: E501

        Returns settlement messages generated by the SAA for a given settlement period, relating to the data  for a settlement run.                Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_messages_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: The settlement period to filter. This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: The settlement date to filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementMessageResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501

        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(
            '/balancing/settlement/messages/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementMessageResponse',  # 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 balancing_settlement_stack_all_bid_offer_settlement_date_settlement_period_get(self, bid_offer, settlement_date, settlement_period, **kwargs):  # noqa: E501
        """Settlement bid-offer stacks by settlement period (ISPSTACK)  # noqa: E501

        Returns detailed system prices generated by the latest calculation run for a given settlement period.                Settlement date parameter 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.balancing_settlement_stack_all_bid_offer_settlement_date_settlement_period_get(bid_offer, settlement_date, settlement_period, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str bid_offer: Filter if bid or offer data is to be returned. (required)
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param int settlement_period: The settlement period for the filter. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementStackResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_stack_all_bid_offer_settlement_date_settlement_period_get_with_http_info(bid_offer, settlement_date, settlement_period, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_stack_all_bid_offer_settlement_date_settlement_period_get_with_http_info(bid_offer, settlement_date, settlement_period, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_stack_all_bid_offer_settlement_date_settlement_period_get_with_http_info(self, bid_offer, settlement_date, settlement_period, **kwargs):  # noqa: E501
        """Settlement bid-offer stacks by settlement period (ISPSTACK)  # noqa: E501

        Returns detailed system prices generated by the latest calculation run for a given settlement period.                Settlement date parameter 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.balancing_settlement_stack_all_bid_offer_settlement_date_settlement_period_get_with_http_info(bid_offer, settlement_date, settlement_period, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str bid_offer: Filter if bid or offer data is to be returned. (required)
        :param date settlement_date: The settlement date for the filter. This must be in the format yyyy-MM-dd. (required)
        :param int settlement_period: The settlement period for the filter. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementStackResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'bid_offer' in params:
            path_params['bidOffer'] = params['bid_offer']  # noqa: E501
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501

        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(
            '/balancing/settlement/stack/all/{bidOffer}/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSettlementStackResponse',  # 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 balancing_settlement_summary_settlement_date_settlement_period_get(self, settlement_date, settlement_period, **kwargs):  # noqa: E501
        """Settlement calculation summary (ISPSTACK, DISEBSP, MID, NETBSAD)  # noqa: E501

        Returns the settlement calculation summary for the requested settlement period.  Data is derived from the following datasets: ISPSTACK, DISEBSP, MID, NETBSAD                In JSON format, decimal values are returned as strings to avoid loss of precision.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.balancing_settlement_summary_settlement_date_settlement_period_get(settlement_date, settlement_period, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param int settlement_period: This should be an integer from 1-50 inclusive. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesBalancingSettlementSettlementSummaryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_summary_settlement_date_settlement_period_get_with_http_info(settlement_date, settlement_period, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_summary_settlement_date_settlement_period_get_with_http_info(settlement_date, settlement_period, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_summary_settlement_date_settlement_period_get_with_http_info(self, settlement_date, settlement_period, **kwargs):  # noqa: E501
        """Settlement calculation summary (ISPSTACK, DISEBSP, MID, NETBSAD)  # noqa: E501

        Returns the settlement calculation summary for the requested settlement period.  Data is derived from the following datasets: ISPSTACK, DISEBSP, MID, NETBSAD                In JSON format, decimal values are returned as strings to avoid loss of precision.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.balancing_settlement_summary_settlement_date_settlement_period_get_with_http_info(settlement_date, settlement_period, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: This must be in the format yyyy-MM-dd. (required)
        :param int settlement_period: This should be an integer from 1-50 inclusive. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesBalancingSettlementSettlementSummaryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501

        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(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/balancing/settlement/summary/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesBalancingSettlementSettlementSummaryResponse',  # 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 balancing_settlement_system_prices_settlement_date_get(self, settlement_date, **kwargs):  # noqa: E501
        """Settlement system prices by settlement date (DISEBSP)  # noqa: E501

        Returns settlement system buy and sell prices generated by the SAA for a given settlement day, relating to  the data for a settlement run.                For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_system_prices_settlement_date_get(settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: The settlement date to filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSystemPriceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_system_prices_settlement_date_get_with_http_info(settlement_date, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_system_prices_settlement_date_get_with_http_info(settlement_date, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_system_prices_settlement_date_get_with_http_info(self, settlement_date, **kwargs):  # noqa: E501
        """Settlement system prices by settlement date (DISEBSP)  # noqa: E501

        Returns settlement system buy and sell prices generated by the SAA for a given settlement day, relating to  the data for a settlement run.                For each settlement period within the range, only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_system_prices_settlement_date_get_with_http_info(settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param date settlement_date: The settlement date to filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSystemPriceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        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(
            '/balancing/settlement/system-prices/{settlementDate}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSystemPriceResponse',  # 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 balancing_settlement_system_prices_settlement_date_settlement_period_get(self, settlement_period, settlement_date, **kwargs):  # noqa: E501
        """Settlement system prices by settlement date and period (DISEBSP)  # noqa: E501

        Returns settlement system buy and sell prices generated by the SAA for a given settlement period, relating to  the data for a settlement run.                Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_system_prices_settlement_date_settlement_period_get(settlement_period, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: The settlement period to filter. This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: The settlement date to filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSystemPriceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.balancing_settlement_system_prices_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, **kwargs)  # noqa: E501
        else:
            (data) = self.balancing_settlement_system_prices_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, **kwargs)  # noqa: E501
            return data

    def balancing_settlement_system_prices_settlement_date_settlement_period_get_with_http_info(self, settlement_period, settlement_date, **kwargs):  # noqa: E501
        """Settlement system prices by settlement date and period (DISEBSP)  # noqa: E501

        Returns settlement system buy and sell prices generated by the SAA for a given settlement period, relating to  the data for a settlement run.                Only messages generated for the latest settlement run are returned.                Settlement date parameter 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.balancing_settlement_system_prices_settlement_date_settlement_period_get_with_http_info(settlement_period, settlement_date, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int settlement_period: The settlement period to filter. This should be an integer from 1-50 inclusive. (required)
        :param date settlement_date: The settlement date to filter. This must be in the format yyyy-MM-dd. (required)
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSystemPriceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'settlement_period' in params:
            path_params['settlementPeriod'] = params['settlement_period']  # noqa: E501
        if 'settlement_date' in params:
            path_params['settlementDate'] = params['settlement_date']  # noqa: E501

        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(
            '/balancing/settlement/system-prices/{settlementDate}/{settlementPeriod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesBalancingSettlementSystemPriceResponse',  # 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)
