Module adcp.types.generated_poc.preview_creative_response
Classes
class Error (**data: Any)-
Expand source code
class Error(AdCPBaseModel): code: Annotated[ str, Field( description="Error code (e.g., 'invalid_manifest', 'unsupported_format', 'missing_assets')" ), ] details: Annotated[dict[str, Any] | None, Field(description='Additional error context')] = None message: Annotated[str, Field(description='Human-readable error message')]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var code : strvar details : dict[str, typing.Any] | Nonevar message : strvar model_config
Inherited members
class Input (**data: Any)-
Expand source code
class Input(AdCPBaseModel): context_description: Annotated[ str | None, Field(description='Context description applied to this variant') ] = None macros: Annotated[ dict[str, str] | None, Field(description='Macro values applied to this variant') ] = None name: Annotated[str, Field(description='Human-readable name for this variant')]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context_description : str | Nonevar macros : dict[str, str] | Nonevar model_configvar name : str
Inherited members
class Input4 (**data: Any)-
Expand source code
class Input4(AdCPBaseModel): context_description: str | None = None macros: dict[str, str] | None = None name: strBase 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_description : str | Nonevar macros : dict[str, str] | Nonevar model_configvar name : str
Inherited members
class Preview (**data: Any)-
Expand source code
class Preview(AdCPBaseModel): input: Annotated[ Input, Field( description='The input parameters that generated this preview variant. Echoes back the request input or shows defaults used.' ), ] preview_id: Annotated[str, Field(description='Unique identifier for this preview variant')] renders: Annotated[ list[ preview_render.PreviewRender1 | preview_render.PreviewRender2 | preview_render.PreviewRender3 ], Field( description='Array of rendered pieces for this preview variant. Most formats render as a single piece. Companion ad formats (video + banner), multi-placement formats, and adaptive formats render as multiple pieces.', min_length=1, ), ]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var input : Inputvar model_configvar preview_id : strvar renders : list[PreviewRender1 | PreviewRender2 | PreviewRender3]
Inherited members
class Preview1 (**data: Any)-
Expand source code
class Preview1(AdCPBaseModel): input: Input4 preview_id: str renders: Annotated[ list[ preview_render.PreviewRender1 | preview_render.PreviewRender2 | preview_render.PreviewRender3 ], Field(min_length=1), ]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var input : Input4var model_configvar preview_id : strvar renders : list[PreviewRender1 | PreviewRender2 | PreviewRender3]
class Preview2 (**data: Any)-
Expand source code
class Preview1(AdCPBaseModel): input: Input4 preview_id: str renders: Annotated[ list[ preview_render.PreviewRender1 | preview_render.PreviewRender2 | preview_render.PreviewRender3 ], Field(min_length=1), ]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var input : Input4var model_configvar preview_id : strvar renders : list[PreviewRender1 | PreviewRender2 | PreviewRender3]
Inherited members
class PreviewCreativeResponse (root: RootModelRootType = PydanticUndefined, **data)-
Expand source code
class PreviewCreativeResponse(RootModel[PreviewCreativeResponse1 | PreviewCreativeResponse2]): root: Annotated[ PreviewCreativeResponse1 | PreviewCreativeResponse2, Field( description='Response containing preview links for one or more creatives. Format matches the request: single preview response for single requests, batch results for batch requests.', title='Preview Creative Response', ), ]Usage Documentation
A Pydantic
BaseModelfor 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- pydantic.root_model.RootModel[Union[PreviewCreativeResponse1, PreviewCreativeResponse2]]
- pydantic.root_model.RootModel
- pydantic.main.BaseModel
- typing.Generic
Class variables
var model_configvar root : PreviewCreativeResponse1 | PreviewCreativeResponse2
class PreviewCreativeResponse1 (**data: Any)-
Expand source code
class PreviewCreativeResponse1(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) context: Annotated[ dict[str, Any] | None, Field( description='Initiator-provided context echoed inside the preview payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.' ), ] = None expires_at: Annotated[ AwareDatetime, Field(description='ISO 8601 timestamp when preview links expire') ] interactive_url: Annotated[ AnyUrl | None, Field( description='Optional URL to an interactive testing page that shows all preview variants with controls to switch between them, modify macro values, and test different scenarios.' ), ] = None previews: Annotated[ list[Preview], Field( description='Array of preview variants. Each preview corresponds to an input set from the request. If no inputs were provided, returns a single default preview.', min_length=1, ), ] response_type: Annotated[ Literal['single'], Field(description='Discriminator indicating this is a single preview response'), ]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context : dict[str, typing.Any] | Nonevar expires_at : pydantic.types.AwareDatetimevar interactive_url : pydantic.networks.AnyUrl | Nonevar model_configvar previews : list[Preview]var response_type : Literal['single']
Inherited members
class PreviewCreativeResponse2 (**data: Any)-
Expand source code
class PreviewCreativeResponse2(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) context: Annotated[ dict[str, Any] | None, Field( description='Initiator-provided context echoed inside the preview payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.' ), ] = None response_type: Annotated[ Literal['batch'], Field(description='Discriminator indicating this is a batch preview response'), ] results: Annotated[ list[Results | Results1], Field( description='Array of preview results corresponding to each request in the same order. results[0] is the result for requests[0], results[1] for requests[1], etc. Order is guaranteed even when some requests fail. Each result contains either a successful preview response or an error.', min_length=1, ), ]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context : dict[str, typing.Any] | Nonevar model_configvar response_type : Literal['batch']var results : list[Results | Results1]
Inherited members
class Response (**data: Any)-
Expand source code
class Response(AdCPBaseModel): expires_at: AwareDatetime interactive_url: AnyUrl | None = None previews: Annotated[ list[Preview1], Field(description='Array of preview variants for this creative', min_length=1), ]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var expires_at : pydantic.types.AwareDatetimevar interactive_url : pydantic.networks.AnyUrl | Nonevar model_configvar previews : list[Preview1]
Inherited members
class Response1 (**data: Any)-
Expand source code
class Response1(AdCPBaseModel): expires_at: AwareDatetime interactive_url: AnyUrl | None = None previews: Annotated[ list[Preview2], Field(description='Array of preview variants for this creative', min_length=1), ]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var expires_at : pydantic.types.AwareDatetimevar interactive_url : pydantic.networks.AnyUrl | Nonevar model_configvar previews : list[Preview1]
Inherited members
class Results (**data: Any)-
Expand source code
class Results(AdCPBaseModel): error: Annotated[Error | None, Field(description='Error information for failed requests')] = ( None ) response: Annotated[Response, Field(description='Preview response for successful requests')] success: Annotated[Literal[True], Field(description='Whether this preview request succeeded')]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var error : Error | Nonevar model_configvar response : Responsevar success : Literal[True]
Inherited members
class Results1 (**data: Any)-
Expand source code
class Results1(AdCPBaseModel): error: Annotated[Error, Field(description='Error information for failed requests')] response: Annotated[ Response1 | None, Field(description='Preview response for successful requests') ] = None success: Annotated[Literal[False], Field(description='Whether this preview request succeeded')]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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var error : Errorvar model_configvar response : Response1 | Nonevar success : Literal[False]
Inherited members