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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .status_c5a_enum import StatusC5AEnum


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

    client_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure Blob Service Principal Client ID
    """

    client_secret: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure Blob Service Principal Client Secret
    """

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

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

    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.Any] = pydantic.Field(default=None)
    """
    Meta and debug information about storage processes
    """

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

    presign: typing.Optional[bool] = None
    presign_ttl: typing.Optional[int] = pydantic.Field(default=None)
    """
    Presigned URLs TTL (in minutes)
    """

    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)
    """
    Cloud storage regex for filtering objects
    """

    status: typing.Optional[StatusC5AEnum] = None
    synchronizable: typing.Optional[bool] = None
    tenant_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure Tenant ID
    """

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

    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)
    """
    Interpret objects as BLOBs and generate URLs
    """

    user_delegation_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    User Delegation Key (Backend)
    """

    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
