"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .policy import Policy, PolicyTypedDict
from datetime import datetime
from factify.types import BaseModel
from typing_extensions import TypedDict


class DocumentPolicyTypedDict(TypedDict):
    r"""DocumentPolicy represents a policy attached to a document."""

    attached_at: datetime
    r"""Timestamp when policy was attached."""
    document_id: str
    r"""Document ID this policy is attached to.
    Pattern: doc_[0-9a-hjkmnp-tv-z]{26}
    """
    policy: PolicyTypedDict
    r"""Policy represents a governance policy."""


class DocumentPolicy(BaseModel):
    r"""DocumentPolicy represents a policy attached to a document."""

    attached_at: datetime
    r"""Timestamp when policy was attached."""

    document_id: str
    r"""Document ID this policy is attached to.
    Pattern: doc_[0-9a-hjkmnp-tv-z]{26}
    """

    policy: Policy
    r"""Policy represents a governance policy."""
