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

from __future__ import annotations
from .confluencedata import ConfluenceData, ConfluenceDataTypedDict
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 List, Literal
from typing_extensions import Annotated, TypedDict


class AuthenticatorConfluenceConnectionTypedDict(TypedDict):
    data: List[ConfluenceDataTypedDict]
    credentials: OAuthRefreshTokenCredentialsTypedDict
    provider: Literal["confluence"]


class AuthenticatorConfluenceConnection(BaseModel):
    data: List[ConfluenceData]

    credentials: OAuthRefreshTokenCredentials

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