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

from __future__ import annotations
from .googlefolderdata import GoogleFolderData, GoogleFolderDataTypedDict
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 List, Literal
from typing_extensions import Annotated, TypedDict


class AuthenticatorGoogleDriveConnectionTypedDict(TypedDict):
    data: List[GoogleFolderDataTypedDict]
    email: str
    r"""The email of the Google Drive account this is for"""
    credentials: OAuthRefreshTokenCredentialsTypedDict
    provider: Literal["google_drive"]


class AuthenticatorGoogleDriveConnection(BaseModel):
    data: List[GoogleFolderData]

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

    credentials: OAuthRefreshTokenCredentials

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