o
    |!g                     @   s6  d dl Zd dlZd dlZd dlmZ ddlmZ ddl	m
Z
mZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z! zd dl"Z"e"j#$droe%d dl&m'Z" W n e%y   d dl"Z"Y nw e(ej)dZ*G dd dZ+G dd dZ,dS )    N)JSONDecodeError   )ApiError)AsyncClientWrapperSyncClientWrapper)jsonable_encoder)remove_none_from_dict)UnprocessableEntityError)File)HttpValidationError)PageFigureMetadata)PageScreenshotMetadata)PresignedUrl   )"FileCreateFromUrlResourceInfoValue)FileCreatePermissionInfoValue)FileCreateResourceInfoValuez1..c                   @     e Zd ZdefddZddddedeje deje d	efd
dZ	ddddedeje deje d	dfddZ
ddddeje deje d	eje fddZdddddeje deje deje dejd	ef
ddZdddeeeeeed	deje deje deje dedeje deje dejej dejejeeje f  dejejeeje f  deje d	efddZddddeje deje d	eje fdd Zddeeeeeed!deje deje deje d"ed#eje d$ejejeeje f  d%eje d&eje dejejeeje f  d	efd'd(Zdddd)dedeje deje deje d	ef
d*d+Zddddedeje deje d	eje fd,d-Zdddded.edeje deje d	ejf
d/d0Z ddddedeje deje d	eje! fd1d2Z"dddded.edeje deje d	eje! f
d3d4Z#dddded.ed5edeje deje d	ejfd6d7Z$dS )8FilesClientclient_wrapperc                C   
   || _ d S N_client_wrapperselfr    r   d/mnt/skqttb/ctump_chatbot/chatbot/lib/python3.10/site-packages/llama_cloud/resources/files/client.py__init__#      
zFilesClient.__init__N
project_idorganization_ididr!   r"   returnc                C   s   | j jjdtj| j   dd| t||d| j  dd}d|j	  kr-dk r7n nt
t| S |j	d	krFtt
t| z| }W n ty[   t|j	|jd
w t|j	|d
)a  
        Read File metadata objects.

        Parameters:
            - id: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.get_file(
            id="string",
        )
        GET/api/v1/files/r    <   paramsheaderstimeout   ,    status_codebodyr   httpx_clientrequesturllibparseurljoinget_base_urlr   get_headersr1   pydanticparse_obj_asr
   jsonr	   r   r   r   textr   r#   r!   r"   	_response_response_jsonr   r   r   get_file&   s"   
zFilesClient.get_filec                C   s   | j jjdtj| j   dd| t||d| j  dd}d|j	  kr.dk r/d	S  |j	d
kr>t
tt| z| }W n tyS   t|j	|jdw t|j	|d)a  
        Delete the file from S3.

        Parameters:
            - id: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.delete_file(
            id="string",
        )
        DELETEr&   r'   r    r(   r)   r-   r.   Nr/   r0   r   r4   r5   r6   r7   r8   r9   r   r:   r1   r	   r;   r<   r   r=   r   r   r>   r?   r   r   r   delete_fileM   s$   
zFilesClient.delete_filec                C      | j jjdtj| j   ddt||d| j  dd}d|j	  kr*dk r7n nt
tjt | S |j	d	krFtt
t| z| }W n ty[   t|j	|jd
w t|j	|d
)aP  
        Read File metadata objects.

        Parameters:
            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.list_files()
        r%   r&   api/v1/filesr    r(   r)   r-   r.   r/   r0   r   r4   r5   r6   r7   r8   r9   r   r:   r1   r;   r<   typingListr
   r=   r	   r   r   r   r>   r   r!   r"   r@   rA   r   r   r   
list_filest   "   
zFilesClient.list_filesexternal_file_idr!   r"   rO   upload_filec             	   C   s   | j jjdtj| j   ddt|||dti d|i| j 	 dd}d|j
  kr1d	k r;n ntt| S |j
