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

from ..core.unchecked_base_model import UncheckedBaseModel
import pydantic
import typing
import datetime as dt
import typing_extensions
from ..core.serialization import FieldMetadata
from .status_c5a_enum import StatusC5AEnum
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class DatabricksImportStorageRequest(UncheckedBaseModel):
    catalog: str = pydantic.Field()
    """
    UC catalog name
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Cloud storage description
    """

    host: str = pydantic.Field()
    """
    Databricks workspace base URL (https://...)
    """

    last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Last sync finished time
    """

    last_sync_count: typing.Optional[int] = pydantic.Field(default=None)
    """
    Count of tasks synced last time
    """

    last_sync_job: typing.Optional[str] = pydantic.Field(default=None)
    """
    Last sync job ID
    """

    meta: typing.Optional[typing.Optional[typing.Any]] = pydantic.Field(default=None)
    """
    Meta and debug information about storage processes
    """

    prefix: typing.Optional[str] = pydantic.Field(default=None)
    """
    Path under the volume
    """

    presign: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Presign not supported; always proxied
    """

    presign_ttl: typing.Optional[int] = pydantic.Field(default=None)
    """
    Unused for Databricks; kept for compatibility
    """

    project: int = pydantic.Field()
    """
    A unique integer value identifying this project.
    """

    recursive_scan: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Perform recursive scan
    """

    regex_filter: typing.Optional[str] = pydantic.Field(default=None)
    """
    Regex for filtering objects
    """

    request_timeout_s: typing.Optional[int] = None
    schema_: typing_extensions.Annotated[str, FieldMetadata(alias="schema")] = pydantic.Field()
    """
    UC schema name
    """

    status: typing.Optional[StatusC5AEnum] = None
    stream_chunk_bytes: typing.Optional[int] = None
    synchronizable: typing.Optional[bool] = None
    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    Cloud storage title
    """

    token: typing.Optional[str] = None
    traceback: typing.Optional[str] = pydantic.Field(default=None)
    """
    Traceback report for the last failed sync
    """

    use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Generate blob URLs in tasks
    """

    verify_tls: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Verify TLS certificates
    """

    volume: str = pydantic.Field()
    """
    UC volume name
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
