# coding: utf-8

"""
    Slack Web API

    One way to interact with the Slack platform is its HTTP RPC-based Web API, a collection of methods requiring OAuth 2.0-based user, bot, or workspace tokens blessed with related OAuth scopes.

    The version of the OpenAPI document: 1.7.0
    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, StrictFloat, StrictInt, StrictStr
from typing import Optional, Union
from typing_extensions import Annotated
from slack_beta_ti.models.default_success_template import DefaultSuccessTemplate

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


class FilesRemoteApi:
    """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 files_remote_add(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = None,
        title: Annotated[Optional[StrictStr], Field(description="Title of the file being shared.")] = None,
        filetype: Annotated[Optional[StrictStr], Field(description="type of file")] = None,
        external_url: Annotated[Optional[StrictStr], Field(description="URL of the remote file.")] = None,
        preview_image: Annotated[Optional[StrictStr], Field(description="Preview of the document via `multipart/form-data`.")] = None,
        indexable_file_contents: Annotated[Optional[StrictStr], Field(description="A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.")] = 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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """files_remote_add

        Adds a file from a remote service

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :param title: Title of the file being shared.
        :type title: str
        :param filetype: type of file
        :type filetype: str
        :param external_url: URL of the remote file.
        :type external_url: str
        :param preview_image: Preview of the document via `multipart/form-data`.
        :type preview_image: str
        :param indexable_file_contents: A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
        :type indexable_file_contents: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_add_serialize(
            token=token,
            external_id=external_id,
            title=title,
            filetype=filetype,
            external_url=external_url,
            preview_image=preview_image,
            indexable_file_contents=indexable_file_contents,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_add_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = None,
        title: Annotated[Optional[StrictStr], Field(description="Title of the file being shared.")] = None,
        filetype: Annotated[Optional[StrictStr], Field(description="type of file")] = None,
        external_url: Annotated[Optional[StrictStr], Field(description="URL of the remote file.")] = None,
        preview_image: Annotated[Optional[StrictStr], Field(description="Preview of the document via `multipart/form-data`.")] = None,
        indexable_file_contents: Annotated[Optional[StrictStr], Field(description="A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.")] = 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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """files_remote_add

        Adds a file from a remote service

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :param title: Title of the file being shared.
        :type title: str
        :param filetype: type of file
        :type filetype: str
        :param external_url: URL of the remote file.
        :type external_url: str
        :param preview_image: Preview of the document via `multipart/form-data`.
        :type preview_image: str
        :param indexable_file_contents: A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
        :type indexable_file_contents: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_add_serialize(
            token=token,
            external_id=external_id,
            title=title,
            filetype=filetype,
            external_url=external_url,
            preview_image=preview_image,
            indexable_file_contents=indexable_file_contents,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_add_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = None,
        title: Annotated[Optional[StrictStr], Field(description="Title of the file being shared.")] = None,
        filetype: Annotated[Optional[StrictStr], Field(description="type of file")] = None,
        external_url: Annotated[Optional[StrictStr], Field(description="URL of the remote file.")] = None,
        preview_image: Annotated[Optional[StrictStr], Field(description="Preview of the document via `multipart/form-data`.")] = None,
        indexable_file_contents: Annotated[Optional[StrictStr], Field(description="A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.")] = 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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """files_remote_add

        Adds a file from a remote service

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :param title: Title of the file being shared.
        :type title: str
        :param filetype: type of file
        :type filetype: str
        :param external_url: URL of the remote file.
        :type external_url: str
        :param preview_image: Preview of the document via `multipart/form-data`.
        :type preview_image: str
        :param indexable_file_contents: A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
        :type indexable_file_contents: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_add_serialize(
            token=token,
            external_id=external_id,
            title=title,
            filetype=filetype,
            external_url=external_url,
            preview_image=preview_image,
            indexable_file_contents=indexable_file_contents,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _files_remote_add_serialize(
        self,
        token,
        external_id,
        title,
        filetype,
        external_url,
        preview_image,
        indexable_file_contents,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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
        # process the header parameters
        # process the form parameters
        if token is not None:
            _form_params.append(('token', token))
        if external_id is not None:
            _form_params.append(('external_id', external_id))
        if title is not None:
            _form_params.append(('title', title))
        if filetype is not None:
            _form_params.append(('filetype', filetype))
        if external_url is not None:
            _form_params.append(('external_url', external_url))
        if preview_image is not None:
            _form_params.append(('preview_image', preview_image))
        if indexable_file_contents is not None:
            _form_params.append(('indexable_file_contents', indexable_file_contents))
        # 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'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

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

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/files.remote.add',
            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 files_remote_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:read`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = 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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """files_remote_info

        Retrieve information about a remote file added to Slack

        :param token: Authentication token. Requires scope: `remote_files:read`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_info_serialize(
            token=token,
            file=file,
            external_id=external_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_info_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:read`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = 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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """files_remote_info

        Retrieve information about a remote file added to Slack

        :param token: Authentication token. Requires scope: `remote_files:read`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_info_serialize(
            token=token,
            file=file,
            external_id=external_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_info_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:read`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = 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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """files_remote_info

        Retrieve information about a remote file added to Slack

        :param token: Authentication token. Requires scope: `remote_files:read`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_info_serialize(
            token=token,
            file=file,
            external_id=external_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _files_remote_info_serialize(
        self,
        token,
        file,
        external_id,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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 token is not None:
            
            _query_params.append(('token', token))
            
        if file is not None:
            
            _query_params.append(('file', file))
            
        if external_id is not None:
            
            _query_params.append(('external_id', external_id))
            
        # 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] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/files.remote.info',
            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 files_remote_list(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Filter files appearing in a specific channel, indicated by its ID.")] = None,
        ts_from: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter files created after this timestamp (inclusive).")] = None,
        ts_to: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter files created before this timestamp (inclusive).")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = 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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """files_remote_list

        Retrieve information about a remote file added to Slack

        :param token: Authentication token. Requires scope: `remote_files:read`
        :type token: str
        :param channel: Filter files appearing in a specific channel, indicated by its ID.
        :type channel: str
        :param ts_from: Filter files created after this timestamp (inclusive).
        :type ts_from: float
        :param ts_to: Filter files created before this timestamp (inclusive).
        :type ts_to: float
        :param limit: The maximum number of items to return.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_list_serialize(
            token=token,
            channel=channel,
            ts_from=ts_from,
            ts_to=ts_to,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_list_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Filter files appearing in a specific channel, indicated by its ID.")] = None,
        ts_from: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter files created after this timestamp (inclusive).")] = None,
        ts_to: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter files created before this timestamp (inclusive).")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = 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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """files_remote_list

        Retrieve information about a remote file added to Slack

        :param token: Authentication token. Requires scope: `remote_files:read`
        :type token: str
        :param channel: Filter files appearing in a specific channel, indicated by its ID.
        :type channel: str
        :param ts_from: Filter files created after this timestamp (inclusive).
        :type ts_from: float
        :param ts_to: Filter files created before this timestamp (inclusive).
        :type ts_to: float
        :param limit: The maximum number of items to return.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_list_serialize(
            token=token,
            channel=channel,
            ts_from=ts_from,
            ts_to=ts_to,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_list_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Filter files appearing in a specific channel, indicated by its ID.")] = None,
        ts_from: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter files created after this timestamp (inclusive).")] = None,
        ts_to: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter files created before this timestamp (inclusive).")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = 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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """files_remote_list

        Retrieve information about a remote file added to Slack

        :param token: Authentication token. Requires scope: `remote_files:read`
        :type token: str
        :param channel: Filter files appearing in a specific channel, indicated by its ID.
        :type channel: str
        :param ts_from: Filter files created after this timestamp (inclusive).
        :type ts_from: float
        :param ts_to: Filter files created before this timestamp (inclusive).
        :type ts_to: float
        :param limit: The maximum number of items to return.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_list_serialize(
            token=token,
            channel=channel,
            ts_from=ts_from,
            ts_to=ts_to,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _files_remote_list_serialize(
        self,
        token,
        channel,
        ts_from,
        ts_to,
        limit,
        cursor,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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 token is not None:
            
            _query_params.append(('token', token))
            
        if channel is not None:
            
            _query_params.append(('channel', channel))
            
        if ts_from is not None:
            
            _query_params.append(('ts_from', ts_from))
            
        if ts_to is not None:
            
            _query_params.append(('ts_to', ts_to))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        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] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/files.remote.list',
            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 files_remote_remove(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = 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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """files_remote_remove

        Remove a remote file.

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_remove_serialize(
            token=token,
            file=file,
            external_id=external_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_remove_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = 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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """files_remote_remove

        Remove a remote file.

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_remove_serialize(
            token=token,
            file=file,
            external_id=external_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_remove_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = 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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """files_remote_remove

        Remove a remote file.

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_remove_serialize(
            token=token,
            file=file,
            external_id=external_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _files_remote_remove_serialize(
        self,
        token,
        file,
        external_id,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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
        # process the header parameters
        # process the form parameters
        if token is not None:
            _form_params.append(('token', token))
        if file is not None:
            _form_params.append(('file', file))
        if external_id is not None:
            _form_params.append(('external_id', external_id))
        # 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'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

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

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/files.remote.remove',
            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 files_remote_share(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:share`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack.  Either this field or `file` or both are required.")] = None,
        channels: Annotated[Optional[StrictStr], Field(description="Comma-separated list of channel IDs where the file will be shared.")] = 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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """files_remote_share

        Share a remote file into a channel.

        :param token: Authentication token. Requires scope: `remote_files:share`
        :type token: str
        :param file: Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.
        :type file: str
        :param external_id: The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack.  Either this field or `file` or both are required.
        :type external_id: str
        :param channels: Comma-separated list of channel IDs where the file will be shared.
        :type channels: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_share_serialize(
            token=token,
            file=file,
            external_id=external_id,
            channels=channels,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_share_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:share`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack.  Either this field or `file` or both are required.")] = None,
        channels: Annotated[Optional[StrictStr], Field(description="Comma-separated list of channel IDs where the file will be shared.")] = 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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """files_remote_share

        Share a remote file into a channel.

        :param token: Authentication token. Requires scope: `remote_files:share`
        :type token: str
        :param file: Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.
        :type file: str
        :param external_id: The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack.  Either this field or `file` or both are required.
        :type external_id: str
        :param channels: Comma-separated list of channel IDs where the file will be shared.
        :type channels: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_share_serialize(
            token=token,
            file=file,
            external_id=external_id,
            channels=channels,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_share_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:share`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack.  Either this field or `file` or both are required.")] = None,
        channels: Annotated[Optional[StrictStr], Field(description="Comma-separated list of channel IDs where the file will be shared.")] = 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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """files_remote_share

        Share a remote file into a channel.

        :param token: Authentication token. Requires scope: `remote_files:share`
        :type token: str
        :param file: Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.
        :type file: str
        :param external_id: The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack.  Either this field or `file` or both are required.
        :type external_id: str
        :param channels: Comma-separated list of channel IDs where the file will be shared.
        :type channels: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_share_serialize(
            token=token,
            file=file,
            external_id=external_id,
            channels=channels,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _files_remote_share_serialize(
        self,
        token,
        file,
        external_id,
        channels,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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 token is not None:
            
            _query_params.append(('token', token))
            
        if file is not None:
            
            _query_params.append(('file', file))
            
        if external_id is not None:
            
            _query_params.append(('external_id', external_id))
            
        if channels is not None:
            
            _query_params.append(('channels', channels))
            
        # 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] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/files.remote.share',
            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 files_remote_update(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = None,
        title: Annotated[Optional[StrictStr], Field(description="Title of the file being shared.")] = None,
        filetype: Annotated[Optional[StrictStr], Field(description="type of file")] = None,
        external_url: Annotated[Optional[StrictStr], Field(description="URL of the remote file.")] = None,
        preview_image: Annotated[Optional[StrictStr], Field(description="Preview of the document via `multipart/form-data`.")] = None,
        indexable_file_contents: Annotated[Optional[StrictStr], Field(description="File containing contents that can be used to improve searchability for the remote file.")] = 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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """files_remote_update

        Updates an existing remote file.

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :param title: Title of the file being shared.
        :type title: str
        :param filetype: type of file
        :type filetype: str
        :param external_url: URL of the remote file.
        :type external_url: str
        :param preview_image: Preview of the document via `multipart/form-data`.
        :type preview_image: str
        :param indexable_file_contents: File containing contents that can be used to improve searchability for the remote file.
        :type indexable_file_contents: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_update_serialize(
            token=token,
            file=file,
            external_id=external_id,
            title=title,
            filetype=filetype,
            external_url=external_url,
            preview_image=preview_image,
            indexable_file_contents=indexable_file_contents,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_update_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = None,
        title: Annotated[Optional[StrictStr], Field(description="Title of the file being shared.")] = None,
        filetype: Annotated[Optional[StrictStr], Field(description="type of file")] = None,
        external_url: Annotated[Optional[StrictStr], Field(description="URL of the remote file.")] = None,
        preview_image: Annotated[Optional[StrictStr], Field(description="Preview of the document via `multipart/form-data`.")] = None,
        indexable_file_contents: Annotated[Optional[StrictStr], Field(description="File containing contents that can be used to improve searchability for the remote file.")] = 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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """files_remote_update

        Updates an existing remote file.

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :param title: Title of the file being shared.
        :type title: str
        :param filetype: type of file
        :type filetype: str
        :param external_url: URL of the remote file.
        :type external_url: str
        :param preview_image: Preview of the document via `multipart/form-data`.
        :type preview_image: str
        :param indexable_file_contents: File containing contents that can be used to improve searchability for the remote file.
        :type indexable_file_contents: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_update_serialize(
            token=token,
            file=file,
            external_id=external_id,
            title=title,
            filetype=filetype,
            external_url=external_url,
            preview_image=preview_image,
            indexable_file_contents=indexable_file_contents,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 files_remote_update_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `remote_files:write`")] = None,
        file: Annotated[Optional[StrictStr], Field(description="Specify a file by providing its ID.")] = None,
        external_id: Annotated[Optional[StrictStr], Field(description="Creator defined GUID for the file.")] = None,
        title: Annotated[Optional[StrictStr], Field(description="Title of the file being shared.")] = None,
        filetype: Annotated[Optional[StrictStr], Field(description="type of file")] = None,
        external_url: Annotated[Optional[StrictStr], Field(description="URL of the remote file.")] = None,
        preview_image: Annotated[Optional[StrictStr], Field(description="Preview of the document via `multipart/form-data`.")] = None,
        indexable_file_contents: Annotated[Optional[StrictStr], Field(description="File containing contents that can be used to improve searchability for the remote file.")] = 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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """files_remote_update

        Updates an existing remote file.

        :param token: Authentication token. Requires scope: `remote_files:write`
        :type token: str
        :param file: Specify a file by providing its ID.
        :type file: str
        :param external_id: Creator defined GUID for the file.
        :type external_id: str
        :param title: Title of the file being shared.
        :type title: str
        :param filetype: type of file
        :type filetype: str
        :param external_url: URL of the remote file.
        :type external_url: str
        :param preview_image: Preview of the document via `multipart/form-data`.
        :type preview_image: str
        :param indexable_file_contents: File containing contents that can be used to improve searchability for the remote file.
        :type indexable_file_contents: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._files_remote_update_serialize(
            token=token,
            file=file,
            external_id=external_id,
            title=title,
            filetype=filetype,
            external_url=external_url,
            preview_image=preview_image,
            indexable_file_contents=indexable_file_contents,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _files_remote_update_serialize(
        self,
        token,
        file,
        external_id,
        title,
        filetype,
        external_url,
        preview_image,
        indexable_file_contents,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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
        # process the header parameters
        # process the form parameters
        if token is not None:
            _form_params.append(('token', token))
        if file is not None:
            _form_params.append(('file', file))
        if external_id is not None:
            _form_params.append(('external_id', external_id))
        if title is not None:
            _form_params.append(('title', title))
        if filetype is not None:
            _form_params.append(('filetype', filetype))
        if external_url is not None:
            _form_params.append(('external_url', external_url))
        if preview_image is not None:
            _form_params.append(('preview_image', preview_image))
        if indexable_file_contents is not None:
            _form_params.append(('indexable_file_contents', indexable_file_contents))
        # 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'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

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

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/files.remote.update',
            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__
        )


