Module adcp.types.generated_poc.media_buy.package_update
Classes
class KeywordTargetsAddItem (**data: Any)-
Expand source code
class KeywordTargetsAddItem(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) bid_price: Annotated[ float | None, Field( description="Per-keyword bid price. Inherits currency and max_bid interpretation from the package's pricing option.", ge=0.0, ), ] = None keyword: Annotated[str, Field(description='The keyword to target', min_length=1)] match_type: Annotated[MatchType, Field(description='Match type for this keyword')]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var bid_price : float | Nonevar keyword : strvar match_type : MatchTypevar model_config
Inherited members
class KeywordTargetsRemoveItem (**data: Any)-
Expand source code
class KeywordTargetsRemoveItem(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) keyword: Annotated[str, Field(description='The keyword to stop targeting', min_length=1)] match_type: Annotated[MatchType, Field(description='Match type to remove')]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var keyword : strvar match_type : MatchTypevar model_config
Inherited members
class MatchType (*args, **kwds)-
Expand source code
class MatchType(Enum): broad = 'broad' phrase = 'phrase' exact = 'exact'Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3Access them by:
- attribute access::
>>> Color.RED <Color.RED: 1>- value lookup:
>>> Color(1) <Color.RED: 1>- name lookup:
>>> Color['RED'] <Color.RED: 1>Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
Ancestors
- enum.Enum
Class variables
var broadvar exactvar phrase
class NegativeKeywordsAddItem (**data: Any)-
Expand source code
class NegativeKeywordsAddItem(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) keyword: Annotated[str, Field(description='The keyword to exclude', min_length=1)] match_type: Annotated[MatchType, Field(description='Match type for exclusion')]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var keyword : strvar match_type : MatchTypevar model_config
Inherited members
class NegativeKeywordsRemoveItem (**data: Any)-
Expand source code
class NegativeKeywordsRemoveItem(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) keyword: Annotated[str, Field(description='The keyword to stop excluding', min_length=1)] match_type: Annotated[MatchType, Field(description='Match type to remove')]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var keyword : strvar match_type : MatchTypevar model_config
Inherited members
class PackageUpdate (**data: Any)-
Expand source code
class PackageUpdate(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) bid_price: Annotated[ float | None, Field( description="Updated bid price for auction-based pricing options. This is the exact bid/price to honor unless selected pricing_option has max_bid=true, in which case bid_price is the buyer's maximum willingness to pay (ceiling).", 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 canceled: Annotated[ Literal[True], Field( description='Cancel this specific package. Cancellation is irreversible — canceled packages stop delivery and cannot be reactivated. Sellers MAY reject with NOT_CANCELLABLE.' ), ] = True cancellation_reason: Annotated[ str | None, Field(description='Reason for canceling this package.', max_length=500) ] = None catalogs: Annotated[ list[catalog.Catalog] | None, Field( description='Replace the catalogs this package promotes. Uses replacement semantics — the provided array replaces the current list. Omit to leave catalogs unchanged.', min_length=1, ), ] = None context: context_1.ContextObject | None = 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 end_time: Annotated[ AwareDatetime | None, Field( description="Updated flight end date/time for this package in ISO 8601 format. Must fall within the media buy's date range." ), ] = None ext: ext_1.ExtensionObject | None = None impressions: Annotated[ float | None, Field(description='Updated impression goal for this package', ge=0.0) ] = None keyword_targets_add: Annotated[ list[KeywordTargetsAddItem] | None, Field( description='Keyword targets to add or update on this package. Upserts by (keyword, match_type) identity: if the pair already exists, its bid_price is updated; if not, a new keyword target is added. Use targeting_overlay.keyword_targets in create_media_buy to set the initial list.', min_length=1, ), ] = None keyword_targets_remove: Annotated[ list[KeywordTargetsRemoveItem] | None, Field( description='Keyword targets to remove from this package. Removes matching (keyword, match_type) pairs. If a specified pair is not present, sellers SHOULD treat it as a no-op for that entry.', min_length=1, ), ] = None negative_keywords_add: Annotated[ list[NegativeKeywordsAddItem] | None, Field( description='Negative keywords to add to this package. Appends to the existing negative keyword list — does not replace it. If a keyword+match_type pair already exists, sellers SHOULD treat it as a no-op for that entry. Use targeting_overlay.negative_keywords in create_media_buy to set the initial list.', min_length=1, ), ] = None negative_keywords_remove: Annotated[ list[NegativeKeywordsRemoveItem] | None, Field( description='Negative keywords to remove from this package. Removes matching keyword+match_type pairs from the existing list. If a specified pair is not present, sellers SHOULD treat it as a no-op for that entry.', min_length=1, ), ] = None optimization_goals: Annotated[ list[optimization_goal.OptimizationGoal] | None, Field( description='Replace all optimization goals for this package. Uses replacement semantics — omit to leave goals unchanged.', min_length=1, ), ] = None pacing: pacing_1.Pacing | None = None package_id: Annotated[str, Field(description="Seller's ID of package to update")] paused: Annotated[ bool | None, Field(description='Pause/resume specific package (true = paused, false = active)'), ] = None start_time: Annotated[ AwareDatetime | None, Field( description="Updated flight start date/time for this package in ISO 8601 format. Must fall within the media buy's date range." ), ] = None targeting_overlay: Annotated[ targeting.TargetingOverlay | None, Field( description='Targeting overlay to apply to this package. Uses replacement semantics — the full overlay replaces the previous one. Omit to leave targeting unchanged. For keyword and negative keyword updates, prefer the incremental operations (keyword_targets_add, keyword_targets_remove, negative_keywords_add, negative_keywords_remove) which avoid replacing the full overlay. Sellers SHOULD return a validation error if targeting_overlay.keyword_targets is present in the same request as keyword_targets_add or keyword_targets_remove, and likewise for negative_keywords.' ), ] = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var bid_price : float | Nonevar budget : float | Nonevar canceled : Literal[True]var cancellation_reason : str | Nonevar catalogs : list[Catalog] | Nonevar context : ContextObject | Nonevar creative_assignments : list[CreativeAssignment] | Nonevar creatives : list[CreativeAsset] | Nonevar end_time : pydantic.types.AwareDatetime | Nonevar ext : ExtensionObject | Nonevar impressions : float | Nonevar keyword_targets_add : list[KeywordTargetsAddItem] | Nonevar keyword_targets_remove : list[KeywordTargetsRemoveItem] | Nonevar model_configvar negative_keywords_add : list[NegativeKeywordsAddItem] | Nonevar negative_keywords_remove : list[NegativeKeywordsRemoveItem] | Nonevar optimization_goals : list[OptimizationGoal] | Nonevar pacing : Pacing | Nonevar package_id : strvar paused : bool | Nonevar start_time : pydantic.types.AwareDatetime | Nonevar targeting_overlay : TargetingOverlay | None
Inherited members