
    ]j8k                         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	 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)
LseProject)ProjectTemplate   )AsyncRawProjectTemplatesClientRawProjectTemplatesClient.c                   (   e Zd ZdefdZedefd       Zddddej                  e
   dej                  e   dej                  e   fd	Zeeeeeeeeeedd
de
dedej                  ej"                     dej                  e   dej                  e
   dej                  e
   dej                  e   dej                  ej"                     dej                  e   dej                  ej"                     dej                  e   dej                  ej"                     dej                  e   defdZdddedej                  e   defdZdddedej                  e   ddfdZeeeeeeeeeeeedddedej                  ej"                     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j"                     dej                  e   dej                  ej"                     dej                  e   dej                  ej"                     dej                  e   defdZedddede
d edej                  e
   dej                  e   defd!Zy)"ProjectTemplatesClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     S/root/env/lib/python3.12/site-packages/label_studio_sdk/project_templates/client.py__init__zProjectTemplatesClient.__init__   s    4NS    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawProjectTemplatesClient
        r   r   s    r   with_raw_responsez(ProjectTemplatesClient.with_raw_response        r   Norderingrequest_optionsr   r   c                T    | j                   j                  ||      }|j                  S )aF  
        <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>
        Get a list of all project templates for an organization.

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

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

        Returns
        -------
        typing.List[ProjectTemplate]


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.project_templates.list()
        r   r   listdatar   r   r   	_responses       r   r"   zProjectTemplatesClient.list   s*    D $$))8_)]	~~r   assignment_settings
created_bycustom_scriptdescriptionorganizationproject_settingsrequire_comment_on_skipreview_settings&show_unused_data_columns_to_annotatorstagsr   name
project_idr'   r(   r)   r*   r+   r,   r-   r.   r/   r0   c                j    | j                   j                  |||||||||	|
|||      }|j                  S )aY  
        <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 project template for an organization.

        Parameters
        ----------
        name : str

        project_id : int

        assignment_settings : typing.Optional[typing.Any]
            general dict serialized assignment settings

        created_by : typing.Optional[int]

        custom_script : typing.Optional[str]
            custom script (Plugin) for projects created from this template

        description : typing.Optional[str]

        organization : typing.Optional[int]

        project_settings : typing.Optional[typing.Any]
            general dict serialized project settings

        require_comment_on_skip : typing.Optional[bool]
            flag to require comment on skip

        review_settings : typing.Optional[typing.Any]
            general dict serialized review settings

        show_unused_data_columns_to_annotators : typing.Optional[bool]

        tags : typing.Optional[typing.Any]

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

        Returns
        -------
        ProjectTemplate


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.project_templates.create(
            name="name",
            project_id=1,
        )
        r1   r2   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r   r   creater#   r   r1   r2   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r   r%   s                  r   r6   zProjectTemplatesClient.createC   sS    Z $$++! 3!'#%-$;+3Y+ , 
	 ~~r   r   idc                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>
        Get a specific project template by ID for an organization.

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

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

        Returns
        -------
        ProjectTemplate


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.project_templates.get(
            id=1,
        )
        r8   r   getr#   r   r9   r   r%   s       r   r<   zProjectTemplatesClient.get   s*    B $$((_(M	~~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>
        Delete a specific project template by ID for an organization.

        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.project_templates.delete(
            id=1,
        )
        r8   r   deleter#   r=   s       r   r@   zProjectTemplatesClient.delete   s*    @ $$++B+P	~~r   r'   r(   r)   r*   r1   r+   r2   r,   r-   r.   r/   r0   r   c                l    | 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>
        Update the details of a specific project template by ID for an organization.

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

        assignment_settings : typing.Optional[typing.Any]
            general dict serialized assignment settings

        created_by : typing.Optional[int]

        custom_script : typing.Optional[str]
            custom script (Plugin) for projects created from this template

        description : typing.Optional[str]

        name : typing.Optional[str]

        organization : typing.Optional[int]

        project_id : typing.Optional[int]

        project_settings : typing.Optional[typing.Any]
            general dict serialized project settings

        require_comment_on_skip : typing.Optional[bool]
            flag to require comment on skip

        review_settings : typing.Optional[typing.Any]
            general dict serialized review settings

        show_unused_data_columns_to_annotators : typing.Optional[bool]

        tags : typing.Optional[typing.Any]

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

        Returns
        -------
        ProjectTemplate


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.project_templates.update(
            id=1,
        )
        rA   r   updater#   r   r9   r'   r(   r)   r*   r1   r+   r2   r,   r-   r.   r/   r0   r   r%   s                   r   rD   zProjectTemplatesClient.update   sV    ^ $$++ 3!'#%!-$;+3Y+ , 
	  ~~r   r*   r   titleworkspace_idc                Z    | 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>
        Create a project from a specific project template by ID for an organization.

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

        title : str
            The title of the project to be created from the template.

        workspace_id : int
            A unique integer value identifying the workspace in which to create the project.

        description : typing.Optional[str]
            A description for the project.

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

        Returns
        -------
        LseProject
            Project created successfully

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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.project_templates.create_project_from_template(
            id=1,
            title="title",
            workspace_id=1,
        )
        rG   rH   r*   r   r   create_project_from_templater#   r   r9   rG   rH   r*   r   r%   s          r   rL   z3ProjectTemplatesClient.create_project_from_templateI  s9    h $$AAe,Kap B 
	 ~~r   )__name__
