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

from __future__ import annotations
from documenso_sdk import utils
from documenso_sdk.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, TypedDict


class TemplateToggleTemplateDirectLinkRequestBodyTypedDict(TypedDict):
    template_id: float
    enabled: bool


class TemplateToggleTemplateDirectLinkRequestBody(BaseModel):
    template_id: Annotated[float, pydantic.Field(alias="templateId")]

    enabled: bool


class TemplateToggleTemplateDirectLinkTemplatesDirectLinkIssuesTypedDict(TypedDict):
    message: str


class TemplateToggleTemplateDirectLinkTemplatesDirectLinkIssues(BaseModel):
    message: str


class TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseResponseBodyData(
    BaseModel
):
    message: str

    code: str

    issues: Optional[
        List[TemplateToggleTemplateDirectLinkTemplatesDirectLinkIssues]
    ] = None


class TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseResponseBody(
    Exception
):
    r"""Internal server error"""

    data: TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseResponseBodyData

    def __init__(
        self,
        data: TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseResponseBodyData,
    ):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(
            self.data,
            TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseResponseBodyData,
        )


class TemplateToggleTemplateDirectLinkIssuesTypedDict(TypedDict):
    message: str


class TemplateToggleTemplateDirectLinkIssues(BaseModel):
    message: str


class TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseBodyData(BaseModel):
    message: str

    code: str

    issues: Optional[List[TemplateToggleTemplateDirectLinkIssues]] = None


class TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseBody(Exception):
    r"""Invalid input data"""

    data: TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseBodyData

    def __init__(
        self, data: TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseBodyData
    ):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(
            self.data,
            TemplateToggleTemplateDirectLinkTemplatesDirectLinkResponseBodyData,
        )


class TemplateToggleTemplateDirectLinkResponseBodyTypedDict(TypedDict):
    r"""Successful response"""

    id: str
    template_id: int
    token: str
    created_at: str
    enabled: bool
    direct_template_recipient_id: int


class TemplateToggleTemplateDirectLinkResponseBody(BaseModel):
    r"""Successful response"""

    id: str

    template_id: Annotated[int, pydantic.Field(alias="templateId")]

    token: str

    created_at: Annotated[str, pydantic.Field(alias="createdAt")]

    enabled: bool

    direct_template_recipient_id: Annotated[
        int, pydantic.Field(alias="directTemplateRecipientId")
    ]
