
    ]jW^                         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	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  e j*                  e j,                  d      Z G d d      Z G d d      Zy)    N)JSONDecodeError   )ApiError)AsyncClientWrapperSyncClientWrapper)AsyncHttpResponseHttpResponse)jsonable_encoder)RequestOptions)construct_type)Pause)
ReasonEnum.c                      e Zd ZdefdZdddddededej                  e   dej                  e	   d	ej                  e
   d
eej                  e      fdZedddedededej                  e	   d	ej                  e
   d
ee   fdZdddedede	d	ej                  e
   d
ee   f
dZdddedede	d	ej                  e
   d
ed   f
dZeedddedede	dej                  e   dej                  e	   d	ej                  e
   d
ee   fdZy)RawPausesClientclient_wrapperc                    || _         y N_client_wrapperselfr   s     U/root/env/lib/python3.12/site-packages/label_studio_sdk/projects/pauses/raw_client.py__init__zRawPausesClient.__init__   
    -    Ninclude_deletedorderingrequest_options
project_pkuser_pkr   r   r   returnc                   | j                   j                  j                  dt        |       dt        |       dd||d|      }	 d|j                  cxk  rdk  rin nft        j                  t
        j                  t           t        t
        j                  t           |j                         	            }t        ||
      S |j                         }t        |j                  t        |j                        |      # t        $ r6 t        |j                  t        |j                        |j                         w xY w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a list of all pauses.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        include_deleted : typing.Optional[bool]
            Include deleted pauses.

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

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

        Returns
        -------
        HttpResponse[typing.List[Pause]]

        api/projects/	/members//pauses/GETr   r   methodparamsr      ,  type_object_responsedatastatus_codeheadersbody)r   httpx_clientrequestr
   r5   typingcastListr   r   jsonr	   r   r   dictr6   text	r   r    r!   r   r   r   	_response_data_response_jsons	            r   listzRawPausesClient.list   s$   L ((55==,Z89CST[C\B]]ef#2$ , > 
		ti++1c1KK&"$kk%0 ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   A=D  D   ?D?verbose_reasonr   reasonrF   c                P   | j                   j                  j                  dt        |       dt        |       dd||dddi|t              }	 d	|j
                  cxk  rd
k  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }t        |j
                  t        |j                        |      # t        $ r6 t        |j
                  t        |j                        |j                         w xY w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new pause entry.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        reason : ReasonEnum
            Reason for pausing

            * `MANUAL` - Manual
            * `BEHAVIOR_BASED` - Behavior-based
            * `ANNOTATOR_EVALUATION` - Annotator evaluation
            * `ANNOTATION_LIMIT` - Annotation limit
            * `CUSTOM_SCRIPT` - Custom script

        verbose_reason : typing.Optional[str]
            Detailed description of why the project is paused, will be readable by paused annotators

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

        Returns
        -------
        HttpResponse[Pause]

        r$   r%   r&   POSTrG   rF   content-typeapplication/jsonr*   r=   r6   r   omitr,   r-   r.   r1   r4   r   r8   r9   r
   OMITr5   r:   r;   r   r   r=   r	   r   r   r>   r6   r?   	r   r    r!   rG   rF   r   rA   rB   rC   s	            r   createzRawPausesClient.createU   s"   X ((55==,Z89CST[C\B]]ef "0
  2 , > 
		ti++1c1"# ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	t   AC& +C& &?D%r   idc          
      P   | j                   j                  j                  dt        |       dt        |       dt        |       dd|      }	 d|j                  cxk  rdk  rGn nDt        j                  t        t        t        |j                         	            }t        ||
      S |j                         }t        |j                  t        |j                        |      # t        $ r6 t        |j                  t        |j                        |j                        w xY w)a<  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a specific pause by ID.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        id : str

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

        Returns
        -------
        HttpResponse[Pause]

        r$   r%   r&   /r'   r*   r   r,   r-   r.   r1   r4   )r   r8   r9   r
   r5   r:   r;   r   r   r=   r	   r   r   r>   r6   r?   r   r    r!   rU   r   rA   rB   rC   s           r   getzRawPausesClient.get   s   8 ((55==,Z89CST[C\B]]efvwyfze{{|}+ > 
	
	ti++1c1"# ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	trS   c          
         | j                   j                  j                  dt        |       dt        |       dt        |       dd|      }	 d|j                  cxk  rdk  rn nt        |d	
      S |j                         }t        |j                  t        |j                        |      # t        $ r6 t        |j                  t        |j                        |j                        w xY w)a8  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Delete a specific pause by ID.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        id : str

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

        Returns
        -------
        HttpResponse[None]
        r$   r%   r&   rW   DELETErX   r,   r-   Nr1   r4   )r   r8   r9   r
   r5   r	   r=   r   r   r>   r6   r?   r   r    r!   rU   r   rA   rC   s          r   deletezRawPausesClient.delete   s    6 ((55==,Z89CST[C\B]]efvwyfze{{|}+ > 
	
	ti++1c1#YTBB&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   $B/ 4B/ /?C.rG   rF   r   c          
      h   | j                   j                  j                  dt        |       dt        |       dt        |       dd||dddi|t        	      }	 d
|j
                  cxk  rdk  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }	t        |j
                  t        |j                        |	      # t        $ r6 t        |j
                  t        |j                        |j                         w xY w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Partially update a pause entry by ID.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        id : str

        reason : typing.Optional[ReasonEnum]
            Reason for pausing

            * `MANUAL` - Manual
            * `BEHAVIOR_BASED` - Behavior-based
            * `ANNOTATOR_EVALUATION` - Annotator evaluation
            * `ANNOTATION_LIMIT` - Annotation limit
            * `CUSTOM_SCRIPT` - Custom script

        verbose_reason : typing.Optional[str]
            Detailed description of why the project is paused, will be readable by paused annotators

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

        Returns
        -------
        HttpResponse[Pause]

        r$   r%   r&   rW   PATCHrJ   rK   rL   rM   r,   r-   r.   r1   r4   rO   
