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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
import datetime as dt
from .azure_blob_export_storage_status import AzureBlobExportStorageStatus
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class AzureBlobExportStorage(UniversalBaseModel):
    id: typing.Optional[int] = None
    type: typing.Optional[str] = None
    synchronizable: typing.Optional[bool] = None
    container: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure blob container
    """

    prefix: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure blob prefix name
    """

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

    use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Interpret objects as BLOBs and generate URLs
    """

    account_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure Blob account name
    """

    account_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure Blob account key
    """

    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
    """

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

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

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

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

    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Creation time
    """

    can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Deletion from storage enabled
    """

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

    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
