# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ...core.request_options import RequestOptions
from ...types.azure_service_principal_import_storage import AzureServicePrincipalImportStorage
from ...types.status_c5a_enum import StatusC5AEnum
from .raw_client import AsyncRawAzureSpiClient, RawAzureSpiClient

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class AzureSpiClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawAzureSpiClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawAzureSpiClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAzureSpiClient
        """
        return self._raw_client

    def list(
        self,
        *,
        project: int,
        ordering: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[AzureServicePrincipalImportStorage]:
        """
        <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 list of all Azure import storage connections set up with Service Principal authentication.

        Parameters
        ----------
        project : int
            Project ID

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

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

        Returns
        -------
        typing.List[AzureServicePrincipalImportStorage]


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.import_storage.azure_spi.list(
            project=1,
        )
        """
        _response = self._raw_client.list(project=project, ordering=ordering, request_options=request_options)
        return _response.data

    def create(
        self,
        *,
        project: int,
        account_name: typing.Optional[str] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: typing.Optional[str] = OMIT,
        container: typing.Optional[str] = OMIT,
        description: typing.Optional[str] = OMIT,
        last_sync: typing.Optional[dt.datetime] = OMIT,
        last_sync_count: typing.Optional[int] = OMIT,
        last_sync_job: typing.Optional[str] = OMIT,
        meta: typing.Optional[typing.Any] = OMIT,
        prefix: typing.Optional[str] = OMIT,
        presign: typing.Optional[bool] = OMIT,
        presign_ttl: typing.Optional[int] = OMIT,
        recursive_scan: typing.Optional[bool] = OMIT,
        regex_filter: typing.Optional[str] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        user_delegation_key: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AzureServicePrincipalImportStorage:
        """
        <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 Azure import storage with Service Principal authentication.

        Parameters
        ----------
        project : int
            A unique integer value identifying this project.

        account_name : typing.Optional[str]
            Azure Blob account name

        client_id : typing.Optional[str]
            Azure Blob Service Principal Client ID

        client_secret : typing.Optional[str]
            Azure Blob Service Principal Client Secret

        container : typing.Optional[str]
            Azure blob container

        description : typing.Optional[str]
            Cloud storage description

        last_sync : typing.Optional[dt.datetime]
            Last sync finished time

        last_sync_count : typing.Optional[int]
            Count of tasks synced last time

        last_sync_job : typing.Optional[str]
            Last sync job ID

        meta : typing.Optional[typing.Any]
            Meta and debug information about storage processes

        prefix : typing.Optional[str]
            Azure blob prefix name

        presign : typing.Optional[bool]

        presign_ttl : typing.Optional[int]
            Presigned URLs TTL (in minutes)

        recursive_scan : typing.Optional[bool]
            Perform recursive scan

        regex_filter : typing.Optional[str]
            Cloud storage regex for filtering objects

        status : typing.Optional[StatusC5AEnum]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure Tenant ID

        title : typing.Optional[str]
            Cloud storage title

        traceback : typing.Optional[str]
            Traceback report for the last failed sync

        use_blob_urls : typing.Optional[bool]
            Interpret objects as BLOBs and generate URLs

        user_delegation_key : typing.Optional[str]
            User Delegation Key (Backend)

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

        Returns
        -------
        AzureServicePrincipalImportStorage


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.import_storage.azure_spi.create(
            project=1,
        )
        """
        _response = self._raw_client.create(
            project=project,
            account_name=account_name,
            client_id=client_id,
            client_secret=client_secret,
            container=container,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            presign=presign,
            presign_ttl=presign_ttl,
            recursive_scan=recursive_scan,
            regex_filter=regex_filter,
            status=status,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            user_delegation_key=user_delegation_key,
            request_options=request_options,
        )
        return _response.data

    def validate(
        self,
        *,
        project: int,
        account_name: typing.Optional[str] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: typing.Optional[str] = OMIT,
        container: typing.Optional[str] = OMIT,
        description: typing.Optional[str] = OMIT,
        last_sync: typing.Optional[dt.datetime] = OMIT,
        last_sync_count: typing.Optional[int] = OMIT,
        last_sync_job: typing.Optional[str] = OMIT,
        meta: typing.Optional[typing.Any] = OMIT,
        prefix: typing.Optional[str] = OMIT,
        presign: typing.Optional[bool] = OMIT,
        presign_ttl: typing.Optional[int] = OMIT,
        recursive_scan: typing.Optional[bool] = OMIT,
        regex_filter: typing.Optional[str] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        user_delegation_key: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> None:
        """
        <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>
        Validate a specific Azure import storage connection that was set up with Service Principal authentication.

        Parameters
        ----------
        project : int
            A unique integer value identifying this project.

        account_name : typing.Optional[str]
            Azure Blob account name

        client_id : typing.Optional[str]
            Azure Blob Service Principal Client ID

        client_secret : typing.Optional[str]
            Azure Blob Service Principal Client Secret

        container : typing.Optional[str]
            Azure blob container

        description : typing.Optional[str]
            Cloud storage description

        last_sync : typing.Optional[dt.datetime]
            Last sync finished time

        last_sync_count : typing.Optional[int]
            Count of tasks synced last time

        last_sync_job : typing.Optional[str]
            Last sync job ID

        meta : typing.Optional[typing.Any]
            Meta and debug information about storage processes

        prefix : typing.Optional[str]
            Azure blob prefix name

        presign : typing.Optional[bool]

        presign_ttl : typing.Optional[int]
            Presigned URLs TTL (in minutes)

        recursive_scan : typing.Optional[bool]
            Perform recursive scan

        regex_filter : typing.Optional[str]
            Cloud storage regex for filtering objects

        status : typing.Optional[StatusC5AEnum]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure Tenant ID

        title : typing.Optional[str]
            Cloud storage title

        traceback : typing.Optional[str]
            Traceback report for the last failed sync

        use_blob_urls : typing.Optional[bool]
            Interpret objects as BLOBs and generate URLs

        user_delegation_key : typing.Optional[str]
            User Delegation Key (Backend)

        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.import_storage.azure_spi.validate(
            project=1,
        )
        """
        _response = self._raw_client.validate(
            project=project,
            account_name=account_name,
            client_id=client_id,
            client_secret=client_secret,
            container=container,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            presign=presign,
            presign_ttl=presign_ttl,
            recursive_scan=recursive_scan,
            regex_filter=regex_filter,
            status=status,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            user_delegation_key=user_delegation_key,
            request_options=request_options,
        )
        return _response.data

    def get(
        self, id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AzureServicePrincipalImportStorage:
        """
        <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 Azure import storage connection that was set up with Service Principal authentication.

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

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

        Returns
        -------
        AzureServicePrincipalImportStorage


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.import_storage.azure_spi.get(
            id=1,
        )
        """
        _response = self._raw_client.get(id, request_options=request_options)
        return _response.data

    def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
        """
        <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 Azure import storage connection that was set up with Service Principal authentication.

        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.import_storage.azure_spi.delete(
            id=1,
        )
        """
        _response = self._raw_client.delete(id, request_options=request_options)
        return _response.data

    def update(
        self,
        id: int,
        *,
        account_name: typing.Optional[str] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: typing.Optional[str] = OMIT,
        container: typing.Optional[str] = OMIT,
        description: typing.Optional[str] = OMIT,
        last_sync: typing.Optional[dt.datetime] = OMIT,
        last_sync_count: typing.Optional[int] = OMIT,
        last_sync_job: typing.Optional[str] = OMIT,
        meta: typing.Optional[typing.Any] = OMIT,
        prefix: typing.Optional[str] = OMIT,
        presign: typing.Optional[bool] = OMIT,
        presign_ttl: typing.Optional[int] = OMIT,
        project: typing.Optional[int] = OMIT,
        recursive_scan: typing.Optional[bool] = OMIT,
        regex_filter: typing.Optional[str] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        user_delegation_key: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AzureServicePrincipalImportStorage:
        """
        <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 Azure import storage connection that was set up with Service Principal authentication.

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

        account_name : typing.Optional[str]
            Azure Blob account name

        client_id : typing.Optional[str]
            Azure Blob Service Principal Client ID

        client_secret : typing.Optional[str]
            Azure Blob Service Principal Client Secret

        container : typing.Optional[str]
            Azure blob container

        description : typing.Optional[str]
            Cloud storage description

        last_sync : typing.Optional[dt.datetime]
            Last sync finished time

        last_sync_count : typing.Optional[int]
            Count of tasks synced last time

        last_sync_job : typing.Optional[str]
            Last sync job ID

        meta : typing.Optional[typing.Any]
            Meta and debug information about storage processes

        prefix : typing.Optional[str]
            Azure blob prefix name

        presign : typing.Optional[bool]

        presign_ttl : typing.Optional[int]
            Presigned URLs TTL (in minutes)

        project : typing.Optional[int]
            A unique integer value identifying this project.

        recursive_scan : typing.Optional[bool]
            Perform recursive scan

        regex_filter : typing.Optional[str]
            Cloud storage regex for filtering objects

        status : typing.Optional[StatusC5AEnum]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure Tenant ID

        title : typing.Optional[str]
            Cloud storage title

        traceback : typing.Optional[str]
            Traceback report for the last failed sync

        use_blob_urls : typing.Optional[bool]
            Interpret objects as BLOBs and generate URLs

        user_delegation_key : typing.Optional[str]
            User Delegation Key (Backend)

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

        Returns
        -------
        AzureServicePrincipalImportStorage


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.import_storage.azure_spi.update(
            id=1,
        )
        """
        _response = self._raw_client.update(
            id,
            account_name=account_name,
            client_id=client_id,
            client_secret=client_secret,
            container=container,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            presign=presign,
            presign_ttl=presign_ttl,
            project=project,
            recursive_scan=recursive_scan,
            regex_filter=regex_filter,
            status=status,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            user_delegation_key=user_delegation_key,
            request_options=request_options,
        )
        return _response.data

    def sync(
        self, id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AzureServicePrincipalImportStorage:
        """
        <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>
        Sync tasks from an Azure import storage connection that was set up with Service Principal authentication.

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

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

        Returns
        -------
        AzureServicePrincipalImportStorage


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.import_storage.azure_spi.sync(
            id=1,
        )
        """
        _response = self._raw_client.sync(id, request_options=request_options)
        return _response.data


class AsyncAzureSpiClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawAzureSpiClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawAzureSpiClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAzureSpiClient
        """
        return self._raw_client

    async def list(
        self,
        *,
        project: int,
        ordering: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[AzureServicePrincipalImportStorage]:
        """
        <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 list of all Azure import storage connections set up with Service Principal authentication.

        Parameters
        ----------
        project : int
            Project ID

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

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

        Returns
        -------
        typing.List[AzureServicePrincipalImportStorage]


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.import_storage.azure_spi.list(
                project=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.list(project=project, ordering=ordering, request_options=request_options)
        return _response.data

    async def create(
        self,
        *,
        project: int,
        account_name: typing.Optional[str] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: typing.Optional[str] = OMIT,
        container: typing.Optional[str] = OMIT,
        description: typing.Optional[str] = OMIT,
        last_sync: typing.Optional[dt.datetime] = OMIT,
        last_sync_count: typing.Optional[int] = OMIT,
        last_sync_job: typing.Optional[str] = OMIT,
        meta: typing.Optional[typing.Any] = OMIT,
        prefix: typing.Optional[str] = OMIT,
        presign: typing.Optional[bool] = OMIT,
        presign_ttl: typing.Optional[int] = OMIT,
        recursive_scan: typing.Optional[bool] = OMIT,
        regex_filter: typing.Optional[str] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        user_delegation_key: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AzureServicePrincipalImportStorage:
        """
        <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 Azure import storage with Service Principal authentication.

        Parameters
        ----------
        project : int
            A unique integer value identifying this project.

        account_name : typing.Optional[str]
            Azure Blob account name

        client_id : typing.Optional[str]
            Azure Blob Service Principal Client ID

        client_secret : typing.Optional[str]
            Azure Blob Service Principal Client Secret

        container : typing.Optional[str]
            Azure blob container

        description : typing.Optional[str]
            Cloud storage description

        last_sync : typing.Optional[dt.datetime]
            Last sync finished time

        last_sync_count : typing.Optional[int]
            Count of tasks synced last time

        last_sync_job : typing.Optional[str]
            Last sync job ID

        meta : typing.Optional[typing.Any]
            Meta and debug information about storage processes

        prefix : typing.Optional[str]
            Azure blob prefix name

        presign : typing.Optional[bool]

        presign_ttl : typing.Optional[int]
            Presigned URLs TTL (in minutes)

        recursive_scan : typing.Optional[bool]
            Perform recursive scan

        regex_filter : typing.Optional[str]
            Cloud storage regex for filtering objects

        status : typing.Optional[StatusC5AEnum]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure Tenant ID

        title : typing.Optional[str]
            Cloud storage title

        traceback : typing.Optional[str]
            Traceback report for the last failed sync

        use_blob_urls : typing.Optional[bool]
            Interpret objects as BLOBs and generate URLs

        user_delegation_key : typing.Optional[str]
            User Delegation Key (Backend)

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

        Returns
        -------
        AzureServicePrincipalImportStorage


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.import_storage.azure_spi.create(
                project=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create(
            project=project,
            account_name=account_name,
            client_id=client_id,
            client_secret=client_secret,
            container=container,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            presign=presign,
            presign_ttl=presign_ttl,
            recursive_scan=recursive_scan,
            regex_filter=regex_filter,
            status=status,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            user_delegation_key=user_delegation_key,
            request_options=request_options,
        )
        return _response.data

    async def validate(
        self,
        *,
        project: int,
        account_name: typing.Optional[str] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: typing.Optional[str] = OMIT,
        container: typing.Optional[str] = OMIT,
        description: typing.Optional[str] = OMIT,
        last_sync: typing.Optional[dt.datetime] = OMIT,
        last_sync_count: typing.Optional[int] = OMIT,
        last_sync_job: typing.Optional[str] = OMIT,
        meta: typing.Optional[typing.Any] = OMIT,
        prefix: typing.Optional[str] = OMIT,
        presign: typing.Optional[bool] = OMIT,
        presign_ttl: typing.Optional[int] = OMIT,
        recursive_scan: typing.Optional[bool] = OMIT,
        regex_filter: typing.Optional[str] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        user_delegation_key: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> None:
        """
        <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>
        Validate a specific Azure import storage connection that was set up with Service Principal authentication.

        Parameters
        ----------
        project : int
            A unique integer value identifying this project.

        account_name : typing.Optional[str]
            Azure Blob account name

        client_id : typing.Optional[str]
            Azure Blob Service Principal Client ID

        client_secret : typing.Optional[str]
            Azure Blob Service Principal Client Secret

        container : typing.Optional[str]
            Azure blob container

        description : typing.Optional[str]
            Cloud storage description

        last_sync : typing.Optional[dt.datetime]
            Last sync finished time

        last_sync_count : typing.Optional[int]
            Count of tasks synced last time

        last_sync_job : typing.Optional[str]
            Last sync job ID

        meta : typing.Optional[typing.Any]
            Meta and debug information about storage processes

        prefix : typing.Optional[str]
            Azure blob prefix name

        presign : typing.Optional[bool]

        presign_ttl : typing.Optional[int]
            Presigned URLs TTL (in minutes)

        recursive_scan : typing.Optional[bool]
            Perform recursive scan

        regex_filter : typing.Optional[str]
            Cloud storage regex for filtering objects

        status : typing.Optional[StatusC5AEnum]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure Tenant ID

        title : typing.Optional[str]
            Cloud storage title

        traceback : typing.Optional[str]
            Traceback report for the last failed sync

        use_blob_urls : typing.Optional[bool]
            Interpret objects as BLOBs and generate URLs

        user_delegation_key : typing.Optional[str]
            User Delegation Key (Backend)

        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.import_storage.azure_spi.validate(
                project=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.validate(
            project=project,
            account_name=account_name,
            client_id=client_id,
            client_secret=client_secret,
            container=container,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            presign=presign,
            presign_ttl=presign_ttl,
            recursive_scan=recursive_scan,
            regex_filter=regex_filter,
            status=status,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            user_delegation_key=user_delegation_key,
            request_options=request_options,
        )
        return _response.data

    async def get(
        self, id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AzureServicePrincipalImportStorage:
        """
        <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 Azure import storage connection that was set up with Service Principal authentication.

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

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

        Returns
        -------
        AzureServicePrincipalImportStorage


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        """
        _response = await self._raw_client.get(id, request_options=request_options)
        return _response.data

    async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
        """
        <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 Azure import storage connection that was set up with Service Principal authentication.

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


        asyncio.run(main())
        """
        _response = await self._raw_client.delete(id, request_options=request_options)
        return _response.data

    async def update(
        self,
        id: int,
        *,
        account_name: typing.Optional[str] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: typing.Optional[str] = OMIT,
        container: typing.Optional[str] = OMIT,
        description: typing.Optional[str] = OMIT,
        last_sync: typing.Optional[dt.datetime] = OMIT,
        last_sync_count: typing.Optional[int] = OMIT,
        last_sync_job: typing.Optional[str] = OMIT,
        meta: typing.Optional[typing.Any] = OMIT,
        prefix: typing.Optional[str] = OMIT,
        presign: typing.Optional[bool] = OMIT,
        presign_ttl: typing.Optional[int] = OMIT,
        project: typing.Optional[int] = OMIT,
        recursive_scan: typing.Optional[bool] = OMIT,
        regex_filter: typing.Optional[str] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        user_delegation_key: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AzureServicePrincipalImportStorage:
        """
        <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 Azure import storage connection that was set up with Service Principal authentication.

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

        account_name : typing.Optional[str]
            Azure Blob account name

        client_id : typing.Optional[str]
            Azure Blob Service Principal Client ID

        client_secret : typing.Optional[str]
            Azure Blob Service Principal Client Secret

        container : typing.Optional[str]
            Azure blob container

        description : typing.Optional[str]
            Cloud storage description

        last_sync : typing.Optional[dt.datetime]
            Last sync finished time

        last_sync_count : typing.Optional[int]
            Count of tasks synced last time

        last_sync_job : typing.Optional[str]
            Last sync job ID

        meta : typing.Optional[typing.Any]
            Meta and debug information about storage processes

        prefix : typing.Optional[str]
            Azure blob prefix name

        presign : typing.Optional[bool]

        presign_ttl : typing.Optional[int]
            Presigned URLs TTL (in minutes)

        project : typing.Optional[int]
            A unique integer value identifying this project.

        recursive_scan : typing.Optional[bool]
            Perform recursive scan

        regex_filter : typing.Optional[str]
            Cloud storage regex for filtering objects

        status : typing.Optional[StatusC5AEnum]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure Tenant ID

        title : typing.Optional[str]
            Cloud storage title

        traceback : typing.Optional[str]
            Traceback report for the last failed sync

        use_blob_urls : typing.Optional[bool]
            Interpret objects as BLOBs and generate URLs

        user_delegation_key : typing.Optional[str]
            User Delegation Key (Backend)

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

        Returns
        -------
        AzureServicePrincipalImportStorage


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        """
        _response = await self._raw_client.update(
            id,
            account_name=account_name,
            client_id=client_id,
            client_secret=client_secret,
            container=container,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            presign=presign,
            presign_ttl=presign_ttl,
            project=project,
            recursive_scan=recursive_scan,
            regex_filter=regex_filter,
            status=status,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            user_delegation_key=user_delegation_key,
            request_options=request_options,
        )
        return _response.data

    async def sync(
        self, id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AzureServicePrincipalImportStorage:
        """
        <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>
        Sync tasks from an Azure import storage connection that was set up with Service Principal authentication.

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

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

        Returns
        -------
        AzureServicePrincipalImportStorage


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.import_storage.azure_spi.sync(
                id=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.sync(id, request_options=request_options)
        return _response.data
