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

from __future__ import annotations
from .createconsumerrequest import CreateConsumerRequest, CreateConsumerRequestTypedDict
from .createconsumerresponse import (
    CreateConsumerResponse,
    CreateConsumerResponseTypedDict,
)
from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict
from .unexpectederrorresponse import (
    UnexpectedErrorResponse,
    UnexpectedErrorResponseTypedDict,
)
from apideck_unify.types import BaseModel
from apideck_unify.utils import FieldMetadata, HeaderMetadata, RequestMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


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


class VaultConsumersAddGlobals(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 VaultConsumersAddRequestTypedDict(TypedDict):
    create_consumer_request: CreateConsumerRequestTypedDict
    app_id: NotRequired[str]
    r"""The ID of your Unify application"""


class VaultConsumersAddRequest(BaseModel):
    create_consumer_request: Annotated[
        CreateConsumerRequest,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]

    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 VaultConsumersAddResponseTypedDict(TypedDict):
    http_meta: HTTPMetadataTypedDict
    create_consumer_response: NotRequired[CreateConsumerResponseTypedDict]
    r"""Consumer created"""
    unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict]
    r"""Unexpected error"""


class VaultConsumersAddResponse(BaseModel):
    http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None

    create_consumer_response: Optional[CreateConsumerResponse] = None
    r"""Consumer created"""

    unexpected_error_response: Optional[UnexpectedErrorResponse] = None
    r"""Unexpected error"""
