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

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


class DeleteConnectionRequestTypedDict(TypedDict):
    connection_id: str
    r"""Connection ID"""
    integration: NotRequired[str]
    r"""Integration type (for OAuth connectors)"""
    provider_config_key: NotRequired[str]
    r"""Provider config key (for SQL/MongoDB)"""


class DeleteConnectionRequest(BaseModel):
    connection_id: Annotated[
        str,
        pydantic.Field(alias="connectionId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""Connection ID"""

    integration: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Integration type (for OAuth connectors)"""

    provider_config_key: Annotated[
        Optional[str],
        pydantic.Field(alias="providerConfigKey"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Provider config key (for SQL/MongoDB)"""


class DeleteConnectionResponseTypedDict(TypedDict):
    r"""Successful response"""

    success: NotRequired[bool]
    message: NotRequired[str]


class DeleteConnectionResponse(BaseModel):
    r"""Successful response"""

    success: Optional[bool] = None

    message: Optional[str] = None
