# coding: utf-8

"""
    Verity471 Unified API

      - creds: 1.0.1
  - indicators: 1.0.0
  - malware: 1.0.0
  - reports: 1.0.0
  - sources: 1.0.2
  - actors: 1.0.1
  - watchers: 1.0.0
  - observables: 1.0.0
  - entities: 1.0.0
  - girs: 1.0.0


    The version of the OpenAPI document: 1.1.1
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501

import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictBytes, StrictInt, StrictStr
from typing import Optional, Tuple, Union
from typing_extensions import Annotated
from verity471.models.chat_messages_streaming_page import ChatMessagesStreamingPage
from verity471.models.chat_room_message_stream import ChatRoomMessageStream
from verity471.models.chat_server_type_stream import ChatServerTypeStream
from verity471.models.data_leak_site_posts_streaming_page import DataLeakSitePostsStreamingPage
from verity471.models.forums_posts_streaming_page import ForumsPostsStreamingPage
from verity471.models.forums_private_messages_streaming_page import ForumsPrivateMessagesStreamingPage
from verity471.models.image_type import ImageType
from verity471.models.post_details1 import PostDetails1
from verity471.models.private_message_details1 import PrivateMessageDetails1

from verity471.api_client import ApiClient, RequestSerialized
from verity471.api_response import ApiResponse
from verity471.rest import RESTResponseType


class SourcesApi:
    """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) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def get_data_leak_sites_file_listings_id(
        self,
        id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> bytearray:
        """Get a data leak site file listing content

        Returns data leak sites file listing content

        :param id: (required)
        :type id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_data_leak_sites_file_listings_id_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "bytearray",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_data_leak_sites_file_listings_id_with_http_info(
        self,
        id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[bytearray]:
        """Get a data leak site file listing content

        Returns data leak sites file listing content

        :param id: (required)
        :type id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_data_leak_sites_file_listings_id_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "bytearray",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_data_leak_sites_file_listings_id_without_preload_content(
        self,
        id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get a data leak site file listing content

        Returns data leak sites file listing content

        :param id: (required)
        :type id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_data_leak_sites_file_listings_id_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "bytearray",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_data_leak_sites_file_listings_id_serialize(
        self,
        id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if id is not None:
            _path_params['id'] = id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/octet-stream', 
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/data-leak-sites/file-listings/{id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_data_leak_sites_posts_stream(
        self,
        website_id: Annotated[Optional[StrictStr], Field(description="Search data leak posts in a given data leak blog")] = None,
        thread_id: Annotated[Optional[StrictStr], Field(description="Search data leak posts by thread id")] = None,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search posts based on a keyword")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp in milliseconds")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp in milliseconds")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> DataLeakSitePostsStreamingPage:
        """Get data leak sites posts (stream)

        Returns data leak sites posts based on applied filters

        :param website_id: Search data leak posts in a given data leak blog
        :type website_id: str
        :param thread_id: Search data leak posts by thread id
        :type thread_id: str
        :param text_filter: Apply text filter to search posts based on a keyword
        :type text_filter: str
        :param var_from: UNIX timestamp in milliseconds
        :type var_from: int
        :param until: UNIX timestamp in milliseconds
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_data_leak_sites_posts_stream_serialize(
            website_id=website_id,
            thread_id=thread_id,
            text_filter=text_filter,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DataLeakSitePostsStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_data_leak_sites_posts_stream_with_http_info(
        self,
        website_id: Annotated[Optional[StrictStr], Field(description="Search data leak posts in a given data leak blog")] = None,
        thread_id: Annotated[Optional[StrictStr], Field(description="Search data leak posts by thread id")] = None,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search posts based on a keyword")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp in milliseconds")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp in milliseconds")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[DataLeakSitePostsStreamingPage]:
        """Get data leak sites posts (stream)

        Returns data leak sites posts based on applied filters

        :param website_id: Search data leak posts in a given data leak blog
        :type website_id: str
        :param thread_id: Search data leak posts by thread id
        :type thread_id: str
        :param text_filter: Apply text filter to search posts based on a keyword
        :type text_filter: str
        :param var_from: UNIX timestamp in milliseconds
        :type var_from: int
        :param until: UNIX timestamp in milliseconds
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_data_leak_sites_posts_stream_serialize(
            website_id=website_id,
            thread_id=thread_id,
            text_filter=text_filter,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DataLeakSitePostsStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_data_leak_sites_posts_stream_without_preload_content(
        self,
        website_id: Annotated[Optional[StrictStr], Field(description="Search data leak posts in a given data leak blog")] = None,
        thread_id: Annotated[Optional[StrictStr], Field(description="Search data leak posts by thread id")] = None,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search posts based on a keyword")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp in milliseconds")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp in milliseconds")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get data leak sites posts (stream)

        Returns data leak sites posts based on applied filters

        :param website_id: Search data leak posts in a given data leak blog
        :type website_id: str
        :param thread_id: Search data leak posts by thread id
        :type thread_id: str
        :param text_filter: Apply text filter to search posts based on a keyword
        :type text_filter: str
        :param var_from: UNIX timestamp in milliseconds
        :type var_from: int
        :param until: UNIX timestamp in milliseconds
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_data_leak_sites_posts_stream_serialize(
            website_id=website_id,
            thread_id=thread_id,
            text_filter=text_filter,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DataLeakSitePostsStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_data_leak_sites_posts_stream_serialize(
        self,
        website_id,
        thread_id,
        text_filter,
        var_from,
        until,
        size,
        cursor,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if website_id is not None:
            
            _query_params.append(('website_id', website_id))
            
        if thread_id is not None:
            
            _query_params.append(('thread_id', thread_id))
            
        if text_filter is not None:
            
            _query_params.append(('text_filter', text_filter))
            
        if var_from is not None:
            
            _query_params.append(('from', var_from))
            
        if until is not None:
            
            _query_params.append(('until', until))
            
        if size is not None:
            
            _query_params.append(('size', size))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/data-leak-sites/posts/stream',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_forums_posts_post_id(
        self,
        post_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PostDetails1:
        """Get a forum post by id

        Return a single forum post by id

        :param post_id: (required)
        :type post_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_posts_post_id_serialize(
            post_id=post_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostDetails1",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_forums_posts_post_id_with_http_info(
        self,
        post_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PostDetails1]:
        """Get a forum post by id

        Return a single forum post by id

        :param post_id: (required)
        :type post_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_posts_post_id_serialize(
            post_id=post_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostDetails1",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_forums_posts_post_id_without_preload_content(
        self,
        post_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get a forum post by id

        Return a single forum post by id

        :param post_id: (required)
        :type post_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_posts_post_id_serialize(
            post_id=post_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostDetails1",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_forums_posts_post_id_serialize(
        self,
        post_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if post_id is not None:
            _path_params['post_id'] = post_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/forums/posts/{post_id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_forums_posts_stream(
        self,
        thread_id: Annotated[Optional[StrictStr], Field(description="Search forum posts in a given forum.")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for posts authored by given actor user name.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for posts authored by given actor id.")] = None,
        forum_title: Annotated[Optional[StrictStr], Field(description="Search for posts in a given forum.")] = None,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search posts based on a keyword.")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ForumsPostsStreamingPage:
        """Get forums posts (stream)

        Return posts in a thread

        :param thread_id: Search forum posts in a given forum.
        :type thread_id: str
        :param author: Search for posts authored by given actor user name.
        :type author: str
        :param author_id: Search for posts authored by given actor id.
        :type author_id: str
        :param forum_title: Search for posts in a given forum.
        :type forum_title: str
        :param text_filter: Apply text filter to search posts based on a keyword.
        :type text_filter: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_posts_stream_serialize(
            thread_id=thread_id,
            author=author,
            author_id=author_id,
            forum_title=forum_title,
            text_filter=text_filter,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ForumsPostsStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_forums_posts_stream_with_http_info(
        self,
        thread_id: Annotated[Optional[StrictStr], Field(description="Search forum posts in a given forum.")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for posts authored by given actor user name.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for posts authored by given actor id.")] = None,
        forum_title: Annotated[Optional[StrictStr], Field(description="Search for posts in a given forum.")] = None,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search posts based on a keyword.")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ForumsPostsStreamingPage]:
        """Get forums posts (stream)

        Return posts in a thread

        :param thread_id: Search forum posts in a given forum.
        :type thread_id: str
        :param author: Search for posts authored by given actor user name.
        :type author: str
        :param author_id: Search for posts authored by given actor id.
        :type author_id: str
        :param forum_title: Search for posts in a given forum.
        :type forum_title: str
        :param text_filter: Apply text filter to search posts based on a keyword.
        :type text_filter: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_posts_stream_serialize(
            thread_id=thread_id,
            author=author,
            author_id=author_id,
            forum_title=forum_title,
            text_filter=text_filter,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ForumsPostsStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_forums_posts_stream_without_preload_content(
        self,
        thread_id: Annotated[Optional[StrictStr], Field(description="Search forum posts in a given forum.")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for posts authored by given actor user name.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for posts authored by given actor id.")] = None,
        forum_title: Annotated[Optional[StrictStr], Field(description="Search for posts in a given forum.")] = None,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search posts based on a keyword.")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get forums posts (stream)

        Return posts in a thread

        :param thread_id: Search forum posts in a given forum.
        :type thread_id: str
        :param author: Search for posts authored by given actor user name.
        :type author: str
        :param author_id: Search for posts authored by given actor id.
        :type author_id: str
        :param forum_title: Search for posts in a given forum.
        :type forum_title: str
        :param text_filter: Apply text filter to search posts based on a keyword.
        :type text_filter: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_posts_stream_serialize(
            thread_id=thread_id,
            author=author,
            author_id=author_id,
            forum_title=forum_title,
            text_filter=text_filter,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ForumsPostsStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_forums_posts_stream_serialize(
        self,
        thread_id,
        author,
        author_id,
        forum_title,
        text_filter,
        var_from,
        until,
        size,
        cursor,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if thread_id is not None:
            
            _query_params.append(('thread_id', thread_id))
            
        if author is not None:
            
            _query_params.append(('author', author))
            
        if author_id is not None:
            
            _query_params.append(('author_id', author_id))
            
        if forum_title is not None:
            
            _query_params.append(('forum_title', forum_title))
            
        if text_filter is not None:
            
            _query_params.append(('text_filter', text_filter))
            
        if var_from is not None:
            
            _query_params.append(('from', var_from))
            
        if until is not None:
            
            _query_params.append(('until', until))
            
        if size is not None:
            
            _query_params.append(('size', size))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/forums/posts/stream',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_forums_private_messages_private_message_id(
        self,
        private_message_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PrivateMessageDetails1:
        """Get a private message by id

        Return a single private message by id

        :param private_message_id: (required)
        :type private_message_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_private_messages_private_message_id_serialize(
            private_message_id=private_message_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PrivateMessageDetails1",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_forums_private_messages_private_message_id_with_http_info(
        self,
        private_message_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PrivateMessageDetails1]:
        """Get a private message by id

        Return a single private message by id

        :param private_message_id: (required)
        :type private_message_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_private_messages_private_message_id_serialize(
            private_message_id=private_message_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PrivateMessageDetails1",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_forums_private_messages_private_message_id_without_preload_content(
        self,
        private_message_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get a private message by id

        Return a single private message by id

        :param private_message_id: (required)
        :type private_message_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_private_messages_private_message_id_serialize(
            private_message_id=private_message_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PrivateMessageDetails1",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_forums_private_messages_private_message_id_serialize(
        self,
        private_message_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if private_message_id is not None:
            _path_params['private_message_id'] = private_message_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/forums/private-messages/{private_message_id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_forums_private_messages_stream(
        self,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search for private messages based on a keyword.")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor user name.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor id.")] = None,
        forum_title: Annotated[Optional[StrictStr], Field(description="Search for messages in a given forum")] = None,
        subject: Annotated[Optional[StrictStr], Field(description="Search text in subjects of Private Messages.")] = None,
        recipient: Annotated[Optional[StrictStr], Field(description="Search messages received by given actor user name.")] = None,
        recipient_id: Annotated[Optional[StrictStr], Field(description="Search messages received by given actor id.")] = None,
        forum_id: Annotated[Optional[StrictStr], Field(description="Search for messages in a given forum by `forum_id`. `forum_id` will take precedence if used together with the `forum_title` filter")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ForumsPrivateMessagesStreamingPage:
        """Get forums private messages (stream)

        Returns a private messages conversations based on filters

        :param text_filter: Apply text filter to search for private messages based on a keyword.
        :type text_filter: str
        :param author: Search for messages authored by given actor user name.
        :type author: str
        :param author_id: Search for messages authored by given actor id.
        :type author_id: str
        :param forum_title: Search for messages in a given forum
        :type forum_title: str
        :param subject: Search text in subjects of Private Messages.
        :type subject: str
        :param recipient: Search messages received by given actor user name.
        :type recipient: str
        :param recipient_id: Search messages received by given actor id.
        :type recipient_id: str
        :param forum_id: Search for messages in a given forum by `forum_id`. `forum_id` will take precedence if used together with the `forum_title` filter
        :type forum_id: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_private_messages_stream_serialize(
            text_filter=text_filter,
            author=author,
            author_id=author_id,
            forum_title=forum_title,
            subject=subject,
            recipient=recipient,
            recipient_id=recipient_id,
            forum_id=forum_id,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ForumsPrivateMessagesStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_forums_private_messages_stream_with_http_info(
        self,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search for private messages based on a keyword.")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor user name.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor id.")] = None,
        forum_title: Annotated[Optional[StrictStr], Field(description="Search for messages in a given forum")] = None,
        subject: Annotated[Optional[StrictStr], Field(description="Search text in subjects of Private Messages.")] = None,
        recipient: Annotated[Optional[StrictStr], Field(description="Search messages received by given actor user name.")] = None,
        recipient_id: Annotated[Optional[StrictStr], Field(description="Search messages received by given actor id.")] = None,
        forum_id: Annotated[Optional[StrictStr], Field(description="Search for messages in a given forum by `forum_id`. `forum_id` will take precedence if used together with the `forum_title` filter")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ForumsPrivateMessagesStreamingPage]:
        """Get forums private messages (stream)

        Returns a private messages conversations based on filters

        :param text_filter: Apply text filter to search for private messages based on a keyword.
        :type text_filter: str
        :param author: Search for messages authored by given actor user name.
        :type author: str
        :param author_id: Search for messages authored by given actor id.
        :type author_id: str
        :param forum_title: Search for messages in a given forum
        :type forum_title: str
        :param subject: Search text in subjects of Private Messages.
        :type subject: str
        :param recipient: Search messages received by given actor user name.
        :type recipient: str
        :param recipient_id: Search messages received by given actor id.
        :type recipient_id: str
        :param forum_id: Search for messages in a given forum by `forum_id`. `forum_id` will take precedence if used together with the `forum_title` filter
        :type forum_id: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_private_messages_stream_serialize(
            text_filter=text_filter,
            author=author,
            author_id=author_id,
            forum_title=forum_title,
            subject=subject,
            recipient=recipient,
            recipient_id=recipient_id,
            forum_id=forum_id,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ForumsPrivateMessagesStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_forums_private_messages_stream_without_preload_content(
        self,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search for private messages based on a keyword.")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor user name.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor id.")] = None,
        forum_title: Annotated[Optional[StrictStr], Field(description="Search for messages in a given forum")] = None,
        subject: Annotated[Optional[StrictStr], Field(description="Search text in subjects of Private Messages.")] = None,
        recipient: Annotated[Optional[StrictStr], Field(description="Search messages received by given actor user name.")] = None,
        recipient_id: Annotated[Optional[StrictStr], Field(description="Search messages received by given actor id.")] = None,
        forum_id: Annotated[Optional[StrictStr], Field(description="Search for messages in a given forum by `forum_id`. `forum_id` will take precedence if used together with the `forum_title` filter")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get forums private messages (stream)

        Returns a private messages conversations based on filters

        :param text_filter: Apply text filter to search for private messages based on a keyword.
        :type text_filter: str
        :param author: Search for messages authored by given actor user name.
        :type author: str
        :param author_id: Search for messages authored by given actor id.
        :type author_id: str
        :param forum_title: Search for messages in a given forum
        :type forum_title: str
        :param subject: Search text in subjects of Private Messages.
        :type subject: str
        :param recipient: Search messages received by given actor user name.
        :type recipient: str
        :param recipient_id: Search messages received by given actor id.
        :type recipient_id: str
        :param forum_id: Search for messages in a given forum by `forum_id`. `forum_id` will take precedence if used together with the `forum_title` filter
        :type forum_id: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_forums_private_messages_stream_serialize(
            text_filter=text_filter,
            author=author,
            author_id=author_id,
            forum_title=forum_title,
            subject=subject,
            recipient=recipient,
            recipient_id=recipient_id,
            forum_id=forum_id,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ForumsPrivateMessagesStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_forums_private_messages_stream_serialize(
        self,
        text_filter,
        author,
        author_id,
        forum_title,
        subject,
        recipient,
        recipient_id,
        forum_id,
        var_from,
        until,
        size,
        cursor,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if text_filter is not None:
            
            _query_params.append(('text_filter', text_filter))
            
        if author is not None:
            
            _query_params.append(('author', author))
            
        if author_id is not None:
            
            _query_params.append(('author_id', author_id))
            
        if forum_title is not None:
            
            _query_params.append(('forum_title', forum_title))
            
        if subject is not None:
            
            _query_params.append(('subject', subject))
            
        if recipient is not None:
            
            _query_params.append(('recipient', recipient))
            
        if recipient_id is not None:
            
            _query_params.append(('recipient_id', recipient_id))
            
        if forum_id is not None:
            
            _query_params.append(('forum_id', forum_id))
            
        if var_from is not None:
            
            _query_params.append(('from', var_from))
            
        if until is not None:
            
            _query_params.append(('until', until))
            
        if size is not None:
            
            _query_params.append(('size', size))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/forums/private-messages/stream',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_images_image_type_hash_name(
        self,
        image_type: ImageType,
        hash: StrictStr,
        name: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> bytearray:
        """Download image by type hash and name


        :param image_type: (required)
        :type image_type: ImageType
        :param hash: (required)
        :type hash: str
        :param name: (required)
        :type name: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_images_image_type_hash_name_serialize(
            image_type=image_type,
            hash=hash,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "bytearray",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_images_image_type_hash_name_with_http_info(
        self,
        image_type: ImageType,
        hash: StrictStr,
        name: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[bytearray]:
        """Download image by type hash and name


        :param image_type: (required)
        :type image_type: ImageType
        :param hash: (required)
        :type hash: str
        :param name: (required)
        :type name: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_images_image_type_hash_name_serialize(
            image_type=image_type,
            hash=hash,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "bytearray",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_images_image_type_hash_name_without_preload_content(
        self,
        image_type: ImageType,
        hash: StrictStr,
        name: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Download image by type hash and name


        :param image_type: (required)
        :type image_type: ImageType
        :param hash: (required)
        :type hash: str
        :param name: (required)
        :type name: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_images_image_type_hash_name_serialize(
            image_type=image_type,
            hash=hash,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "bytearray",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_images_image_type_hash_name_serialize(
        self,
        image_type,
        hash,
        name,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if image_type is not None:
            _path_params['image_type'] = image_type.value
        if hash is not None:
            _path_params['hash'] = hash
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/octet-stream', 
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/images/{image_type}/{hash}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_messaging_services_messages_message_id(
        self,
        message_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ChatRoomMessageStream:
        """Get a chat message by id

        Return a single chat message by id

        :param message_id: (required)
        :type message_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_messaging_services_messages_message_id_serialize(
            message_id=message_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChatRoomMessageStream",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_messaging_services_messages_message_id_with_http_info(
        self,
        message_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ChatRoomMessageStream]:
        """Get a chat message by id

        Return a single chat message by id

        :param message_id: (required)
        :type message_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_messaging_services_messages_message_id_serialize(
            message_id=message_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChatRoomMessageStream",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_messaging_services_messages_message_id_without_preload_content(
        self,
        message_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get a chat message by id

        Return a single chat message by id

        :param message_id: (required)
        :type message_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_messaging_services_messages_message_id_serialize(
            message_id=message_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChatRoomMessageStream",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_messaging_services_messages_message_id_serialize(
        self,
        message_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if message_id is not None:
            _path_params['message_id'] = message_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/messaging-services/messages/{message_id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_messaging_services_messages_stream(
        self,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search messages based on a keyword")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor user name handle.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor id handle.")] = None,
        server_type: Annotated[Optional[ChatServerTypeStream], Field(description="Filter results based on server type")] = None,
        server_id: Annotated[Optional[StrictStr], Field(description="Search for chat messages by chat server id.")] = None,
        room_id: Annotated[Optional[StrictStr], Field(description="Search for chat messages by chat room id.")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ChatMessagesStreamingPage:
        """Get chat messages (stream)

        Return messages in a chat room

        :param text_filter: Apply text filter to search messages based on a keyword
        :type text_filter: str
        :param author: Search for messages authored by given actor user name handle.
        :type author: str
        :param author_id: Search for messages authored by given actor id handle.
        :type author_id: str
        :param server_type: Filter results based on server type
        :type server_type: ChatServerTypeStream
        :param server_id: Search for chat messages by chat server id.
        :type server_id: str
        :param room_id: Search for chat messages by chat room id.
        :type room_id: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_messaging_services_messages_stream_serialize(
            text_filter=text_filter,
            author=author,
            author_id=author_id,
            server_type=server_type,
            server_id=server_id,
            room_id=room_id,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChatMessagesStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_messaging_services_messages_stream_with_http_info(
        self,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search messages based on a keyword")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor user name handle.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor id handle.")] = None,
        server_type: Annotated[Optional[ChatServerTypeStream], Field(description="Filter results based on server type")] = None,
        server_id: Annotated[Optional[StrictStr], Field(description="Search for chat messages by chat server id.")] = None,
        room_id: Annotated[Optional[StrictStr], Field(description="Search for chat messages by chat room id.")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ChatMessagesStreamingPage]:
        """Get chat messages (stream)

        Return messages in a chat room

        :param text_filter: Apply text filter to search messages based on a keyword
        :type text_filter: str
        :param author: Search for messages authored by given actor user name handle.
        :type author: str
        :param author_id: Search for messages authored by given actor id handle.
        :type author_id: str
        :param server_type: Filter results based on server type
        :type server_type: ChatServerTypeStream
        :param server_id: Search for chat messages by chat server id.
        :type server_id: str
        :param room_id: Search for chat messages by chat room id.
        :type room_id: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_messaging_services_messages_stream_serialize(
            text_filter=text_filter,
            author=author,
            author_id=author_id,
            server_type=server_type,
            server_id=server_id,
            room_id=room_id,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChatMessagesStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_messaging_services_messages_stream_without_preload_content(
        self,
        text_filter: Annotated[Optional[StrictStr], Field(description="Apply text filter to search messages based on a keyword")] = None,
        author: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor user name handle.")] = None,
        author_id: Annotated[Optional[StrictStr], Field(description="Search for messages authored by given actor id handle.")] = None,
        server_type: Annotated[Optional[ChatServerTypeStream], Field(description="Filter results based on server type")] = None,
        server_id: Annotated[Optional[StrictStr], Field(description="Search for chat messages by chat server id.")] = None,
        room_id: Annotated[Optional[StrictStr], Field(description="Search for chat messages by chat room id.")] = None,
        var_from: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        until: Annotated[Optional[StrictInt], Field(description="UNIX timestamp(in milliseconds)")] = None,
        size: Annotated[Optional[StrictInt], Field(description="Range is: [1, 1000]")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Continue scrolling from cursor")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get chat messages (stream)

        Return messages in a chat room

        :param text_filter: Apply text filter to search messages based on a keyword
        :type text_filter: str
        :param author: Search for messages authored by given actor user name handle.
        :type author: str
        :param author_id: Search for messages authored by given actor id handle.
        :type author_id: str
        :param server_type: Filter results based on server type
        :type server_type: ChatServerTypeStream
        :param server_id: Search for chat messages by chat server id.
        :type server_id: str
        :param room_id: Search for chat messages by chat room id.
        :type room_id: str
        :param var_from: UNIX timestamp(in milliseconds)
        :type var_from: int
        :param until: UNIX timestamp(in milliseconds)
        :type until: int
        :param size: Range is: [1, 1000]
        :type size: int
        :param cursor: Continue scrolling from cursor
        :type cursor: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_messaging_services_messages_stream_serialize(
            text_filter=text_filter,
            author=author,
            author_id=author_id,
            server_type=server_type,
            server_id=server_id,
            room_id=room_id,
            var_from=var_from,
            until=until,
            size=size,
            cursor=cursor,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChatMessagesStreamingPage",
            '400': "BadRequest",
            '401': "Unauthorized",
            '403': "Forbidden",
            '404': "NotFound",
            '409': "Conflict",
            '500': "InternalServerError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_messaging_services_messages_stream_serialize(
        self,
        text_filter,
        author,
        author_id,
        server_type,
        server_id,
        room_id,
        var_from,
        until,
        size,
        cursor,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if text_filter is not None:
            
            _query_params.append(('text_filter', text_filter))
            
        if author is not None:
            
            _query_params.append(('author', author))
            
        if author_id is not None:
            
            _query_params.append(('author_id', author_id))
            
        if server_type is not None:
            
            _query_params.append(('server_type', server_type.value))
            
        if server_id is not None:
            
            _query_params.append(('server_id', server_id))
            
        if room_id is not None:
            
            _query_params.append(('room_id', room_id))
            
        if var_from is not None:
            
            _query_params.append(('from', var_from))
            
        if until is not None:
            
            _query_params.append(('until', until))
            
        if size is not None:
            
            _query_params.append(('size', size))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'basicAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/integrations/sources/v1/messaging-services/messages/stream',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


