Ë
    8ø»jý   ã                  óÜ   — d dl mZ d dlmZmZ d dlmZ d dlmZm	Z	 d dl
mZmZ d dlmZ erd dlmZ d dlmZmZ d d	lmZ  ed
«       G d„ de«      «       Z ed
«       G d„ de«      «       Zy)é    )Úannotations)ÚTYPE_CHECKINGÚAny)Ú
docs_group)ÚBuildÚBuildResponse)ÚResourceClientÚResourceClientAsync)Úresponse_to_dict)Ú	timedelta)Ú	LogClientÚLogClientAsync)ÚTimeoutzResource clientsc                  ó’   ‡ — e Zd ZdZddœ	 	 	 	 	 	 	 dˆ fd„Zddœdd„Zddœdd„Zddœdd	„Zd
dœdd„Zdddœ	 	 	 	 	 dd„Z	dd„Z
ˆ xZS )ÚBuildClientzêSub-client for managing a specific Actor build.

    Provides methods to manage a specific Actor build, e.g. get it, abort it, or wait for it to finish. Obtain an
    instance via an appropriate method on the `ApifyClient` class.
    úactor-builds©Úresource_pathc               ó*   •— t        ‰| �  d||dœ|¤Ž y ©N)Úresource_idr   © ©ÚsuperÚ__init__©Úselfr   r   ÚkwargsÚ	__class__s       €ú[/var/www/html/GAP/venv/lib/python3.12/site-packages/apify_client/_resource_clients/build.pyr   zBuildClient.__init__   ó'   ø€ ô 	‰Ñð 	
Ø#Ø'ñ	
ð ó	
ó    Úshort©Útimeoutc               ój   — | j                  |¬«      }|€yt        j                  |«      j                  S ©a  Return information about the Actor build.

        https://docs.apify.com/api/v2#/reference/actor-builds/build-object/get-build

        Args:
            timeout: Timeout for the API HTTP request.

        Returns:
            The retrieved Actor build data.
        r$   N©Ú_getr   Úmodel_validateÚdata©r   r%   Úresults      r    ÚgetzBuildClient.get&   s3   € ð —‘ 7�Ó+ˆØˆ>ØÜ×+Ñ+¨FÓ3×8Ñ8Ð8r"   c               ó(   — | j                  |¬«       y©z¹Delete the build.

        https://docs.apify.com/api/v2#/reference/actor-builds/delete-build/delete-build

        Args:
            timeout: Timeout for the API HTTP request.
        r$   N©Ú_delete©r   r%   s     r    ÚdeletezBuildClient.delete6   s   € ð 	�‰˜WˆÕ%r"   c               óÎ   — | j                   j                  | j                  d«      d| j                  «       |¬«      }t	        |«      }t        j                  |«      j                  S )á=  Abort the Actor build which is starting or currently running and return its details.

        https://docs.apify.com/api/v2#/reference/actor-builds/abort-build/abort-build

        Args:
            timeout: Timeout for the API HTTP request.

        Returns:
            The data of the aborted Actor build.
        ÚabortÚPOST©ÚurlÚmethodÚparamsr%   ©Ú_http_clientÚcallÚ
_build_urlÚ_build_paramsr   r   r*   r+   ©r   r%   Úresponser-   s       r    r7   zBuildClient.abort@   s`   € ð ×$Ñ$×)Ñ)Ø—‘ Ó(ØØ×%Ñ%Ó'Øð	 *ó 
ˆô " (Ó+ˆÜ×+Ñ+¨FÓ3×8Ñ8Ð8r"   Úmediumc               ór   — | j                   j                  | j                  d«      d|¬«      }t        |«      S )á	  Return OpenAPI definition of the Actor's build.

        https://docs.apify.com/api/v2/actor-build-openapi-json-get

        Args:
            timeout: Timeout for the API HTTP request.

        Returns:
            OpenAPI definition of the Actor's build.
        úopenapi.jsonÚGET©r:   r;   r%   ©r>   r?   r@   r   ©r   r%   rC   s      r    Úget_open_api_definitionz#BuildClient.get_open_api_definitionT   s>   € ð ×$Ñ$×)Ñ)Ø—‘ Ó/ØØð *ó 
ˆô
   Ó)Ð)r"   NÚ
no_timeout©Úwait_durationr%   c               ó–   — | j                  | j                  «       | j                  «       ||¬«      }|�t        j                  |«      S dS )aÈ  Wait synchronously until the build finishes or the server times out.

        Args:
            wait_duration: How long does the client wait for build to finish. None for indefinite.
            timeout: Timeout for the API HTTP request.

        Returns:
            The Actor build data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED,
                TIMED-OUT, ABORTED), then the build has not yet finished.
        ©r:   r<   rO   r%   N©Ú_wait_for_finishr@   rA   r   r*   ©r   rO   r%   r-   s       r    Úwait_for_finishzBuildClient.wait_for_finishf   sR   € ð ×&Ñ&Ø—‘Ó!Ø×%Ñ%Ó'Ø'Øð	 'ó 
ˆð 06Ð/AŒu×#Ñ# FÓ+ÐKÀtÐKr"   c                óR   —  | j                   j                  dddi| j                  ¤ŽS ©zàGet the client for the log of the Actor build.

        https://docs.apify.com/api/v2/#/reference/actor-builds/build-log/get-log

        Returns:
            A client allowing access to the log of this Actor build.
        r   Úlogr   ©Ú_client_registryÚ
log_clientÚ_base_client_kwargs©r   s    r    rX   zBuildClient.log{   ó5   € ð 0ˆt×$Ñ$×/Ñ/ñ 
Øð
à×&Ñ&ñ
ð 	
r"   ©r   Ústrr   r`   r   r   ÚreturnÚNone©r%   r   ra   úBuild | None©r%   r   ra   rb   ©r%   r   ra   r   ©r%   r   ra   Údict©rO   ztimedelta | Noner%   r   ra   rd   )ra   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r.   r4   r7   rL   rU   rX   Ú__classcell__©r   s   @r    r   r      s�   ø„ ñð ,ñ	
ð ð
ð ð	
ð
 ð
