# 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
from .approver_object_approver import ApproverObjectApprover
from .approver_object_policy import ApproverObjectPolicy


class ApproverObject(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    Unique approval record identifier
    """

    approver: ApproverObjectApprover = pydantic.Field()
    """
    Approver user details
    """

    policy: typing.Optional[ApproverObjectPolicy] = pydantic.Field(default=None)
    """
    Policy that assigned this approver (null if manually added)
    """

    created_date: dt.datetime = pydantic.Field()
    """
    Date when approver was added
    """

    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
