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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
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 LseS3ImportStorage(UncheckedBaseModel):
    aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS_ACCESS_KEY_ID
    """

    aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS_SECRET_ACCESS_KEY
    """

    aws_session_token: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS_SESSION_TOKEN
    """

    aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS SSE KMS Key ID
    """

    bucket: typing.Optional[str] = pydantic.Field(default=None)
    """
    S3 bucket name
    """

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

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

    external_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS ExternalId
    """

    id: typing.Optional[int] = None
    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
    """

    legacy_auth: typing.Optional[bool] = None
    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)
    """
    S3 bucket prefix
    """

    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 over the bucket content
    """

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

    region_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS Region
    """

    role_arn: str = pydantic.Field()
    """
    AWS RoleArn
    """

    s3endpoint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_endpoint")] = pydantic.Field(
        default=None
    )
    """
    S3 Endpoint
    """

    status: typing.Optional[StatusC5AEnum] = None
    synchronizable: typing.Optional[bool] = None
    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
    """

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

    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
