
    ]j$                         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
  e j                  e j                  d      Z G d	 d
      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)Project   )AsyncRawProjectsClientRawProjectsClient.c            	           e Zd ZdefdZedefd       Zdddede	j                  e   de	j                  e   fd	Zddded
ede	j                  e   ddfdZdddede	j                  e   ddfdZy)ProjectsClientclient_wrapperc                &    t        |      | _        y N)r   )r
   _raw_clientselfr   s     U/root/env/lib/python3.12/site-packages/label_studio_sdk/workspaces/projects/client.py__init__zProjectsClient.__init__   s    ,NK    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawProjectsClient
        r   r   s    r   with_raw_responsez ProjectsClient.with_raw_response        r   Nrequest_optionsidr   c                T    | 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>
        Retrieve a list of all projects in a specific workspace.

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

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

        Returns
        -------
        typing.List[Project]
            Projects list

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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.workspaces.projects.list(
            id=1,
        )
        r   r   listdatar   r   r   	_responses       r   r!   zProjectsClient.list   s*    B $$))"o)N	~~r   projectc                V    | 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>
        Add a project to a specific workspace.

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

        project : int
            Project ID

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

        Returns
        -------
        None

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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.workspaces.projects.add(
            id=1,
            project=1,
        )
        r%   r   r   addr"   r   r   r%   r   r$   s        r   r)   zProjectsClient.addA   s,    H $$((Wo(^	~~r   c                T    | 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>
        Remove a project from a specific workspace.

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

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

        Returns
        -------
        None

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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.workspaces.projects.remove(
            id=1,
        )
        r   r   remover"   r#   s       r   r-   zProjectsClient.removeh   s*    @ $$++B+P	~~r   )__name__
__module____qualname__r   r   propertyr
   r   inttypingOptionalr   Listr   r!   r)   r-    r   r   r   r      s    L*; L  #4     SW "s "0O "[a[f[fgn[o "H `d %c %s %V__^=\ %hl %N UY ! !&//.2Q !]a !r   r   c            	           e Zd ZdefdZedefd       Zdddede	j                  e   de	j                  e   fd	Zddded
ede	j                  e   ddfdZdddede	j                  e   ddfdZy)AsyncProjectsClientr   c                &    t        |      | _        y r   )r	   r   r   s     r   r   zAsyncProjectsClient.__init__   s    1Pr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawProjectsClient
        r   r   s    r   r   z%AsyncProjectsClient.with_raw_response   r   r   Nr   r   r   c                p   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>
        Retrieve a list of all projects in a specific workspace.

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

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

        Returns
        -------
        typing.List[Project]
            Projects list

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workspaces.projects.list(
                id=1,
            )


        asyncio.run(main())
        r   Nr    r#   s       r   r!   zAsyncProjectsClient.list   s7     R **//O/TT	~~ U   !646r%   c                r   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>
        Add a project to a specific workspace.

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

        project : int
            Project ID

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workspaces.projects.add(
                id=1,
                project=1,
            )


        asyncio.run(main())
        r'   Nr(   r*   s        r   r)   zAsyncProjectsClient.add   s:     X **..r7Tc.dd	~~ es   "757c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)ad  
        <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>
        Remove a project from a specific workspace.

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

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workspaces.projects.remove(
                id=1,
            )


        asyncio.run(main())
        r   Nr,   r#   s       r   r-   zAsyncProjectsClient.remove   s7     P **11"o1VV	~~ Wr<   )r.   r/   r0   r   r   r1   r	   r   r2   r3   r4   r   r5   r   r!   r)   r-   r6   r   r   r8   r8      s    Q*< Q  #9     Y] *S *foon6U *agalalmtau *X fj -C -S -6??SaCb -nr -^ [_ )s )8W )cg )r   r8   )r3   core.client_wrapperr   r   core.request_optionsr   types.projectr   
raw_clientr	   r
   castAnyOMITr   r8   r6   r   r   <module>rF      sG     H 2 $ A v{{6::s#{ {|S Sr   