Module adcp.types.generated_poc.creative.preview_creative_request
Classes
class Input (**data: Any)-
Expand source code
class Input(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) name: Annotated[ str, Field( description="Human-readable name for this input set (e.g., 'Sunny morning on mobile', 'Evening podcast ad', 'Desktop dark mode')" ), ] macros: Annotated[ dict[str, str] | None, Field( description="Macro values to use for this preview. Supports all universal macros from the format's supported_macros list." ), ] = None context_description: Annotated[ str | None, Field( description="Natural language description of the context for AI-generated content (e.g., 'User just searched for running shoes', 'Podcast discussing weather patterns')" ), ] = 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 context_description : str | Nonevar macros : dict[str, str] | Nonevar model_configvar name : str
Inherited members
class Input8 (**data: Any)-
Expand source code
class Input8(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) name: Annotated[str, Field(description='Human-readable name for this input set')] macros: Annotated[ dict[str, str] | None, Field(description='Macro values to use for this preview') ] = None context_description: Annotated[ str | None, Field(description='Natural language description of the context for AI-generated content'), ] = 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 context_description : str | Nonevar macros : dict[str, str] | Nonevar model_configvar name : str
Inherited members
class PreviewCreativeRequest (**data: Any)-
Expand source code
class PreviewCreativeRequest(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) adcp_major_version: Annotated[ int | None, Field( description="The AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.", ge=1, le=99, ), ] = None request_type: Annotated[ RequestType, Field( description="Preview mode. 'single' previews one creative manifest. 'batch' previews multiple creatives in one call. 'variant' replays a post-flight variant by ID." ), ] creative_manifest: Annotated[ creative_manifest_1.CreativeManifest | None, Field( description="Complete creative manifest with all required assets for the format. Required when request_type is 'single'. Also accepted per item in batch mode." ), ] = None format_id: Annotated[ format_id_1.FormatId | None, Field( description='Format identifier for rendering the preview. Defaults to creative_manifest_1.format_id if omitted. Used in single mode.' ), ] = None inputs: Annotated[ list[Input] | None, Field( description='Array of input sets for generating multiple preview variants. Each input set defines macros and context values for one preview rendering. Used in single mode.', min_length=1, ), ] = None template_id: Annotated[ str | None, Field(description='Specific template ID for custom format rendering. Used in single mode.'), ] = None quality: Annotated[ creative_quality.CreativeQuality | None, Field( description="Render quality. 'draft' produces fast, lower-fidelity renderings. 'production' produces full-quality renderings. In batch mode, sets the default for all requests (individual items can override)." ), ] = None output_format: Annotated[ preview_output_format.PreviewOutputFormat | None, Field( description="Output format. 'url' returns preview_url (iframe-embeddable URL), 'html' returns preview_html (raw HTML). In batch mode, sets the default for all requests (individual items can override). Default: 'url'." ), ] = preview_output_format.PreviewOutputFormat.url item_limit: Annotated[ int | None, Field( description='Maximum number of catalog items to render per preview variant. Used in single mode. Creative agents SHOULD default to a reasonable sample when omitted and the catalog is large.', ge=1, ), ] = None requests: Annotated[ list[Request] | None, Field( description="Array of preview requests (1-50 items). Required when request_type is 'batch'. Each item follows the single request structure.", max_length=50, min_length=1, ), ] = None variant_id: Annotated[ str | None, Field( description="Platform-assigned variant identifier from get_creative_delivery response. Required when request_type is 'variant'." ), ] = None creative_id: Annotated[ str | None, Field(description='Creative identifier for context. Used in variant mode.') ] = None context: context_1.ContextObject | None = None ext: ext_1.ExtensionObject | None = 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 adcp_major_version : int | Nonevar context : ContextObject | Nonevar creative_id : str | Nonevar creative_manifest : CreativeManifest | Nonevar ext : ExtensionObject | Nonevar format_id : FormatId | Nonevar inputs : list[Input] | Nonevar item_limit : int | Nonevar model_configvar output_format : PreviewOutputFormat | Nonevar quality : CreativeQuality | Nonevar request_type : RequestTypevar requests : list[Request] | Nonevar template_id : str | Nonevar variant_id : str | None
Inherited members
class Request (**data: Any)-
Expand source code
class Request(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) format_id: Annotated[ format_id_1.FormatId | None, Field( description='Format identifier for rendering the preview. Defaults to creative_manifest_1.format_id if omitted.' ), ] = None creative_manifest: Annotated[ creative_manifest_1.CreativeManifest, Field(description='Complete creative manifest with all required assets.'), ] inputs: Annotated[ list[Input8] | None, Field( description='Array of input sets for generating multiple preview variants', min_length=1 ), ] = None template_id: Annotated[ str | None, Field(description='Specific template ID for custom format rendering') ] = None quality: Annotated[ creative_quality.CreativeQuality | None, Field(description='Render quality for this preview. Overrides batch-level default.'), ] = None output_format: Annotated[ preview_output_format.PreviewOutputFormat | None, Field(description='Output format for this preview. Overrides batch-level default.'), ] = preview_output_format.PreviewOutputFormat.url item_limit: Annotated[ int | None, Field(description='Maximum number of catalog items to render in this preview.', ge=1), ] = 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 creative_manifest : CreativeManifestvar format_id : FormatId | Nonevar inputs : list[Input8] | Nonevar item_limit : int | Nonevar model_configvar output_format : PreviewOutputFormat | Nonevar quality : CreativeQuality | Nonevar template_id : str | None
Inherited members
class RequestType (*args, **kwds)-
Expand source code
class RequestType(Enum): single = 'single' batch = 'batch' variant = 'variant'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 batchvar singlevar variant