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

from __future__ import annotations
from .intercomcredentials import IntercomCredentials, IntercomCredentialsTypedDict
from .intercomdata import IntercomData, IntercomDataTypedDict
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 PublicIntercomConnectionTypedDict(TypedDict):
    data: IntercomDataTypedDict
    credentials: IntercomCredentialsTypedDict
    provider: Literal["intercom"]


class PublicIntercomConnection(BaseModel):
    data: IntercomData

    credentials: IntercomCredentials

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