# 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 .configuration_write_timeout_to_mark_thread_as_inactive_units_item import (
    ConfigurationWriteTimeoutToMarkThreadAsInactiveUnitsItem,
)


class ConfigurationWriteTimeoutToMarkThreadAsInactive(UniversalBaseModel):
    """
    minimum precision supported is seconds, please use a duration with seconds precision or higher. Also, the max duration allowed is 7 days.
    """

    seconds: typing.Optional[int] = None
    zero: typing.Optional[bool] = None
    nano: typing.Optional[int] = None
    negative: typing.Optional[bool] = None
    positive: typing.Optional[bool] = None
    units: typing.Optional[typing.List[ConfigurationWriteTimeoutToMarkThreadAsInactiveUnitsItem]] = None

    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