d
krJttt| z| }W n ty_   t|j
|jdw t|j
|d)
        Upload a file to S3.

        Parameters:
            - external_file_id: typing.Optional[str].

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].

            - upload_file: typing.IO.
        POSTr&   rG   rN   rP   r(   r*   datafilesr+   r,   r-   r.   r/   r0   r   r4   r5   r6   r7   r8   r9   r   r   r:   r1   r;   r<   r
   r=   r	   r   r   r   r>   r   rO   r!   r"   rP   r@   rA   r   r   r   rP      s*   

zFilesClient.upload_file	expires_at_secondsr!   r"   rO   	file_sizelast_modified_atresource_infopermission_infodata_source_idrY   namerZ   r[   r\   r]   r^   c       
         C   s0  d|i}|t ur||d< |t ur||d< |t ur||d< |t ur$||d< |	t ur,|	|d< |
t ur4|
|d< | jjjdtj| j  d	d
t|||dt	|| j
 dd}d|j  krbdk rln ntt| S |jdkr{ttt| z| }W n ty   t|j|jdw t|j|d)a  
        Create a presigned url for uploading a file.

        Parameters:
            - expires_at_seconds: typing.Optional[int].

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].

            - name: str.

            - external_file_id: typing.Optional[str].

            - file_size: typing.Optional[int].

            - last_modified_at: typing.Optional[dt.datetime].

            - resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateResourceInfoValue]]].

            - permission_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreatePermissionInfoValue]]].

            - data_source_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.generate_presigned_url(
            name="string",
        )
        r_   rO   rZ   r[   r\   r]   r^   PUTr&   rG   rY   r!   r"   r(   r*   r=   r+   r,   r-   r.   r/   r0   OMITr   r4   r5   r6   r7   r8   r9   r   r   r:   r1   r;   r<   r   r=   r	   r   r   r   r>   r   rY   r!   r"   r_   rO   rZ   r[   r\   r]   r^   _requestr@   rA   r   r   r   generate_presigned_url   sB   /


z"FilesClient.generate_presigned_urlc                C   rF   )ay  
        Sync Files API against file contents uploaded via S3 presigned urls.

        Parameters:
            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.sync_files()
        r`   r&   api/v1/files/syncr    r(   r)   r-   r.   r/   r0   rH   rK   r   r   r   
sync_files  rM   zFilesClient.sync_filesr!   r"   r_   	proxy_urlrequest_headers
verify_sslfollow_redirectsr\   urlrk   rl   rm   rn   c       	         C   s.  d|i}
|t ur||
d< |t ur||
d< |t ur||
d< |t ur$||
d< |t ur,||
d< |	t ur4|	|
d< | jjjdtj| j  d	d
t||dt	|
| j
 dd}d|j  kradk rkn ntt| S |jdkrzttt| z| }W n ty   t|j|jdw t|j|d)a  
        Upload a file to S3 from a URL.

        Parameters:
            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].

            - name: typing.Optional[str].

            - url: str. URL of the file to download

            - proxy_url: typing.Optional[str].

            - request_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]].

            - verify_ssl: typing.Optional[bool]. Whether to verify the SSL certificate when downloading the file

            - follow_redirects: typing.Optional[bool]. Whether to follow redirects when downloading the file

            - resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateFromUrlResourceInfoValue]]].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.upload_file_from_url(
            url="string",
        )
        ro   r_   rk   rl   rm   rn   r\   r`   r&   api/v1/files/upload_from_urlr    r(   rb   r-   r.   r/   r0   rd   r   r4   r5   r6   r7   r8   r9   r   r   r:   r1   r;   r<   r
   r=   r	   r   r   r   r>   r   r!   r"   r_   ro   rk   rl   rm   rn   r\   rf   r@   rA   r   r   r   upload_file_from_url3  s>   ,
z FilesClient.upload_file_from_urlra   c                C   s   | j jjdtj| j   dd| dt|||d| j  dd}d|j	  kr/d	k r9n nt
t| S |j	d
krHtt
t| z| }W n ty]   t|j	|jdw t|j	|d)a  
        Returns a presigned url to read the file content.

        Parameters:
            - id: str.

            - expires_at_seconds: typing.Optional[int].

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.read_file_content(
            id="string",
        )
        r%   r&   r'   /contentra   r(   r)   r-   r.   r/   r0   r   r4   r5   r6   r7   r8   r9   r   r:   r1   r;   r<   r   r=   r	   r   r   r   r>   r   r#   rY   r!   r"   r@   rA   r   r   r   read_file_content~  s&    
	
