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

from __future__ import annotations
from .hubspotdata import HubspotData, HubspotDataTypedDict
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 Literal
from typing_extensions import Annotated, TypedDict


class AuthenticatorHubspotConnectionTypedDict(TypedDict):
    data: HubspotDataTypedDict
    hub_id: str
    hub_domain: str
    credentials: OAuthRefreshTokenCredentialsTypedDict
    provider: Literal["hubspot"]


class AuthenticatorHubspotConnection(BaseModel):
    data: HubspotData

    hub_id: str

    hub_domain: str

    credentials: OAuthRefreshTokenCredentials

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