
    ]j9                         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
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)MaybeExpandedComment.c                      e Zd ZdefdZdddddddddej                  e   dej                  e   dej                  e   dej                  e	   d	ej                  e   d
ej                  e   dej                  e
   deej                  e      fdZdeeeeeedddej                  e	   dej                  e   dej                  ej                      dej                  e   dej                  e	   dej                  ej                      dej                  e   dej                  e
   dee   fdZej&                  dddddddddej                  e   dej                  e   dej                  e   dej                  e	   d
ej                  e   dej                  e   dej                  e
   dej(                  eej(                  e         fd       Zddddedej                  e	   dej                  e
   dee   fdZddddedej                  e	   dej                  e
   ded   fdZdeeeeeedddedej                  e	   dej                  e   dej                  ej                      dej                  e   dej                  e	   dej                  ej                      dej                  e   dej                  e
   dee   fdZy)RawCommentsClientclient_wrapperc                    || _         y N_client_wrapperselfr   s     N/root/env/lib/python3.12/site-packages/label_studio_sdk/comments/raw_client.py__init__zRawCommentsClient.__init__   
    -    N
annotation
annotatorsdraftexpand_created_byorderingprojectsrequest_optionsr   r   r   r   r    r!   r"   returnc                Z   | j                   j                  j                  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>
        List all comments for a specific annotation ID.

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

        annotators : typing.Optional[str]

        draft : typing.Optional[int]

        expand_created_by : typing.Optional[bool]

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

        projects : typing.Optional[str]

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

        Returns
        -------
        HttpResponse[typing.List[MaybeExpandedComment]]
            List of comments
        api/comments/GETr   r   r   r   r    r!   methodparamsr"      ,  type_object_responsedatastatus_codeheadersbody)r   httpx_clientrequestr4   typingcastListr   r   jsonr	   r   r   dictr5   textr   r   r   r   r   r    r!   r"   	_response_data_response_jsons              r   listzRawCommentsClient.list   s   V ((55==((%6$$ , > 
		ti++1c1KK 45"$kk*>? ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   A=C+ 0C+ +?D*r   r   classificationsr   is_resolved
region_refr>   r"   rE   rF   rG   r>   c                ,   | j                   j                  j                  ddd|i||||||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 comment for a specific annotation ID.

        Parameters
        ----------
        expand_created_by : typing.Optional[bool]
            Expand the created_by field

        annotation : typing.Optional[int]

        classifications : typing.Optional[typing.Any]
            Classifications applied by a reviewer or annotator

        draft : typing.Optional[int]

        is_resolved : typing.Optional[bool]
            True if the comment is resolved

        region_ref : typing.Optional[typing.Any]
            Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name.

        text : typing.Optional[str]
            Reviewer or annotator comment

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

        Returns
        -------
        HttpResponse[MaybeExpandedComment]

        r%   POSTr   r   rE   r   rF   rG   r>   content-typeapplication/jsonr)   r*   r<   r5   r"   omitr+   r,   r-   r0   r3   )r   r7   r8   OMITr4   r9   r:   r   r   r<   r	   r   r   r=   r5   r>   r   r   r   rE   r   rF   rG   r>   r"   r@   rA   rB   s               r   createzRawCommentsClient.create^   s   d ((55==#%6 )#2*(  2 ,% > 
	(	ti++1c1("2 ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AC C ?Dr   r   r   r   r!   tzr"   rS   c             #      	K   | j                   j                  j                  dd||||||d      5 	dt        t        j
                  t              f	fd} |        ddd       y# 1 sw Y   y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>
        Export comments to CSV file

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

        annotators : typing.Optional[str]

        draft : typing.Optional[int]

        expand_created_by : typing.Optional[bool]

        projects : typing.Optional[str]

        tz : typing.Optional[str]
            Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.Iterator[HttpResponse[typing.Iterator[bytes]]]
            CSV file with comments
        api/comments/export/r&   r   r   r   r   r!   rS   r(   r#   c                     	 dj                   cxk  rdk  r=n n:j                  dd       nd } t        d j                  |       D              S j	                          j                         }t        j                   t        j                        |      # t        $ r6 t        j                   t        j                        j                        w xY w)Nr+   r,   
chunk_sizec              3       K   | ]  }|  y wr    .0_chunks     r   	<genexpr>z<RawCommentsClient.export.<locals>._stream.<locals>.<genexpr>   s     5xf5xs   rX   r0   r3   )r4   getr	   
iter_bytesreadr<   r   r   r=   r5   r>   _chunk_sizerB   r@   r"   s     r   _streamz)RawCommentsClient.export.<locals>._stream   s    i339c9Q`Qlo&9&9,&Mrv+%.5x9K_K_kvK_Kw5x   NN$%.^^%5N
 9+@+@$yO`O`Jahvww	 ' "$-$9$94	HYHYCZajaoao s   AB   B   ?CN)r   r7   streamr	   r9   Iteratorbytes
r   r   r   r   r   r!   rS   r"   re   r@   s
          ` @r   exportzRawCommentsClient.export   s     X !!..55"((%6$ , 6 
 	 x\&//%*@A x )O;	 	 	s   1A9/A-$	A9-A62A9r   r"   idc                &   | j                   j                  j                  dt        |       ddd|i|      }	 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 comment by ID for an annotation.

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

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

        Returns
        -------
        HttpResponse[MaybeExpandedComment]

        r%   /r&   r   r(   r+   r,   r-   r0   r3   )r   r7   r8   r
   r4   r9   r:   r   r   r<   r	   r   r   r=   r5   r>   r   rl   r   r"   r@   rA   rB   s          r   r`   zRawCommentsClient.get   s   > ((55==,R013#%6 , > 
		ti++1c1("2 ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AC C ?Dc                   | j                   j                  j                  dt        |       ddd|i|      }	 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)aZ  
        <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 comment by ID

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

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

        Returns
        -------
        HttpResponse[None]
        r%   rn   DELETEr   r(   r+   r,   Nr0   r3   )r   r7   r8   r
   r4   r	   r<   r   r   r=   r5   r>   r   rl   r   r"   r@   rB   s         r   deletezRawCommentsClient.delete4  s    < ((55==,R013#%6 , > 
		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 B ?Cc                F   | j                   j                  j                  dt        |       ddd|i||||||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>
        Update a specific comment by ID.

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

        annotation : typing.Optional[int]

        classifications : typing.Optional[typing.Any]
            Classifications applied by a reviewer or annotator

        draft : typing.Optional[int]

        is_resolved : typing.Optional[bool]
            True if the comment is resolved

        region_ref : typing.Optional[typing.Any]
            Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name.

        text : typing.Optional[str]
            Reviewer or annotator comment

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

        Returns
        -------
        HttpResponse[MaybeExpandedComment]

        r%   rn   PATCHr   rJ   rK   rL   rM   r+   r,   r-   r0   r3   )r   r7   r8   r
   rO   r4   r9   r:   r   r   r<   r	   r   r   r=   r5   r>   r   rl   r   r   rE   r   rF   rG   r>   r"   r@   rA   rB   s                r   updatezRawCommentsClient.updateb  s,   j ((55==,R013#%6 )#2*(  2 ,% > 
	(	ti++1c1("2 ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   
AC! &C! !?D )__name__
__module____qualname__r   r   r9   Optionalintstrboolr   r	   r;   r   rC   rO   AnyrQ   
contextlibcontextmanagerrg   rh   rj   r`   rs   rw   rZ   r   r   r   r      s0   .*; . ,0+/&*37)-)-;?Ep OOC(Ep OOC(	Ep
 s#Ep "??40Ep //#&Ep //#&Ep  8Ep 
fkk"67	8EpT 48+/7;&*-126%);?Sp "??40Sp OOC(	Sp
  4Sp s#Sp __T*Sp OOFJJ/Sp ooc"Sp  8Sp 
*	+Spj  ,0+/&*37)-#';?H OOC(H OOC(	H
 s#H "??40H //#&H OOC H  8H 
fooe&<=	>H H\ 48;?4p4p "??40	4p
  84p 
*	+4pt 48;?,p,p "??40	,p
  8,p 
d	,pd 48+/7;&*-126%);?VpVp "??40	Vp
 OOC(Vp  4Vp s#Vp __T*Vp OOFJJ/Vp ooc"Vp  8Vp 
*	+Vpr   r   c                      e Zd ZdefdZdddddddddej                  e   dej                  e   dej                  e   dej                  e	   d	ej                  e   d
ej                  e   dej                  e
   deej                  e      fdZdeeeeeedddej                  e	   dej                  e   dej                  ej                      dej                  e   dej                  e	   dej                  ej                      dej                  e   dej                  e
   dee   fdZej&                  dddddddddej                  e   dej                  e   dej                  e   dej                  e	   d
ej                  e   dej                  e   dej                  e
   dej(                  eej(                  e         fd       Zddddedej                  e	   dej                  e
   dee   fdZddddedej                  e	   dej                  e
   ded   fdZdeeeeeedddedej                  e	   dej                  e   dej                  ej                      dej                  e   dej                  e	   dej                  ej                      dej                  e   dej                  e
   dee   fdZy)AsyncRawCommentsClientr   c                    || _         y r   r   r   s     r   r   zAsyncRawCommentsClient.__init__  r   r   Nr   r   r   r   r   r    r!   r"   r#   c                v  K   | j                   j                  j                  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>
        List all comments for a specific annotation ID.

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

        annotators : typing.Optional[str]

        draft : typing.Optional[int]

        expand_created_by : typing.Optional[bool]

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

        projects : typing.Optional[str]

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

        Returns
        -------
        AsyncHttpResponse[typing.List[MaybeExpandedComment]]
            List of comments
        r%   r&   r'   r(   Nr+   r,   r-   r0   r3   )r   r7   r8   r4   r9   r:   r;   r   r   r<   r   r   r   r=   r5   r>   r?   s              r   rC   zAsyncRawCommentsClient.list  s!    V ..;;CC((%6$$ , D 
 
		ti++1c1KK 45"$kk*>? ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo5
0  	ty'<'<d9K\K\F]dmdrdrss	ts3   4D9C5D9A=C7 9D9:C7 
,D97?D66D9rD   rE   rF   rG   r>   c                H  K   | j                   j                  j                  ddd|i||||||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 comment for a specific annotation ID.

        Parameters
        ----------
        expand_created_by : typing.Optional[bool]
            Expand the created_by field

        annotation : typing.Optional[int]

        classifications : typing.Optional[typing.Any]
            Classifications applied by a reviewer or annotator

        draft : typing.Optional[int]

        is_resolved : typing.Optional[bool]
            True if the comment is resolved

        region_ref : typing.Optional[typing.Any]
            Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name.

        text : typing.Optional[str]
            Reviewer or annotator comment

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

        Returns
        -------
        AsyncHttpResponse[MaybeExpandedComment]

        r%   rI   r   rJ   rK   rL   rM   Nr+   r,   r-   r0   r3   )r   r7   r8   rO   r4   r9   r:   r   r   r<   r   r   r   r=   r5   r>   rP   s               r   rQ   zAsyncRawCommentsClient.create  s+    d ..;;CC#%6 )#2*(  2 ,% D 
 
	(	ti++1c1("2 ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`nooC
>  	ty'<'<d9K\K\F]dmdrdrss	ts6   ?D"CD"AC  "D"#C  3,D" ?DD"rR   rS   c               F  	K   | j                   j                  j                  dd||||||d      4 d{   	dt        t        j
                  t              f	fd} |        d{    ddd      d{    y7 L7 7 	# 1 d{  7  sw Y   y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>
        Export comments to CSV file

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

        annotators : typing.Optional[str]

        draft : typing.Optional[int]

        expand_created_by : typing.Optional[bool]

        projects : typing.Optional[str]

        tz : typing.Optional[str]
            Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]
            CSV file with comments
        rU   r&   rV   r(   Nr#   c                    K   	 dj                   cxk  rdk  r=n n:j                  dd       nd } t        d j                  |       2              S j	                          d {    j                         }t        j                   t        j                        |      7 ?# t        $ r6 t        j                   t        j                        j                        w xY ww)Nr+   r,   rX   c                2   K   | 3 d {   }| 7 
6 y wr   rZ   r[   s     r   r^   zAAsyncRawCommentsClient.export.<locals>._stream.<locals>.<genexpr>  s     !k!k6&!k!ks   r_   r0   r3   )r4   r`   r   aiter_bytesareadr<   r   r   r=   r5   r>   rc   s     r   re   z.AsyncRawCommentsClient.export.<locals>._stream  s     i339c9Q`Qlo&9&9,&Mrv0%.!kY=R=R^i=R=j!k   $//+++%.^^%5N
 9+@+@$yO`O`Jahvww ,& "$-$9$94	HYHYCZajaoao s;   C.AB, C.B, *B*+B, ?+C.*B, ,?C++C.)r   r7   rf   r   r9   AsyncIteratorrh   ri   s
          ` @r   rj   zAsyncRawCommentsClient.export[  s     X ''44;;"((%6$ , < 
 	" 	" x#4V5I5I%5P#Q x   	/!=	" 	" 	"< "=	" 	" 	" 	"sV   5B!BB!0B-B.B5B! B
B!B
B!BBBB!rk   rl   c                B  K   | j                   j                  j                  dt        |       ddd|i|       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>
        Retrieve a specific comment by ID for an annotation.

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

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

        Returns
        -------
        AsyncHttpResponse[MaybeExpandedComment]

        r%   rn   r&   r   r(   Nr+   r,   r-   r0   r3   )r   r7   r8   r
   r4   r9   r:   r   r   r<   r   r   r   r=   r5   r>   ro   s          r   r`   zAsyncRawCommentsClient.get  s    > ..;;CC,R013#%6 , D 
 
		ti++1c1("2 ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo+
&  	ty'<'<d9K\K\F]dmdrdrss	ts4   <DCDAC D C 0,D?DDc                  K   | j                   j                  j                  dt        |       ddd|i|       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 comment by ID

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

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

        Returns
        -------
        AsyncHttpResponse[None]
        r%   rn   rq   r   r(   Nr+   r,   r0   r3   )r   r7   r8   r
   r4   r   r<   r   r   r=   r5   r>   rr   s         r   rs   zAsyncRawCommentsClient.delete  s     < ..;;CC,R013#%6 , D 
 
		ti++1c1()$GG&^^-N 9#8#8$yGXGXBY`noo
  	ty'<'<d9K\K\F]dmdrdrss	ts3   <C(B$C($B& (C()B& 9,C(&?C%%C(c                b  K   | j                   j                  j                  dt        |       ddd|i||||||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>
        Update a specific comment by ID.

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

        annotation : typing.Optional[int]

        classifications : typing.Optional[typing.Any]
            Classifications applied by a reviewer or annotator

        draft : typing.Optional[int]

        is_resolved : typing.Optional[bool]
            True if the comment is resolved

        region_ref : typing.Optional[typing.Any]
            Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name.

        text : typing.Optional[str]
            Reviewer or annotator comment

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

        Returns
        -------
        AsyncHttpResponse[MaybeExpandedComment]

        r%   rn   ru   r   rJ   rK   rL   rM   Nr+   r,   r-   r0   r3   )r   r7   r8   r
   rO   r4   r9   r:   r   r   r<   r   r   r   r=   r5   r>   rv   s                r   rw   zAsyncRawCommentsClient.update  s;    j ..;;CC,R013#%6 )#2*(  2 ,% D 
 
	(	ti++1c1("2 ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`nooC
>  	ty'<'<d9K\K\F]dmdrdrss	ts7   AD/C+D/AC- /D/0C-  ,D/-?D,,D/)rx   ry   rz   r   r   r9   r{   r|   r}   r~   r   r   r;   r   rC   rO   r   rQ   r   asynccontextmanagerr   rh   rj   r`   rs   rw   rZ   r   r   r   r     s5   .*< . ,0+/&*37)-)-;?Ep OOC(Ep OOC(	Ep
 s#Ep "??40Ep //#&Ep //#&Ep  8Ep 
6;;';<	=EpT 48+/7;&*-126%);?Sp "??40Sp OOC(	Sp
  4Sp s#Sp __T*Sp OOFJJ/Sp ooc"Sp  8Sp 
/	0Spj ## ,0+/&*37)-#';?I" OOC(I" OOC(	I"
 s#I" "??40I" //#&I" OOC I"  8I" 
		/0D0DU0KL	MI" $I"^ 48;?4p4p "??40	4p
  84p 
/	04pt 48;?,p,p "??40	,p
  8,p 
4	 ,pd 48+/7;&*-126%);?VpVp "??40	Vp
 OOC(Vp  4Vp s#Vp __T*Vp OOFJJ/Vp ooc"Vp  8Vp 
/	0Vpr   r   )r   r9   json.decoderr   core.api_errorr   core.client_wrapperr   r   core.http_responser   r	   core.jsonable_encoderr
   core.request_optionsr   core.unchecked_base_modelr   types.maybe_expanded_commentr   r:   r   rO   r   r   rZ   r   r   <module>r      sZ      ( % G @ 4 1 6 ? v{{6::s#ep epPfp fpr   