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

from __future__ import annotations
from enum import Enum
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 ProductPriceOneTimeFreeCreateType(str, Enum):
    ONE_TIME = "one_time"


class ProductPriceOneTimeFreeCreateAmountType(str, Enum):
    FREE = "free"


class ProductPriceOneTimeFreeCreateTypedDict(TypedDict):
    r"""Schema to create a free one-time product price."""

    type: ProductPriceOneTimeFreeCreateType
    amount_type: ProductPriceOneTimeFreeCreateAmountType


class ProductPriceOneTimeFreeCreate(BaseModel):
    r"""Schema to create a free one-time product price."""

    TYPE: Annotated[
        Annotated[
            ProductPriceOneTimeFreeCreateType,
            AfterValidator(validate_const(ProductPriceOneTimeFreeCreateType.ONE_TIME)),
        ],
        pydantic.Field(alias="type"),
    ] = ProductPriceOneTimeFreeCreateType.ONE_TIME

    AMOUNT_TYPE: Annotated[
        Annotated[
            ProductPriceOneTimeFreeCreateAmountType,
            AfterValidator(
                validate_const(ProductPriceOneTimeFreeCreateAmountType.FREE)
            ),
        ],
        pydantic.Field(alias="amount_type"),
    ] = ProductPriceOneTimeFreeCreateAmountType.FREE
