Module adcp.types.generated_poc.url_asset

Classes

class UrlAsset (**data: Any)
Expand source code
class UrlAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    description: Annotated[
        str | None, Field(description='Description of what this URL points to')
    ] = None
    url: Annotated[AnyUrl, Field(description='URL reference')]
    url_type: Annotated[
        UrlType | None,
        Field(
            description="Type of URL asset: 'clickthrough' for user click destination (landing page), 'tracker_pixel' for impression/event tracking via HTTP request (fires GET, expects pixel/204 response), 'tracker_script' for measurement SDKs that must load as <script> tag (OMID verification, native event trackers using method:2)"
        ),
    ] = 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 description : str | None
var model_config
var url : pydantic.networks.AnyUrl
var url_typeUrlType | None

Inherited members

class UrlType (*args, **kwds)
Expand source code
class UrlType(Enum):
    clickthrough = 'clickthrough'
    tracker_pixel = 'tracker_pixel'
    tracker_script = 'tracker_script'

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 clickthrough
var tracker_pixel
var tracker_script