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

from __future__ import annotations
from fermisdk.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ConnectSessionRequestMetadataTypedDict(TypedDict):
    r"""Connection metadata"""


class ConnectSessionRequestMetadata(BaseModel):
    r"""Connection metadata"""


class ConnectSessionRequestTypedDict(TypedDict):
    integration: NotRequired[str]
    r"""Integration type (e.g., 'google-mail', 'google-drive', 'google-drive-files')"""
    provider_config_key: NotRequired[str]
    r"""Provider config key (e.g., 'mysql', 'mongodb')"""
    username: NotRequired[str]
    r"""Database username (for SQL/MongoDB)"""
    password: NotRequired[str]
    r"""Database password (for SQL/MongoDB)"""
    metadata: NotRequired[ConnectSessionRequestMetadataTypedDict]
    r"""Connection metadata"""


class ConnectSessionRequest(BaseModel):
    integration: Optional[str] = None
    r"""Integration type (e.g., 'google-mail', 'google-drive', 'google-drive-files')"""

    provider_config_key: Annotated[
        Optional[str], pydantic.Field(alias="providerConfigKey")
    ] = None
    r"""Provider config key (e.g., 'mysql', 'mongodb')"""

    username: Optional[str] = None
    r"""Database username (for SQL/MongoDB)"""

    password: Optional[str] = None
    r"""Database password (for SQL/MongoDB)"""

    metadata: Optional[ConnectSessionRequestMetadata] = None
    r"""Connection metadata"""
