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

from __future__ import annotations
from datetime import datetime
from paygentic_sdk.types import BaseModel
from paygentic_sdk.utils import FieldMetadata, PathParamMetadata, RequestMetadata
import pydantic
from typing import Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


class RequestBody2TypedDict(TypedDict):
    advance_by: str
    r"""ISO 8601 duration format indicating clock advancement distance. Sample values: 'P1M' moves forward one month, 'P7D' moves forward seven days, 'PT2H' moves forward two hours, 'P1Y2M3DT4H5M6S' moves forward one year, two months, three days, four hours, five minutes, and six seconds"""


class RequestBody2(BaseModel):
    advance_by: Annotated[str, pydantic.Field(alias="advanceBy")]
    r"""ISO 8601 duration format indicating clock advancement distance. Sample values: 'P1M' moves forward one month, 'P7D' moves forward seven days, 'PT2H' moves forward two hours, 'P1Y2M3DT4H5M6S' moves forward one year, two months, three days, four hours, five minutes, and six seconds"""


class RequestBody1TypedDict(TypedDict):
    current_time: datetime
    r"""New absolute time for the test clock (must be forward in time)"""


class RequestBody1(BaseModel):
    current_time: Annotated[datetime, pydantic.Field(alias="currentTime")]
    r"""New absolute time for the test clock (must be forward in time)"""


AdvanceTestClockRequestBodyTypedDict = TypeAliasType(
    "AdvanceTestClockRequestBodyTypedDict",
    Union[RequestBody1TypedDict, RequestBody2TypedDict],
)


AdvanceTestClockRequestBody = TypeAliasType(
    "AdvanceTestClockRequestBody", Union[RequestBody1, RequestBody2]
)


class AdvanceTestClockRequestTypedDict(TypedDict):
    id: str
    r"""Test clock ID"""
    request_body: AdvanceTestClockRequestBodyTypedDict


class AdvanceTestClockRequest(BaseModel):
    id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Test clock ID"""

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


try:
    RequestBody2.model_rebuild()
except NameError:
    pass
try:
    RequestBody1.model_rebuild()
except NameError:
    pass
