
    ]j92                         d dl Z ddlmZm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  e j                  e j                   d
      Z G d d      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)#ProjectMemberBulkAssignRolesRequest   )AsyncRawBulkClientRawBulkClient)DeleteBulkResponse)PostBulkResponse.c                      e Zd ZdefdZedefd       Zdddddeeedd	de	d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j                  e	      dej                  ej                  e	      dej                  ej                  e      dej                  e   defdZdddddddd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fdZy)
BulkClientclient_wrapperc                &    t        |      | _        y N)r   )r
   _raw_clientselfr   s     W/root/env/lib/python3.12/site-packages/label_studio_sdk/projects/members/bulk/client.py__init__zBulkClient.__init__   s    (G    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawBulkClient
        r   r   s    r   with_raw_responsezBulkClient.with_raw_response        r   N	last_activity_gtelast_activity_lterolesearchtagsexcludedincludedrolesrequest_optionsidall_r   r    r!   r"   r#   r$   r%   r&   r'   c       
         f    | j                   j                  |||||||||	|
|      }|j                  S )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>
        Assign project members in bulk.

        Parameters
        ----------
        id : int

        all_ : bool
            Apply to all project members

        last_activity_gte : typing.Optional[str]
            Filter by last activity (ISO 8601 formatted date). Only when all=True.

        last_activity_lte : typing.Optional[str]
            Filter by last activity upper bound (ISO 8601 formatted date). Only when all=True.

        role : typing.Optional[str]
            Filter by role, project roles take precedence over organization roles. Only when all=True. (comma-separated values)

        search : typing.Optional[str]
            Search term for filtering members by name, email, or username. Only when all=True.

        tags : typing.Optional[str]
            Filter tags by in list (comma-separated values)

        excluded : typing.Optional[typing.Sequence[int]]
            Excluded user IDs

        included : typing.Optional[typing.Sequence[int]]
            Included user IDs

        roles : typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]]
            Member roles

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

        Returns
        -------
        PostBulkResponse


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.projects.members.bulk.post(
            id=1,
            all_=True,
        )
        
r)   r   r    r!   r"   r#   r$   r%   r&   r'   r   postdatar   r(   r)   r   r    r!   r"   r#   r$   r%   r&   r'   	_responses                r   r-   zBulkClient.post   sM    V $$))//+ * 
	 ~~r   r   r    r!   r"   r#   r'   c          	      ^    | j                   j                  |||||||      }|j                  S )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>
        Unassign project members in bulk. Allows the same request body as bulk assign.

        Parameters
        ----------
        id : int

        last_activity_gte : typing.Optional[str]
            Filter by last activity (ISO 8601 formatted date). Only when all=True.

        last_activity_lte : typing.Optional[str]
            Filter by last activity upper bound (ISO 8601 formatted date). Only when all=True.

        role : typing.Optional[str]
            Filter by role, project roles take precedence over organization roles. Only when all=True. (comma-separated values)

        search : typing.Optional[str]
            Search term for filtering members by name, email, or username. Only when all=True.

        tags : typing.Optional[str]
            Filter tags by in list (comma-separated values)

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

        Returns
        -------
        DeleteBulkResponse


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.projects.members.bulk.delete(
            id=1,
        )
        r1   r   deleter.   	r   r(   r   r    r!   r"   r#   r'   r0   s	            r   r4   zBulkClient.deletey   sA    t $$++//+ , 
	 ~~r   )__name__
__module____qualname__r   r   propertyr
   r   OMITintbooltypingOptionalstrSequencer   r   r   r-   r   r4    r   r   r   r      s   H*; H  =     3726%)'+%):>:>W[;?XX 	X
 "??3/X "??3/X ooc"X $X ooc"X //&//#"67X //&//#"67X v/RSTX  8X 
X| 3726%)'+%);?CC "??3/	C
 "??3/C ooc"C $C ooc"C  8C 
Cr   r   c                      e Zd ZdefdZedefd       Zdddddeeedd	de	d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j                  e	      dej                  ej                  e	      dej                  ej                  e      dej                  e   defdZdddddddd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fdZy)AsyncBulkClientr   c                &    t        |      | _        y r   )r	   r   r   s     r   r   zAsyncBulkClient.__init__   s    -^Lr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawBulkClient
        r   r   s    r   r   z!AsyncBulkClient.with_raw_response   r   r   Nr   r(   r)   r   r    r!   r"   r#   r$   r%   r&   r'   c       
            K   | j                   j                  |||||||||	|
|       d{   }|j                  S 7 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>
        Assign project members in bulk.

        Parameters
        ----------
        id : int

        all_ : bool
            Apply to all project members

        last_activity_gte : typing.Optional[str]
            Filter by last activity (ISO 8601 formatted date). Only when all=True.

        last_activity_lte : typing.Optional[str]
            Filter by last activity upper bound (ISO 8601 formatted date). Only when all=True.

        role : typing.Optional[str]
            Filter by role, project roles take precedence over organization roles. Only when all=True. (comma-separated values)

        search : typing.Optional[str]
            Search term for filtering members by name, email, or username. Only when all=True.

        tags : typing.Optional[str]
            Filter tags by in list (comma-separated values)

        excluded : typing.Optional[typing.Sequence[int]]
            Excluded user IDs

        included : typing.Optional[typing.Sequence[int]]
            Included user IDs

        roles : typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]]
            Member roles

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

        Returns
        -------
        PostBulkResponse


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.projects.members.bulk.post(
                id=1,
                all_=True,
            )


        asyncio.run(main())
        r+   Nr,   r/   s                r   r-   zAsyncBulkClient.post   s[     f **////+ 0 
 
	 ~~
s   *?=?r1   c          	      z   K   | j                   j                  |||||||       d{   }|j                  S 7 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>
        Unassign project members in bulk. Allows the same request body as bulk assign.

        Parameters
        ----------
        id : int

        last_activity_gte : typing.Optional[str]
            Filter by last activity (ISO 8601 formatted date). Only when all=True.

        last_activity_lte : typing.Optional[str]
            Filter by last activity upper bound (ISO 8601 formatted date). Only when all=True.

        role : typing.Optional[str]
            Filter by role, project roles take precedence over organization roles. Only when all=True. (comma-separated values)

        search : typing.Optional[str]
            Search term for filtering members by name, email, or username. Only when all=True.

        tags : typing.Optional[str]
            Filter tags by in list (comma-separated values)

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

        Returns
        -------
        DeleteBulkResponse


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.projects.members.bulk.delete(
                id=1,
            )


        asyncio.run(main())
        r1   Nr3   r5   s	            r   r4   zAsyncBulkClient.delete0  sO     D **11//+ 2 
 
	 ~~
s   &;9;)r6   r7   r8   r   r   r9   r	   r   r:   r;   r<   r=   r>   r?   r@   r   r   r   r-   r   r4   rA   r   r   rC   rC      s   M*< M  #5     3726%)'+%):>:>W[;?`` 	`
 "??3/` "??3/` ooc"` $` ooc"` //&//#"67` //&//#"67` v/RST`  8` 
`L 3726%)'+%);?KK "??3/	K
 "??3/K ooc"K $K ooc"K  8K 
Kr   rC   )r=   core.client_wrapperr   r   core.request_optionsr   .types.project_member_bulk_assign_roles_requestr   
raw_clientr	   r
   types.delete_bulk_responser   types.post_bulk_responser   castAnyr:   r   rC   rA   r   r   <module>rP      sM     I 3 b 9 : 6 v{{6::s#l l^| |r   