# This file was auto-generated by Fern from our API Definition.

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.file_assets_with_includes_response import FileAssetsWithIncludesResponse
from ..types.file_copy_response import FileCopyResponse
from ..types.file_remote_upload_response import FileRemoteUploadResponse
from ..types.file_response import FileResponse
from ..types.file_upload_status_response import FileUploadStatusResponse
from ..types.file_with_includes_response import FileWithIncludesResponse
from ..types.file_with_upload_urls_response import FileWithUploadUrlsResponse
from ..types.include_total_count import IncludeTotalCount
from ..types.request_after_opaque_cursor import RequestAfterOpaqueCursor
from ..types.request_page_size import RequestPageSize
from ..types.uuid_ import Uuid
from .raw_client import AsyncRawFilesClient, RawFilesClient
from .types.file_copy_params_data import FileCopyParamsData
from .types.file_create_local_upload_params_data import FileCreateLocalUploadParamsData
from .types.file_create_params_data import FileCreateParamsData
from .types.file_create_remote_upload_params_data import FileCreateRemoteUploadParamsData
from .types.file_move_params_data import FileMoveParamsData
from .types.file_update_params_data import FileUpdateParamsData
from .types.files_copy_request_copy_comments import FilesCopyRequestCopyComments
from .types.files_list_request_include import FilesListRequestInclude
from .types.files_list_request_sort import FilesListRequestSort
from .types.files_show_request_include import FilesShowRequestInclude

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class FilesClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawFilesClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawFilesClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawFilesClient
        """
        return self._raw_client

    def list(
        self,
        account_id: Uuid,
        folder_id: Uuid,
        *,
        include: typing.Optional[FilesListRequestInclude] = None,
        sort: typing.Optional[FilesListRequestSort] = None,
        after: typing.Optional[RequestAfterOpaqueCursor] = None,
        page_size: typing.Optional[RequestPageSize] = None,
        include_total_count: typing.Optional[IncludeTotalCount] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileAssetsWithIncludesResponse:
        """
        List files in a given folder. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        folder_id : Uuid


        include : typing.Optional[FilesListRequestInclude]


        sort : typing.Optional[FilesListRequestSort]
            Sort files by query params

        after : typing.Optional[RequestAfterOpaqueCursor]
            Opaque Cursor query param for requests returning paginated results.
            <br/>
            NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.

        page_size : typing.Optional[RequestPageSize]


        include_total_count : typing.Optional[IncludeTotalCount]


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileAssetsWithIncludesResponse
            OK

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.list(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            folder_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            include="media_links",
            sort="name_asc",
            after="<opaque_cursor>",
            page_size=10,
            include_total_count=False,
        )
        """
        _response = self._raw_client.list(
            account_id,
            folder_id,
            include=include,
            sort=sort,
            after=after,
            page_size=page_size,
            include_total_count=include_total_count,
            request_options=request_options,
        )
        return _response.data

    def create(
        self,
        account_id: Uuid,
        folder_id: Uuid,
        *,
        data: FileCreateParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileWithUploadUrlsResponse:
        """
        Create new file under parent folder. `Create file (local upload)` and `Create file (remote upload)` have replaced this endpoint. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        folder_id : Uuid


        data : FileCreateParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileWithUploadUrlsResponse
            Created

        Examples
        --------
        from frameio import Frameio
        from frameio.files import FileCreateParamsData

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.create(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            folder_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=FileCreateParamsData(
                file_size=1137444,
                media_type="image/png",
                name="asset.png",
            ),
        )
        """
        _response = self._raw_client.create(account_id, folder_id, data=data, request_options=request_options)
        return _response.data

    def show(
        self,
        account_id: Uuid,
        file_id: Uuid,
        *,
        include: typing.Optional[FilesShowRequestInclude] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileWithIncludesResponse:
        """
        Show file details.
        <br>
        Use the `include` query parameter to selectively include additional properties in the response.
        <br>
        Note: if you include `media_links.original` and the user does not have permission to download the file
        then this endpoint will respond with a `403 Forbidden` error. If the content is inaccessible because
        watermarking is required for this user and isn't supported by the requested media_links, then the request will
        succeed but the unsupported media links will be set to null.
        Similarly, if a requested transcode link does not exist for a particular file (e.g. including
        `media_links.video_h264_180` on a static image file) or transoding process hasn't completed
        (i.e. the file's `status` is "uploaded" rather than "transcoded"), then the link will also be set to null in
        the response payload. In short, the client must handle null media links gracefully.
        <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        include : typing.Optional[FilesShowRequestInclude]


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileWithIncludesResponse
            OK

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.show(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            include="media_links",
        )
        """
        _response = self._raw_client.show(account_id, file_id, include=include, request_options=request_options)
        return _response.data

    def delete(
        self, account_id: Uuid, file_id: Uuid, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Delete file by ID. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.delete(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
        )
        """
        _response = self._raw_client.delete(account_id, file_id, request_options=request_options)
        return _response.data

    def update(
        self,
        account_id: Uuid,
        file_id: Uuid,
        *,
        data: FileUpdateParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileResponse:
        """
        Update file details. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        data : FileUpdateParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileResponse
            OK

        Examples
        --------
        from frameio import Frameio
        from frameio.files import FileUpdateParamsData

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.update(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=FileUpdateParamsData(
                name="asset.png",
            ),
        )
        """
        _response = self._raw_client.update(account_id, file_id, data=data, request_options=request_options)
        return _response.data

    def copy(
        self,
        account_id: Uuid,
        file_id: Uuid,
        *,
        copy_metadata: typing.Optional[bool] = None,
        copy_comments: typing.Optional[FilesCopyRequestCopyComments] = None,
        data: typing.Optional[FileCopyParamsData] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileCopyResponse:
        """
        Copy file. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        copy_metadata : typing.Optional[bool]
            Whether to copy metadata values along with the file

        copy_comments : typing.Optional[FilesCopyRequestCopyComments]
            Which comments to copy along with the file

        data : typing.Optional[FileCopyParamsData]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileCopyResponse
            OK

        Examples
        --------
        from frameio import Frameio
        from frameio.files import FileCopyParamsData

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.copy(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            copy_metadata=True,
            copy_comments="none",
            data=FileCopyParamsData(
                parent_id="2e426fe0-f965-4594-8b2b-b4dff1dc00ec",
            ),
        )
        """
        _response = self._raw_client.copy(
            account_id,
            file_id,
            copy_metadata=copy_metadata,
            copy_comments=copy_comments,
            data=data,
            request_options=request_options,
        )
        return _response.data

    def create_remote_upload(
        self,
        account_id: Uuid,
        folder_id: Uuid,
        *,
        data: FileCreateRemoteUploadParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileRemoteUploadResponse:
        """
        Create new file under parent folder through remote upload. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        folder_id : Uuid


        data : FileCreateRemoteUploadParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileRemoteUploadResponse
            Accepted

        Examples
        --------
        from frameio import Frameio
        from frameio.files import FileCreateRemoteUploadParamsData

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.create_remote_upload(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            folder_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=FileCreateRemoteUploadParamsData(
                name="asset.png",
                source_url="https://upload.wikimedia.org/wikipedia/commons/e/e1/White_Pixel_1x1.png",
            ),
        )
        """
        _response = self._raw_client.create_remote_upload(
            account_id, folder_id, data=data, request_options=request_options
        )
        return _response.data

    def move(
        self,
        account_id: Uuid,
        file_id: Uuid,
        *,
        data: FileMoveParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileResponse:
        """
        Move file to a folder or version_stack. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        data : FileMoveParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileResponse
            OK

        Examples
        --------
        from frameio import Frameio
        from frameio.files import FileMoveParamsData

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.move(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=FileMoveParamsData(
                parent_id="2e426fe0-f965-4594-8b2b-b4dff1dc00ec",
            ),
        )
        """
        _response = self._raw_client.move(account_id, file_id, data=data, request_options=request_options)
        return _response.data

    def create_local_upload(
        self,
        account_id: Uuid,
        folder_id: Uuid,
        *,
        data: FileCreateLocalUploadParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileWithUploadUrlsResponse:
        """
        Create new file under parent folder through local upload. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        folder_id : Uuid


        data : FileCreateLocalUploadParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileWithUploadUrlsResponse
            Created

        Examples
        --------
        from frameio import Frameio
        from frameio.files import FileCreateLocalUploadParamsData

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.create_local_upload(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            folder_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=FileCreateLocalUploadParamsData(
                file_size=1137444,
                name="asset.png",
            ),
        )
        """
        _response = self._raw_client.create_local_upload(
            account_id, folder_id, data=data, request_options=request_options
        )
        return _response.data

    def show_file_upload_status(
        self, account_id: Uuid, file_id: Uuid, *, request_options: typing.Optional[RequestOptions] = None
    ) -> FileUploadStatusResponse:
        """
        Show file upload status details. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileUploadStatusResponse
            OK

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.files.show_file_upload_status(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
        )
        """
        _response = self._raw_client.show_file_upload_status(account_id, file_id, request_options=request_options)
        return _response.data


class AsyncFilesClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawFilesClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawFilesClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawFilesClient
        """
        return self._raw_client

    async def list(
        self,
        account_id: Uuid,
        folder_id: Uuid,
        *,
        include: typing.Optional[FilesListRequestInclude] = None,
        sort: typing.Optional[FilesListRequestSort] = None,
        after: typing.Optional[RequestAfterOpaqueCursor] = None,
        page_size: typing.Optional[RequestPageSize] = None,
        include_total_count: typing.Optional[IncludeTotalCount] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileAssetsWithIncludesResponse:
        """
        List files in a given folder. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        folder_id : Uuid


        include : typing.Optional[FilesListRequestInclude]


        sort : typing.Optional[FilesListRequestSort]
            Sort files by query params

        after : typing.Optional[RequestAfterOpaqueCursor]
            Opaque Cursor query param for requests returning paginated results.
            <br/>
            NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.

        page_size : typing.Optional[RequestPageSize]


        include_total_count : typing.Optional[IncludeTotalCount]


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileAssetsWithIncludesResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.list(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                folder_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                include="media_links",
                sort="name_asc",
                after="<opaque_cursor>",
                page_size=10,
                include_total_count=False,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.list(
            account_id,
            folder_id,
            include=include,
            sort=sort,
            after=after,
            page_size=page_size,
            include_total_count=include_total_count,
            request_options=request_options,
        )
        return _response.data

    async def create(
        self,
        account_id: Uuid,
        folder_id: Uuid,
        *,
        data: FileCreateParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileWithUploadUrlsResponse:
        """
        Create new file under parent folder. `Create file (local upload)` and `Create file (remote upload)` have replaced this endpoint. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        folder_id : Uuid


        data : FileCreateParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileWithUploadUrlsResponse
            Created

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.files import FileCreateParamsData

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.create(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                folder_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=FileCreateParamsData(
                    file_size=1137444,
                    media_type="image/png",
                    name="asset.png",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create(account_id, folder_id, data=data, request_options=request_options)
        return _response.data

    async def show(
        self,
        account_id: Uuid,
        file_id: Uuid,
        *,
        include: typing.Optional[FilesShowRequestInclude] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileWithIncludesResponse:
        """
        Show file details.
        <br>
        Use the `include` query parameter to selectively include additional properties in the response.
        <br>
        Note: if you include `media_links.original` and the user does not have permission to download the file
        then this endpoint will respond with a `403 Forbidden` error. If the content is inaccessible because
        watermarking is required for this user and isn't supported by the requested media_links, then the request will
        succeed but the unsupported media links will be set to null.
        Similarly, if a requested transcode link does not exist for a particular file (e.g. including
        `media_links.video_h264_180` on a static image file) or transoding process hasn't completed
        (i.e. the file's `status` is "uploaded" rather than "transcoded"), then the link will also be set to null in
        the response payload. In short, the client must handle null media links gracefully.
        <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        include : typing.Optional[FilesShowRequestInclude]


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileWithIncludesResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.show(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                include="media_links",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.show(account_id, file_id, include=include, request_options=request_options)
        return _response.data

    async def delete(
        self, account_id: Uuid, file_id: Uuid, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Delete file by ID. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.delete(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.delete(account_id, file_id, request_options=request_options)
        return _response.data

    async def update(
        self,
        account_id: Uuid,
        file_id: Uuid,
        *,
        data: FileUpdateParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileResponse:
        """
        Update file details. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        data : FileUpdateParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.files import FileUpdateParamsData

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.update(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=FileUpdateParamsData(
                    name="asset.png",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.update(account_id, file_id, data=data, request_options=request_options)
        return _response.data

    async def copy(
        self,
        account_id: Uuid,
        file_id: Uuid,
        *,
        copy_metadata: typing.Optional[bool] = None,
        copy_comments: typing.Optional[FilesCopyRequestCopyComments] = None,
        data: typing.Optional[FileCopyParamsData] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileCopyResponse:
        """
        Copy file. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        copy_metadata : typing.Optional[bool]
            Whether to copy metadata values along with the file

        copy_comments : typing.Optional[FilesCopyRequestCopyComments]
            Which comments to copy along with the file

        data : typing.Optional[FileCopyParamsData]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileCopyResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.files import FileCopyParamsData

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.copy(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                copy_metadata=True,
                copy_comments="none",
                data=FileCopyParamsData(
                    parent_id="2e426fe0-f965-4594-8b2b-b4dff1dc00ec",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.copy(
            account_id,
            file_id,
            copy_metadata=copy_metadata,
            copy_comments=copy_comments,
            data=data,
            request_options=request_options,
        )
        return _response.data

    async def create_remote_upload(
        self,
        account_id: Uuid,
        folder_id: Uuid,
        *,
        data: FileCreateRemoteUploadParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileRemoteUploadResponse:
        """
        Create new file under parent folder through remote upload. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        folder_id : Uuid


        data : FileCreateRemoteUploadParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileRemoteUploadResponse
            Accepted

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.files import FileCreateRemoteUploadParamsData

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.create_remote_upload(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                folder_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=FileCreateRemoteUploadParamsData(
                    name="asset.png",
                    source_url="https://upload.wikimedia.org/wikipedia/commons/e/e1/White_Pixel_1x1.png",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_remote_upload(
            account_id, folder_id, data=data, request_options=request_options
        )
        return _response.data

    async def move(
        self,
        account_id: Uuid,
        file_id: Uuid,
        *,
        data: FileMoveParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileResponse:
        """
        Move file to a folder or version_stack. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        data : FileMoveParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.files import FileMoveParamsData

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.move(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=FileMoveParamsData(
                    parent_id="2e426fe0-f965-4594-8b2b-b4dff1dc00ec",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.move(account_id, file_id, data=data, request_options=request_options)
        return _response.data

    async def create_local_upload(
        self,
        account_id: Uuid,
        folder_id: Uuid,
        *,
        data: FileCreateLocalUploadParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> FileWithUploadUrlsResponse:
        """
        Create new file under parent folder through local upload. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        folder_id : Uuid


        data : FileCreateLocalUploadParamsData

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileWithUploadUrlsResponse
            Created

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.files import FileCreateLocalUploadParamsData

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.create_local_upload(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                folder_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=FileCreateLocalUploadParamsData(
                    file_size=1137444,
                    name="asset.png",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_local_upload(
            account_id, folder_id, data=data, request_options=request_options
        )
        return _response.data

    async def show_file_upload_status(
        self, account_id: Uuid, file_id: Uuid, *, request_options: typing.Optional[RequestOptions] = None
    ) -> FileUploadStatusResponse:
        """
        Show file upload status details. <br>Rate Limits: 5 calls per 1 second(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        file_id : Uuid


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        FileUploadStatusResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.files.show_file_upload_status(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                file_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.show_file_upload_status(account_id, file_id, request_options=request_options)
        return _response.data
