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

from __future__ import annotations
from ascend_sdk.models.components import (
    httpmetadata as components_httpmetadata,
    status as components_status,
    token as components_token,
)
from ascend_sdk.types import BaseModel
from ascend_sdk.utils import FieldMetadata, SecurityMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class AuthenticationGenerateServiceAccountTokenSecurityTypedDict(TypedDict):
    api_key_auth: str


class AuthenticationGenerateServiceAccountTokenSecurity(BaseModel):
    api_key_auth: Annotated[
        str,
        FieldMetadata(
            security=SecurityMetadata(
                scheme=True,
                scheme_type="apiKey",
                sub_type="header",
                field_name="x-api-key",
            )
        ),
    ]


class AuthenticationGenerateServiceAccountTokenResponseTypedDict(TypedDict):
    http_meta: components_httpmetadata.HTTPMetadataTypedDict
    token: NotRequired[components_token.TokenTypedDict]
    r"""OK"""
    status: NotRequired[components_status.StatusTypedDict]
    r"""INVALID_ARGUMENT: The request was not well formed."""


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

    token: Optional[components_token.Token] = None
    r"""OK"""

    status: Optional[components_status.Status] = None
    r"""INVALID_ARGUMENT: The request was not well formed."""