r   r    r!   rU   rG   rF   r   rA   rB   rC   s
             r   updatezRawPausesClient.update   s1   ^ ((55==,Z89CST[C\B]]efvwyfze{{|} "0
  2 , > 
		ti++1c1"# ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AC2 7C2 2?D1)__name__
__module____qualname__r   r   intr:   Optionalboolstrr   r	   r<   r   rD   rP   r   rR   rZ   r^   rc    r   r   r   r      s   .*; . 26)-;?<p<p <p
  .<p //#&<p  8<p 
fkk%(	)<pH 04;?FpFp Fp
 Fp ,Fp  8Fp 
e	FpR mq.p.p(+.p14.pJP//ZhJi.p	e	.pb mq&p&p(+&p14&pJP//ZhJi&p	d	&p\ /3/3;?IpIp Ip 	Ip 
+Ip ,Ip  8Ip 
e	Ipr   r   c                      e Zd ZdefdZdddddededej                  e   dej                  e	   d	ej                  e
   d
eej                  e      fdZedddedededej                  e	   d	ej                  e
   d
ee   fdZdddedede	d	ej                  e
   d
ee   f
dZdddedede	d	ej                  e
   d
ed   f
dZeedddedede	dej                  e   dej                  e	   d	ej                  e
   d
ee   fdZy)AsyncRawPausesClientr   c                    || _         y r   r   r   s     r   r   zAsyncRawPausesClient.__init__B  r   r   Nr   r    r!   r   r   r   r"   c                  K   | j                   j                  j                  dt        |       dt        |       dd||d|       d{   }	 d|j                  cxk  rd	k  rin nft        j                  t
        j                  t           t        t
        j                  t           |j                         
            }t        ||      S |j                         }t        |j                  t        |j                        |      7 # t        $ r6 t        |j                  t        |j                        |j                         w xY ww)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a list of all pauses.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        include_deleted : typing.Optional[bool]
            Include deleted pauses.

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

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

        Returns
        -------
        AsyncHttpResponse[typing.List[Pause]]

        r$   r%   r&   r'   r(   r)   Nr,   r-   r.   r1   r4   )r   r8   r9   r
   r5   r:   r;   r<   r   r   r=   r   r   r   r>   r6   r?   r@   s	            r   rD   zAsyncRawPausesClient.listE  s2    L ..;;CC,Z89CST[C\B]]ef#2$ , D 
 
		ti++1c1KK&"$kk%0 ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo-
(  	ty'<'<d9K\K\F]dmdrdrss	ts7   A	ED
EA=D ED ,E?EErE   rG   rF   c                l  K   | j                   j                  j                  dt        |       dt        |       dd||dddi|t               d	{   }	 d
|j
                  cxk  rdk  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }t        |j
                  t        |j                        |      7 # t        $ r6 t        |j
                  t        |j                        |j                         w xY ww)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new pause entry.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        reason : ReasonEnum
            Reason for pausing

            * `MANUAL` - Manual
            * `BEHAVIOR_BASED` - Behavior-based
            * `ANNOTATOR_EVALUATION` - Annotator evaluation
            * `ANNOTATION_LIMIT` - Annotation limit
            * `CUSTOM_SCRIPT` - Custom script

        verbose_reason : typing.Optional[str]
            Detailed description of why the project is paused, will be readable by paused annotators

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

        Returns
        -------
        AsyncHttpResponse[Pause]

        r$   r%   r&   rI   rJ   rK   rL   rM   Nr,   r-   r.   r1   r4   r   r8   r9   r
   rP   r5   r:   r;   r   r   r=   r   r   r   r>   r6   r?   rQ   s	            r   rR   zAsyncRawPausesClient.create  s0    X ..;;CC,Z89CST[C\B]]ef "0
  2 , D 
 
		ti++1c1"# ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo5
