"""
    Events and Transcripts API

    <p>The Calendar Events API provides access to FactSetâ€™s Event Calendar data alongside business logic that allows users to replicate views and functionality consistent with the experience provided by the Workstation. This API provides the ability to pull Event Calendar data based on specific filters.</p> <p>Events Audio API provides access to historical as well as the latest audio recordings of various company events covered by FactSet. The events include, but are not limited to: earnings calls, conferences, and investor days. This API also provides relevant metadata such as timestamps and identifiers around each audio file.</p> <p>The  Near Real-time Transcripts API enables access to Near Real-time Transcripts provided by CallStreet to time-sensitive clients. This API also provides the relevant speaker metadata along with their confidence scores. This data caters to quant clients interested in building machine learning models. Clients can leverage this API to perform sentiment analysis through natural language processing or machine learning. It can also be used to complement analysis using FactSet's transcripts service.</p> <p>Transcripts API provides conference call transcripts for companies' publicly held conference calls and a wealth of information regarding upcoming corporate events, such as conference call date and time, phone number and password, type of conference call, and important company investor relations contact information.</p>   # noqa: E501

    The version of the OpenAPI document: 2.2.0
    Contact: api@factset.com
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401
from multiprocessing.pool import ApplyResult
import typing

from fds.sdk.EventsandTranscripts.api_client import ApiClient, Endpoint as _Endpoint
from fds.sdk.EventsandTranscripts.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from fds.sdk.EventsandTranscripts.exceptions import ApiException
from fds.sdk.EventsandTranscripts.model.error import Error
from fds.sdk.EventsandTranscripts.model.indexed_nrt_response import IndexedNrtResponse
from fds.sdk.EventsandTranscripts.model.nrt_calls_request import NrtCallsRequest
from fds.sdk.EventsandTranscripts.model.nrt_calls_response import NrtCallsResponse
from fds.sdk.EventsandTranscripts.model.nrt_speaker_ids_response import NrtSpeakerIdsResponse





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

    Do not edit the class manually.
    """

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

        self.get_indexed_nrt_endpoint = _Endpoint(
            settings={
                'response_type': (
                  { 200: (IndexedNrtResponse,), 400: (Error,), 401: (Error,), 403: (Error,), 500: (Error,),  },
                  None
                ),
                'auth': [
                    'FactSetApiKey',
                    'FactSetOAuth2'
                ],
                'endpoint_path': '/nrt/indexed',
                'operation_id': 'get_indexed_nrt',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'audio_source_id',
                    'pagination_limit',
                    'pagination_offset',
                ],
                'required': [
                    'audio_source_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'pagination_limit',
                ]
            },
            root_map={
                'validations': {
                    ('pagination_limit',): {

                        'inclusive_maximum': 50,
                        'inclusive_minimum': 0,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'audio_source_id':
                        (int,),
                    'pagination_limit':
                        (int,),
                    'pagination_offset':
                        (int,),
                },
                'attribute_map': {
                    'audio_source_id': 'audioSourceId',
                    'pagination_limit': '_paginationLimit',
                    'pagination_offset': '_paginationOffset',
                },
                'location_map': {
                    'audio_source_id': 'query',
                    'pagination_limit': 'query',
                    'pagination_offset': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )

        self.get_speaker_ids_endpoint = _Endpoint(
            settings={
                'response_type': (
                  { 200: (NrtSpeakerIdsResponse,), 400: (Error,), 401: (Error,), 403: (Error,), 500: (Error,),  },
                  None
                ),
                'auth': [
                    'FactSetApiKey',
                    'FactSetOAuth2'
                ],
                'endpoint_path': '/nrt/speaker-ids',
                'operation_id': 'get_speaker_ids',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'audio_source_id',
                    'sort',
                    'pagination_limit',
                    'pagination_offset',
                ],
                'required': [
                    'audio_source_id',
                ],
                'nullable': [
                ],
                'enum': [
                    'sort',
                ],
                'validation': [
                    'sort',
                ]
            },
            root_map={
                'validations': {
                    ('sort',): {

                        'max_items': 1,
                    },
                },
                'allowed_values': {
                    ('sort',): {

                        "SPEAKERSTARTOFFSET": "speakerStartOffset",
                        "-SPEAKERSTARTOFFSET": "-speakerStartOffset"
                    },
                },
                'openapi_types': {
                    'audio_source_id':
                        (int,),
                    'sort':
                        ([str],),
                    'pagination_limit':
                        (int,),
                    'pagination_offset':
                        (int,),
                },
                'attribute_map': {
                    'audio_source_id': 'audioSourceId',
                    'sort': '_sort',
                    'pagination_limit': '_paginationLimit',
                    'pagination_offset': '_paginationOffset',
                },
                'location_map': {
                    'audio_source_id': 'query',
                    'sort': 'query',
                    'pagination_limit': 'query',
                    'pagination_offset': 'query',
                },
                'collection_format_map': {
                    'sort': 'csv',
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )

        self.search_nrt_calls_endpoint = _Endpoint(
            settings={
                'response_type': (
                  { 200: (NrtCallsResponse,), 400: (Error,), 401: (Error,), 403: (Error,), 500: (Error,),  },
                  None
                ),
                'auth': [
                    'FactSetApiKey',
                    'FactSetOAuth2'
                ],
                'endpoint_path': '/nrt/calls',
                'operation_id': 'search_nrt_calls',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'nrt_calls_request',
                ],
                'required': [
                    'nrt_calls_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'nrt_calls_request':
                        (NrtCallsRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'nrt_calls_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )


    @staticmethod
    def apply_kwargs_defaults(kwargs, return_http_data_only, async_req):
        kwargs["async_req"] = async_req
        kwargs["_return_http_data_only"] = return_http_data_only
        kwargs["_preload_content"] = kwargs.get("_preload_content", True)
        kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
        kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
        kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
        kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
        kwargs["_content_type"] = kwargs.get("_content_type")
        kwargs["_host_index"] = kwargs.get("_host_index")


    def get_indexed_nrt(
        self,
        audio_source_id,
        **kwargs
    ) -> IndexedNrtResponse:
        """Returns the  indexed transcript data  in small increments throughout the duration of an active call.  # noqa: E501

        Returns the  indexed transcript data  in small increments throughout the duration of an active call.  # noqa: E501
        This method makes a synchronous HTTP request. Returns the http data only

        Args:
            audio_source_id (int): Unique ID for an Internal recording specific to reportID. For example, ReportID X would have multiple recordings from different source (dial-in or webcast). One ReportID can have multiple AudioSourceIDs.

        Keyword Args:
            pagination_limit (int): Number of results to return per page.. [optional] if omitted the server will use the default value of 25
            pagination_offset (int): Specifies the starting point for pagination. This parameter is used to identify the beginning of the next set of results.. [optional] if omitted the server will use the default value of 0
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            IndexedNrtResponse
                Response Object
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=False)
        kwargs['audio_source_id'] = \
            audio_source_id
        return self.get_indexed_nrt_endpoint.call_with_http_info(**kwargs)

    def get_indexed_nrt_with_http_info(
        self,
        audio_source_id,
        **kwargs
    ) -> typing.Tuple[IndexedNrtResponse, int, typing.MutableMapping]:
        """Returns the  indexed transcript data  in small increments throughout the duration of an active call.  # noqa: E501

        Returns the  indexed transcript data  in small increments throughout the duration of an active call.  # noqa: E501
        This method makes a synchronous HTTP request. Returns http data, http status and headers

        Args:
            audio_source_id (int): Unique ID for an Internal recording specific to reportID. For example, ReportID X would have multiple recordings from different source (dial-in or webcast). One ReportID can have multiple AudioSourceIDs.

        Keyword Args:
            pagination_limit (int): Number of results to return per page.. [optional] if omitted the server will use the default value of 25
            pagination_offset (int): Specifies the starting point for pagination. This parameter is used to identify the beginning of the next set of results.. [optional] if omitted the server will use the default value of 0
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            IndexedNrtResponse
                Response Object
            int
                Http Status Code
            dict
                Dictionary of the response headers
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=False)
        kwargs['audio_source_id'] = \
            audio_source_id
        return self.get_indexed_nrt_endpoint.call_with_http_info(**kwargs)

    def get_indexed_nrt_async(
        self,
        audio_source_id,
        **kwargs
    ) -> "ApplyResult[IndexedNrtResponse]":
        """Returns the  indexed transcript data  in small increments throughout the duration of an active call.  # noqa: E501

        Returns the  indexed transcript data  in small increments throughout the duration of an active call.  # noqa: E501
        This method makes a asynchronous HTTP request. Returns the http data, wrapped in ApplyResult

        Args:
            audio_source_id (int): Unique ID for an Internal recording specific to reportID. For example, ReportID X would have multiple recordings from different source (dial-in or webcast). One ReportID can have multiple AudioSourceIDs.

        Keyword Args:
            pagination_limit (int): Number of results to return per page.. [optional] if omitted the server will use the default value of 25
            pagination_offset (int): Specifies the starting point for pagination. This parameter is used to identify the beginning of the next set of results.. [optional] if omitted the server will use the default value of 0
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            ApplyResult[IndexedNrtResponse]
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=True)
        kwargs['audio_source_id'] = \
            audio_source_id
        return self.get_indexed_nrt_endpoint.call_with_http_info(**kwargs)

    def get_indexed_nrt_with_http_info_async(
        self,
        audio_source_id,
        **kwargs
    ) -> "ApplyResult[typing.Tuple[IndexedNrtResponse, int, typing.MutableMapping]]":
        """Returns the  indexed transcript data  in small increments throughout the duration of an active call.  # noqa: E501

        Returns the  indexed transcript data  in small increments throughout the duration of an active call.  # noqa: E501
        This method makes a asynchronous HTTP request. Returns http data, http status and headers, wrapped in ApplyResult

        Args:
            audio_source_id (int): Unique ID for an Internal recording specific to reportID. For example, ReportID X would have multiple recordings from different source (dial-in or webcast). One ReportID can have multiple AudioSourceIDs.

        Keyword Args:
            pagination_limit (int): Number of results to return per page.. [optional] if omitted the server will use the default value of 25
            pagination_offset (int): Specifies the starting point for pagination. This parameter is used to identify the beginning of the next set of results.. [optional] if omitted the server will use the default value of 0
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            ApplyResult[(IndexedNrtResponse, int, typing.Dict)]
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=True)
        kwargs['audio_source_id'] = \
            audio_source_id
        return self.get_indexed_nrt_endpoint.call_with_http_info(**kwargs)


    def get_speaker_ids(
        self,
        audio_source_id,
        **kwargs
    ) -> NrtSpeakerIdsResponse:
        """Returns the latest speakerIds with the confidence scores generated for an active call.  # noqa: E501

        Returns the latest speakerIds with the confidence scores generated for an active call.  # noqa: E501
        This method makes a synchronous HTTP request. Returns the http data only

        Args:
            audio_source_id (int): Unique ID for an Internal recording specific to reportID. For example, ReportID X would have multiple recordings from different source (dial-in or webcast). One ReportID can have multiple AudioSourceIDs.

        Keyword Args:
            sort ([str]): Enables sorting data in ascending or descending chronological order based on the start offset of the speaker. . [optional] if omitted the server will use the default value of ["-speakerStartOffset"]
            pagination_limit (int): Number of results to return per page.. [optional] if omitted the server will use the default value of 25
            pagination_offset (int): Specifies the starting point for pagination. This parameter is used to identify the beginning of the next set of results.. [optional] if omitted the server will use the default value of 0
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            NrtSpeakerIdsResponse
                Response Object
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=False)
        kwargs['audio_source_id'] = \
            audio_source_id
        return self.get_speaker_ids_endpoint.call_with_http_info(**kwargs)

    def get_speaker_ids_with_http_info(
        self,
        audio_source_id,
        **kwargs
    ) -> typing.Tuple[NrtSpeakerIdsResponse, int, typing.MutableMapping]:
        """Returns the latest speakerIds with the confidence scores generated for an active call.  # noqa: E501

        Returns the latest speakerIds with the confidence scores generated for an active call.  # noqa: E501
        This method makes a synchronous HTTP request. Returns http data, http status and headers

        Args:
            audio_source_id (int): Unique ID for an Internal recording specific to reportID. For example, ReportID X would have multiple recordings from different source (dial-in or webcast). One ReportID can have multiple AudioSourceIDs.

        Keyword Args:
            sort ([str]): Enables sorting data in ascending or descending chronological order based on the start offset of the speaker. . [optional] if omitted the server will use the default value of ["-speakerStartOffset"]
            pagination_limit (int): Number of results to return per page.. [optional] if omitted the server will use the default value of 25
            pagination_offset (int): Specifies the starting point for pagination. This parameter is used to identify the beginning of the next set of results.. [optional] if omitted the server will use the default value of 0
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            NrtSpeakerIdsResponse
                Response Object
            int
                Http Status Code
            dict
                Dictionary of the response headers
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=False)
        kwargs['audio_source_id'] = \
            audio_source_id
        return self.get_speaker_ids_endpoint.call_with_http_info(**kwargs)

    def get_speaker_ids_async(
        self,
        audio_source_id,
        **kwargs
    ) -> "ApplyResult[NrtSpeakerIdsResponse]":
        """Returns the latest speakerIds with the confidence scores generated for an active call.  # noqa: E501

        Returns the latest speakerIds with the confidence scores generated for an active call.  # noqa: E501
        This method makes a asynchronous HTTP request. Returns the http data, wrapped in ApplyResult

        Args:
            audio_source_id (int): Unique ID for an Internal recording specific to reportID. For example, ReportID X would have multiple recordings from different source (dial-in or webcast). One ReportID can have multiple AudioSourceIDs.

        Keyword Args:
            sort ([str]): Enables sorting data in ascending or descending chronological order based on the start offset of the speaker. . [optional] if omitted the server will use the default value of ["-speakerStartOffset"]
            pagination_limit (int): Number of results to return per page.. [optional] if omitted the server will use the default value of 25
            pagination_offset (int): Specifies the starting point for pagination. This parameter is used to identify the beginning of the next set of results.. [optional] if omitted the server will use the default value of 0
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            ApplyResult[NrtSpeakerIdsResponse]
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=True)
        kwargs['audio_source_id'] = \
            audio_source_id
        return self.get_speaker_ids_endpoint.call_with_http_info(**kwargs)

    def get_speaker_ids_with_http_info_async(
        self,
        audio_source_id,
        **kwargs
    ) -> "ApplyResult[typing.Tuple[NrtSpeakerIdsResponse, int, typing.MutableMapping]]":
        """Returns the latest speakerIds with the confidence scores generated for an active call.  # noqa: E501

        Returns the latest speakerIds with the confidence scores generated for an active call.  # noqa: E501
        This method makes a asynchronous HTTP request. Returns http data, http status and headers, wrapped in ApplyResult

        Args:
            audio_source_id (int): Unique ID for an Internal recording specific to reportID. For example, ReportID X would have multiple recordings from different source (dial-in or webcast). One ReportID can have multiple AudioSourceIDs.

        Keyword Args:
            sort ([str]): Enables sorting data in ascending or descending chronological order based on the start offset of the speaker. . [optional] if omitted the server will use the default value of ["-speakerStartOffset"]
            pagination_limit (int): Number of results to return per page.. [optional] if omitted the server will use the default value of 25
            pagination_offset (int): Specifies the starting point for pagination. This parameter is used to identify the beginning of the next set of results.. [optional] if omitted the server will use the default value of 0
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            ApplyResult[(NrtSpeakerIdsResponse, int, typing.Dict)]
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=True)
        kwargs['audio_source_id'] = \
            audio_source_id
        return self.get_speaker_ids_endpoint.call_with_http_info(**kwargs)


    def search_nrt_calls(
        self,
        nrt_calls_request,
        **kwargs
    ) -> NrtCallsResponse:
        """Returns the active calls happening at the moment based on ticker/entity or specific IDs.  # noqa: E501

        Retrieves active Near Real-Time (NRT) calls based on either ticker/entity/status criteria or specific audio source/report IDs. Use the appropriate parameters within the `data` object of the request body to specify the search method. Pagination and sorting are controlled via the `meta` object.   # noqa: E501
        This method makes a synchronous HTTP request. Returns the http data only

        Args:
            nrt_calls_request (NrtCallsRequest): Criteria to search for NRT calls. Select one mode of search.

        Keyword Args:
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            NrtCallsResponse
                Response Object
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=False)
        kwargs['nrt_calls_request'] = \
            nrt_calls_request
        return self.search_nrt_calls_endpoint.call_with_http_info(**kwargs)

    def search_nrt_calls_with_http_info(
        self,
        nrt_calls_request,
        **kwargs
    ) -> typing.Tuple[NrtCallsResponse, int, typing.MutableMapping]:
        """Returns the active calls happening at the moment based on ticker/entity or specific IDs.  # noqa: E501

        Retrieves active Near Real-Time (NRT) calls based on either ticker/entity/status criteria or specific audio source/report IDs. Use the appropriate parameters within the `data` object of the request body to specify the search method. Pagination and sorting are controlled via the `meta` object.   # noqa: E501
        This method makes a synchronous HTTP request. Returns http data, http status and headers

        Args:
            nrt_calls_request (NrtCallsRequest): Criteria to search for NRT calls. Select one mode of search.

        Keyword Args:
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            NrtCallsResponse
                Response Object
            int
                Http Status Code
            dict
                Dictionary of the response headers
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=False)
        kwargs['nrt_calls_request'] = \
            nrt_calls_request
        return self.search_nrt_calls_endpoint.call_with_http_info(**kwargs)

    def search_nrt_calls_async(
        self,
        nrt_calls_request,
        **kwargs
    ) -> "ApplyResult[NrtCallsResponse]":
        """Returns the active calls happening at the moment based on ticker/entity or specific IDs.  # noqa: E501

        Retrieves active Near Real-Time (NRT) calls based on either ticker/entity/status criteria or specific audio source/report IDs. Use the appropriate parameters within the `data` object of the request body to specify the search method. Pagination and sorting are controlled via the `meta` object.   # noqa: E501
        This method makes a asynchronous HTTP request. Returns the http data, wrapped in ApplyResult

        Args:
            nrt_calls_request (NrtCallsRequest): Criteria to search for NRT calls. Select one mode of search.

        Keyword Args:
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            ApplyResult[NrtCallsResponse]
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=True)
        kwargs['nrt_calls_request'] = \
            nrt_calls_request
        return self.search_nrt_calls_endpoint.call_with_http_info(**kwargs)

    def search_nrt_calls_with_http_info_async(
        self,
        nrt_calls_request,
        **kwargs
    ) -> "ApplyResult[typing.Tuple[NrtCallsResponse, int, typing.MutableMapping]]":
        """Returns the active calls happening at the moment based on ticker/entity or specific IDs.  # noqa: E501

        Retrieves active Near Real-Time (NRT) calls based on either ticker/entity/status criteria or specific audio source/report IDs. Use the appropriate parameters within the `data` object of the request body to specify the search method. Pagination and sorting are controlled via the `meta` object.   # noqa: E501
        This method makes a asynchronous HTTP request. Returns http data, http status and headers, wrapped in ApplyResult

        Args:
            nrt_calls_request (NrtCallsRequest): Criteria to search for NRT calls. Select one mode of search.

        Keyword Args:
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True. NOTE: if this API returns a file, it is the responsibility
                of the caller to close the file stream.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
        Returns:
            ApplyResult[(NrtCallsResponse, int, typing.Dict)]
        """
        self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=True)
        kwargs['nrt_calls_request'] = \
            nrt_calls_request
        return self.search_nrt_calls_endpoint.call_with_http_info(**kwargs)


