# 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.auth_type_enum import AuthTypeEnum
from ...types.databricks_export_storage import DatabricksExportStorage
from ...types.status_c5a_enum import StatusC5AEnum
from .raw_client import AsyncRawDatabricksClient, RawDatabricksClient

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


class DatabricksClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawDatabricksClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawDatabricksClient
        """
        return self._raw_client

    def list(
        self,
        *,
        project: int,
        ordering: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[DatabricksExportStorage]:
        """
        <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 Databricks Files export storage connections.

        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[DatabricksExportStorage]


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

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

    def create(
        self,
        *,
        catalog: str,
        host: str,
        project: int,
        schema: str,
        volume: str,
        auth_type: typing.Optional[AuthTypeEnum] = OMIT,
        can_delete_objects: typing.Optional[bool] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: 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,
        regex_filter: typing.Optional[str] = OMIT,
        request_timeout_s: typing.Optional[int] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        stream_chunk_bytes: typing.Optional[int] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        token: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        verify_tls: typing.Optional[bool] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DatabricksExportStorage:
        """
        <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 Databricks Files export storage connection.

        Parameters
        ----------
        catalog : str
            UC catalog name

        host : str
            Databricks workspace base URL (https://...)

        project : int
            A unique integer value identifying this project.

        schema : str
            UC schema name

        volume : str
            UC volume name

        auth_type : typing.Optional[AuthTypeEnum]
            Authentication method: PAT, Databricks SP, or Azure AD SP

            * `pat` - Personal Access Token
            * `dbx_sp` - Databricks Service Principal
            * `azure_ad_sp` - Azure AD Service Principal

        can_delete_objects : typing.Optional[bool]
            Deletion from storage enabled

        client_id : typing.Optional[str]
            Service principal client/application ID (required for SP modes)

        client_secret : typing.Optional[str]
            Service principal client secret (required for SP modes)

        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]
            Export path prefix under the volume

        regex_filter : typing.Optional[str]
            Regex for filtering objects

        request_timeout_s : typing.Optional[int]

        status : typing.Optional[StatusC5AEnum]

        stream_chunk_bytes : typing.Optional[int]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure AD tenant ID (required for Azure AD SP mode)

        title : typing.Optional[str]
            Cloud storage title

        token : typing.Optional[str]
            Databricks personal access token (required for PAT mode)

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

        use_blob_urls : typing.Optional[bool]
            Generate blob URLs in tasks

        verify_tls : typing.Optional[bool]
            Verify TLS certificates

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

        Returns
        -------
        DatabricksExportStorage


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.export_storage.databricks.create(
            catalog="catalog",
            host="host",
            project=1,
            schema="schema",
            volume="volume",
        )
        """
        _response = self._raw_client.create(
            catalog=catalog,
            host=host,
            project=project,
            schema=schema,
            volume=volume,
            auth_type=auth_type,
            can_delete_objects=can_delete_objects,
            client_id=client_id,
            client_secret=client_secret,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            regex_filter=regex_filter,
            request_timeout_s=request_timeout_s,
            status=status,
            stream_chunk_bytes=stream_chunk_bytes,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            token=token,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            verify_tls=verify_tls,
            request_options=request_options,
        )
        return _response.data

    def validate(
        self,
        *,
        catalog: str,
        host: str,
        project: int,
        schema: str,
        volume: str,
        auth_type: typing.Optional[AuthTypeEnum] = OMIT,
        can_delete_objects: typing.Optional[bool] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: 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,
        regex_filter: typing.Optional[str] = OMIT,
        request_timeout_s: typing.Optional[int] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        stream_chunk_bytes: typing.Optional[int] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        token: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        verify_tls: typing.Optional[bool] = 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 Databricks Files export storage connection.

        Parameters
        ----------
        catalog : str
            UC catalog name

        host : str
            Databricks workspace base URL (https://...)

        project : int
            A unique integer value identifying this project.

        schema : str
            UC schema name

        volume : str
            UC volume name

        auth_type : typing.Optional[AuthTypeEnum]
            Authentication method: PAT, Databricks SP, or Azure AD SP

            * `pat` - Personal Access Token
            * `dbx_sp` - Databricks Service Principal
            * `azure_ad_sp` - Azure AD Service Principal

        can_delete_objects : typing.Optional[bool]
            Deletion from storage enabled

        client_id : typing.Optional[str]
            Service principal client/application ID (required for SP modes)

        client_secret : typing.Optional[str]
            Service principal client secret (required for SP modes)

        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]
            Export path prefix under the volume

        regex_filter : typing.Optional[str]
            Regex for filtering objects

        request_timeout_s : typing.Optional[int]

        status : typing.Optional[StatusC5AEnum]

        stream_chunk_bytes : typing.Optional[int]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure AD tenant ID (required for Azure AD SP mode)

        title : typing.Optional[str]
            Cloud storage title

        token : typing.Optional[str]
            Databricks personal access token (required for PAT mode)

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

        use_blob_urls : typing.Optional[bool]
            Generate blob URLs in tasks

        verify_tls : typing.Optional[bool]
            Verify TLS certificates

        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.export_storage.databricks.validate(
            catalog="catalog",
            host="host",
            project=1,
            schema="schema",
            volume="volume",
        )
        """
        _response = self._raw_client.validate(
            catalog=catalog,
            host=host,
            project=project,
            schema=schema,
            volume=volume,
            auth_type=auth_type,
            can_delete_objects=can_delete_objects,
            client_id=client_id,
            client_secret=client_secret,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            regex_filter=regex_filter,
            request_timeout_s=request_timeout_s,
            status=status,
            stream_chunk_bytes=stream_chunk_bytes,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            token=token,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            verify_tls=verify_tls,
            request_options=request_options,
        )
        return _response.data

    def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> DatabricksExportStorage:
        """
        <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 Databricks Files export storage connection.

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

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

        Returns
        -------
        DatabricksExportStorage


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.export_storage.databricks.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 Databricks Files export storage connection.

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

    def update(
        self,
        id: int,
        *,
        auth_type: typing.Optional[AuthTypeEnum] = OMIT,
        can_delete_objects: typing.Optional[bool] = OMIT,
        catalog: typing.Optional[str] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: typing.Optional[str] = OMIT,
        description: typing.Optional[str] = OMIT,
        host: 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,
        project: typing.Optional[int] = OMIT,
        regex_filter: typing.Optional[str] = OMIT,
        request_timeout_s: typing.Optional[int] = OMIT,
        schema: typing.Optional[str] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        stream_chunk_bytes: typing.Optional[int] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        token: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        verify_tls: typing.Optional[bool] = OMIT,
        volume: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DatabricksExportStorage:
        """
        <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 Databricks Files export storage connection.

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

        auth_type : typing.Optional[AuthTypeEnum]
            Authentication method: PAT, Databricks SP, or Azure AD SP

            * `pat` - Personal Access Token
            * `dbx_sp` - Databricks Service Principal
            * `azure_ad_sp` - Azure AD Service Principal

        can_delete_objects : typing.Optional[bool]
            Deletion from storage enabled

        catalog : typing.Optional[str]
            UC catalog name

        client_id : typing.Optional[str]
            Service principal client/application ID (required for SP modes)

        client_secret : typing.Optional[str]
            Service principal client secret (required for SP modes)

        description : typing.Optional[str]
            Cloud storage description

        host : typing.Optional[str]
            Databricks workspace base URL (https://...)

        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]
            Export path prefix under the volume

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

        regex_filter : typing.Optional[str]
            Regex for filtering objects

        request_timeout_s : typing.Optional[int]

        schema : typing.Optional[str]
            UC schema name

        status : typing.Optional[StatusC5AEnum]

        stream_chunk_bytes : typing.Optional[int]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure AD tenant ID (required for Azure AD SP mode)

        title : typing.Optional[str]
            Cloud storage title

        token : typing.Optional[str]
            Databricks personal access token (required for PAT mode)

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

        use_blob_urls : typing.Optional[bool]
            Generate blob URLs in tasks

        verify_tls : typing.Optional[bool]
            Verify TLS certificates

        volume : typing.Optional[str]
            UC volume name

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

        Returns
        -------
        DatabricksExportStorage


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

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.export_storage.databricks.update(
            id=1,
        )
        """
        _response = self._raw_client.update(
            id,
            auth_type=auth_type,
            can_delete_objects=can_delete_objects,
            catalog=catalog,
            client_id=client_id,
            client_secret=client_secret,
            description=description,
            host=host,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            project=project,
            regex_filter=regex_filter,
            request_timeout_s=request_timeout_s,
            schema=schema,
            status=status,
            stream_chunk_bytes=stream_chunk_bytes,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            token=token,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            verify_tls=verify_tls,
            volume=volume,
            request_options=request_options,
        )
        return _response.data

    def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> DatabricksExportStorage:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Export annotations to a Databricks Files storage.

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

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

        Returns
        -------
        DatabricksExportStorage


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

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


class AsyncDatabricksClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawDatabricksClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawDatabricksClient
        """
        return self._raw_client

    async def list(
        self,
        *,
        project: int,
        ordering: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[DatabricksExportStorage]:
        """
        <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 Databricks Files export storage connections.

        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[DatabricksExportStorage]


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.export_storage.databricks.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,
        *,
        catalog: str,
        host: str,
        project: int,
        schema: str,
        volume: str,
        auth_type: typing.Optional[AuthTypeEnum] = OMIT,
        can_delete_objects: typing.Optional[bool] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: 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,
        regex_filter: typing.Optional[str] = OMIT,
        request_timeout_s: typing.Optional[int] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        stream_chunk_bytes: typing.Optional[int] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        token: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        verify_tls: typing.Optional[bool] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DatabricksExportStorage:
        """
        <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 Databricks Files export storage connection.

        Parameters
        ----------
        catalog : str
            UC catalog name

        host : str
            Databricks workspace base URL (https://...)

        project : int
            A unique integer value identifying this project.

        schema : str
            UC schema name

        volume : str
            UC volume name

        auth_type : typing.Optional[AuthTypeEnum]
            Authentication method: PAT, Databricks SP, or Azure AD SP

            * `pat` - Personal Access Token
            * `dbx_sp` - Databricks Service Principal
            * `azure_ad_sp` - Azure AD Service Principal

        can_delete_objects : typing.Optional[bool]
            Deletion from storage enabled

        client_id : typing.Optional[str]
            Service principal client/application ID (required for SP modes)

        client_secret : typing.Optional[str]
            Service principal client secret (required for SP modes)

        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]
            Export path prefix under the volume

        regex_filter : typing.Optional[str]
            Regex for filtering objects

        request_timeout_s : typing.Optional[int]

        status : typing.Optional[StatusC5AEnum]

        stream_chunk_bytes : typing.Optional[int]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure AD tenant ID (required for Azure AD SP mode)

        title : typing.Optional[str]
            Cloud storage title

        token : typing.Optional[str]
            Databricks personal access token (required for PAT mode)

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

        use_blob_urls : typing.Optional[bool]
            Generate blob URLs in tasks

        verify_tls : typing.Optional[bool]
            Verify TLS certificates

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

        Returns
        -------
        DatabricksExportStorage


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.export_storage.databricks.create(
                catalog="catalog",
                host="host",
                project=1,
                schema="schema",
                volume="volume",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create(
            catalog=catalog,
            host=host,
            project=project,
            schema=schema,
            volume=volume,
            auth_type=auth_type,
            can_delete_objects=can_delete_objects,
            client_id=client_id,
            client_secret=client_secret,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            regex_filter=regex_filter,
            request_timeout_s=request_timeout_s,
            status=status,
            stream_chunk_bytes=stream_chunk_bytes,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            token=token,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            verify_tls=verify_tls,
            request_options=request_options,
        )
        return _response.data

    async def validate(
        self,
        *,
        catalog: str,
        host: str,
        project: int,
        schema: str,
        volume: str,
        auth_type: typing.Optional[AuthTypeEnum] = OMIT,
        can_delete_objects: typing.Optional[bool] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: 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,
        regex_filter: typing.Optional[str] = OMIT,
        request_timeout_s: typing.Optional[int] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        stream_chunk_bytes: typing.Optional[int] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        token: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        verify_tls: typing.Optional[bool] = 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 Databricks Files export storage connection.

        Parameters
        ----------
        catalog : str
            UC catalog name

        host : str
            Databricks workspace base URL (https://...)

        project : int
            A unique integer value identifying this project.

        schema : str
            UC schema name

        volume : str
            UC volume name

        auth_type : typing.Optional[AuthTypeEnum]
            Authentication method: PAT, Databricks SP, or Azure AD SP

            * `pat` - Personal Access Token
            * `dbx_sp` - Databricks Service Principal
            * `azure_ad_sp` - Azure AD Service Principal

        can_delete_objects : typing.Optional[bool]
            Deletion from storage enabled

        client_id : typing.Optional[str]
            Service principal client/application ID (required for SP modes)

        client_secret : typing.Optional[str]
            Service principal client secret (required for SP modes)

        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]
            Export path prefix under the volume

        regex_filter : typing.Optional[str]
            Regex for filtering objects

        request_timeout_s : typing.Optional[int]

        status : typing.Optional[StatusC5AEnum]

        stream_chunk_bytes : typing.Optional[int]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure AD tenant ID (required for Azure AD SP mode)

        title : typing.Optional[str]
            Cloud storage title

        token : typing.Optional[str]
            Databricks personal access token (required for PAT mode)

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

        use_blob_urls : typing.Optional[bool]
            Generate blob URLs in tasks

        verify_tls : typing.Optional[bool]
            Verify TLS certificates

        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.export_storage.databricks.validate(
                catalog="catalog",
                host="host",
                project=1,
                schema="schema",
                volume="volume",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.validate(
            catalog=catalog,
            host=host,
            project=project,
            schema=schema,
            volume=volume,
            auth_type=auth_type,
            can_delete_objects=can_delete_objects,
            client_id=client_id,
            client_secret=client_secret,
            description=description,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            regex_filter=regex_filter,
            request_timeout_s=request_timeout_s,
            status=status,
            stream_chunk_bytes=stream_chunk_bytes,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            token=token,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            verify_tls=verify_tls,
            request_options=request_options,
        )
        return _response.data

    async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> DatabricksExportStorage:
        """
        <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 Databricks Files export storage connection.

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

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

        Returns
        -------
        DatabricksExportStorage


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.export_storage.databricks.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 Databricks Files export storage connection.

        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.export_storage.databricks.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,
        *,
        auth_type: typing.Optional[AuthTypeEnum] = OMIT,
        can_delete_objects: typing.Optional[bool] = OMIT,
        catalog: typing.Optional[str] = OMIT,
        client_id: typing.Optional[str] = OMIT,
        client_secret: typing.Optional[str] = OMIT,
        description: typing.Optional[str] = OMIT,
        host: 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,
        project: typing.Optional[int] = OMIT,
        regex_filter: typing.Optional[str] = OMIT,
        request_timeout_s: typing.Optional[int] = OMIT,
        schema: typing.Optional[str] = OMIT,
        status: typing.Optional[StatusC5AEnum] = OMIT,
        stream_chunk_bytes: typing.Optional[int] = OMIT,
        synchronizable: typing.Optional[bool] = OMIT,
        tenant_id: typing.Optional[str] = OMIT,
        title: typing.Optional[str] = OMIT,
        token: typing.Optional[str] = OMIT,
        traceback: typing.Optional[str] = OMIT,
        use_blob_urls: typing.Optional[bool] = OMIT,
        verify_tls: typing.Optional[bool] = OMIT,
        volume: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DatabricksExportStorage:
        """
        <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 Databricks Files export storage connection.

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

        auth_type : typing.Optional[AuthTypeEnum]
            Authentication method: PAT, Databricks SP, or Azure AD SP

            * `pat` - Personal Access Token
            * `dbx_sp` - Databricks Service Principal
            * `azure_ad_sp` - Azure AD Service Principal

        can_delete_objects : typing.Optional[bool]
            Deletion from storage enabled

        catalog : typing.Optional[str]
            UC catalog name

        client_id : typing.Optional[str]
            Service principal client/application ID (required for SP modes)

        client_secret : typing.Optional[str]
            Service principal client secret (required for SP modes)

        description : typing.Optional[str]
            Cloud storage description

        host : typing.Optional[str]
            Databricks workspace base URL (https://...)

        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]
            Export path prefix under the volume

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

        regex_filter : typing.Optional[str]
            Regex for filtering objects

        request_timeout_s : typing.Optional[int]

        schema : typing.Optional[str]
            UC schema name

        status : typing.Optional[StatusC5AEnum]

        stream_chunk_bytes : typing.Optional[int]

        synchronizable : typing.Optional[bool]

        tenant_id : typing.Optional[str]
            Azure AD tenant ID (required for Azure AD SP mode)

        title : typing.Optional[str]
            Cloud storage title

        token : typing.Optional[str]
            Databricks personal access token (required for PAT mode)

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

        use_blob_urls : typing.Optional[bool]
            Generate blob URLs in tasks

        verify_tls : typing.Optional[bool]
            Verify TLS certificates

        volume : typing.Optional[str]
            UC volume name

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

        Returns
        -------
        DatabricksExportStorage


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        """
        _response = await self._raw_client.update(
            id,
            auth_type=auth_type,
            can_delete_objects=can_delete_objects,
            catalog=catalog,
            client_id=client_id,
            client_secret=client_secret,
            description=description,
            host=host,
            last_sync=last_sync,
            last_sync_count=last_sync_count,
            last_sync_job=last_sync_job,
            meta=meta,
            prefix=prefix,
            project=project,
            regex_filter=regex_filter,
            request_timeout_s=request_timeout_s,
            schema=schema,
            status=status,
            stream_chunk_bytes=stream_chunk_bytes,
            synchronizable=synchronizable,
            tenant_id=tenant_id,
            title=title,
            token=token,
            traceback=traceback,
            use_blob_urls=use_blob_urls,
            verify_tls=verify_tls,
            volume=volume,
            request_options=request_options,
        )
        return _response.data

    async def sync(
        self, id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> DatabricksExportStorage:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Export annotations to a Databricks Files storage.

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

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

        Returns
        -------
        DatabricksExportStorage


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


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


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