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

from __future__ import annotations
from .folderdata import FolderData, FolderDataTypedDict
from .oauthrefreshtokencredentials import (
    OAuthRefreshTokenCredentials,
    OAuthRefreshTokenCredentialsTypedDict,
)
import pydantic
from pydantic.functional_validators import AfterValidator
from ragie.types import BaseModel
from ragie.utils import validate_const
from typing import Literal
from typing_extensions import Annotated, TypedDict


class AuthenticatorDropboxConnectionTypedDict(TypedDict):
    data: FolderDataTypedDict
    email: str
    r"""The email of the Dropbox account this is for"""
    credentials: OAuthRefreshTokenCredentialsTypedDict
    provider: Literal["dropbox"]


class AuthenticatorDropboxConnection(BaseModel):
    data: FolderData

    email: str
    r"""The email of the Dropbox account this is for"""

    credentials: OAuthRefreshTokenCredentials

    PROVIDER: Annotated[
        Annotated[Literal["dropbox"], AfterValidator(validate_const("dropbox"))],
        pydantic.Field(alias="provider"),
    ] = "dropbox"
