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

from __future__ import annotations
from .documentpolicy import DocumentPolicy, DocumentPolicyTypedDict
from factify.types import BaseModel
from factify.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Dict, List
from typing_extensions import Annotated, TypedDict


class AttachPolicyRequestTypedDict(TypedDict):
    r"""AttachPolicyRequest specifies a policy to attach to a document."""

    policy_id: str
    r"""Policy ID to attach.
    Pattern: pol_[0-9a-hjkmnp-tv-z]{26}
    """


class AttachPolicyRequest(BaseModel):
    r"""AttachPolicyRequest specifies a policy to attach to a document."""

    policy_id: str
    r"""Policy ID to attach.
    Pattern: pol_[0-9a-hjkmnp-tv-z]{26}
    """


class AttachDocumentPolicyRequestTypedDict(TypedDict):
    document_id: str
    r"""Document ID.
    Pattern: doc_[0-9a-hjkmnp-tv-z]{26}
    """
    body: AttachPolicyRequestTypedDict


class AttachDocumentPolicyRequest(BaseModel):
    document_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Document ID.
    Pattern: doc_[0-9a-hjkmnp-tv-z]{26}
    """

    body: Annotated[
        AttachPolicyRequest,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


class AttachDocumentPolicyResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: DocumentPolicyTypedDict


class AttachDocumentPolicyResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: DocumentPolicy
