# generated by datamodel-codegen:
#   filename:  core/pricing_option.json
#   timestamp: 2026-02-23T01:56:40+00:00

from __future__ import annotations

from typing import Annotated

from pydantic import Field, RootModel

from ..pricing_options import (
    cpa_option,
    cpc_option,
    cpcv_option,
    cpm_option,
    cpp_option,
    cpv_option,
    flat_rate_option,
    time_option,
    vcpm_option,
)


class PricingOption(
    RootModel[
        cpm_option.CpmPricingOption
        | vcpm_option.VcpmPricingOption
        | cpc_option.CpcPricingOption
        | cpcv_option.CpcvPricingOption
        | cpv_option.CpvPricingOption
        | cpp_option.CppPricingOption
        | cpa_option.CpaPricingOption
        | flat_rate_option.FlatRatePricingOption
        | time_option.TimeBasedPricingOption
    ]
):
    root: Annotated[
        cpm_option.CpmPricingOption
        | vcpm_option.VcpmPricingOption
        | cpc_option.CpcPricingOption
        | cpcv_option.CpcvPricingOption
        | cpv_option.CpvPricingOption
        | cpp_option.CppPricingOption
        | cpa_option.CpaPricingOption
        | flat_rate_option.FlatRatePricingOption
        | time_option.TimeBasedPricingOption,
        Field(
            description="A pricing model option offered by a publisher for a product. Discriminated by pricing_model field. If fixed_price is present, it's fixed pricing. If absent, it's auction-based (floor_price and price_guidance optional). Bid-based auction models may also include max_bid as a boolean signal to interpret bid_price as a buyer ceiling instead of an exact honored price.",
            title='Pricing Option',
        ),
    ]
