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

from __future__ import annotations
from .bucketdata import BucketData, BucketDataTypedDict
from .s3compatiblecredentials import (
    S3CompatibleCredentials,
    S3CompatibleCredentialsTypedDict,
)
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 PublicS3CompatibleConnectionTypedDict(TypedDict):
    data: BucketDataTypedDict
    credentials: S3CompatibleCredentialsTypedDict
    provider: Literal["s3"]


class PublicS3CompatibleConnection(BaseModel):
    data: BucketData

    credentials: S3CompatibleCredentials

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