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

from __future__ import annotations
from .platforms import Platforms
from polar_sdk.types import BaseModel
from polar_sdk.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing_extensions import Annotated, TypedDict


class DonationOrganizationTypedDict(TypedDict):
    id: str
    name: str
    avatar_url: str
    is_personal: bool
    platform: Platforms


class DonationOrganization(BaseModel):
    id: str

    name: str

    avatar_url: str

    is_personal: bool

    PLATFORM: Annotated[
        Annotated[Platforms, AfterValidator(validate_const(Platforms.GITHUB))],
        pydantic.Field(alias="platform"),
    ] = Platforms.GITHUB