__module____qualname__r   r   propertyr   r   typingOptionalstrr   Listr   r"   OMITintAnyboolr6   r<   r@   rD   r   rL    r   r   r   r      s   T*; T  #<     37ko#!??3/#IOYgIh#	_	%#T <@+/.2,0-18<9=7;HL,0;?\ \ 	\
 $__VZZ8\ OOC(\ s+\ __S)\ ooc*\ !//&**5\ "(!6\  4\ 170E\ oofjj)\  8\  
!\| RV "c "v~/N "Zi "H UY ! !&//.2Q !]a !N <@+/.2,0%)-1+/8<9=7;HL,0;?!__ $__VZZ8	_
 OOC(_ s+_ __S)_ ooc"_ ooc*_ OOC(_ !//&**5_ "(!6_  4_ 170E_ oofjj)_   8!_" 
#_N -1;?77 	7
 7 __S)7  87 
7r   r   c                   (   e Zd ZdefdZedefd       Zddddej                  e
   dej                  e   dej                  e   fd	Zeeeeeeeeeedd
de
dedej                  ej"                     dej                  e   dej                  e
   dej                  e
   dej                  e   dej                  ej"                     dej                  e   dej                  ej"                     dej                  e   dej                  ej"                     dej                  e   defdZdddedej                  e   defdZdddedej                  e   ddfdZeeeeeeeeeeeedddedej                  ej"                     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j"                     dej                  e   dej                  ej"                     dej                  e   dej                  ej"                     dej                  e   defdZedddede
d edej                  e
   dej                  e   defd!Zy)"AsyncProjectTemplatesClientr   c                &    t        |      | _        y r   )r
   r   r   s     r   r   z$AsyncProjectTemplatesClient.__init__  s    9Xr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawProjectTemplatesClient
        r   r   s    r   r   z-AsyncProjectTemplatesClient.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>
        Get a list of all project templates for an organization.

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

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

        Returns
        -------
        typing.List[ProjectTemplate]


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.project_templates.list()


        asyncio.run(main())
        r   Nr!   r$   s       r   r"   z AsyncProjectTemplatesClient.list  s8     T **//Sb/cc	~~ d   !646r&   r1   r2   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   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>
        Create a project template for an organization.

        Parameters
        ----------
        name : str

        project_id : int

        assignment_settings : typing.Optional[typing.Any]
            general dict serialized assignment settings

        created_by : typing.Optional[int]

        custom_script : typing.Optional[str]
            custom script (Plugin) for projects created from this template

        description : typing.Optional[str]

        organization : typing.Optional[int]

        project_settings : typing.Optional[typing.Any]
            general dict serialized project settings

        require_comment_on_skip : typing.Optional[bool]
            flag to require comment on skip

        review_settings : typing.Optional[typing.Any]
            general dict serialized review settings

        show_unused_data_columns_to_annotators : typing.Optional[bool]

        tags : typing.Optional[typing.Any]

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

        Returns
        -------
        ProjectTemplate


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.project_templates.create(
                name="name",
                project_id=1,
            )


        asyncio.run(main())
        r4   Nr5   r7   s                  r   r6   z"AsyncProjectTemplatesClient.create  sa     j **11! 3!'#%-$;+3Y+ 2 
 
	 ~~
