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

from __future__ import annotations
from .backblazecredentials import BackblazeCredentials, BackblazeCredentialsTypedDict
from .bucketdata import BucketData, BucketDataTypedDict
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 PublicBackblazeConnectionTypedDict(TypedDict):
    data: BucketDataTypedDict
    credentials: BackblazeCredentialsTypedDict
    provider: Literal["backblaze"]


class PublicBackblazeConnection(BaseModel):
    data: BucketData

    credentials: BackblazeCredentials

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