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

import typing

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


class AutoSyncInfo(UncheckedBaseModel):
    minimum_frequency_days: typing.Optional[int] = pydantic.Field(default=None)
    """
    Maximum number of days between automatic syncs
    """

    auto_remove: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to remove the document if the URL becomes unavailable
    """

    consec_failures: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of consecutive sync failures
    """

    next_refresh_by: typing.Optional[int] = pydantic.Field(default=None)
    """
    Unix timestamp for the next scheduled sync or None (in case of folders)
    """

    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
