# 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 RedisExportStorage(UncheckedBaseModel):
    can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Deletion from storage enabled
    """

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

    db: typing.Optional[int] = pydantic.Field(default=None)
    """
    Server Database
    """

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

    host: typing.Optional[str] = pydantic.Field(default=None)
    """
    Server Host IP (optional)
    """

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

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

    password: typing.Optional[str] = pydantic.Field(default=None)
    """
    Server Password (optional)
    """

    path: typing.Optional[str] = pydantic.Field(default=None)
    """
    Storage prefix (optional)
    """

    port: typing.Optional[str] = pydantic.Field(default=None)
    """
    Server Port (optional)
    """

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

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