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

import typing

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


class AutoRotate(UniversalBaseModel):
    """
    Enable Auto Rotation to automatically rotate the token
    """

    auto_rotate_interval: int = pydantic.Field(default=360)
    """
    Rotation Interval in days after which the token will be rotated. Minimum value is 30.
    """

    grace_period: int = pydantic.Field(default=30)
    """
    Grace Period in days for which the token will be valid after rotation interval. Minimum value is 1.
    """

    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
