# 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 REMITApi(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 remit_get(self, message_id, **kwargs):  # noqa: E501
        """Bulk fetch message details by IDs  # noqa: E501

        This endpoint provides one or more REMIT messages based on the given message IDs.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_get(message_id, async_req=True)
        >>> result = thread.get()

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

    def remit_get_with_http_info(self, message_id, **kwargs):  # noqa: E501
        """Bulk fetch message details by IDs  # noqa: E501

        This endpoint provides one or more REMIT messages based on the given message IDs.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_get_with_http_info(message_id, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'message_id' in params:
            query_params.append(('messageId', params['message_id']))  # noqa: E501
            collection_formats['messageId'] = '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(
            '/remit', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageWithId',  # 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 remit_list_by_event_get(self, _from, to, **kwargs):  # noqa: E501
        """List messages by event time  # noqa: E501

        This endpoint provides a list of REMIT message identifiers based on the event start time, end time and other optional parameters.                - Filtering by LatestRevisionOnly (default = true):     if true, include only the latest revision of each message.                - Filtering by ProfileOnly (default = false):      if true, include only messages with an outage profile.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_list_by_event_get(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param str participant_id:
        :param str asset_id:
        :param str message_type:
        :param str unavailability_type:
        :param list[str] event_type:
        :param list[str] fuel_type:
        :param bool latest_revision_only:
        :param bool profile_only:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.remit_list_by_event_get_with_http_info(_from, to, **kwargs)  # noqa: E501
        else:
            (data) = self.remit_list_by_event_get_with_http_info(_from, to, **kwargs)  # noqa: E501
            return data

    def remit_list_by_event_get_with_http_info(self, _from, to, **kwargs):  # noqa: E501
        """List messages by event time  # noqa: E501

        This endpoint provides a list of REMIT message identifiers based on the event start time, end time and other optional parameters.                - Filtering by LatestRevisionOnly (default = true):     if true, include only the latest revision of each message.                - Filtering by ProfileOnly (default = false):      if true, include only messages with an outage profile.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_list_by_event_get_with_http_info(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param str participant_id:
        :param str asset_id:
        :param str message_type:
        :param str unavailability_type:
        :param list[str] event_type:
        :param list[str] fuel_type:
        :param bool latest_revision_only:
        :param bool profile_only:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['_from', 'to', 'participant_id', 'asset_id', 'message_type', 'unavailability_type', 'event_type', 'fuel_type', 'latest_revision_only', 'profile_only', '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 remit_list_by_event_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter '_from' is set
        if ('_from' not in params or
                params['_from'] is None):
            raise ValueError("Missing the required parameter `_from` when calling `remit_list_by_event_get`")  # noqa: E501
        # verify the required parameter 'to' is set
        if ('to' not in params or
                params['to'] is None):
            raise ValueError("Missing the required parameter `to` when calling `remit_list_by_event_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501
        if 'participant_id' in params:
            query_params.append(('participantId', params['participant_id']))  # noqa: E501
        if 'asset_id' in params:
            query_params.append(('assetId', params['asset_id']))  # noqa: E501
        if 'message_type' in params:
            query_params.append(('messageType', params['message_type']))  # noqa: E501
        if 'unavailability_type' in params:
            query_params.append(('unavailabilityType', params['unavailability_type']))  # noqa: E501
        if 'event_type' in params:
            query_params.append(('eventType', params['event_type']))  # noqa: E501
            collection_formats['eventType'] = 'multi'  # noqa: E501
        if 'fuel_type' in params:
            query_params.append(('fuelType', params['fuel_type']))  # noqa: E501
            collection_formats['fuelType'] = 'multi'  # noqa: E501
        if 'latest_revision_only' in params:
            query_params.append(('latestRevisionOnly', params['latest_revision_only']))  # noqa: E501
        if 'profile_only' in params:
            query_params.append(('profileOnly', params['profile_only']))  # 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(
            '/remit/list/by-event', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl',  # 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 remit_list_by_event_stream_get(self, _from, to, **kwargs):  # noqa: E501
        """List messages by event time (stream)  # noqa: E501

        This endpoint provides a list of REMIT message identifiers based on the event start, end time and other optional parameters.                - Filtering by LatestRevisionOnly (default = true):     if true, include only the latest revision of each message.                - Filtering by ProfileOnly (default = false):      if true, include only messages with an outage profile.                This endpoint has an optimised JSON payload and is aimed at frequent requests for this data.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_list_by_event_stream_get(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param str participant_id:
        :param str asset_id:
        :param str message_type:
        :param str unavailability_type:
        :param list[str] event_type:
        :param list[str] fuel_type:
        :param bool latest_revision_only:
        :param bool profile_only:
        :return: list[InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.remit_list_by_event_stream_get_with_http_info(_from, to, **kwargs)  # noqa: E501
        else:
            (data) = self.remit_list_by_event_stream_get_with_http_info(_from, to, **kwargs)  # noqa: E501
            return data

    def remit_list_by_event_stream_get_with_http_info(self, _from, to, **kwargs):  # noqa: E501
        """List messages by event time (stream)  # noqa: E501

        This endpoint provides a list of REMIT message identifiers based on the event start, end time and other optional parameters.                - Filtering by LatestRevisionOnly (default = true):     if true, include only the latest revision of each message.                - Filtering by ProfileOnly (default = false):      if true, include only messages with an outage profile.                This endpoint has an optimised JSON payload and is aimed at frequent requests for this data.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_list_by_event_stream_get_with_http_info(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param str participant_id:
        :param str asset_id:
        :param str message_type:
        :param str unavailability_type:
        :param list[str] event_type:
        :param list[str] fuel_type:
        :param bool latest_revision_only:
        :param bool profile_only:
        :return: list[InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['_from', 'to', 'participant_id', 'asset_id', 'message_type', 'unavailability_type', 'event_type', 'fuel_type', 'latest_revision_only', 'profile_only']  # 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 remit_list_by_event_stream_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter '_from' is set
        if ('_from' not in params or
                params['_from'] is None):
            raise ValueError("Missing the required parameter `_from` when calling `remit_list_by_event_stream_get`")  # noqa: E501
        # verify the required parameter 'to' is set
        if ('to' not in params or
                params['to'] is None):
            raise ValueError("Missing the required parameter `to` when calling `remit_list_by_event_stream_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501
        if 'participant_id' in params:
            query_params.append(('participantId', params['participant_id']))  # noqa: E501
        if 'asset_id' in params:
            query_params.append(('assetId', params['asset_id']))  # noqa: E501
        if 'message_type' in params:
            query_params.append(('messageType', params['message_type']))  # noqa: E501
        if 'unavailability_type' in params:
            query_params.append(('unavailabilityType', params['unavailability_type']))  # noqa: E501
        if 'event_type' in params:
            query_params.append(('eventType', params['event_type']))  # noqa: E501
            collection_formats['eventType'] = 'multi'  # noqa: E501
        if 'fuel_type' in params:
            query_params.append(('fuelType', params['fuel_type']))  # noqa: E501
            collection_formats['fuelType'] = 'multi'  # noqa: E501
        if 'latest_revision_only' in params:
            query_params.append(('latestRevisionOnly', params['latest_revision_only']))  # noqa: E501
        if 'profile_only' in params:
            query_params.append(('profileOnly', params['profile_only']))  # 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'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/remit/list/by-event/stream', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl]',  # 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 remit_list_by_publish_get(self, _from, to, **kwargs):  # noqa: E501
        """List messages by publish time  # noqa: E501

        This endpoint provides a list of REMIT message identifiers based on the publish time and other optional parameters.                - Filtering by LatestRevisionOnly (default = true):     if true, include only the latest revision of each message.                - Filtering by ProfileOnly (default = false):      if true, include only messages with an outage profile.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_list_by_publish_get(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param str participant_id:
        :param str asset_id:
        :param str message_type:
        :param str unavailability_type:
        :param list[str] event_type:
        :param list[str] fuel_type:
        :param bool latest_revision_only:
        :param bool profile_only:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.remit_list_by_publish_get_with_http_info(_from, to, **kwargs)  # noqa: E501
        else:
            (data) = self.remit_list_by_publish_get_with_http_info(_from, to, **kwargs)  # noqa: E501
            return data

    def remit_list_by_publish_get_with_http_info(self, _from, to, **kwargs):  # noqa: E501
        """List messages by publish time  # noqa: E501

        This endpoint provides a list of REMIT message identifiers based on the publish time and other optional parameters.                - Filtering by LatestRevisionOnly (default = true):     if true, include only the latest revision of each message.                - Filtering by ProfileOnly (default = false):      if true, include only messages with an outage profile.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_list_by_publish_get_with_http_info(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param str participant_id:
        :param str asset_id:
        :param str message_type:
        :param str unavailability_type:
        :param list[str] event_type:
        :param list[str] fuel_type:
        :param bool latest_revision_only:
        :param bool profile_only:
        :param str format: Response data format. Use json/xml to include metadata.
        :return: InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['_from', 'to', 'participant_id', 'asset_id', 'message_type', 'unavailability_type', 'event_type', 'fuel_type', 'latest_revision_only', 'profile_only', '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 remit_list_by_publish_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter '_from' is set
        if ('_from' not in params or
                params['_from'] is None):
            raise ValueError("Missing the required parameter `_from` when calling `remit_list_by_publish_get`")  # noqa: E501
        # verify the required parameter 'to' is set
        if ('to' not in params or
                params['to'] is None):
            raise ValueError("Missing the required parameter `to` when calling `remit_list_by_publish_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501
        if 'participant_id' in params:
            query_params.append(('participantId', params['participant_id']))  # noqa: E501
        if 'asset_id' in params:
            query_params.append(('assetId', params['asset_id']))  # noqa: E501
        if 'message_type' in params:
            query_params.append(('messageType', params['message_type']))  # noqa: E501
        if 'unavailability_type' in params:
            query_params.append(('unavailabilityType', params['unavailability_type']))  # noqa: E501
        if 'event_type' in params:
            query_params.append(('eventType', params['event_type']))  # noqa: E501
            collection_formats['eventType'] = 'multi'  # noqa: E501
        if 'fuel_type' in params:
            query_params.append(('fuelType', params['fuel_type']))  # noqa: E501
            collection_formats['fuelType'] = 'multi'  # noqa: E501
        if 'latest_revision_only' in params:
            query_params.append(('latestRevisionOnly', params['latest_revision_only']))  # noqa: E501
        if 'profile_only' in params:
            query_params.append(('profileOnly', params['profile_only']))  # 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(
            '/remit/list/by-publish', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl',  # 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 remit_list_by_publish_stream_get(self, _from, to, **kwargs):  # noqa: E501
        """List messages by publish time (stream)  # noqa: E501

        This endpoint provides a list of REMIT message identifiers based on the publish time and other optional parameters.                - Filtering by LatestRevisionOnly (default = true):     if true, include only the latest revision of each message.                - Filtering by ProfileOnly (default = false):      if true, include only messages with an outage profile.                This endpoint has an optimised JSON payload and is aimed at frequent requests for this data.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_list_by_publish_stream_get(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param str participant_id:
        :param str asset_id:
        :param str message_type:
        :param str unavailability_type:
        :param list[str] event_type:
        :param list[str] fuel_type:
        :param bool latest_revision_only:
        :param bool profile_only:
        :return: list[InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.remit_list_by_publish_stream_get_with_http_info(_from, to, **kwargs)  # noqa: E501
        else:
            (data) = self.remit_list_by_publish_stream_get_with_http_info(_from, to, **kwargs)  # noqa: E501
            return data

    def remit_list_by_publish_stream_get_with_http_info(self, _from, to, **kwargs):  # noqa: E501
        """List messages by publish time (stream)  # noqa: E501

        This endpoint provides a list of REMIT message identifiers based on the publish time and other optional parameters.                - Filtering by LatestRevisionOnly (default = true):     if true, include only the latest revision of each message.                - Filtering by ProfileOnly (default = false):      if true, include only messages with an outage profile.                This endpoint has an optimised JSON payload and is aimed at frequent requests for this data.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_list_by_publish_stream_get_with_http_info(_from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param datetime _from: (required)
        :param datetime to: (required)
        :param str participant_id:
        :param str asset_id:
        :param str message_type:
        :param str unavailability_type:
        :param list[str] event_type:
        :param list[str] fuel_type:
        :param bool latest_revision_only:
        :param bool profile_only:
        :return: list[InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['_from', 'to', 'participant_id', 'asset_id', 'message_type', 'unavailability_type', 'event_type', 'fuel_type', 'latest_revision_only', 'profile_only']  # 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 remit_list_by_publish_stream_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter '_from' is set
        if ('_from' not in params or
                params['_from'] is None):
            raise ValueError("Missing the required parameter `_from` when calling `remit_list_by_publish_stream_get`")  # noqa: E501
        # verify the required parameter 'to' is set
        if ('to' not in params or
                params['to'] is None):
            raise ValueError("Missing the required parameter `to` when calling `remit_list_by_publish_stream_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'to' in params:
            query_params.append(('to', params['to']))  # noqa: E501
        if 'participant_id' in params:
            query_params.append(('participantId', params['participant_id']))  # noqa: E501
        if 'asset_id' in params:
            query_params.append(('assetId', params['asset_id']))  # noqa: E501
        if 'message_type' in params:
            query_params.append(('messageType', params['message_type']))  # noqa: E501
        if 'unavailability_type' in params:
            query_params.append(('unavailabilityType', params['unavailability_type']))  # noqa: E501
        if 'event_type' in params:
            query_params.append(('eventType', params['event_type']))  # noqa: E501
            collection_formats['eventType'] = 'multi'  # noqa: E501
        if 'fuel_type' in params:
            query_params.append(('fuelType', params['fuel_type']))  # noqa: E501
            collection_formats['fuelType'] = 'multi'  # noqa: E501
        if 'latest_revision_only' in params:
            query_params.append(('latestRevisionOnly', params['latest_revision_only']))  # noqa: E501
        if 'profile_only' in params:
            query_params.append(('profileOnly', params['profile_only']))  # 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'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/remit/list/by-publish/stream', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl]',  # 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 remit_message_id_get(self, message_id, **kwargs):  # noqa: E501
        """Fetch message details by ID  # noqa: E501

        This endpoint provides a REMIT message based on a given message ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_message_id_get(message_id, async_req=True)
        >>> result = thread.get()

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

    def remit_message_id_get_with_http_info(self, message_id, **kwargs):  # noqa: E501
        """Fetch message details by ID  # noqa: E501

        This endpoint provides a REMIT message based on a given message ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_message_id_get_with_http_info(message_id, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

        path_params = {}
        if 'message_id' in params:
            path_params['messageId'] = params['message_id']  # 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(
            '/remit/{messageId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageWithId',  # 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 remit_revisions_get(self, **kwargs):  # noqa: E501
        """List all message revisions  # noqa: E501

        This endpoint provides all revisions for a given REMIT message.  The message can be specified in two ways:  - the mRID  - the message ID of a specific revision, which will return the entire list of revisions for that message  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_revisions_get(async_req=True)
        >>> result = thread.get()

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

    def remit_revisions_get_with_http_info(self, **kwargs):  # noqa: E501
        """List all message revisions  # noqa: E501

        This endpoint provides all revisions for a given REMIT message.  The message can be specified in two ways:  - the mRID  - the message ID of a specific revision, which will return the entire list of revisions for that message  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_revisions_get_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = ['mrid', 'message_id', '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 remit_revisions_get" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'mrid' in params:
            query_params.append(('mrid', params['mrid']))  # noqa: E501
        if 'message_id' in params:
            query_params.append(('messageId', params['message_id']))  # 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(
            '/remit/revisions', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageIdentifierWithUrl',  # 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 remit_search_get(self, mrid, **kwargs):  # noqa: E501
        """Fetch message details by mRID  # noqa: E501

        This endpoint provides one or more REMIT messages based on the given mRID and revision number. If none is given  it returns the REMIT message revision with the latest revision number.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_search_get(mrid, async_req=True)
        >>> result = thread.get()

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

    def remit_search_get_with_http_info(self, mrid, **kwargs):  # noqa: E501
        """Fetch message details by mRID  # noqa: E501

        This endpoint provides one or more REMIT messages based on the given mRID and revision number. If none is given  it returns the REMIT message revision with the latest revision number.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remit_search_get_with_http_info(mrid, async_req=True)
        >>> result = thread.get()

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'mrid' in params:
            query_params.append(('mrid', params['mrid']))  # noqa: E501
        if 'revision_number' in params:
            query_params.append(('revisionNumber', params['revision_number']))  # 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(
            '/remit/search', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesTransparencyRemitRemitMessageWithId',  # 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)
