Module adcp.types.generated_poc.asset_type

Classes

class AssetTypeSchema (**data: Any)
Expand source code
class AssetTypeSchema(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    asset_role: Annotated[
        str,
        Field(
            description="Role or purpose of this asset in the creative (e.g., 'hero_image', 'logo', 'cta_button')"
        ),
    ]
    constraints: Annotated[
        list[str] | None,
        Field(description='Additional constraints or requirements (human-readable)'),
    ] = None
    examples: Annotated[
        list[str] | None, Field(description='Example values or descriptions for this asset')
    ] = None
    required: Annotated[
        bool | None, Field(description='Whether this asset is mandatory for the format')
    ] = True
    requirements: Annotated[
        Requirements | None, Field(description='Technical requirements for this asset type')
    ] = None
    type: Annotated[Type, Field(description='Type of asset')]

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var asset_role : str
var constraints : list[str] | None
var examples : list[str] | None
var model_config
var required : bool | None
var requirementsRequirements | None
var typeType

Inherited members

class ContentLength (**data: Any)
Expand source code
class ContentLength(AdCPBaseModel):
    max_characters: Annotated[int | None, Field(ge=1)] = None
    max_words: Annotated[int | None, Field(ge=1)] = None
    min_characters: Annotated[int | None, Field(ge=0)] = None
    min_words: Annotated[int | None, Field(ge=0)] = None

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var max_characters : int | None
var max_words : int | None
var min_characters : int | None
var min_words : int | None
var model_config

Inherited members

class Dimensions (**data: Any)
Expand source code
class Dimensions(AdCPBaseModel):
    aspect_ratio: str | None = None
    height: Annotated[int | None, Field(ge=1)] = None
    max_height: Annotated[int | None, Field(ge=1)] = None
    max_width: Annotated[int | None, Field(ge=1)] = None
    min_height: Annotated[int | None, Field(ge=1)] = None
    min_width: Annotated[int | None, Field(ge=1)] = None
    width: Annotated[int | None, Field(ge=1)] = None

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var aspect_ratio : str | None
var height : int | None
var max_height : int | None
var max_width : int | None
var min_height : int | None
var min_width : int | None
var model_config
var width : int | None

Inherited members

class Duration (**data: Any)
Expand source code
class Duration(AdCPBaseModel):
    exact_seconds: Annotated[float | None, Field(ge=0.0)] = None
    max_seconds: Annotated[float | None, Field(ge=0.0)] = None
    min_seconds: Annotated[float | None, Field(ge=0.0)] = None

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var exact_seconds : float | None
var max_seconds : float | None
var min_seconds : float | None
var model_config

Inherited members

class FileSize (**data: Any)
Expand source code
class FileSize(AdCPBaseModel):
    max_bytes: Annotated[int | None, Field(ge=1)] = None
    min_bytes: Annotated[int | None, Field(ge=0)] = None

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var max_bytes : int | None
var min_bytes : int | None
var model_config

Inherited members

class Quality (**data: Any)
Expand source code
class Quality(AdCPBaseModel):
    max_bitrate_kbps: Annotated[int | None, Field(ge=1)] = None
    min_bitrate_kbps: Annotated[int | None, Field(ge=1)] = None
    min_resolution_dpi: Annotated[int | None, Field(ge=72)] = None

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var max_bitrate_kbps : int | None
var min_bitrate_kbps : int | None
var min_resolution_dpi : int | None
var model_config

Inherited members

class Requirements (**data: Any)
Expand source code
class Requirements(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    content_length: ContentLength | None = None
    dimensions: Dimensions | None = None
    duration: Duration | None = None
    file_formats: Annotated[
        list[str] | None,
        Field(description="Acceptable file formats (e.g., ['jpg', 'png'] for images)"),
    ] = None
    file_size: FileSize | None = None
    quality: Quality | None = None

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var content_lengthContentLength | None
var dimensionsDimensions | None
var durationDuration | None
var file_formats : list[str] | None
var file_sizeFileSize | None
var model_config
var qualityQuality | None

Inherited members

class Type (*args, **kwds)
Expand source code
class Type(Enum):
    image = 'image'
    video = 'video'
    audio = 'audio'
    text = 'text'
    html = 'html'
    css = 'css'
    javascript = 'javascript'
    vast = 'vast'
    daast = 'daast'
    promoted_offerings = 'promoted_offerings'
    url = 'url'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access 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 audio
var css
var daast
var html
var image
var javascript
var promoted_offerings
var text
var url
var vast
var video