zFilesClient.read_file_contentc                C      | j jjdtj| j   dd| dt||d| j  dd}d|j	  kr.d	k r;n nt
tjt | S |j	d
krJtt
t| z| }W n ty_   t|j	|jdw t|j	|d)a  
        List metadata for all screenshots of pages from a file.

        Parameters:
            - id: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.list_file_page_screenshots(
            id="string",
        )
        r%   r&   r'   /page_screenshotsr    r(   r)   r-   r.   r/   r0   r   r4   r5   r6   r7   r8   r9   r   r:   r1   r;   r<   rI   rJ   r   r=   r	   r   r   r   r>   r?   r   r   r   list_file_page_screenshots  s"    
z&FilesClient.list_file_page_screenshots
page_indexc             	   C   s   | j jjdtj| j   dd| d| t||d| j  dd}d|j	  kr0d	k r;n n	t
tj| S |j	d
krJtt
t| z| }W n ty_   t|j	|jdw t|j	|d)a  
        Get screenshot of a page from a file.

        Parameters:
            - id: str.

            - page_index: int.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.get_file_page_screenshot(
            id="string",
            page_index=1,
        )
        r%   r&   r'   /page_screenshots/r    r(   r)   r-   r.   r/   r0   r   r4   r5   r6   r7   r8   r9   r   r:   r1   r;   r<   rI   Anyr=   r	   r   r   r   r>   r   r#   r|   r!   r"   r@   rA   r   r   r   get_file_page_screenshot  s&   	
z$FilesClient.get_file_page_screenshotc                C   rx   )ar  
        Parameters:
            - id: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.list_file_pages_figures(
            id="string",
        )
        r%   r&   r'   /page-figuresr    r(   r)   r-   r.   r/   r0   r   r4   r5   r6   r7   r8   r9   r   r:   r1   r;   r<   rI   rJ   r   r=   r	   r   r   r   r>   r?   r   r   r   list_file_pages_figures  s"    
z#FilesClient.list_file_pages_figuresc             	   C   s   | j jjdtj| j   dd| d| t||d| j  dd}d|j	  kr0d	k r=n nt
tjt | S |j	d
krLtt
t| z| }W n tya   t|j	|jdw t|j	|d)a  
        Parameters:
            - id: str.

            - page_index: int.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.list_file_page_figures(
            id="string",
            page_index=1,
        )
        r%   r&   r'   /page-figures/r    r(   r)   r-   r.   r/   r0   r   r   r   r   r   list_file_page_figures+  s&   	
z"FilesClient.list_file_page_figuresfigure_namec                C   s   | j jjdtj| j   dd| d| d| t||d| j  dd}d|j	  kr3d	k r>n n	t
tj| S |j	d
krMtt
t| z| }W n tyb   t|j	|jdw t|j	|d)a  
        Parameters:
            - id: str.

            - page_index: int.

            - figure_name: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.files.get_file_page_figure(
            id="string",
            page_index=1,
            figure_name="string",
        )
        r%   r&   r'   r   r    r(   r)   r-   r.   r/   r0   r~   r   r#   r|   r   r!   r"   r@   rA   r   r   r   get_file_page_figureZ  s&    "	
z FilesClient.get_file_page_figure)%__name__
__module____qualname__r   r   strrI   Optionalr
   rB   rE   rJ   rL   IOrP   rd   intdtdatetimeDictr   r   r   rg   ri   boolr   rs   rw   r   r{   r   r   r   r   r   r   r   r   r   r   r   "   x   
(
(
&
,
	

Q
&	

O
1
,
2
*
5r   c                   @   r   )8AsyncFilesClientr   c                C   r   r   r   r   r   r   r   r     r   zAsyncFilesClient.__init__Nr    r#   r!   r"   r$   c                   s   | j jjdtj| j   dd| t||d| j  ddI dH }d|j	  kr1d	k r;n nt
t| S |j	d
krJtt
t| z| }W n ty_   t|j	|jdw t|j	|d)a  
        Read File metadata objects.

        Parameters:
            - id: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.get_file(
            id="string",
        )
        r%   r&   r'   r    r(   r)   Nr-   r.   r/   r0   r3   r?   r   r   r   rB     s$   
