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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .azure_connection_string_auth import AzureConnectionStringAuth


class AzureBlobStorage(UniversalBaseModel):
    """
    Azure ABS
    """

    type: typing.Literal["integration/blob-storage/azure/blob"] = pydantic.Field(
        default="integration/blob-storage/azure/blob"
    )
    """
    +value=integration/blob-storage/azure/blob
    """

    name: str = pydantic.Field()
    """
    The name of the integration that will be displayed in the TrueFoundry UI.
    """

    storage_root: str = pydantic.Field()
    """
    The full Azure Blob Storage URL in the format 'https://<storage-account-name>.blob.core.windows.net/<container-name>/<optional-path-prefix>'. Example: 'https://mystorageaccount.blob.core.windows.net/mycontainer' or 'https://mystorageaccount.blob.core.windows.net/mycontainer/artifacts/production'.
    """

    auth_data: typing.Optional[AzureConnectionStringAuth] = None
    authorized_subjects: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    List of subjects that are authorized to access this integration. List of user fqn in format <user_type>:<username>.
    """

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

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