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

from __future__ import annotations
from ascend_sdk.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class TokenTypedDict(TypedDict):
    r"""Represents a JSON Web Token for access to the system; See: https://datatracker.ietf.org/doc/html/rfc6749#section-5.1"""

    access_token: NotRequired[str]
    r"""The access token issued by the authorization server"""
    expires_in: NotRequired[int]
    r"""The lifetime in seconds of the access token"""
    token_type: NotRequired[str]
    r"""The token type for this access token"""


class Token(BaseModel):
    r"""Represents a JSON Web Token for access to the system; See: https://datatracker.ietf.org/doc/html/rfc6749#section-5.1"""

    access_token: Optional[str] = None
    r"""The access token issued by the authorization server"""

    expires_in: Optional[int] = None
    r"""The lifetime in seconds of the access token"""

    token_type: Optional[str] = None
    r"""The token type for this access token"""
