# 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, UniversalBaseModel


class RetentionPolicyResponse(UniversalBaseModel):
    """
    Response schema for retention policy.
    """

    id: typing.Optional[str] = None
    organization_id: str
    retention_days: int = pydantic.Field()
    """
    0 = unlimited retention
    """

    policy_type: str = pydantic.Field()
    """
    standard, strict, or regulatory
    """

    apply_to: str = pydantic.Field()
    """
    Comma-separated content types: transcripts,recordings,intelligence
    """

    grace_period_days: int = pydantic.Field()
    """
    Days before permanent deletion
    """

    is_active: typing.Optional[bool] = None
    is_default: typing.Optional[bool] = None
    created_at: typing.Optional[dt.datetime] = None
    updated_at: typing.Optional[dt.datetime] = 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