zAsyncFilesClient.get_filec                   s   | j jjdtj| j   dd| t||d| j  ddI dH }d|j	  kr2d	k r3dS  |j	d
krBt
tt| z| }W n tyW   t|j	|jdw t|j	|d)a  
        Delete the file from S3.

        Parameters:
            - id: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.delete_file(
            id="string",
        )
        rC   r&   r'   r    r(   r)   Nr-   r.   r/   r0   rD   r?   r   r   r   rE     s&   
zAsyncFilesClient.delete_filec                      | j jjdtj| j   ddt||d| j  ddI dH }d|j	  kr.d	k r;n nt
tjt | S |j	d
krJtt
t| z| }W n ty_   t|j	|jdw t|j	|d)a`  
        Read File metadata objects.

        Parameters:
            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.list_files()
        r%   r&   rG   r    r(   r)   Nr-   r.   r/   r0   rH   rK   r   r   r   rL     $   
zAsyncFilesClient.list_filesrN   rO   rP   c             	      s   | j jjdtj| j   ddt|||dti d|i| j 	 ddI dH }d	|j
  kr5d
k r?n ntt| S |j
dkrNttt| z| }W n tyc   t|j
|jdw t|j
|d)rQ   rR   r&   rG   rN   rP   r(   rS   Nr-   r.   r/   r0   rV   rW   r   r   r   rP     s,   

zAsyncFilesClient.upload_filerX   rY   r_   rZ   r[   r\   r]   r^   c       
            s8  d|i}|t ur||d< |t ur||d< |t ur||d< |t ur%||d< |	t ur-|	|d< |
t ur5|
|d< | jjjdtj| j  d	d
t|||dt	|| j
 ddI dH }d|j  krfdk rpn ntt| S |jdkrttt| z| }W n ty   t|j|jdw t|j|d)a  
        Create a presigned url for uploading a file.

        Parameters:
            - expires_at_seconds: typing.Optional[int].

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].

            - name: str.

            - external_file_id: typing.Optional[str].

            - file_size: typing.Optional[int].

            - last_modified_at: typing.Optional[dt.datetime].

            - resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateResourceInfoValue]]].

            - permission_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreatePermissionInfoValue]]].

            - data_source_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.generate_presigned_url(
            name="string",
        )
        r_   rO   rZ   r[   r\   r]   r^   r`   r&   rG   ra   r(   rb   Nr-   r.   r/   r0   rc   re   r   r   r   rg   ,  sD   /


z'AsyncFilesClient.generate_presigned_urlc                   r   )a  
        Sync Files API against file contents uploaded via S3 presigned urls.

        Parameters:
            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.sync_files()
        r`   r&   rh   r    r(   r)   Nr-   r.   r/   r0   rH   rK   r   r   r   ri   |  r   zAsyncFilesClient.sync_filesrj   ro   rk   rl   rm   rn   c       	            s6  d|i}
|t ur||
d< |t ur||
d< |t ur||
d< |t ur%||
d< |t ur-||
d< |	t ur5|	|
d< | jjjdtj| j  d	d
t||dt	|
| j
 ddI dH }d|j  kredk ron ntt| S |jdkr~ttt| z| }W n ty   t|j|jdw t|j|d)a  
        Upload a file to S3 from a URL.

        Parameters:
            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].

            - name: typing.Optional[str].

            - url: str. URL of the file to download

            - proxy_url: typing.Optional[str].

            - request_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]].

            - verify_ssl: typing.Optional[bool]. Whether to verify the SSL certificate when downloading the file

            - follow_redirects: typing.Optional[bool]. Whether to follow redirects when downloading the file

            - resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateFromUrlResourceInfoValue]]].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.upload_file_from_url(
            url="string",
        )
        ro   r_   rk   rl   rm   rn   r\   r`   r&   rp   r    r(   rb   Nr-   r.   r/   r0   rq   rr   r   r   r   rs     s@   ,
z%AsyncFilesClient.upload_file_from_urlra   c                   s   | j jjdtj| j   dd| dt|||d| j  ddI dH }d	|j	  kr3d
k r=n nt
t| S |j	dkrLtt
t| z| }W n tya   t|j	|jdw t|j	|d)a  
        Returns a presigned url to read the file content.

        Parameters:
            - id: str.

            - expires_at_seconds: typing.Optional[int].

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.read_file_content(
            id="string",
        )
        r%   r&   r'   rt   ra   r(   r)   Nr-   r.   r/   r0   ru   rv   r   r   r   rw     s(    
	
