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

from __future__ import annotations
from .freshdeskcredentials import FreshdeskCredentials, FreshdeskCredentialsTypedDict
from .freshdeskdata import FreshdeskData, FreshdeskDataTypedDict
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 PublicFreshdeskConnectionTypedDict(TypedDict):
    data: FreshdeskDataTypedDict
    user_email: str
    r"""The email the API key is associated with"""
    credentials: FreshdeskCredentialsTypedDict
    provider: Literal["freshdesk"]


class PublicFreshdeskConnection(BaseModel):
    data: FreshdeskData

    user_email: str
    r"""The email the API key is associated with"""

    credentials: FreshdeskCredentials

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