Module adcp.types.base
Classes
class AdCPBaseModel (**data: Any)-
Expand source code
class AdCPBaseModel(BaseModel): """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 set ``additionalProperties: true`` override this with ``extra='allow'`` in their own ``model_config``. Consumers who want strict validation can override with ``extra='forbid'``. """ model_config = ConfigDict(extra="ignore") def model_dump(self, **kwargs: Any) -> dict[str, Any]: if "exclude_none" not in kwargs: kwargs["exclude_none"] = True return super().model_dump(**kwargs) def model_dump_json(self, **kwargs: Any) -> str: if "exclude_none" not in kwargs: kwargs["exclude_none"] = True return super().model_dump_json(**kwargs) def model_summary(self) -> str: """Human-readable summary for protocol responses. Returns a standardized human-readable message suitable for MCP tool results, A2A task communications, and REST API responses. For types without a registered formatter, returns a generic message with the class name. """ formatter = _RESPONSE_MESSAGE_REGISTRY.get(self.__class__.__name__) if formatter: return formatter(self) return f"{self.__class__.__name__} response"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
- pydantic.main.BaseModel
Subclasses
- adcp.types._generated.AssetSelectors
- adcp.types._generated.BrandManifest
- adcp.types._generated.DeliverTo
- adcp.types._generated.ListAuthorizedPropertiesRequest
- adcp.types._generated.ListAuthorizedPropertiesResponse
- adcp.types._generated.Pricing
- adcp.types._generated.PromotedOfferings
- adcp.types._generated.PromotedOfferingsAssetRequirements
- adcp.types._generated.PromotedProducts
- A2UiBoundValue1
- A2UiBoundValue2
- A2UiBoundValue3
- A2UiBoundValue4
- A2UiBoundValue5
- A2UiComponent
- Action
- Action4
- AppHandoff
- Apps
- Button
- Card
- Column
- Image
- IntegrationAction
- Link
- List
- ProductCard
- Row
- SiComponentCatalog
- Template
- Text
- A2UiSurface
- A2UiUserAction
- Action
- GetAccountFinancialsRequest
- Balance
- Credit
- GetAccountFinancialsResponse1
- GetAccountFinancialsResponse2
- Invoice
- LastTopUp
- Spend
- ListAccountsRequest
- ListAccountsResponse
- ReportUsageRequest
- UsageItem
- ReportUsageResponse
- Account
- Authentication
- GovernanceAgent
- SyncAccountsRequest
- Account
- CreditLimit
- Setup
- SyncAccountsResponse1
- SyncAccountsResponse2
- AdcpAgentsAuthorization1
- AdcpAgentsAuthorization2
- AuthorizedAgents
- AuthorizedAgents1
- AuthorizedAgents2
- AuthorizedAgents3
- AuthorizedAgents4
- AuthorizedAgents5
- Contact
- PropertyFeature
- Tags
- AgenticCheckout
- Asset
- AssetLibrary
- AuthorizedOperator
- Avatar
- Backgrounds
- Brand
- BrandAgent
- BrandDiscovery1
- BrandDiscovery2
- BrandDiscovery3
- BrandDiscovery4
- BrandShapes
- ColorGuide
- Colors
- Colorway
- CompositionRules
- Contact
- Contact1
- Disclaimer
- Fonts
- Framing
- GraphicElement
- GraphicStyle
- House
- Iconography
- Logo
- LogoPlacement
- MotionGuidelines
- Overlays
- Palette
- People
- PhotographyStyle
- ProductCatalog
- Property
- RightsAgent
- Show
- Subject
- Texture
- Tone
- Trademark
- TypeScale
- TypeScaleEntry
- Usage
- Usage1
- VisualGuidelines
- VoiceSynthesis
- AcquireRightsRequest
- Campaign
- AcquireRightsResponse1
- AcquireRightsResponse2
- AcquireRightsResponse3
- AcquireRightsResponse4
- Disclosure
- CreativeApprovalRequest
- CreativeApprovalResponse1
- CreativeApprovalResponse2
- CreativeApprovalResponse3
- CreativeApprovalResponse4
- GetBrandIdentityRequest
- Asset
- Colors
- Fonts
- GetBrandIdentityResponse1
- GetBrandIdentityResponse2
- House
- Logo
- Rights
- Tone
- VoiceSynthesis
- GetRightsRequest
- ExcludedItem
- ExclusivityStatus
- GetRightsResponse1
- GetRightsResponse2
- PreviewAsset
- Right
- RevocationNotification
- RightsPricingOption
- Exclusivity
- RightsTerms
- UpdateRightsRequest
- UpdateRightsResponse1
- UpdateRightsResponse2
- Artifact
- AssetAccess1
- AssetAccess2
- AssetAccess3
- Assets
- Assets1
- Assets2
- Assets3
- Identifiers
- Metadata
- Artifact
- ArtifactWebhookPayload
- Pagination
- CalibrateContentRequest
- CalibrateContentResponse1
- CalibrateContentResponse2
- Feature
- CalibrationExemplars
- ContentStandards
- CalibrationExemplars
- CreateContentStandardsRequest
- Fail
- Pass
- Scope
- CreateContentStandardsResponse1
- CreateContentStandardsResponse2
- GetContentStandardsRequest
- GetContentStandardsResponse2
- GetMediaBuyArtifactsRequest
- Pagination
- Sampling
- TimeRange
- Artifact
- BrandContext
- GetMediaBuyArtifactsResponse1
- GetMediaBuyArtifactsResponse2
- SamplingInfo
- ListContentStandardsRequest
- ListContentStandardsResponse1
- ListContentStandardsResponse2
- CalibrationExemplars
- Fail
- Pass
- Scope
- UpdateContentStandardsRequest
- UpdateContentStandardsResponse1
- UpdateContentStandardsResponse2
- BrandContext
- Record
- ValidateContentDeliveryRequest
- Feature
- Result
- Summary
- ValidateContentDeliveryResponse1
- ValidateContentDeliveryResponse2
- Account
- Authentication
- CreditLimit
- GovernanceAgent
- Setup
- AccountReference1
- AccountReference2
- ActivationKey1
- ActivationKey2
- AdInventoryConfiguration
- AppItem
- AudioAsset
- CssAsset
- DaastAsset1
- DaastAsset2
- Accessibility
- HtmlAsset
- ImageAsset
- Accessibility
- JavascriptAsset
- MarkdownAsset
- TextAsset
- UrlAsset
- VastAsset1
- VastAsset2
- VideoAsset
- Security
- WebhookAsset
- AttributionWindow
- AudienceMember
- Uid
- BrandReference
- Catalog
- CatalogFieldMapping
- Catchment
- Geometry
- Radius
- TravelTime
- ContentRating
- ContextObject
- CreativeAsset
- Input
- CreativeAssignment
- Compliance
- CreativeBrief
- Messaging
- RequiredDisclosure
- CreativeFilters
- CreativeItem1
- CreativeItem2
- CreativeManifest
- CreativePolicy
- CreativeVariable
- Artifact
- GenerationContext
- DataProviderSignalSelector1
- DataProviderSignalSelector2
- DataProviderSignalSelector3
- DateRange
- DatetimeRange
- DaypartTarget
- DeliveryForecast
- ByActionSourceItem
- ByEventTypeItem
- DeliveryMetrics
- DoohMetrics
- QuartileData
- VenueBreakdownItem
- Viewability
- Deployment1
- Deployment2
- Destination1
- Destination2
- DestinationItem
- Location
- Duration
- EducationItem
- DerivativeOf
- Episode
- Error
- Event
- Content
- EventCustomData
- ExtensionObject
- Destination
- FlightItem
- Origin
- ForecastPoint
- Metrics
- ForecastRange
- Accessibility
- Assets18
- BaseGroupAsset
- BaseIndividualAsset
- Dimensions
- DisclosureCapability
- Format
- FormatCard
- FormatCardDetailed
- Renders
- Renders1
- Responsive
- FormatId
- FrequencyCap
- GenerationCredential
- GeographicBreakdownSupport
- Address
- HotelItem
- Location
- Identifier
- JobItem
- Salary
- McpWebhookPayload
- MediaBuy
- MediaBuyFeatures
- GeoTargets
- Metro
- Offering
- PostalArea
- OfferingAssetGroup
- AttributionWindow
- EventSource
- OptimizationGoal1
- OptimizationGoal2
- Target
- Target1
- Target2
- Target3
- Target4
- TargetFrequency
- TargetFrequency1
- OutcomeMeasurement
- Bounds
- Overlay
- Visual
- Package
- PaginationRequest
- PaginationResponse
- MeasurementPeriod
- PerformanceFeedback
- Placement
- Geo
- PlannedDelivery
- Price
- CatalogMatch
- ConversionTracking
- DeliveryMeasurement
- MetricOptimization
- Product
- ProductCard
- ProductCardDetailed
- ProductAllocation
- BudgetRange
- BudgetRange1
- Metro
- ProductFilters
- RequiredGeoTargetingItem
- Identifier
- Property
- PropertyListReference
- Proposal
- TotalBudgetGuidance
- ProtocolEnvelope
- AiTool
- C2pa
- DeclaredBy
- Disclosure
- Jurisdiction
- Provenance
- RenderGuidance
- VerificationItem
- PublisherPropertySelector1
- PublisherPropertySelector2
- PublisherPropertySelector3
- Authentication
- PushNotificationConfig
- Address
- Area
- Location
- RealEstateItem
- ReferenceAsset
- ReportingCapabilities
- Authentication
- ReportingWebhook
- AudioAssetRequirements
- AssetPoolBinding
- CatalogFieldBinding1
- ScalarBinding
- CatalogRequirements
- CssAssetRequirements
- DaastAssetRequirements
- HtmlAssetRequirements
- ImageAssetRequirements
- JavascriptAssetRequirements
- MarkdownAssetRequirements
- OfferingAssetConstraint
- TextAssetRequirements
- UrlAssetRequirements
- VastAssetRequirements
- VideoAssetRequirements
- WebhookAssetRequirements
- ProtocolResponse
- RightsAgent
- RightsConstraint
- RelatedShow
- Show
- Identifier
- ShowDistribution
- Range
- SignalDefinition
- SignalFilters
- SignalId2
- SignalId3
- SignalPricing1
- SignalPricing2
- SignalPricing3
- SignalPricingOption1
- SignalPricingOption2
- SignalPricingOption3
- SignalPricingOption4
- SignalTargeting1
- SignalTargeting2
- SignalTargeting3
- Address
- Location
- StoreItem
- Talent
- AgeRestriction
- GeoMetro
- GeoMetrosExcludeItem
- GeoPostalArea
- GeoPostalAreasExcludeItem
- GeoProximity
- GeoProximity2
- GeoProximity3
- Geometry
- KeywordTarget
- NegativeKeyword
- Radius
- StoreCatchment
- TargetingOverlay
- TravelTime
- TasksGetRequest
- Details
- Error
- HistoryItem
- Progress
- TasksGetResponse
- Filters
- Sort
- TasksListRequest
- DomainBreakdown
- QuerySummary
- SortApplied
- Task
- TasksListResponse
- Uid
- UserMatch
- Location
- Mileage
- VehicleItem
- CreativeFeatureResult
- GetCreativeDeliveryRequest
- Creative
- GetCreativeDeliveryResponse
- Pagination
- ReportingPeriod
- GetCreativeFeaturesRequest
- GetCreativeFeaturesResponse1
- GetCreativeFeaturesResponse2
- ListCreativeFormatsRequestCreativeAgent
- CreativeAgent
- ListCreativeFormatsResponseCreativeAgent
- ListCreativesRequest
- Sort
- AssignedPackage
- Assignments
- Creative
- ListCreativesResponse
- QuerySummary
- Snapshot
- SortApplied
- StatusSummary
- Input
- Input4
- PreviewCreativeRequest1
- PreviewCreativeRequest2
- PreviewCreativeRequest3
- Request
- Input
- Input6
- Preview
- Preview5
- Preview7
- PreviewCreativeResponse1
- PreviewCreativeResponse2
- PreviewCreativeResponse3
- Response
- Response1
- Results
- Results1
- Dimensions
- Embedding
- PreviewRender1
- PreviewRender2
- PreviewRender3
- SyncCreativesInputRequired
- SyncCreativesSubmitted
- SyncCreativesWorking
- Assignment
- SyncCreativesRequest
- Creative
- SyncCreativesResponse1
- SyncCreativesResponse2
- AdcpExtensionFileSchema
- CheckGovernanceRequest
- DeliveryMetrics
- ReportingPeriod
- CheckGovernanceResponse
- Condition
- Escalation
- Finding
- GetPlanAuditLogsRequest
- Budget
- Campaign
- ChannelAllocation
- DriftMetrics
- Entry
- Escalation
- Finding
- GetPlanAuditLogsResponse
- Plan
- Statuses
- Summary
- Thresholds
- Flight
- GovernanceContext
- TotalBudget
- Exemplar
- Exemplars
- PolicyEntry
- PolicyReference
- Delivery
- Error
- Package
- ReportPlanOutcomeRequest
- ReportingPeriod
- SellerResponse
- Finding
- PlanSummary
- ReportPlanOutcomeResponse
- Budget
- BudgetLimit
- Channels
- Delegation
- Flight
- MixTargets
- Plan
- Portfolio
- SyncPlansRequest
- Category
- Plan
- ResolvedPolicy
- SyncPlansResponse
- BuildCreativeInputRequired
- BuildCreativeSubmitted
- BuildCreativeWorking
- BuildCreativeRequest1
- BuildCreativeRequest2
- PreviewInput
- BuildCreativeResponse1
- BuildCreativeResponse2
- BuildCreativeResponse3
- Input
- Input1
- Preview
- Preview1
- Preview2
- Preview3
- CreateMediaBuyInputRequired
- CreateMediaBuySubmitted
- CreateMediaBuyWorking
- ArtifactWebhook
- Authentication
- CreateMediaBuyRequest
- TotalBudget
- CreateMediaBuyResponse1
- CreateMediaBuyResponse2
- AttributionWindow
- Audience
- DeviceType
- Geo
- GetMediaBuyDeliveryRequest
- ReportingDimensions
- AggregatedTotals
- DailyBreakdownItem
- DailyBreakdownItem1
- GetMediaBuyDeliveryResponse
- MediaBuyDelivery
- ReportingPeriod
- GetMediaBuysRequest
- CreativeApproval
- GetMediaBuysResponse
- MediaBuy
- Package
- Snapshot
- GetProductsInputRequired
- GetProductsSubmitted
- GetProductsWorking
- GetProductsRequest1
- GetProductsRequest2
- GetProductsRequest3
- Refine
- Refine1
- Refine2
- GetProductsResponse
- IncompleteItem
- RefinementAppliedItem
- ListCreativeFormatsRequest
- CreativeAgent
- ListCreativeFormatsResponse
- LogEventRequest
- LogEventResponse1
- LogEventResponse2
- PartialFailure
- PackageRequest
- KeywordTargetsAddItem
- KeywordTargetsRemoveItem
- NegativeKeywordsAddItem
- NegativeKeywordsRemoveItem
- PackageUpdate
- ProvidePerformanceFeedbackRequest
- ProvidePerformanceFeedbackResponse1
- ProvidePerformanceFeedbackResponse2
- Audience
- SyncAudiencesRequest
- Audience
- SyncAudiencesResponse1
- SyncAudiencesResponse2
- SyncCatalogsInputRequired
- SyncCatalogsSubmitted
- SyncCatalogsWorking
- SyncCatalogsRequest
- Catalog
- ItemIssue
- SyncCatalogsResponse1
- SyncCatalogsResponse2
- EventSource
- SyncEventSourcesRequest
- EventSource
- Setup
- SyncEventSourcesResponse1
- SyncEventSourcesResponse2
- UpdateMediaBuyInputRequired
- UpdateMediaBuySubmitted
- UpdateMediaBuyWorking
- UpdateMediaBuyRequest
- UpdateMediaBuyResponse1
- UpdateMediaBuyResponse2
- CpaPricingOption
- CpcPricingOption
- CpcvPricingOption
- CpmPricingOption
- CppPricingOption
- Parameters
- CpvPricingOption
- Parameters
- ViewThreshold1
- FlatRatePricingOption
- Parameters
- PriceGuidance
- Parameters
- TimeBasedPricingOption
- VcpmPricingOption
- AuthorizationResult
- Violation
- BasePropertySource1
- BasePropertySource2
- BasePropertySource3
- CreatePropertyListRequest
- CreatePropertyListResponse
- DeletePropertyListRequest
- DeletePropertyListResponse
- DeliveryRecord
- FeatureRequirement
- GetPropertyListRequest
- Pagination
- GetPropertyListResponse
- ListPropertyListsRequest
- ListPropertyListsResponse
- PropertyError
- PropertyFeature
- Coverage
- PropertyFeatureDefinition
- Range
- PropertyFeatureResult
- PropertyFeatureValue
- PropertyList
- ChangeSummary
- PropertyListChangedWebhook
- PropertyListFilters
- UpdatePropertyListRequest
- UpdatePropertyListResponse
- ValidatePropertyDeliveryRequest
- Aggregate
- AuthorizationSummary
- Summary
- ValidatePropertyDeliveryResponse
- Requirement
- ValidationResult
- Violation
- GetAdcpCapabilitiesRequest
- Account
- Adcp
- AgeRestriction
- AttributionWindow
- AudienceTargeting
- Brand
- ConversionTracking
- Creative
- CreativeFeature
- CreativeSpecs
- Endpoint
- Execution
- Features
- GeoMetros
- GeoPostalAreas
- GeoProximity
- GetAdcpCapabilitiesResponse
- Governance
- KeywordTargets
- MatchingLatencyHours
- MediaBuy
- NegativeKeywords
- Portfolio
- PropertyFeature
- Range
- Reporting
- Signals
- SponsoredIntelligence
- Targeting
- Transport
- ActivateSignalRequest
- ActivateSignalResponse1
- ActivateSignalResponse2
- GetSignalsRequest
- GetSignalsResponse
- Range
- Signal
- A2ui
- Avatar
- Commerce
- Components
- Modalities
- SiCapabilities
- Video
- Voice
- SiGetOfferingRequest
- MatchingProduct
- Offering
- SiGetOfferingResponse
- PrivacyPolicyAcknowledged
- ShippingAddress
- SiIdentity
- User
- SiInitiateSessionRequest
- Response
- SiInitiateSessionResponse
- ActionResponse
- SiSendMessageRequest
- ContextForCheckout
- Handoff
- Intent
- Price
- Response
- SiSendMessageResponse
- SiTerminateSessionRequest
- TerminationContext
- TransactionIntent
- AcpHandoff
- FollowUp
- SiTerminateSessionResponse
- SiUiElement
Class variables
var model_config
Methods
def model_dump(self, **kwargs: Any) ‑> dict[str, typing.Any]-
Expand source code
def model_dump(self, **kwargs: Any) -> dict[str, Any]: if "exclude_none" not in kwargs: kwargs["exclude_none"] = True return super().model_dump(**kwargs)Usage Documentation
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
Args
mode- The mode in which
to_pythonshould run. If mode is 'json', the output will only contain JSON serializable types. If mode is 'python', the output may contain non-JSON-serializable Python objects. include- A set of fields to include in the output.
exclude- A set of fields to exclude from the output.
context- Additional context to pass to the serializer.
by_alias- Whether to use the field's alias in the dictionary key if defined.
exclude_unset- Whether to exclude fields that have not been explicitly set.
exclude_defaults- Whether to exclude fields that are set to their default value.
exclude_none- Whether to exclude fields that have a value of
None. exclude_computed_fields- Whether to exclude computed fields.
While this can be useful for round-tripping, it is usually recommended to use the dedicated
round_tripparameter instead. round_trip- If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings- How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
"error" raises a [
PydanticSerializationError][pydantic_core.PydanticSerializationError]. fallback- A function to call when an unknown value is encountered. If not provided,
a [
PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised. serialize_as_any- Whether to serialize fields with duck-typing serialization behavior.
Returns
A dictionary representation of the model.
def model_dump_json(self, **kwargs: Any) ‑> str-
Expand source code
def model_dump_json(self, **kwargs: Any) -> str: if "exclude_none" not in kwargs: kwargs["exclude_none"] = True return super().model_dump_json(**kwargs)Usage Documentation
Generates a JSON representation of the model using Pydantic's
to_jsonmethod.Args
indent- Indentation to use in the JSON output. If None is passed, the output will be compact.
ensure_ascii- If
True, the output is guaranteed to have all incoming non-ASCII characters escaped. IfFalse(the default), these characters will be output as-is. include- Field(s) to include in the JSON output.
exclude- Field(s) to exclude from the JSON output.
context- Additional context to pass to the serializer.
by_alias- Whether to serialize using field aliases.
exclude_unset- Whether to exclude fields that have not been explicitly set.
exclude_defaults- Whether to exclude fields that are set to their default value.
exclude_none- Whether to exclude fields that have a value of
None. exclude_computed_fields- Whether to exclude computed fields.
While this can be useful for round-tripping, it is usually recommended to use the dedicated
round_tripparameter instead. round_trip- If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings- How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
"error" raises a [
PydanticSerializationError][pydantic_core.PydanticSerializationError]. fallback- A function to call when an unknown value is encountered. If not provided,
a [
PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised. serialize_as_any- Whether to serialize fields with duck-typing serialization behavior.
Returns
A JSON string representation of the model.
def model_summary(self) ‑> str-
Expand source code
def model_summary(self) -> str: """Human-readable summary for protocol responses. Returns a standardized human-readable message suitable for MCP tool results, A2A task communications, and REST API responses. For types without a registered formatter, returns a generic message with the class name. """ formatter = _RESPONSE_MESSAGE_REGISTRY.get(self.__class__.__name__) if formatter: return formatter(self) return f"{self.__class__.__name__} response"Human-readable summary for protocol responses.
Returns a standardized human-readable message suitable for MCP tool results, A2A task communications, and REST API responses.
For types without a registered formatter, returns a generic message with the class name.