z"AsyncFilesClient.read_file_contentc                      | j jjdtj| j   dd| dt||d| j  ddI dH }d	|j	  kr2d
k r?n nt
tjt | S |j	dkrNtt
t| z| }W n tyc   t|j	|jdw t|j	|d)a  
        List metadata for all screenshots of pages from a file.

        Parameters:
            - id: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.list_file_page_screenshots(
            id="string",
        )
        r%   r&   r'   ry   r    r(   r)   Nr-   r.   r/   r0   rz   r?   r   r   r   r{     s$    
z+AsyncFilesClient.list_file_page_screenshotsr|   c             	      s   | j jjdtj| j   dd| d| t||d| j  ddI dH }d	|j	  kr4d
k r?n n	t
tj| S |j	dkrNtt
t| z| }W n tyc   t|j	|jdw t|j	|d)a  
        Get screenshot of a page from a file.

        Parameters:
            - id: str.

            - page_index: int.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.get_file_page_screenshot(
            id="string",
            page_index=1,
        )
        r%   r&   r'   r}   r    r(   r)   Nr-   r.   r/   r0   r~   r   r   r   r   r   A  s(   	
z)AsyncFilesClient.get_file_page_screenshotc                   r   )a  
        Parameters:
            - id: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.list_file_pages_figures(
            id="string",
        )
        r%   r&   r'   r   r    r(   r)   Nr-   r.   r/   r0   r   r?   r   r   r   r   r  s$    
z(AsyncFilesClient.list_file_pages_figuresc             	      s   | j jjdtj| j   dd| d| t||d| j  ddI dH }d	|j	  kr4d
k rAn nt
tjt | S |j	dkrPtt
t| z| }W n tye   t|j	|jdw t|j	|d)a  
        Parameters:
            - id: str.

            - page_index: int.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.list_file_page_figures(
            id="string",
            page_index=1,
        )
        r%   r&   r'   r   r    r(   r)   Nr-   r.   r/   r0   r   r   r   r   r   r     s(   	
z'AsyncFilesClient.list_file_page_figuresr   c                   s   | j jjdtj| j   dd| d| d| t||d| j  ddI dH }d	|j	  kr7d
k rBn n	t
tj| S |j	dkrQtt
t| z| }W n tyf   t|j	|jdw t|j	|d)a  
        Parameters:
            - id: str.

            - page_index: int.

            - figure_name: str.

            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.files.get_file_page_figure(
            id="string",
            page_index=1,
            figure_name="string",
        )
        r%   r&   r'   r   r    r(   r)   Nr-   r.   r/   r0   r~   r   r   r   r   r     s(    "	
z%AsyncFilesClient.get_file_page_figure)%r   r   r   r   r   r   rI   r   r
   rB   rE   rJ   rL   r   rP   rd   r   r   r   r   r   r   r   rg   ri   r   r   rs   rw   r   r{   r   r   r   r   r   r   r   r   r   r   r     r   r   )-r   r   rI   urllib.parser6   json.decoderr   core.api_errorr   core.client_wrapperr   r   core.jsonable_encoderr   core.remove_none_from_dictr   !errors.unprocessable_entity_errorr	   
types.filer
   types.http_validation_errorr   types.page_figure_metadatar   types.page_screenshot_metadatar   types.presigned_urlr   .types.file_create_from_url_resource_info_valuer   'types.file_create_permission_info_valuer   %types.file_create_resource_info_valuer   r;   __version__
startswithImportErrorpydantic.v1v1castr   rd   r   r   r   r   r   r   <module>   s@       p