# generated by datamodel-codegen:
#   filename:  media_buy/get_products_response.json
#   timestamp: 2026-02-12T02:11:19+00:00

from __future__ import annotations

from typing import Annotated

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field

from ..core import context as context_1
from ..core import error
from ..core import ext as ext_1
from ..core import pagination_response, product, proposal


class GetProductsResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    context: context_1.ContextObject | None = None
    errors: Annotated[
        list[error.Error] | None,
        Field(description='Task-specific errors and warnings (e.g., product filtering issues)'),
    ] = None
    ext: ext_1.ExtensionObject | None = None
    pagination: pagination_response.PaginationResponse | None = None
    product_selectors_applied: Annotated[
        bool | None,
        Field(
            description='Indicates whether product_selectors filtering was applied. True if the seller filtered results based on the provided product_selectors. Absent or false if product_selectors was not provided or not supported by this agent.'
        ),
    ] = None
    products: Annotated[list[product.Product], Field(description='Array of matching products')]
    property_list_applied: Annotated[
        bool | None,
        Field(
            description='[AdCP 3.0] Indicates whether property_list filtering was applied. True if the agent filtered products based on the provided property_list. Absent or false if property_list was not provided or not supported by this agent.'
        ),
    ] = None
    proposals: Annotated[
        list[proposal.Proposal] | None,
        Field(
            description='Optional array of proposed media plans with budget allocations across products. Publishers include proposals when they can provide strategic guidance based on the brief. Proposals are actionable - buyers can refine them via subsequent get_products calls or execute them directly via create_media_buy.'
        ),
    ] = None
