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

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


class AuthenticationTypedDict(TypedDict):
    r"""Example response"""

    access_token: NotRequired[str]
    r"""A new access token that can be used for subsequent authenticated requests"""
    token_type: NotRequired[str]
    r"""The literal string 'bearer'"""
    expires_in: NotRequired[float]
    r"""The TTL of this token. After this amount of time, you must hit the refresh token endpoint to continue making authenticated requests."""
    refresh_token: NotRequired[str]
    r"""A token that must be passed to the refresh token endpoint to get a new authenticated token."""
    created_at: NotRequired[str]
    r"""Datetime for when the new access token is created."""
    scope: NotRequired[str]
    r"""All of the scopes for which the access token provides access."""


class Authentication(BaseModel):
    r"""Example response"""

    access_token: Optional[str] = None
    r"""A new access token that can be used for subsequent authenticated requests"""

    token_type: Optional[str] = "bearer"
    r"""The literal string 'bearer'"""

    expires_in: Optional[float] = 7200
    r"""The TTL of this token. After this amount of time, you must hit the refresh token endpoint to continue making authenticated requests."""

    refresh_token: Optional[str] = None
    r"""A token that must be passed to the refresh token endpoint to get a new authenticated token."""

    created_at: Optional[str] = None
    r"""Datetime for when the new access token is created."""

    scope: Optional[str] = None
    r"""All of the scopes for which the access token provides access."""
