Module adcp.types.generated_poc.protocol_envelope
Classes
class ProtocolEnvelope (**data: Any)-
Expand source code
class ProtocolEnvelope(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) context_id: Annotated[ str | None, Field( description='Session/conversation identifier for tracking related operations across multiple task invocations. Managed by the protocol layer to maintain conversational context.' ), ] = None message: Annotated[ str | None, Field( description='Human-readable summary of the task result. Provides natural language explanation of what happened, suitable for display to end users or for AI agent comprehension. Generated by the protocol layer based on the task response.' ), ] = None payload: Annotated[ dict[str, Any], Field( description='The actual task-specific response data. This is the content defined in individual task response schemas (e.g., get-products-response.json, create-media-buy-response.json). Contains only domain-specific data without protocol-level fields.' ), ] push_notification_config: Annotated[ push_notification_config_1.PushNotificationConfig | None, Field( description='Push notification configuration for async task updates (A2A and REST protocols). Echoed from the request to confirm webhook settings. Specifies URL, authentication scheme (Bearer or HMAC-SHA256), and credentials. MCP uses progress notifications instead of webhooks.' ), ] = None status: Annotated[ task_status.TaskStatus, Field( description='Current task execution state. Indicates whether the task is completed, in progress (working), submitted for async processing, failed, or requires user input. Managed by the protocol layer.' ), ] task_id: Annotated[ str | None, Field( description='Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.' ), ] = None timestamp: Annotated[ AwareDatetime | None, Field( description='ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.' ), ] = NoneBase 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context_id : str | Nonevar message : str | Nonevar model_configvar payload : dict[str, typing.Any]var push_notification_config : PushNotificationConfig | Nonevar status : TaskStatusvar task_id : str | Nonevar timestamp : pydantic.types.AwareDatetime | None
Inherited members