ð 
õ
ð )0õ 9ð  ,3õ &ð +2õ 9ð( =Eõ *ð& 48ÈLñLØ 0ðLØBIðLà	óL÷*
r"   r   c                  ó’   ‡ — e Zd ZdZddœ	 	 	 	 	 	 	 dˆ fd„Zddœdd„Zddœdd„Zddœdd	„Zd
dœdd„Zdddœ	 	 	 	 	 dd„Z	dd„Z
ˆ xZS )ÚBuildClientAsynczïSub-client for managing a specific Actor build.

    Provides methods to manage a specific Actor build, e.g. get it, abort it, or wait for it to finish. Obtain an
    instance via an appropriate method on the `ApifyClientAsync` class.
    r   r   c               ó*   •— t        ‰| �  d||dœ|¤Ž y r   r   r   s       €r    r   zBuildClientAsync.__init__‘   r!   r"   r#   r$   c             ƒ  ó†   K  — | j                  |¬«      ƒ d{  –—† }|€yt        j                  |«      j                  S 7 Œ&­wr'   r(   r,   s      r    r.   zBuildClientAsync.getž   s?   è ø€ ð —y‘y¨�yÓ1×1ˆØˆ>ØÜ×+Ñ+¨FÓ3×8Ñ8Ð8ð 2ús   ‚A˜?™'Ac             ƒ  óê   K  — | j                   j                  | j                  d«      d| j                  «       |¬«      ƒ d{  –—† }t	        |«      }t        j                  |«      j                  S 7 Œ.­w)r6   r7   r8   r9   Nr=   rB   s       r    r7   zBuildClientAsync.abort®   sn   è ø€ ð ×*Ñ*×/Ñ/Ø—‘ Ó(ØØ×%Ñ%Ó'Øð	 0ó 
÷ 
ˆô " (Ó+ˆÜ×+Ñ+¨FÓ3×8Ñ8Ð8ð
ús   ‚A A3ÁA1Á/A3c             ƒ  óD   K  — | j                  |¬«      ƒ d{  –—†  y7 Œ­wr0   r1   r3   s     r    r4   zBuildClientAsync.deleteÂ   s   è ø€ ð �l‰l 7ˆlÓ+×+Ò+ús   ‚ ˜™ rD   c             ƒ  óŽ   K  — | j                   j                  | j                  d«      d|¬«      ƒ d{  –—† }t        |«      S 7 Œ­w)rF   rG   rH   rI   NrJ   rK   s      r    rL   z(BuildClientAsync.get_open_api_definitionÌ   sL   è ø€ ð ×*Ñ*×/Ñ/Ø—‘ Ó/ØØð 0ó 
÷ 
ˆô
   Ó)Ð)ð
ús   ‚1A³A´ANrM   rN   c             ƒ  ó²   K  — | j                  | j                  «       | j                  «       ||¬«      ƒ d{  –—† }|�t        j                  |«      S dS 7 Œ­w)aÉ  Wait asynchronously until the build finishes or the server times out.

        Args:
            wait_duration: How long does the client wait for build to finish. None for indefinite.
            timeout: Timeout for the API HTTP request.

        Returns:
            The Actor build data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED,
                TIMED-OUT, ABORTED), then the build has not yet finished.
        rQ   NrR   rT   s       r    rU   z BuildClientAsync.wait_for_finishÞ   s`   è ø€ ð ×,Ñ,Ø—‘Ó!Ø×%Ñ%Ó'Ø'Øð	 -ó 
÷ 
ˆð 06Ð/AŒu×#Ñ# FÓ+ÐKÀtÐKð
ús   ‚5A·A¸Ac                óR   —  | j                   j                  dddi| j                  ¤ŽS rW   rY   r]   s    r    rX   zBuildClientAsync.logó   r^   r"   r_   rc   rf   re   rg   ri   )ra   r   )rj   rk   rl   rm   r   r.   r7   r4   rL   rU   rX   rn   ro   s   @r    rq   rq   ‰   s‘   ø„ ñð ,ñ	
ð ð
ð ð	
ð
 ð
ð 
õ
ð /6õ 9ð  18õ 9ð( 29õ ,ð CKõ *ð& 48ÈLñLØ 0ðLØBIðLà	óL÷*
r"   rq   N)Ú
__future__r   Útypingr   r   Úapify_client._docsr   Úapify_client._modelsr   r   Ú/apify_client._resource_clients._resource_clientr	   r
   Úapify_client._utils.httpr   Údatetimer   Úapify_client._resource_clientsr   r   Úapify_client.typesr   r   rq   r   r"   r    ú<module>r‚      sm   ðÝ "ç %å )ß 5ß _Ý 5áÝ"çHÝ*ñ ÐÓôt
�.ó t
ó  ðt
ñn ÐÓôt
Ð*ó t
ó  ñt
r"   