s   ,A?Ar8   r9   c                p   K   | j                   j                  ||       d{   }|j                  S 7 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>
        Get a specific project template by ID for an organization.

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

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

        Returns
        -------
        ProjectTemplate


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.project_templates.get(
                id=1,
            )


        asyncio.run(main())
        r8   Nr;   r=   s       r   r<   zAsyncProjectTemplatesClient.get%  s7     R **..r?.SS	~~ Tr`   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)at  
        <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 project template by ID for an organization.

        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.project_templates.delete(
                id=1,
            )


        asyncio.run(main())
        r8   Nr?   r=   s       r   r@   z"AsyncProjectTemplatesClient.deleteQ  s7     P **11"o1VV	~~ Wr`   rA   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>
        Update the details of a specific project template by ID for an organization.

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

        assignment_settings : typing.Optional[typing.Any]
            general dict serialized assignment settings

        created_by : typing.Optional[int]

        custom_script : typing.Optional[str]
            custom script (Plugin) for projects created from this template

        description : typing.Optional[str]

        name : typing.Optional[str]

        organization : typing.Optional[int]

        project_id : typing.Optional[int]

        project_settings : typing.Optional[typing.Any]
            general dict serialized project settings

        require_comment_on_skip : typing.Optional[bool]
            flag to require comment on skip

        review_settings : typing.Optional[typing.Any]
            general dict serialized review settings

        show_unused_data_columns_to_annotators : typing.Optional[bool]

        tags : typing.Optional[typing.Any]

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

        Returns
        -------
        ProjectTemplate


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.project_templates.update(
                id=1,
            )


        asyncio.run(main())
        rA   NrC   rE   s                   r   rD   z"AsyncProjectTemplatesClient.update|  sd     n **11 3!'#%!-$;+3Y+ 2 
 
	  ~~!
s   -AA ArF   rG   rH   c                v   K   | j                   j                  |||||       d{   }|j                  S 7 w)a2  
        <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 project from a specific project template by ID for an organization.

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

        title : str
            The title of the project to be created from the template.

        workspace_id : int
            A unique integer value identifying the workspace in which to create the project.

        description : typing.Optional[str]
            A description for the project.

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

        Returns
        -------
        LseProject
            Project created successfully

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.project_templates.create_project_from_template(
                id=1,
                title="title",
                workspace_id=1,
            )


        asyncio.run(main())
        rJ   NrK   rM   s          r   rL   z8AsyncProjectTemplatesClient.create_project_from_template  sG     x **GGe,Kap H 
 
	 ~~
s   $979)rN   rO   rP   r   r   rQ   r
   r   rR   rS   rT   r   rU   r   r"   rV   rW   rX   rY   r6   r<   r@   rD   r   rL   rZ   r   r   r\   r\     s   Y*< Y  #A     37ko+!??3/+IOYgIh+	_	%+d <@+/.2,0-18<9=7;HL,0;?d d 	d
 $__VZZ8d OOC(d s+d __S)d ooc*d !//&**5d "(!6d  4d 170Ed oofjj)d  8d  
!dL X\ *C *V__^5T *`o *X [_ )s )8W )cg )^ <@+/.2,0%)-1+/8<9=7;HL,0;?!gg $__VZZ8	g
 OOC(g s+g __S)g ooc"g ooc*g OOC(g !//&**5g "(!6g  4g 170Eg oofjj)g   8!g" 
#g^ -1;??? 	?
 ? __S)?  8? 
?r   r\   )rR   core.client_wrapperr   r   core.request_optionsr   types.lse_projectr   types.project_templater   
raw_clientr
   r   castrX   rV   r   r\   rZ   r   r   <module>rl      sJ     G 1 * 4 Q v{{6::s#q qha ar   