0  	ty'<'<d9K\K\F]dmdrdrss	t7   AD4C0D4AC2 4D45C2 ,D42?D11D4rT   rU   c          
      l  K   | j                   j                  j                  dt        |       dt        |       dt        |       dd|       d{   }	 d|j                  cxk  rd	k  rGn nDt        j                  t        t        t        |j                         
            }t        ||      S |j                         }t        |j                  t        |j                        |      7 # t        $ r6 t        |j                  t        |j                        |j                        w xY ww)aA  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a specific pause by ID.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        id : str

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

        Returns
        -------
        AsyncHttpResponse[Pause]

        r$   r%   r&   rW   r'   rX   Nr,   r-   r.   r1   r4   )r   r8   r9   r
   r5   r:   r;   r   r   r=   r   r   r   r>   r6   r?   rY   s           r   rZ   zAsyncRawPausesClient.get  s!    8 ..;;CC,Z89CST[C\B]]efvwyfze{{|}+ D 
 
	
	ti++1c1"# ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo%
   	ty'<'<d9K\K\F]dmdrdrss	trr   c          
        K   | j                   j                  j                  dt        |       dt        |       dt        |       dd|       d{   }	 d|j                  cxk  rd	k  rn nt        |d
      S |j                         }t        |j                  t        |j                        |      7 e# t        $ r6 t        |j                  t        |j                        |j                        w xY ww)a=  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Delete a specific pause by ID.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        id : str

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

        Returns
        -------
        AsyncHttpResponse[None]
        r$   r%   r&   rW   r\   rX   Nr,   r-   r1   r4   )r   r8   r9   r
   r5   r   r=   r   r   r>   r6   r?   r]   s          r   r^   zAsyncRawPausesClient.delete  s     6 ..;;CC,Z89CST[C\B]]efvwyfze{{|}+ D 
 
	
	ti++1c1()$GG&^^-N 9#8#8$yGXGXBY`noo
  	ty'<'<d9K\K\F]dmdrdrss	ts6   AC=B9C=$B; =C=>B; ,C=;?C::C=r_   c          
        K   | j                   j                  j                  dt        |       dt        |       dt        |       dd||dddi|t        	       d
{   }	 d|j
                  cxk  rdk  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }	t        |j
                  t        |j                        |	      7 # t        $ r6 t        |j
                  t        |j                        |j                         w xY ww)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Partially update a pause entry by ID.

        Parameters
        ----------
        project_pk : int

        user_pk : int

        id : str

        reason : typing.Optional[ReasonEnum]
            Reason for pausing

            * `MANUAL` - Manual
            * `BEHAVIOR_BASED` - Behavior-based
            * `ANNOTATOR_EVALUATION` - Annotator evaluation
            * `ANNOTATION_LIMIT` - Annotation limit
            * `CUSTOM_SCRIPT` - Custom script

        verbose_reason : typing.Optional[str]
            Detailed description of why the project is paused, will be readable by paused annotators

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

        Returns
        -------
        AsyncHttpResponse[Pause]

        r$   r%   r&   rW   ra   rJ   rK   rL   rM   Nr,   r-   r.   r1   r4   rq   rb   s
             r   rc   zAsyncRawPausesClient.update#  s?    ^ ..;;CC,Z89CST[C\B]]efvwyfze{{|} "0
  2 , D 
 
		ti++1c1"# ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo5
0  	ty'<'<d9K\K\F]dmdrdrss	ts7   AE C< E %AC>  E C> ,E >?D==E )rd   re   rf   r   r   rg   r:   rh   ri   rj   r   r   r<   r   rD   rP   r   rR   rZ   r^   rc   rk   r   r   rm   rm   A  s   .*< . 26)-;?<p<p <p
  .<p //#&<p  8<p 
6;;u-	.<pH 04;?FpFp Fp
 Fp ,Fp  8Fp 
5	!FpR mq.p.p(+.p14.pJP//ZhJi.p	5	!.pb mq&p&p(+&p14&pJP//ZhJi&p	4	 &p\ /3/3;?IpIp Ip 	Ip 
+Ip ,Ip  8Ip 
5	!Ipr   rm   )r:   json.decoderr   core.api_errorr   core.client_wrapperr   r   core.http_responser   r	   core.jsonable_encoderr
   core.request_optionsr   core.unchecked_base_modelr   types.pauser   types.reason_enumr   r;   AnyrP   r   rm   rk   r   r   <module>r      sZ     ( & H A 5 2 7   + v{{6::s#kp kp\	kp kpr   