Module adcp.types.generated_poc.media_buy.package_update

Classes

class PackageUpdate (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class PackageUpdate(RootModel[PackageUpdate1 | PackageUpdate2]):
    root: Annotated[
        PackageUpdate1 | PackageUpdate2,
        Field(
            description='Package update configuration for update_media_buy. Identifies package by package_id or buyer_ref and specifies fields to modify. Fields not present are left unchanged. Note: product_id, format_ids, and pricing_option_id cannot be changed after creation.',
            title='Package Update',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[PackageUpdate1, PackageUpdate2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootPackageUpdate1 | PackageUpdate2
class PackageUpdate1 (**data: Any)
Expand source code
class PackageUpdate1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    bid_price: Annotated[
        float | None,
        Field(
            description='Updated bid price for auction-based pricing options (only applies when pricing_option is auction-based)',
            ge=0.0,
        ),
    ] = None
    budget: Annotated[
        float | None,
        Field(
            description='Updated budget allocation for this package in the currency specified by the pricing option',
            ge=0.0,
        ),
    ] = None
    buyer_ref: Annotated[
        str | None, Field(description="Buyer's reference for the package to update")
    ] = None
    creative_assignments: Annotated[
        list[creative_assignment.CreativeAssignment] | None,
        Field(
            description='Replace creative assignments for this package with optional weights and placement targeting. Uses replacement semantics - omit to leave assignments unchanged.'
        ),
    ] = None
    creatives: Annotated[
        list[creative_asset.CreativeAsset] | None,
        Field(
            description='Upload new creative assets and assign to this package (creatives will be added to library). Use creative_assignments instead for existing library creatives.',
            max_length=100,
            min_length=1,
        ),
    ] = None
    ext: ext_1.ExtensionObject | None = None
    impressions: Annotated[
        float | None, Field(description='Updated impression goal for this package', ge=0.0)
    ] = None
    optimization_goal: optimization_goal_1.OptimizationGoal | None = None
    pacing: pacing_1.Pacing | None = None
    package_id: Annotated[str, Field(description="Publisher's ID of package to update")]
    paused: Annotated[
        bool | None,
        Field(description='Pause/resume specific package (true = paused, false = active)'),
    ] = None
    targeting_overlay: targeting.TargetingOverlay | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var bid_price : float | None
var budget : float | None
var buyer_ref : str | None
var creative_assignments : list[CreativeAssignment] | None
var creatives : list[CreativeAsset] | None
var extExtensionObject | None
var impressions : float | None
var model_config
var optimization_goalOptimizationGoal | None
var pacingPacing | None
var package_id : str
var paused : bool | None
var targeting_overlayTargetingOverlay | None

Inherited members

class PackageUpdate2 (**data: Any)
Expand source code
class PackageUpdate2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    bid_price: Annotated[
        float | None,
        Field(
            description='Updated bid price for auction-based pricing options (only applies when pricing_option is auction-based)',
            ge=0.0,
        ),
    ] = None
    budget: Annotated[
        float | None,
        Field(
            description='Updated budget allocation for this package in the currency specified by the pricing option',
            ge=0.0,
        ),
    ] = None
    buyer_ref: Annotated[str, Field(description="Buyer's reference for the package to update")]
    creative_assignments: Annotated[
        list[creative_assignment.CreativeAssignment] | None,
        Field(
            description='Replace creative assignments for this package with optional weights and placement targeting. Uses replacement semantics - omit to leave assignments unchanged.'
        ),
    ] = None
    creatives: Annotated[
        list[creative_asset.CreativeAsset] | None,
        Field(
            description='Upload new creative assets and assign to this package (creatives will be added to library). Use creative_assignments instead for existing library creatives.',
            max_length=100,
            min_length=1,
        ),
    ] = None
    ext: ext_1.ExtensionObject | None = None
    impressions: Annotated[
        float | None, Field(description='Updated impression goal for this package', ge=0.0)
    ] = None
    optimization_goal: optimization_goal_1.OptimizationGoal | None = None
    pacing: pacing_1.Pacing | None = None
    package_id: Annotated[str | None, Field(description="Publisher's ID of package to update")] = (
        None
    )
    paused: Annotated[
        bool | None,
        Field(description='Pause/resume specific package (true = paused, false = active)'),
    ] = None
    targeting_overlay: targeting.TargetingOverlay | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var bid_price : float | None
var budget : float | None
var buyer_ref : str
var creative_assignments : list[CreativeAssignment] | None
var creatives : list[CreativeAsset] | None
var extExtensionObject | None
var impressions : float | None
var model_config
var optimization_goalOptimizationGoal | None
var pacingPacing | None
var package_id : str | None
var paused : bool | None
var targeting_overlayTargetingOverlay | None

Inherited members