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

from __future__ import annotations
from .consumerrequestcountsindaterangeresponse import (
    ConsumerRequestCountsInDateRangeResponse,
    ConsumerRequestCountsInDateRangeResponseTypedDict,
)
from .unexpectederrorresponse import (
    UnexpectedErrorResponse,
    UnexpectedErrorResponseTypedDict,
)
from apideck_unify.types import BaseModel
from apideck_unify.utils import (
    FieldMetadata,
    HeaderMetadata,
    PathParamMetadata,
    QueryParamMetadata,
)
import pydantic
from typing import Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict


class VaultConsumerRequestCountsAllGlobalsTypedDict(TypedDict):
    app_id: NotRequired[str]
    r"""The ID of your Unify application"""


class VaultConsumerRequestCountsAllGlobals(BaseModel):
    app_id: Annotated[
        Optional[str],
        pydantic.Field(alias="x-apideck-app-id"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""The ID of your Unify application"""


class VaultConsumerRequestCountsAllRequestTypedDict(TypedDict):
    consumer_id: str
    r"""ID of the consumer to return"""
    start_datetime: str
    r"""Scopes results to requests that happened after datetime"""
    end_datetime: str
    r"""Scopes results to requests that happened before datetime"""


class VaultConsumerRequestCountsAllRequest(BaseModel):
    consumer_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""ID of the consumer to return"""

    start_datetime: Annotated[
        str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
    ]
    r"""Scopes results to requests that happened after datetime"""

    end_datetime: Annotated[
        str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
    ]
    r"""Scopes results to requests that happened before datetime"""


VaultConsumerRequestCountsAllResponseTypedDict = TypeAliasType(
    "VaultConsumerRequestCountsAllResponseTypedDict",
    Union[
        ConsumerRequestCountsInDateRangeResponseTypedDict,
        UnexpectedErrorResponseTypedDict,
    ],
)


VaultConsumerRequestCountsAllResponse = TypeAliasType(
    "VaultConsumerRequestCountsAllResponse",
    Union[ConsumerRequestCountsInDateRangeResponse, UnexpectedErrorResponse],
)
