adcom1

package
v0.0.0-...-b0bd989 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: Unlicense Imports: 1 Imported by: 0

README

Documentation

Overview

Package adcom1 provides AdCOM 1.0 types

https://iabtechlab.com/standards/openmedia/ https://github.com/InteractiveAdvertisingBureau/AdCOM

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIFramework

type APIFramework int64

APIFramework represents API frameworks either supported by a placement or required by an ad.

const (
	APIVPAID10 APIFramework = 1 // VPAID 1.0
	APIVPAID20 APIFramework = 2 // VPAID 2.0
	APIMRAID10 APIFramework = 3 // MRAID 1.0
	APIORMMA   APIFramework = 4 // ORMMA
	APIMRAID20 APIFramework = 5 // MRAID 2.0
	APIMRAID30 APIFramework = 6 // MRAID 3.0
	APIOMID10  APIFramework = 7 // OMID 1.0
	APISIMID10 APIFramework = 8 // SIMID 1.0
	APISIMID11 APIFramework = 9 // SIMID 1.1
)

API frameworks either supported by a placement or required by an ad.

Values of 500+ hold vendor-specific codes.

type Ad struct {
	// Attribute:
	//   id
	// Type:
	//   string; required
	// Definition:
	//   ID of the creative; unique at least throughout the scope of a vendor (e.g., an exchange or buying platform).
	//   Note that multiple instances of the same ad when used in transactions must have the same ID.
	ID string `json:"id"`

	// Attribute:
	//   adomain
	// Type:
	//   string array; recommended
	// Definition:
	//   Advertiser domain; top two levels only (e.g., “ford.com”).
	//   This can be an array for the case of rotating creatives.
	ADomain []string `json:"adomain,omitempty"`

	// Attribute:
	//   bundle
	// Type:
	//   string array
	// Definition:
	//   When the product of the ad is an app, the unique ID of that app as a bundle or package name (e.g., “com.foo.mygame”).
	//   This should NOT be an app store ID (e.g., no iTunes store IDs).
	//   This can be an array of for the case of rotating creatives.
	Bundle []string `json:"bundle,omitempty"`

	// Attribute:
	//   iurl
	// Type:
	//   string
	// Definition:
	//   URL without cache-busting to an image that is representative of the ad content for cursory level ad quality checking.
	IURL string `json:"iurl,omitempty"`

	// Attribute:
	//   cat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories describing the ad using IDs from the taxonomy indicated in cattax.
	Cat []string `json:"cat,omitempty"`

	// Attribute:
	//   cattax
	// Type:
	//   integer; default 2
	// Definition:
	//   The taxonomy in use for the cat attribute.
	//   Refer to List: Category Taxonomies.
	CatTax CategoryTaxonomy `json:"cattax,omitempty"`

	// Attribute:
	//   lang
	// Type:
	//   string
	// Definition:
	//   Language of the creative using ISO-639-1-alpha-2.
	//   In practice, vendors using this object may elect an alternate standard (e.g., BCP-47) in which case this must be communicated a priori.
	//   The non-standard code “xx” may also be used if the creative has no linguistic content (e.g., a banner with just a company logo).
	Lang string `json:"lang,omitempty"`

	// Attribute:
	//   attr
	// Type:
	//   integer array
	// Definition:
	//   Set of attributes describing the creative.
	//   Refer to List: Creative Attributes.
	Attr []CreativeAttribute `json:"attr,omitempty"`

	// Attribute:
	//   secure
	// Type:
	//   integer
	// Definition:
	//   Flag to indicate if the creative is secure (i.e., uses HTTPS for all assets and markup), where 0 = no, 1 = yes.
	//   There is no default and thus if omitted, the secure state is unknown.
	//   However, as a practical matter, the safe assumption is to treat unknown as non-secure.
	Secure int8 `json:"secure,omitempty"`

	// Attribute:
	//   mrating
	// Type:
	//   integer
	// Definition:
	//   Media rating per IQG guidelines.
	//   Refer to List: Media Ratings.
	MRating MediaRating `json:"mrating,omitempty"`

	// Attribute:
	//   init
	// Type:
	//   integer
	// Definition:
	//   Timestamp of the original instantiation of this ad (i.e., this object or any of its children) in Unix format (i.e., milliseconds since the epoch).
	Init int64 `json:"init,omitempty"`

	// Attribute:
	//   lastmod
	// Type:
	//   integer
	// Definition:
	//   Timestamp of most recent modification to this ad (i.e., this object or any of its children other than the Audit object) in Unix format (i.e., milliseconds since the epoch).
	LastMod int64 `json:"lastmod,omitempty"`

	// Attribute:
	//   display
	// Type:
	//   Object; required *
	// Definition:
	//   Media Subtype Object that indicates this is a display ad and provides additional detail as such.
	//   Refer to Object: Display.
	//   * Required if no other media subtype object is specified.
	Display *Display `json:"display,omitempty"`

	// Attribute:
	//   video
	// Type:
	//   object; required *
	// Definition:
	//   Media Subtype Object that indicates this is a video ad and provides additional detail as such.
	//   Refer to Object: Video.
	//   * Required if no other media subtype object is specified.
	Video *Video `json:"video,omitempty"`

	// Attribute:
	//   audio
	// Type:
	//   object; required *
	// Definition:
	//   Media Subtype Object that indicates this is an audio ad and provides additional detail as such.
	//   Refer to Object: Audio.
	//   * Required if no other media subtype object is specified.
	Audio *Audio `json:"audio,omitempty"`

	// Attribute:
	//   audit
	// Type:
	//   object
	// Definition:
	//   An object depicting the audit status of the ad; typically part of a quality/safety review process.
	//   Refer to Object: Audit.
	Audit *Audit `json:"audit,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Ad object is the root of a structure that defines in instance of advertising media. It includes metadata about the ad overall and sub-objects that provide additional detail specific to the type of media comprising the creative.

type AgentType

type AgentType int64

AgentType identifies the user agent types a user identifier is from.

const (
	AgentTypeWeb    AgentType = 1 // An ID which is tied to a specific web browser or device (cookie-based, probabilistic, or other).
	AgentTypeApp    AgentType = 2 // In-app impressions, which will typically contain a type of device ID (or rather, the privacy-compliant versions of device IDs).
	AgentTypePerson AgentType = 3 // A person-based ID, i.e., that is the same across devices.
)

Agent types describing where the user agent is from.

Values of 500+ hold vendor-specific codes.

type App

type App struct {
	DistributionChannel

	// Attribute:
	//   domain
	// Type:
	//   string
	// Definition:
	//   Domain of the app (e.g., “mygame.foo.com”).
	Domain string `json:"domain,omitempty"`

	// Attribute:
	//   cat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories describing the app using IDs from the taxonomy indicated in cattax.
	Cat []string `json:"cat,omitempty"`

	// Attribute:
	//   sectcat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories describing the current section of the app using IDs from the taxonomy indicated in cattax.
	SectCat []string `json:"sectcat,omitempty"`

	// Attribute:
	//   pagecat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories describing the current page or view of the app using IDs from the taxonomy indicated in cattax.
	PageCat []string `json:"pagecat,omitempty"`

	// Attribute:
	//   cattax
	// Type:
	//   integer
	// Definition:
	//   The taxonomy in use for the cat, sectcat and pagecat attributes.
	//   Refer to List: Category Taxonomies.
	CatTax CategoryTaxonomy `json:"cattax,omitempty"`

	// Attribute:
	//   privpolicy
	// Type:
	//   integer
	// Definition:
	//   Indicates if the app has a privacy policy, where 0 = no, 1 = yes.
	PrivPolicy int8 `json:"privpolicy,omitempty"`

	// Attribute:
	//   keywords
	// Type:
	//   string; DEPRECATED
	// Definition:
	//   Comma-separated list of keywords about the app.
	//   Only one of 'keywords' or 'kwarray' may be present.
	//   NOTE: this field is deprecated, use 'kwarray' instead.
	Keywords string `json:"keywords,omitempty"`

	// Attribute:
	//   kwarray
	// Type:
	//   string array
	// Definition:
	//   Array of keywords about the site. Only one of 'keywords' or 'kwarray' may be present.
	KwArray []string `json:"kwarray,omitempty"`

	// Attribute:
	//   bundle
	// Type:
	//   string
	// Definition:
	//   Bundle or package name of the app (e.g., “com.foo.mygame”) and should NOT be app store IDs (e.g., not iTunes store IDs).
	Bundle string `json:"bundle,omitempty"`

	// Attribute:
	//   storeid
	// Type:
	//   string
	// Definition:
	//   The ID of the app in an app store (e.g., Apple iTunes, Google Play).
	StoreID string `json:"storeid,omitempty"`

	// Attribute:
	//   storeurl
	// Type:
	//   string
	// Definition:
	//   App store URL for an installed app; for IQG 2.1 compliance.
	StoreURL string `json:"storeurl,omitempty"`

	// Attribute:
	//   ver
	// Type:
	//   string
	// Definition:
	//   Application version.
	Ver string `json:"ver,omitempty"`

	// Attribute:
	//   paid
	// Type:
	//   integer; default 0
	// Definition:
	//   Indicator of whether or not this is a paid app, where 0 = free, 1 = paid.
	Paid int8 `json:"paid,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

App object is used to define an ad supported non-browser application, in contrast to a typical website, example. As a derived class, an App object inherits all DistributionChannel attributes and adds those defined below.

type Asset

type Asset struct {
	// Attribute:
	//   id
	// Type:
	//   integer
	// Definition:
	//   The value of AssetFormat.id if this ad references a specific native placement defined by a Placement object and its structure.
	ID int64 `json:"id,omitempty"`

	// Attribute:
	//   req
	// Type:
	//   integer; default 0
	// Definition:
	//   Indicates if the asset is required to be displayed, where 0 = no, 1 = yes.
	Req int8 `json:"req,omitempty"`

	// Attribute:
	//   title
	// Type:
	//   object; required *
	// Definition:
	//   Asset Subtype Object that indicates this is a title asset and provides additional detail as such.
	//   Refer to Object: TitleAsset.
	//   * Required if no other asset subtype object is specified.
	Title *TitleAsset `json:"title,omitempty"`

	// Attribute:
	//   image
	// Type:
	//   object; required *
	// Definition:
	//   Asset Subtype Object that indicates this is an image asset and provides additional detail as such.
	//   Refer to Object: ImageAsset.
	//   * Required if no other asset subtype object is specified.
	Image *ImageAsset `json:"image,omitempty"`

	// Attribute:
	//   video
	// Type:
	//   object; required *
	// Definition:
	//   Asset Subtype Object that indicates this is a video asset and provides additional detail as such.
	//   Refer to Object: VideoAsset.
	//   * Required if no other asset subtype object is specified.
	Video *VideoAsset `json:"video,omitempty"`

	// Attribute:
	//   data
	// Type:
	//   object; required *
	// Definition:
	//   Asset Subtype Object that indicates this is a data asset and provides additional detail as such.
	//   Refer to Object: DataAsset.
	//   * Required if no other asset subtype object is specified.
	Data *DataAsset `json:"data,omitempty"`

	// Attribute:
	//   link
	// Type:
	//   object; required *
	// Definition:
	//   Asset Subtype Object that indicates this is a link asset and provides additional detail as such.
	//   Refer to Object: LinkAsset.
	//   * Required if no other asset subtype object is specified.
	Link *LinkAsset `json:"link,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Asset object is the container for each asset comprising a native ad. Each asset is of a specific type and to reflect this, one and only one of the subtype objects (i.e., title, img, video, data) must be present; all others should be omitted.

type AssetFormat

type AssetFormat struct {
	// Attribute:
	//   id
	// Type:
	//   integer; required
	// Definition:
	//   Asset ID, unique within the scope of this placement specification.
	ID int64 `json:"id"`

	// Attribute:
	//   req
	// Type:
	//   integer; default 0
	// Definition:
	//   Indicator of whether or not this asset is required, where 0 = no, 1 = yes.
	Req int8 `json:"req,omitempty"`

	// Attribute:
	//   title
	// Type:
	//   object; required *
	// Definition:
	//   Asset Format Subtype Object that indicates this is specifying a title asset and provides additional detail as such.
	//   Refer to Object: TitleAssetFormat.
	//   * Required if no other asset format subtype object is specified.
	Title *TitleAssetFormat `json:"title,omitempty"`

	// Attribute:
	//   img
	// Type:
	//   object; required *
	// Definition:
	//   Asset Format Subtype Object that indicates this is specifying an image asset and provides additional detail as such.
	//   Refer to Object: ImageAssetFormat.
	//   * Required if no other asset format subtype object is specified.
	Img *ImageAssetFormat `json:"img,omitempty"`

	// Attribute:
	//   video
	// Type:
	//   object; required *
	// Definition:
	//   Asset Format Subtype Object, which leverages the VideoPlacement object, that indicates this is specifying a video asset and provides additional detail as such.
	//   Refer to Object: VideoPlacement.
	//   * Required if no other asset format subtype object is specified.
	Video *VideoPlacement `json:"video,omitempty"`

	// Attribute:
	//   data
	// Type:
	//   object; required *
	// Definition:
	//   Asset Format Subtype Object that indicates this is specifying a data asset and provides additional detail as such.
	//   Refer to Object: DataAssetFormat.
	//   * Required if no other asset format subtype object is specified.
	Data *DataAssetFormat `json:"data,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

AssetFormat object represents the permitted specifications of a single asset of a native ad. Along with its own attributes, exactly one of the asset subtype objects must be included. All others must be omitted.

type Audio

type Audio struct {
	// Attribute:
	//   mime
	// Type:
	//   string array
	// Definition:
	//   Mime type(s) of the ad creative(s) (e.g., “audio/mp4”).
	MIME []string `json:"mime,omitempty"`

	// Attribute:
	//   api
	// Type:
	//   integer array
	// Definition:
	//   API required by the ad if applicable.
	//   Refer to List: API Frameworks.
	API []APIFramework `json:"api,omitempty"`

	// Attribute:
	//   ctype
	// Type:
	//   integer
	// Definition:
	//   Subtype of audio creative.
	//   Refer to List: Creative Subtypes - Audio/Video.
	CType MediaCreativeSubtype `json:"ctype,omitempty"`

	// Attribute:
	//   dur
	// Type:
	//   integer
	// Definition:
	//   Duration of the audio creative in seconds.
	Dur int64 `json:"dur,omitempty"`

	// Attribute:
	//   adm
	// Type:
	//   string
	// Definition:
	//   Audio markup (e.g., DAAST). Note that including both adm and curl is not recommended.
	AdM string `json:"adm,omitempty"`

	// Attribute:
	//   curl
	// Type:
	//   string
	// Definition:
	//   Optional means of retrieving markup by reference; a URL that returns audio markup (e.g., DAAST).
	//   If this ad is matched to a Placement specification, the Placement.curlx attribute indicates if this markup retrieval option is supported.
	//   Note that including both adm and curl is not recommended.
	CURL string `json:"curl,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Audio object provides additional detail about an ad specifically for audio ads.

type AudioPlacement

type AudioPlacement struct {
	// Attribute:
	//   delay
	// Type:
	//   integer
	// Definition:
	//   Indicates the start delay in seconds for pre-roll, mid-roll, or post-roll placements.
	//   For additional generic values, refer to List: Start Delay Modes.
	Delay StartDelay `json:"delay,omitempty"`

	// Attribute:
	//   skip
	// Type:
	//   integer
	// Definition:
	//   Indicates if the placement imposes ad skippability, where 0 = no, 1 = yes.
	Skip int8 `json:"skip,omitempty"`

	// Attribute:
	//   skipmin
	// Type:
	//   integer; default 0
	// Definition:
	//   The placement allows creatives of total duration greater than this number of seconds to be skipped; only applicable if the ad is skippable.
	SkipMin int64 `json:"skipmin,omitempty"`

	// Attribute:
	//   skipafter
	// Type:
	//   integer; default 0
	// Definition:
	//   Number of seconds a creative must play before the placement enables skipping; only applicable if the ad is skippable.
	SkipAfter int64 `json:"skipafter,omitempty"`

	// Attribute:
	//   playmethod
	// Type:
	//   integer
	// Definition:
	//   Playback method in use for this placement.
	//   Refer to List: Playback Methods.
	PlayMethod PlaybackMethod `json:"playmethod,omitempty"`

	// Attribute:
	//   playend
	// Type:
	//   integer
	// Definition:
	//   The event that causes playback to end for this placement.
	//   Refer to List: Playback Cessation Modes.
	PlayEnd PlaybackCessationMode `json:"playend,omitempty"`

	// Attribute:
	//   feed
	// Type:
	//   integer
	// Definition:
	//   Type of audio feed of this placement.
	//   Refer to List: Feed Types.
	Feed FeedType `json:"feed,omitempty"`

	// Attribute:
	//   nvol
	// Type:
	//   integer
	// Definition:
	//   Volume normalization mode of this placement.
	//   Refer to List: Volume Normalization Modes.
	NVol VolumeNormalizationMode `json:"nvol,omitempty"`

	// Attribute:
	//   mime
	// Type:
	//   string array; required
	// Definition:
	//   Array of supported mime types (e.g., “audio/mp4”).
	//   If omitted, all types are assumed.
	MIME []string `json:"mime,omitempty"`

	// Attribute:
	//   api
	// Type:
	//   integer array
	// Definition:
	//   List of supported APIs for this placement.
	//   If an API is not explicitly listed, it is assumed to be unsupported.
	//   Refer to List: API Frameworks.
	API []APIFramework `json:"api,omitempty"`

	// Attribute:
	//   ctype
	// Type:
	//   integer array
	// Definition:
	//   Creative subtypes permitted for this placement.
	//   Refer to List: Creative Subtypes - Audio/Video.
	CType []MediaCreativeSubtype `json:"ctype,omitempty"`

	// Attribute:
	//   mindur
	// Type:
	//   integer
	// Definition:
	//   Minimum creative duration in seconds.
	MinDur int64 `json:"mindur,omitempty"`

	// Attribute:
	//   maxdur
	// Type:
	//   integer
	// Definition:
	//   Maximum creative duration in seconds.
	MaxDur int64 `json:"maxdur,omitempty"`

	// Attribute:
	//   rqddurs
	// Type:
	//   integer array
	// Definition:
	//   Precise acceptable durations for video creatives in seconds. This field specifically
	//   targets the Live TV use case where non-exact ad durations would result in undesirable
	//   'dead air'. This field is mutually exclusive with mindur and maxdur; if rqddurs is
	//   specified, mindur and maxdur must not be specified and vice versa.
	RqdDurs []int64 `json:"rqddurs,omitempty"`

	// Attribute:
	//   maxext
	// Type:
	//   integer
	// Definition:
	//   Maximum extended creative duration if extension is allowed.
	//   If 0, extension is not allowed.
	//   If -1, extension is allowed and there is no time limit imposed.
	//   If greater than 0, then the value represents the number of seconds of extended play supported beyond the maxdur value.
	MaxExt int64 `json:"maxext,omitempty"`

	// Attribute:
	//   minbitr
	// Type:
	//   integer
	// Definition:
	//   Minimum bit rate of the creative in Kbps.
	MinBitR int64 `json:"minbitr,omitempty"`

	// Attribute:
	//   maxbitr
	// Type:
	//   integer
	// Definition:
	//   Maximum bit rate of the creative in Kbps.
	MaxBitR int64 `json:"maxbitr,omitempty"`

	// Attribute:
	//   delivery
	// Type:
	//   integer array
	// Definition:
	//   Array of supported creative delivery methods.
	//   If omitted, all can be assumed.
	//   Refer to List: Delivery Methods.
	Delivery []DeliveryMethod `json:"delivery,omitempty"`

	// Attribute:
	//   maxseq
	// Type:
	//   integer
	// Definition:
	//   The maximum number of ads that can be played in an ad pod.
	MaxSeq int64 `json:"maxseq,omitempty"`

	// Attribute:
	//   poddur
	// Type:
	//   integer
	// Definition:
	//   Indicates the total amount of time in seconds that advertisers may fill
	//   for a “dynamic” video ad pod, or the dynamic portion of a “hybrid” ad pod.
	//   This field is required only for the dynamic portion(s) of video ad pods.
	//   This field refers to the length of the entire ad break, whereas
	//   mindur/maxdur/rqddurs are constraints relating to the slots that make up the pod.
	PodDur int64 `json:"poddur,omitempty"`

	// Attribute:
	//   podid
	// Type:
	//   integer
	// Definition:
	//   Unique identifier indicating that an impression opportunity belongs to a
	//   video ad pod. If multiple impression opportunities within a bid request
	//   share the same podid, this indicates that those impression opportunities
	//   belong to the same video ad pod.
	PodID int64 `json:"podid,omitempty"`

	// Attribute:
	//   podseq
	// Type:
	//   integer; default 0
	// Definition:
	//   The sequence (position) of the video ad pod within a content stream.
	//   Refer to List: Pod Sequence for guidance on the use of this field.
	PodSeq PodSequence `json:"podseq,omitempty"`

	// Attribute:
	//   slotinpod
	// Type:
	//   integer; default 0
	// Definition:
	//   For video ad pods, this value indicates that the seller can guarantee delivery
	//   against the indicated slot position in the pod.
	//   Refer to List: Slot Position in Pod for guidance on the use of this field.
	SlotInPod SlotPositionInPod `json:"slotinpod,omitempty"`

	// Attribute:
	//   mincpmpersec
	// Type:
	//   float
	// Definition:
	//   Minimum CPM per second. This is a price floor for the “dynamic” portion of a
	//   video ad pod, relative to the duration of bids an advertiser may submit.
	MinCPMPerSec float64 `json:"mincpmpersec,omitempty"`

	// Attribute:
	//   comp
	// Type:
	//   object array
	// Definition:
	//   Array of objects indicating that companion ads are available and providing the specifications thereof.
	//   Refer to Object: Companion.
	Comp []Companion `json:"comp,omitempty"`

	// Attribute:
	//   comptype
	// Type:
	//   integer array
	// Definition:
	//   Supported companion ad types; recommended if companion ads are specified in comp.
	//   Refer to List: Companion Types.
	CompType []CompanionType `json:"comptype,omitempty"`

	// Attribute:
	//   overlayexpdir
	// Type:
	//   integer array
	// Definition:
	//   Directions in which the creative (video overlay) is permitted to expand.
	//   This is primarily used for non-linear videos.
	//   Refer to List: Expandable Directions.
	OverlayExpDir []ExpandableDirection `json:"overlayexpdir,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

AudioPlacement object signals that the placement may be an audio placement and provides additional detail about permitted audio ads (e.g., DAAST).

type Audit

type Audit struct {
	// Attribute:
	//   status
	// Type:
	//   integer
	// Definition:
	//   The audit status of the ad.
	//   Refer to List: Audit Status Codes.
	Status AuditStatus `json:"status,omitempty"`

	// Attribute:
	//   feedback
	// Type:
	//   string array
	// Definition:
	//   One or more human-readable explanations as to reasons for rejection or any changes to fields for ad quality reasons (e.g., adomain, cat, attr, etc.).
	Feedback []string `json:"feedback,omitempty"`

	// Attribute:
	//   init
	// Type:
	//   integer
	// Definition:
	//   Timestamp of the original instantiation of this object in Unix format (i.e., milliseconds since the epoch).
	Init int64 `json:"init,omitempty"`

	// Attribute:
	//   lastmod
	// Type:
	//   integer
	// Definition:
	//   Timestamp of most recent modification to this object in Unix format (i.e., milliseconds since the epoch).
	LastMod int64 `json:"lastmod,omitempty"`

	// Attribute:
	//   corr
	// Type:
	//   object
	// Definition:
	//   Correction object wherein the auditor can specify changes to attributes of the Ad object or its children they believe to be proper.
	//   For example, if the original Ad indicated a category of “IAB3”, but the auditor deems the correct category to be “IAB13”, then corr could include a sparse Ad object including just the cat array indicating “IAB13”.
	Corr *Ad `json:"corr,omitempty"` // TODO: probably, this won't work due to "omitempty" stuff. Probably, will need an all-pointer Ad equivalent.

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Audit objects represents the outcome of some form of review of the ad. This is typical, for example, when scanning for malware or otherwise performing ad quality reviews.

type AuditStatus

type AuditStatus int

AuditStatus represents codes used in Audit objects to reflect status or workflow state.

const (
	AuditPendingAudit                 AuditStatus = 1 // Pending Audit: An audit has not yet been completed on this ad. A recommendation cannot be made to use this ad, but vendors' policies may override.
	AuditPreApproved                  AuditStatus = 2 // Pre-Approved: An audit has not yet been completed on this ad. Subject to vendors' policies, it can be recommended for use. However, once the audit has been completed, its status will change and it may or may not be approved for continued use.
	AuditApproved                     AuditStatus = 3 // Approved: The audit is complete and the ad is approved for use. Note, however, that some attributes (e.g., adomain, cat, attr, etc.) may have been changed in the process by the auditor.
	AuditDenied                       AuditStatus = 4 // Denied: The audit is complete, but the ad has been found unacceptable in some material aspect and is disapproved for use.
	AuditChangedResubmissionRequested AuditStatus = 5 // Changed; Resubmission Requested: A version of the ad has been detected in use that is materially different from the version that was previously audited, which may result in rejection during use until the ad is resubmitted for audit and approved. Vendors need to communicate offline as to the criteria that constitutes a material change.
	AuditExpired                      AuditStatus = 6 // Expired: The ad has been marked as expired by the vendor. Vendors need to communicate offline as to the expected bidding behavior for ads with this status.
)

Codes used in Audit objects to reflect status or workflow state.

Values of 500+ hold endor-specific codes.

type Banner struct {
	// Attribute:
	//   img
	// Type:
	//   string; required
	// Definition:
	//   A URL that will return the image.
	Img string `json:"img"`

	// Attribute:
	//   link
	// Type:
	//   object
	// Definition:
	//   Destination link if the image is activated (e.g., clicked); not applicable in some contexts (e.g., DOOH) and its inclusion does not guarantee it will be supported.
	//   Refer to Object: LinkAsset.
	Link *LinkAsset `json:"link,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Banner object describes a basic banner creative. It is intended for display scenarios that require a simple, structured image/link pair and is more secure than allowing arbitrary HTML or JavaScript code.

type BidMedia

type BidMedia struct {
	Ad *Ad `json:"ad,omitempty"`
}

BidMedia represents a bunch of data for OpenRTB 3 Bid.media field. Refer to OpenRTB 3.0 specification for details.

For AdCOM v1.x, the objects allowed here are “Ad” and any objects subordinate thereto as specified by AdCOM.

type BrandVersion

type BrandVersion struct {
	// Attribute:
	//   brand
	// Type:
	//   string; recommended
	// Definition:
	//   A brand identifier, for example, “Chrome” or “Windows”.
	//   The value may be sourced from the User-Agent Client Hints headers, representing either the user agent brand (from the Sec-CH-UA-Full-Version header) or the platform brand (from the Sec-CH-UA-Platform header).
	Brand string `json:"brand,omitempty"`

	// Attribute:
	//   version
	// Type:
	//   string array
	// Definition:
	//   A sequence of version components, in descending hierarchical order (major, minor, micro, …).
	Version []string `json:"version,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

BrandVersion provides further identification based on User-Agent Client Hints. The BrandVersion object is used to identify a device’s browser or similar software component, and the user agent’s execution platform or operating system.

type CategoryTaxonomy

type CategoryTaxonomy int64

CategoryTaxonomy identifies the taxonomy in effect when content categories are listed.

const (
	CatTaxIABContent10  CategoryTaxonomy = 1 // 1	IAB Content Category Taxonomy 1.0.
	CatTaxIABContent20  CategoryTaxonomy = 2 // 2	IAB Content Category Taxonomy 2.0: www.iab.com/guidelines/taxonomy
	CatTaxIABProduct10  CategoryTaxonomy = 3 // 3	IAB Ad Product Taxonomy 1.0.
	CatTaxIABAudience11 CategoryTaxonomy = 4 // 4	IAB Audience Taxonomy 1.1.
	CatTaxIABContent21  CategoryTaxonomy = 5 // 5	IAB Content Category Taxonomy 2.1.
	CatTaxIABContent22  CategoryTaxonomy = 6 // 6	IAB Content Category Taxonomy 2.2
)

CategoryTaxonomy options.

Values of 500+ hold vendor-specific codes.

type Channel

type Channel struct {
	// Attribute:
	//   id
	// Type:
	//   string
	// Definition:
	//   A unique identifier assigned by the publisher.
	//   This may not be a unique identifier across all supply sources.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   name
	// Type:
	//   string
	// Definition:
	//   Channel the content is on (e.g., a local channel like "WABC-TV").
	Name string `json:"name,omitempty"`

	// Attribute:
	//   domain
	// Type:
	//   string
	// Definition:
	//   The primary domain of the channel (e.g., “abc7ny.com” in the case of the local channel WABC-TV).
	//   It is recommended to include the top private domain (PSL+1) for DSP targeting normalization purposes.
	Domain string `json:"domain,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Channel describes the channel an ad will be displayed on. A Channel is defined as the entity that curates a content library, or stream within a brand name for viewers. Examples are specific view selectable ‘channels’ within linear and streaming television (MTV, HGTV, CNN, BBC One, etc) or a specific stream of audio content commonly called ‘stations.’ Name is human-readable field while domain and id can be used for reporting and targeting purposes.

type ClickType

type ClickType int

ClickType represents types of creative activation (i.e., click) behavior types.

const (
	ClickNonClickable ClickType = 0 // Non-Clickable
	ClickUnknown      ClickType = 1 // Clickable - Details Unknown
	ClickEmbedded     ClickType = 2 // Clickable - Embedded Browser/Webview
	ClickNative       ClickType = 3 // Clickable - Native Browser
)

Types of creative activation (i.e., click) behavior types.

Values of 500+ hold vendor-specific codes.

type Companion

type Companion struct {
	// Attribute:
	//   id
	// Type:
	//   string
	// Definition:
	//   Identifier of the companion ad; unique within this placement.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   vcm
	// Type:
	//   integer
	// Definition:
	//   Indicates the companion ad rendering mode relative to the associated video or audio ad, where 0 = concurrent, 1 = end-card.
	//   For a given placement, typically only one companion at most should be designated as an end card.
	VCm int8 `json:"vcm,omitempty"`

	// Attribute:
	//   display
	// Type:
	//   object
	// Definition:
	//   Display specification object representing the companion ad.
	//   Refer to Object: DisplayPlacement.
	Display *DisplayPlacement `json:"display,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Companion object is used in video and audio placements to specify an associated or so-called companion display ad. Video and audio placements can specify an array of companion ads.

type CompanionType

type CompanionType int8

CompanionType represents options to indicate markup types allowed for companion ads that apply to video and audio ads. This table is derived from VAST 2.0+ and DAAST 1.0+ specifications.

const (
	CompanionStatic CompanionType = 1 // Static Resource
	CompanionHTML   CompanionType = 2 // HTML Resource
	CompanionIFrame CompanionType = 3 // iframe Resource
)

options to indicate markup types allowed for companion ads that apply to video and audio ads. This table is derived from VAST 2.0+ and DAAST 1.0+ specifications.

type ConnectionType

type ConnectionType int8

ConnectionType represents options for the type of device connectivity.

const (
	ConnectionUnknown  ConnectionType = 0 // 0 Unknown
	ConnectionEthernet ConnectionType = 1 // 1	Ethernet; Wired Connection
	ConnectionWIFI     ConnectionType = 2 // 2	WIFI
	ConnectionCellular ConnectionType = 3 // 3	Cellular Network - Unknown Generation
	Connection2G       ConnectionType = 4 // 4	Cellular Network - 2G
	Connection3G       ConnectionType = 5 // 5	Cellular Network - 3G
	Connection4G       ConnectionType = 6 // 6	Cellular Network - 4G
	Connection5G       ConnectionType = 7 // 7	Cellular Network - 5G
)

Options for the type of device connectivity.

func (ConnectionType) Ptr

func (c ConnectionType) Ptr() *ConnectionType

Ptr returns pointer to own value.

func (*ConnectionType) Val

func (c *ConnectionType) Val() ConnectionType

Val safely dereferences pointer, returning default value (ConnectionUnknown) for nil.

type Content

type Content struct {
	// Attribute:
	//   id
	// Type:
	//   string
	// Definition:
	//   ID uniquely identifying the content.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   episode
	// Type:
	//   integer
	// Definition:
	//   Episode number.
	Episode int64 `json:"episode,omitempty"`

	// Attribute:
	//   title
	// Type:
	//   string
	// Definition:
	//   Content title.
	//   Video Examples: “Search Committee” (television), “Star Wars, A New Hope” (movie), or “Endgame” (made for web).
	//   Non-Video Example: “Why an Antarctic Glacier Is Melting So Quickly” (Time magazine article).
	Title string `json:"title,omitempty"`

	// Attribute:
	//   series
	// Type:
	//   string
	// Definition:
	//   Content series.
	//   Video Examples: “The Office” (television), “Star Wars” (movie), or “Arby 'N' The Chief” (made for web).
	//   Non-Video Example: “Ecocentric” (Time Magazine blog).
	Series string `json:"series,omitempty"`

	// Attribute:
	//   season
	// Type:
	//   string
	// Definition:
	//   Content season (e.g., “Season 3”).
	Season string `json:"season,omitempty"`

	// Attribute:
	//   artist
	// Type:
	//   string
	// Definition:
	//   Artist credited with the content.
	Artist string `json:"artist,omitempty"`

	// Attribute:
	//   genre
	// Type:
	//   string
	// Definition:
	//   Genre that best describes the content (e.g., rock, pop, etc).
	Genre string `json:"genre,omitempty"`

	// Attribute:
	//   album
	// Type:
	//   string
	// Definition:
	//   Album to which the content belongs; typically for audio.
	Album string `json:"album,omitempty"`

	// Attribute:
	//   isrc
	// Type:
	//   string
	// Definition:
	//   International Standard Recording Code conforming to ISO-3901.
	ISRC string `json:"isrc,omitempty"`

	// Attribute:
	//   url
	// Type:
	//   string
	// Definition:
	//   URL of the content, for buy-side contextualization or review.
	URL string `json:"url,omitempty"`

	// Attribute:
	//   cat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories describing the content using IDs from the taxonomy indicated in cattax.
	Cat []string `json:"cat,omitempty"`

	// Attribute:
	//   cattax
	// Type:
	//   integer
	// Definition:
	//   The taxonomy in use for the cat attribute.
	//   Refer to List: Category Taxonomies.
	CatTax CategoryTaxonomy `json:"cattax,omitempty"`

	// Attribute:
	//   prodq
	// Type:
	//   integer
	// Definition:
	//   Production quality.
	//   Refer to List: Production Qualities.
	ProdQ ProductionQuality `json:"prodq,omitempty"`

	// Attribute:
	//   context
	// Type:
	//   integer
	// Definition:
	//   Type of content (game, video, text, etc.).
	//   Refer to List: Content Contexts.
	Context ContentContext `json:"context,omitempty"`

	// Attribute:
	//   rating
	// Type:
	//   string
	// Definition:
	//   Content rating (e.g., MPAA).
	Rating string `json:"rating,omitempty"`

	// Attribute:
	//   urating
	// Type:
	//   string
	// Definition:
	//   User rating of the content (e.g., number of stars, likes, etc.).
	URating string `json:"urating,omitempty"`

	// Attribute:
	//   mrating
	// Type:
	//   integer
	// Definition:
	//   Media rating per IQG guidelines.
	//   Refer to List: Media Ratings.
	MRating MediaRating `json:"mrating,omitempty"`

	// Attribute:
	//   keywords
	// Type:
	//   string; DEPRECATED
	// Definition:
	//   Comma-separated list of keywords describing the content.
	//   Only one of 'keywords' or 'kwarray' may be present.
	//   NOTE: this field is deprecated, use 'kwarray' instead.
	Keywords string `json:"keywords,omitempty"`

	// Attribute:
	//   kwarray
	// Type:
	//   string array
	// Definition:
	//   Array of keywords about the site. Only one of 'keywords' or 'kwarray' may be present.
	KwArray []string `json:"kwarray,omitempty"`

	// Attribute:
	//   live
	// Type:
	//   integer
	// Definition:
	//   Indication of live content, where 0 = not live, 1 = live (e.g., stream, live blog).
	Live int8 `json:"live,omitempty"`

	// Attribute:
	//   srcrel
	// Type:
	//   integer
	// Definition:
	//   Source relationship, where 0 = indirect, 1 = direct.
	SrcRel int8 `json:"srcrel,omitempty"`

	// Attribute:
	//   len
	// Type:
	//   integer
	// Definition:
	//   Length of content in seconds; typically for video or audio.
	Len int64 `json:"len,omitempty"`

	// Attribute:
	//   lang
	// Type:
	//   string
	// Definition:
	//   Content language using ISO-639-1-alpha-2.
	Lang string `json:"lang,omitempty"`

	// Attribute:
	//   embed
	// Type:
	//   integer
	// Definition:
	//   Indicator of whether or not the content is embedded off-site from the the site or app described in those objects (e.g., an embedded video player), where 0 = no, 1 = yes.
	Embed int8 `json:"embed,omitempty"`

	// Attribute:
	//   producer
	// Type:
	//   object
	// Definition:
	//   Details about the content producer.
	//   Refer to Object: Producer.
	Producer *Producer `json:"producer,omitempty"`

	// Attribute:
	//   network
	// Type:
	//   object
	// Definition:
	//   Details about the network.
	//   Refer to Object: Network.
	Network *Network `json:"network,omitempty"`

	// Attribute:
	//   channel
	// Type:
	//   object
	// Definition:
	//   Details about the channel.
	//   Refer to Object: Channel.
	Channel *Channel `json:"channel,omitempty"`

	// Attribute:
	//   data
	// Type:
	//   object array
	// Definition:
	//   Additional user data.
	//   Each Data object represents a different data source.
	//   Refer to Object: Data.
	Data []Data `json:"data,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Content object describes the content in which an impression can appear, which may be syndicated or non-syndicated content. This object may be useful when syndicated content contains impressions and does not necessarily match the publisher's general content. An exchange may or may not have knowledge of the page where the content is running as a result of the syndication method (e.g., a video impression embedded in an iframe on an unknown web property or device).

type ContentContext

type ContentContext int8

ContentContext represents options for indicating the type of content being used or consumed by the user in which ads may appear. This table has values derived from the TAG Inventory Quality Guidelines (IQG).

const (
	ContentVideo   ContentContext = 1 // 1 Video (i.e., video file or stream such as Internet TV broadcasts)
	ContentGame    ContentContext = 2 // 2 Game (i.e., an interactive software game)
	ContentMusic   ContentContext = 3 // 3 Music (i.e., audio file or stream such as Internet radio broadcasts)
	ContentApp     ContentContext = 4 // 4 Application (i.e., an interactive software application)
	ContentText    ContentContext = 5 // 5 Text (i.e., primarily textual document such as a web page, eBook, or news article)
	ContentOther   ContentContext = 6 // 6 Other (i.e., none of the other categories applies)
	ContentUnknown ContentContext = 7 // 7 Unknown
)

Options for indicating the type of content being used or consumed by the user in which ads may appear. This table has values derived from the TAG Inventory Quality Guidelines (IQG).

type CreativeAttribute

type CreativeAttribute int64

CreativeAttribute specifies a standard list of creative attributes that can describe an actual ad or restrictions relative to a given placement.

const (
	AttrAudioAuto              CreativeAttribute = 1  // Audio Ad (Autoplay)
	AttrAudioUser              CreativeAttribute = 2  // Audio Ad (User Initiated)
	AttrExpandableAuto         CreativeAttribute = 3  // Expandable (Automatic)
	AttrExpandableUserClick    CreativeAttribute = 4  // Expandable (User Initiated - Click)
	AttrExpandableUserRollover CreativeAttribute = 5  // Expandable (User Initiated - Rollover)
	AttrVideoAuto              CreativeAttribute = 6  // In-Banner Video Ad (Autoplay)
	AttrVideoUser              CreativeAttribute = 7  // In-Banner Video Ad (User Initiated)
	AttrPop                    CreativeAttribute = 8  // Pop (e.g., Over, Under, or Upon Exit)
	AttrProvocative            CreativeAttribute = 9  // Provocative or Suggestive Imagery
	AttrExtremeAnimation       CreativeAttribute = 10 // Shaky, Flashing, Flickering, Extreme Animation, Smileys
	AttrSurvey                 CreativeAttribute = 11 // Surveys
	AttrTextOnly               CreativeAttribute = 12 // Text Only
	AttrInteractive            CreativeAttribute = 13 // User Interactive (e.g., Embedded Games)
	AttrWindowsDialog          CreativeAttribute = 14 // Windows Dialog or Alert Style
	AttrHasAudioToggleButton   CreativeAttribute = 15 // Has Audio On/Off Button
	AttrHasSkipButton          CreativeAttribute = 16 // Ad Provides Skip Button (e.g. VPAID-rendered skip button on pre-roll video)
	AttrFlash                  CreativeAttribute = 17 // Adobe Flash
	AttrResponsive             CreativeAttribute = 18 // Responsive; Sizeless; Fluid (i.e., creatives that dynamically resize to environment)
)

Standard list of creative attributes that can describe an actual ad or restrictions relative to a given placement.

Values of 500+ hold vendor-specific codes.

type DOOH

type DOOH struct {
	DistributionChannel

	// Attribute:
	//   venue
	// Type:
	//   integer
	// Definition:
	//   The type of out-of-home venue.
	//   Refer to List: DOOH Venue TypesList: DOOH Venue Types.
	Venue DOOHVenueType `json:"venue,omitempty"`

	// Attribute:
	//   fixed
	// Type:
	//   integer
	// Definition:
	//   Indicates whether the DOOH placement is in a fixed location (e.g., kiosk, billboard, elevator) or is movable (e.g., taxi), where 1 = fixed, 2 = movable.
	Fixed int8 `json:"fixed,omitempty"`

	// Attribute:
	//   etime
	// Type:
	//   integer
	// Definition:
	//   The exposure time in seconds per view that the creative will be displayed before refreshing to the next creative.
	ETime int64 `json:"etime,omitempty"`

	// Attribute:
	//   dpi
	// Type:
	//   integer
	// Definition:
	//   Minimum DPI for text-based creative elements to display clearly.
	DPI int64 `json:"dpi,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

DOOH object is used to define an ad supported digital out-of-home (DOOH) experience such as a public kiosk or digital billboard. As a derived class, a Dooh object inherits all DistributionChannel attributes and adds those defined below.

type DOOHVenueType

type DOOHVenueType int

DOOHVenueType represents the digital out-of-home venue types and is derived from DPAA Programmatic Standards.

const (
	VenueAirborne                DOOHVenueType = 1  // Airborne
	VenueAirportsGeneral         DOOHVenueType = 2  // Airports - General
	VenueAirportsBaggageClaim    DOOHVenueType = 3  // Airports - Baggage Claim
	VenueAirportsTerminal        DOOHVenueType = 4  // Airports - Terminal
	VenueAirportsLounge          DOOHVenueType = 5  // Airports - Lounges
	VenueATM                     DOOHVenueType = 6  // ATMs
	VenueBacklight               DOOHVenueType = 7  // Backlights
	VenueBars                    DOOHVenueType = 8  // Bars
	VenueBench                   DOOHVenueType = 9  // Benches
	VenueBikeRack                DOOHVenueType = 10 // Bike Racks
	VenueBulletin                DOOHVenueType = 11 // Bulletins
	VenueBuses                   DOOHVenueType = 12 // Buses
	VenueCafes                   DOOHVenueType = 13 // Cafes
	VenueCasualDining            DOOHVenueType = 14 // Casual Dining Restaurants
	VenueChildCare               DOOHVenueType = 15 // Child Care
	VenueCinema                  DOOHVenueType = 16 // Cinema
	VenueCityInformationPanel    DOOHVenueType = 17 // City Information Panels
	VenueConvenienceStore        DOOHVenueType = 18 // Convenience Stores
	VenueDedicatedWildPosting    DOOHVenueType = 19 // Dedicated Wild Posting
	VenueDoctorsOffice           DOOHVenueType = 20 // Doctors Offices - General
	VenueDoctorsOfficeObstetrics DOOHVenueType = 21 // Doctors Offices - Obstetrics
	VenueDoctorsOfficePediatrics DOOHVenueType = 22 // Doctors Offices - Pediatrics
	VenueFamilyEntertainment     DOOHVenueType = 23 // Family entertainment
	VenueFerry                   DOOHVenueType = 24 // Ferries
	VenueFinancialService        DOOHVenueType = 25 // Financial Services
	VenueGasStation              DOOHVenueType = 26 // Gas Stations
	VenueGolfCourse              DOOHVenueType = 27 // Golf Courses
	VenueGym                     DOOHVenueType = 28 // Gyms
	VenueHospital                DOOHVenueType = 29 // Hospitals
	VenueHotel                   DOOHVenueType = 30 // Hotels
	VenueJuniorPoster            DOOHVenueType = 31 // Junior Posters
	VenueKiosk                   DOOHVenueType = 32 // Kiosks
	VenueMall                    DOOHVenueType = 33 // Malls - General
	VenueMallFoodCourt           DOOHVenueType = 34 // Malls - Food Courts
	VenueMarine                  DOOHVenueType = 35 // Marine
	VenueMobileBillboard         DOOHVenueType = 36 // Mobile Billboards
	VenueMovieTheaterLobby       DOOHVenueType = 37 // Movie Theater Lobbies
	VenueNewsStand               DOOHVenueType = 38 // Newsstands
	VenueOfficeBuilding          DOOHVenueType = 39 // Office Buildings
	VenuePhoneKiosk              DOOHVenueType = 40 // Phone Kiosks
	VenuePoster                  DOOHVenueType = 41 // Posters
	VenueQSR                     DOOHVenueType = 42 // QSR [Quick-Service Restaurants / Fast-Food]
	VenueRail                    DOOHVenueType = 43 // Rail
	VenueReceptacle              DOOHVenueType = 44 // Receptacles
	VenueResortLeisure           DOOHVenueType = 45 // Resorts / Leisure
	VenueRetail                  DOOHVenueType = 46 // Retail
	VenueSalon                   DOOHVenueType = 47 // Salons
	VenueShelter                 DOOHVenueType = 48 // Shelters
	VenueSportsArena             DOOHVenueType = 49 // Sports Arenas
	VenueSubway                  DOOHVenueType = 50 // Subway
	VenueTaxi                    DOOHVenueType = 51 // Taxis / Wrapped vehicles
	VenueTruckSide               DOOHVenueType = 52 // Truckside
	VenueUniversity              DOOHVenueType = 53 // Universities
	VenueUrbanPanel              DOOHVenueType = 54 // Urban Panels
	VenueVeterinarianOffice      DOOHVenueType = 55 // Veterinarian Offices
	VenueWallSpectacular         DOOHVenueType = 56 // Walls / Spectaculars
	VenueOther                   DOOHVenueType = 57 // Other
)

Digital out-of-home venue types.

Values of 500+ hold vendor-specific codes.

type Data

type Data struct {
	// Attribute:
	//   id
	// Type:
	//   string
	// Definition:
	//   Vendor-specific ID for the data provider.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   name
	// Type:
	//   string
	// Definition:
	//   Vendor-specific displayable name for the data provider.
	Name string `json:"name,omitempty"`

	// Attribute:
	//   segment
	// Type:
	//   object array
	// Definition:
	//   Array of Segment objects that contain the actual data values.
	//   Refer to Object: Segment.
	Segment []Segment `json:"segment,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Data and segment objects together allow additional data about the related object (e.g., user, content) to be specified. This data may be from multiple sources whether from the exchange itself or third parties as specified by the id attribute. When in use, vendor-specific IDs should be communicated a priori among the parties.

type DataAsset

type DataAsset struct {
	// Attribute:
	//   value
	// Type:
	//   string; required
	// Definition:
	//   A formatted string of data to be displayed (e.g., “5 stars”, “3.4 stars out of 5”, “$10”, etc.).
	Value string `json:"value"`

	// Attribute:
	//   len
	// Type:
	//   integer
	// Definition:
	//   The length of the value contents.
	//   This length should conform to recommendations provided in List: Native Data Asset Types
	Len int64 `json:"len,omitempty"`

	// Attribute:
	//   type
	// Type:
	//   integer
	// Definition:
	//   The type of data represented by this asset.
	//   Refer to List: Native Data Asset Types.
	Type NativeDataAssetType `json:"type,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

DataAsset object identifies the native asset as a data asset. A data asset is used for all miscellaneous elements such as brand name, ratings, stars, review count, downloads, price, counts, etc. It is purposefully generic to support native elements not currently contemplated by this specification.

type DataAssetFormat

type DataAssetFormat struct {
	// Attribute:
	//   type
	// Type:
	//   integer; required
	// Definition:
	//   The type of data asset supported.
	//   Refer to List: Native Data Asset Types.
	Type NativeDataAssetType `json:"type,omitempty"`

	// Attribute:
	//   len
	// Type:
	//   integer
	// Definition:
	//   The maximum allowed length of the data value.
	Len int64 `json:"len,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

DataAssetFormat object is used to provide native asset format specifications for a data element. A data asset is used for all miscellaneous elements such as brand name, ratings, stars, review count, downloads, prices, etc. It is purposefully generic to support native elements not currently contemplated by this specification.

type DeliveryMethod

type DeliveryMethod int8

DeliveryMethod represents options for the delivery of video or audio content.

const (
	DeliveryStreaming   DeliveryMethod = 1 // Streaming
	DeliveryProgressive DeliveryMethod = 2 // Progressive
	DeliveryDownload    DeliveryMethod = 3 // Download
)

Options for the delivery of video or audio content.

type Device

type Device struct {
	// Attribute:
	//   type
	// Type:
	//   integer
	// Definition:
	//   The general type of device.
	//   Refer to List: Device Types.
	Type DeviceType `json:"type,omitempty"`

	// Attribute:
	//   ua
	// Type:
	//   string
	// Definition:
	//   Browser user agent string.
	UA string `json:"ua,omitempty"`

	// Attribute:
	//   sua
	// Type:
	//   string
	// Definition:
	//   Structured user agent information defined by a Object: UserAgent.
	//   If both `ua` and `sua` are present in the bid request, `sua` should be considered the more accurate representation of the device attributes.
	//   This is because the `ua` may contain a frozen or reduced UserAgent string.
	SUA *UserAgent `json:"sua,omitempty"`

	// Attribute:
	//   ifa
	// Type:
	//   string
	// Definition:
	//   ID sanctioned for advertiser use in the clear (i.e., not hashed).
	IFA string `json:"ifa,omitempty"`

	// Attribute:
	//   dnt
	// Type:
	//   integer
	// Definition:
	//   Standard “Do Not Track” flag as set in the header by the browser, where 0 = tracking is unrestricted, 1 = do not track.
	DNT int8 `json:"dnt,omitempty"`

	// Attribute:
	//   lmt
	// Type:
	//   integer
	// Definition:
	//   “Limit Ad Tracking” signal commercially endorsed (e.g., iOS, Android), where 0 = tracking is unrestricted, 1 = tracking must be limited per commercial guidelines.
	Lmt int8 `json:"lmt,omitempty"`

	// Attribute:
	//   make
	// Type:
	//   string
	// Definition:
	//   Device make (e.g., "Apple").
	Make string `json:"make,omitempty"`

	// Attribute:
	//   model
	// Type:
	//   string
	// Definition:
	//   Device model (e.g., “iPhone10,1” when the specific device model is known, “iPhone” otherwise).
	//   The value obtained from the device O/S should be used when available.
	Model string `json:"model,omitempty"`

	// Attribute:
	//   os
	// Type:
	//   integer
	// Definition:
	//   Device operating system.
	//   Refer to List: Operating Systems.
	OS OperatingSystem `json:"os,omitempty"`

	// Attribute:
	//   osv
	// Type:
	//   string
	// Definition:
	//   Device operating system version (e.g., “3.1.2”).
	OSV string `json:"osv,omitempty"`

	// Attribute:
	//   hwv
	// Type:
	//   string
	// Definition:
	//   Hardware version of the device (e.g., “5S” for iPhone 5S).
	HWV string `json:"hwv,omitempty"`

	// Attribute:
	//   h
	// Type:
	//   integer
	// Definition:
	//   Physical height of the screen in pixels.
	H int64 `json:"h,omitempty"`

	// Attribute:
	//   w
	// Type:
	//   integer
	// Definition:
	//   Physical width of the screen in pixels.
	W int64 `json:"w,omitempty"`

	// Attribute:
	//   ppi
	// Type:
	//   integer
	// Definition:
	//   Screen size as pixels per linear inch.
	PPI int64 `json:"ppi,omitempty"`

	// Attribute:
	//   pxratio
	// Type:
	//   float
	// Definition:
	//   The ratio of physical pixels to device independent pixels.
	PxRatio float64 `json:"pxratio,omitempty"`

	// Attribute:
	//   js
	// Type:
	//   integer
	// Definition:
	//   Support for JavaScript, where 0 = no, 1 = yes.
	JS int8 `json:"js,omitempty"`

	// Attribute:
	//   lang
	// Type:
	//   string
	// Definition:
	//   Browser language using ISO-639-1-alpha-2.
	Lang string `json:"lang,omitempty"`

	// Attribute:
	//   langb
	// Type:
	//   string
	// Definition:
	//   Browser language using IETF BCP 47.
	//   Only one of lang or langb should be present.
	LangB string `json:"langb,omitempty"`

	// Attribute:
	//   ip
	// Type:
	//   string
	// Definition:
	//   IPv4 address closest to device.
	IP string `json:"ip,omitempty"`

	// Attribute:
	//   ipv6
	// Type:
	//   string
	// Definition:
	//   IP address closest to device as IPv6.
	IPv6 string `json:"ipv6,omitempty"`

	// Attribute:
	//   xff
	// Type:
	//   string
	// Definition:
	//   The value of the “x-forwarded-for” header.
	XFF string `json:"xff,omitempty"`

	// Attribute:
	//   iptr
	// Type:
	//   integer
	// Definition:
	//   Indicator of truncation of any of the IP attributes (i.e., ip, ipv6, xff), where 0 = no, 1 = yes (e.g., from 1.2.3.4 to 1.2.3.0).
	//   Refer to https://tools.ietf.org/html/rfc6235#section-4.1.1 for more information on IP truncation.
	IPTr int8 `json:"iptr,omitempty"`

	// Attribute:
	//   carrier
	// Type:
	//   string
	// Definition:
	//   Carrier or ISP (e.g., “VERIZON”) using exchange curated string names which should be published to bidders a priori.
	Carrier string `json:"carrier,omitempty"`

	// Attribute:
	//   mccmnc
	// Type:
	//   string
	// Definition:
	//   Mobile carrier as the concatenated MCC-MNC code (e.g., “310-005” identifies Verizon Wireless CDMA in the USA).
	//   Refer to https://en.wikipedia.org/wiki/Mobile_country_code for further information and references.
	//   Note that the dash between the MCC and MNC parts is required to remove parsing ambiguity.
	MCCMNC string `json:"mccmnc,omitempty"`

	// Attribute:
	//   mccmncsim
	// Type:
	//   string
	// Definition:
	//   MCC and MNC of the SIM card using the same format as mccmnc.
	//   When both values are available, a difference between them reveals that a user is roaming.
	MCCMNCSIM string `json:"mccmncsim,omitempty"`

	// Attribute:
	//   contype
	// Type:
	//   integer
	// Definition:
	//   Network connection type.
	//   Refer to List: Connection Types.
	ConType ConnectionType `json:"contype,omitempty"`

	// Attribute:
	//   geofetch
	// Type:
	//   integer
	// Definition:
	//   Indicates if the geolocation API will be available to JavaScript code running in display ad, where 0 = no, 1 = yes.
	GeoFetch int8 `json:"geofetch,omitempty"`

	// Attribute:
	//   geo
	// Type:
	//   object
	// Definition:
	//   Location of the device (i.e., typically the user's current location).
	//   Refer to Object: Geo.
	Geo *Geo `json:"geo,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Device object provides information pertaining to the device through which the user is interacting. Device information includes its hardware, platform, location, and carrier data. The device can refer to a mobile handset, a desktop computer, set top box, or other digital device.

type DeviceType

type DeviceType int8

DeviceType represents types of devices. This table has values derived from the TAG Inventory Quality Guidelines (IQG).

const (
	DeviceMobile    DeviceType = 1 // Mobile/Tablet - General
	DevicePC        DeviceType = 2 // Personal Computer
	DeviceTV        DeviceType = 3 // Connected TV
	DevicePhone     DeviceType = 4 // Phone
	DeviceTablet    DeviceType = 5 // Tablet
	DeviceConnected DeviceType = 6 // Connected Device
	DeviceSetTopBox DeviceType = 7 // Set Top Box
	DeviceOOH       DeviceType = 8 // OOH Device
)

Types of devices.

type Display

type Display struct {
	// Attribute:
	//   mime
	// Type:
	//   string
	// Definition:
	//   Mime type of the ad (e.g., “image/jpeg”).
	MIME string `json:"mime,omitempty"`

	// Attribute:
	//   api
	// Type:
	//   integer array
	// Definition:
	//   API required by the ad if applicable.
	//   Refer to List: API Frameworks.
	API []APIFramework `json:"api,omitempty"`

	// Attribute:
	//   ctype
	// Type:
	//   integer
	// Definition:
	//   Subtype of display creative.
	//   Refer to List: Creative Subtypes - Display.
	CType DisplayCreativeSubtype `json:"ctype,omitempty"`

	// Attribute:
	//   w
	// Type:
	//   integer
	// Definition:
	//   Absolute width of the creative in device independent pixels (DIPS), typically for non-native ads.
	//   Note that mixing absolute and relative sizes is not recommended.
	W int64 `json:"w,omitempty"`

	// Attribute:
	//   h
	// Type:
	//   integer
	// Definition:
	//   Absolute height of the creative in device independent pixels (DIPS), typically for non-native ads.
	//   Note that mixing absolute and relative sizes is not recommended.
	H int64 `json:"h,omitempty"`

	// Attribute:
	//   wratio
	// Type:
	//   integer
	// Definition:
	//   Relative width of the creative when expressing size as a ratio, typically for non-native ads.
	//   Note that mixing absolute and relative sizes is not recommended.
	// Dev note:
	//   This is kept as `int8` because ratio values are expected to be quite small (like 16:9).
	WRatio int8 `json:"wratio,omitempty"`

	// Attribute:
	//   hratio
	// Type:
	//   integer
	// Definition:
	//   Relative height of the creative when expressing size as a ratio, typically for non-native ads.
	//   Note that mixing absolute and relative sizes is not recommended.
	// Dev note:
	//   This is kept as `int8` because ratio values are expected to be quite small (like 16:9).
	HRatio int8 `json:"hratio,omitempty"`

	// Attribute:
	//   priv
	// Type:
	//   string
	// Definition:
	//   URL of a page informing the user about a buyer's targeting activity.
	Priv string `json:"priv,omitempty"`

	// Attribute:
	//   adm
	// Type:
	//   string
	// Definition:
	//   General display markup (e.g., HTML, AMPHTML) if not using a structured alternative (e.g., banner, native).
	//   Note that including both adm and curl is not recommended.
	AdM string `json:"adm,omitempty"`

	// Attribute:
	//   curl
	// Type:
	//   string
	// Definition:
	//   Optional means of retrieving display markup by reference; a URL that can return HTML, AMPHTML, or a collection native Asset object and their subordinates).
	//   If this ad is matched to a Placement specification, the Placement.curlx attribute indicates if this markup retrieval option is supported.
	//   Note that including both adm and curl is not recommended.
	CURL string `json:"curl,omitempty"`

	// Attribute:
	//   banner
	// Type:
	//   object
	// Definition:
	//   Structured banner image object, recommended for simple banner creatives.
	//   Refer to Object: Banner.
	Banner *Banner `json:"banner,omitempty"`

	// Attribute:
	//   native
	// Type:
	//   object
	// Definition:
	//   Structured native object, recommended for native ads.
	//   Refer to Object: Native.
	Native *Native `json:"native,omitempty"`

	// Attribute:
	//   event
	// Type:
	//   object array
	// Definition:
	//   Array of events that the advertiser or buying platform wants to track.
	//   Refer to Object: Event.
	Event []Event `json:"event,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Display object provides additional detail about an ad specifically for display ads. There are multiple attributes for specifying creative details: banner for simple banner images native for native ads, adm for including general markup, and curl for referencing general markup via URL. In any given Display object, only one of these attributes should be used to avoid confusion. To the extent feasible, structured objects should be favored over general markup for quality and safety issues.

type DisplayContextType

type DisplayContextType int

DisplayContextType represents types of context in which a native ad may appear (i.e., the type of content surrounding the ad on the page). This is intended to denote primary content although other content may also appear on the page. Note that there are two levels of detail grouped by 10s (i.e., 12 is a refined case of 100).

const (
	DisplayContextContent              DisplayContextType = 10 // Content-centric context (e.g., newsfeed, article, image gallery, video gallery, etc.).
	DisplayContextContentArticle       DisplayContextType = 11 // - Primarily article content, which could include images, etc. as part of the article.
	DisplayContextContentVideo         DisplayContextType = 12 // - Primarily video content.
	DisplayContextContentAudio         DisplayContextType = 13 // - Primarily audio content.
	DisplayContextContentImage         DisplayContextType = 14 // - Primarily image content.
	DisplayContextContentUserGenerated DisplayContextType = 15 // - User-generated content (e.g., forums, comments, etc.).
	DisplayContextSocial               DisplayContextType = 20 // Social-centric context (e.g., social network feed, email, chat, etc.).
	DisplayContextSocialEmail          DisplayContextType = 21 // - Primarily email content.
	DisplayContextSocialChat           DisplayContextType = 22 // - Primarily chat/IM content.
	DisplayContextProduct              DisplayContextType = 30 // Product context (e.g., product listings, details, recommendations, reviews, etc.).
	DisplayContextProductApp           DisplayContextType = 31 // - App store/marketplace.
	DisplayContextProductReview        DisplayContextType = 32 // - Product reviews site primarily, which may sell product secondarily.
)

Types of context in which a native ad may appear (i.e., the type of content surrounding the ad on the page).

Values of 500+ hold vendor-specific codes.

type DisplayCreativeSubtype

type DisplayCreativeSubtype int8

DisplayCreativeSubtype represents subtypes of display ad creatives.

const (
	CreativeHTML   DisplayCreativeSubtype = 1 // HTML
	CreativeAMP    DisplayCreativeSubtype = 2 // AMPHTML
	CreativeImage  DisplayCreativeSubtype = 3 // Structured Image Object
	CreativeNative DisplayCreativeSubtype = 4 // Structured Native Object
)

Subtypes of display ad creatives.

type DisplayFormat

type DisplayFormat struct {
	// Attribute:
	//   w
	// Type:
	//   integer
	// Definition:
	//   Absolute width of the creative in units specified by DisplayPlacement.unit.
	//   Note that mixing absolute and relative sizes is not recommended.
	W int64 `json:"w,omitempty"`

	// Attribute:
	//   h
	// Type:
	//   integer
	// Definition:
	//   Absolute height of the creative in units specified by DisplayPlacement.unit.
	//   Note that mixing absolute and relative sizes is not recommended.
	H int64 `json:"h,omitempty"`

	// Attribute:
	//   wratio
	// Type:
	//   integer
	// Definition:
	//   Relative width of the creative when expressing size as a ratio.
	//   Note that mixing absolute and relative sizes is not recommended.
	// Dev note:
	//   This is kept as `int8` because ratio values are expected to be quite small (like 16:9).
	WRatio int8 `json:"wratio,omitempty"`

	// Attribute:
	//   hratio
	// Type:
	//   integer
	// Definition:
	//   Relative height of the creative when expressing size as a ratio.
	//   Note that mixing absolute and relative sizes is not recommended.
	// Dev note:
	//   This is kept as `int8` because ratio values are expected to be quite small (like 16:9).
	HRatio int8 `json:"hratio,omitempty"`

	// Attribute:
	//   expdir
	// Type:
	//   integer array
	// Definition:
	//   Directions in which the creative is permitted to expand.
	//   Refer to List: Expandable Directions.
	ExpDir []ExpandableDirection `json:"expdir,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

DisplayFormat object represents an allowed set of parameters for a banner display ad and often appears as an array when multiple sizes are permitted.

type DisplayPlacement

type DisplayPlacement struct {
	// Attribute:
	//   pos
	// Type:
	//   integer
	// Definition:
	//   Placement position on screen.
	//   Refer to List: Placement Positions.
	Pos PlacementPosition `json:"pos,omitempty"`

	// Attribute:
	//   instl
	// Type:
	//   integer; default 0
	// Definition:
	//   Indicates if this is an interstitial placement, where 0 = no, 1 = yes.
	Instl int8 `json:"instl,omitempty"`

	// Attribute:
	//   topframe
	// Type:
	//   integer
	// Definition:
	//   Indicates if the placement will be loaded into an iframe or not, where 0 = unfriendly iframe or unknown, 1 = top frame, friendly iframe, or SafeFrame.
	//   A value of "1" can be understood to mean that expandable ads are technically capable of being delivered.
	TopFrame int8 `json:"topframe,omitempty"`

	// Attribute:
	//   ifrbust
	// Type:
	//   string array
	// Definition:
	//   Array of iframe busters supported by this placement.
	//   The meaning of strings in this attribute must be coordinated a priori among vendors.
	IfrBust []string `json:"ifrbust,omitempty"`

	// Attribute:
	//   clktype
	// Type:
	//   integer; default 1
	// Definition:
	//   Indicates the click type of this placement.
	//   Refer to List: Click Types.
	ClkType ClickType `json:"clktype,omitempty"`

	// Attribute:
	//   ampren
	// Type:
	//   integer
	// Definition:
	//   AMPHTML rendering treatment for AMP ads in this placement, where 1 = early loading, 2 = standard loading.
	AMPRen int8 `json:"ampren,omitempty"`

	// Attribute:
	//   ptype
	// Type:
	//   Integer; recommended
	// Definition:
	//   The display placement type.
	//   Refer to List: Display Placement Types.
	PType DisplayPlacementType `json:"ptype,omitempty"`

	// Attribute:
	//   context
	// Type:
	//   integer; recommended
	// Definition:
	//   The context of the placement.
	//   Refer to List: Display Context Types.
	Context DisplayContextType `json:"context,omitempty"`

	// Attribute:
	//   mime
	// Type:
	//   string array
	// Definition:
	//   Array of supported mime types (e.g., “image/jpeg”, “image/gif”).
	//   If omitted, all types are assumed.
	MIME []string `json:"mime,omitempty"`

	// Attribute:
	//   api
	// Type:
	//   integer array
	// Definition:
	//   List of supported APIs.
	//   If an API is not explicitly listed, it is assumed to be unsupported.
	//   Refer to List: API Frameworks.
	API []APIFramework `json:"api,omitempty"`

	// Attribute:
	//   ctype
	// Type:
	//   integer array
	// Definition:
	//   Creative subtypes permitted.
	//   Refer to List: Creative Subtypes - Display.
	CType []DisplayCreativeSubtype `json:"ctype,omitempty"`

	// Attribute:
	//   w
	// Type:
	//   integer
	// Definition:
	//   Width of the placement in units specified by unit.
	//   Note that this size applies to the placement itself; permitted creative sizes are specified elsewhere (e.g., DisplayFormat, ImageAssetFormat, etc.).
	W int64 `json:"w,omitempty"`

	// Attribute:
	//   h
	// Type:
	//   integer
	// Definition:
	//   Width of the placement in units specified by unit.
	//   Note that this size applies to the placement itself; permitted creative sizes are specified elsewhere (e.g., DisplayFormat, ImageAssetFormat, etc.).
	H int64 `json:"h,omitempty"`

	// Attribute:
	//   unit
	// Type:
	//   integer; default 1
	// Definition:
	//   Unit of size used for placement size (i.e., w and h attributes).
	//   Refer to List: Size Units.
	Unit SizeUnit `json:"unit,omitempty"`

	// Attribute:
	//   priv
	// Type:
	//   integer; default 0
	// Definition:
	//   Indicator of whether or not the placement supports a buyer-specific privacy notice URL, where 0 = no, 1 = yes.
	Priv int8 `json:"priv,omitempty"`

	// Attribute:
	//   displayfmt
	// Type:
	//   object array
	// Definition:
	//   Array of objects that govern the attributes (e.g., sizes) of a banner display placement.
	//   Refer to Object: DisplayFormat.
	DisplayFmt []DisplayFormat `json:"displayfmt,omitempty"`

	// Attribute:
	//   nativefmt
	// Type:
	//   object
	// Definition:
	//   This object specified the required and permitted assets and attributes of a native display placement.
	//   Refer to Object: NativeFormat.
	NativeFmt *NativeFormat `json:"nativefmt,omitempty"`

	// Attribute:
	//   event
	// Type:
	//   object array
	// Definition:
	//   Array of supported ad tracking events.
	//   Refer to Object: EventSpec.
	Event []EventSpec `json:"event,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

DisplayPlacement object signals that the placement may be a display placement. It provides additional detail about permitted display ads including simple banners, AMPHTML (i.e., Accelerated Mobile Pages), and native.

type DisplayPlacementType

type DisplayPlacementType int

DisplayPlacementType represents types of display placements; the locations where a native ad may be shown in relationship to the surrounding content.

const (
	DisplayPlacementFeed    DisplayPlacementType = 1 // In the feed of content (e.g., as an item inside the organic feed, grid, listing, carousel, etc.).
	DisplayPlacementUnit    DisplayPlacementType = 2 // In the atomic unit of the content (e.g., in the article page or single image page).
	DisplayPlacementOutside DisplayPlacementType = 3 // Outside the core content (e.g., in the ads section on the right rail, as a banner-style placement near the content, etc.).
	DisplayPlacementWidget  DisplayPlacementType = 4 // Recommendation widget; most commonly presented below article content.
)

General types of display placements.

Values of 500+ hold vendor-specific codes.

type DistributionChannel

type DistributionChannel struct {
	// Attribute:
	//   id
	// Type:
	//   string; recommended
	// Definition:
	//   Vendor-specific unique identifier of the distribution channel.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   name
	// Type:
	//   string
	// Definition:
	//   Displayable name of the distribution channel.
	Name string `json:"name,omitempty"`

	// Attribute:
	//   pub
	// Type:
	//   object
	// Definition:
	//   Details about the publisher of the distribution channel.
	//   Refer to Object: Publisher.
	Pub *Publisher `json:"pub,omitempty"`

	// Attribute:
	//   content
	// Type:
	//   object
	// Definition:
	//   Details about the content within the distribution channel.
	//   Refer to Object: Content.
	Content *Content `json:"content,omitempty"`
}

DistributionChannel is an abstraction of the various types of entities or channels through which ads are distributed. Examples include websites, mobile apps, and digital out-of-home (DOOH) systems. This generalized class contains those attributes and relationships that are common to all distribution channels and as such, all of its attributes and relationships are inherited by each of its derived classes.

Note: As an abstract class, a DistributionChannel is never instantiated on its own. Only objects of its derived classes are actually realized.

type Event

type Event struct {
	// Attribute:
	//   type
	// Type:
	//   integer; required
	// Definition:
	//   Type of event to track.
	//   Refer to List: Event Types.
	Type EventType `json:"type"`

	// Attribute:
	//   method
	// Type:
	//   integer; required
	// Definition:
	//   Method of tracking requested.
	//   Refer to List: Event Tracking Methods.
	Method EventTrackingMethod `json:"method"`

	// Attribute:
	//   api
	// Type:
	//   integer array
	// Definition:
	//   The APIs being used by the tracker; only relevant when the tracking method is JavaScript.
	//   Refer to List: API Frameworks.
	API []APIFramework `json:"api,omitempty"`

	// Attribute:
	//   url
	// Type:
	//   string; required *
	// Definition:
	//   The URL of the tracking pixel or JavaScript tag, respectively.
	//   * Required for Image-Pixel or JavaScript methods.
	URL string `json:"url,omitempty"`

	// Attribute:
	//   cdata
	// Type:
	//   object (Map)
	// Definition:
	//   An array of key-value pairs to support vendor-specific data required for custom tracking.
	//   For example, the account number of a buyer with a tracking company might be represented as: {"acct": "123"}.
	CData map[string]string `json:"cdata,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Event object specifies a type of event that the advertiser or buying platform wants to track along with the information required to do so.

type EventSpec

type EventSpec struct {
	// Attribute:
	//   type
	// Type:
	//   integer; required
	// Definition:
	//   Type of supported ad tracking event.
	//   Refer to List: Event Types.
	Type EventType `json:"type,omitempty"`

	// Attribute:
	//   method
	// Type:
	//   integer array
	// Definition:
	//   Array of supported event tracking methods for this event type.
	//   Refer to List: Event Tracking Methods.
	Method []EventTrackingMethod `json:"method,omitempty"`

	// Attribute:
	//   api
	// Type:
	//   integer array
	// Definition:
	//   Event tracking APIs available for use; only relevant for JavaScript method trackers.
	//   Refer to List: API Frameworks.
	API []APIFramework `json:"api,omitempty"`

	// Attribute:
	//   jstrk
	// Type:
	//   string array
	// Definition:
	//   Array of domains, top two levels only (e.g., “tracker.com”), that constitute a restriction list of JavaScript trackers.
	//   The sense of the restrictions is determined by wjs.
	JSTrk []string `json:"jstrk,omitempty"`

	// Attribute:
	//   wjs
	// Type:
	//   integer; default 1
	// Definition:
	//   Sense of the jstrk restriction list, where 0 = block list, 1 = whitelist.
	WJS int8 `json:"wjs,omitempty"`

	// Attribute:
	//   pxtrk
	// Type:
	//   string array
	// Definition:
	//   Array of domains, top two levels only (e.g., “tracker.com”), that constitute a restriction list of pixel image trackers.
	//   The sense of the restrictions is determined by wpx.
	PxTrk []string `json:"pxtrk,omitempty"`

	// Attribute:
	//   wpx
	// Type:
	//   integer; default 1
	// Definition:
	//   Sense of the pxtrk restriction list, where 0 = block list, 1 = whitelist.
	WPx int8 `json:"wpx,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

EventSpec object specifies a type of ad tracking event and which methods of tracking are available for it. This object may appear as an array for a given placement indicating various types of available tracking events.

type EventTrackingMethod

type EventTrackingMethod int

EventTrackingMethod represents methods of tracking of ad events. Vendor specific codes may include custom measurement companies (e.g., Moat, Doubleverify, IAS, etc.).

const (
	TrackingImagePixel EventTrackingMethod = 1 // Image-Pixel: URL provided will be inserted as a 1x1 pixel at the time of the event.
	TrackingJS         EventTrackingMethod = 2 // JavaScript: URL provided will be inserted as a JavaScript tag at the time of the event.
)

Available methods of tracking of ad events.

Values of 500+ hold vendor-specific codes.

type EventType

type EventType int

EventType represents types of ad events available for tracking. These types refer to the actual event, timing, etc.; not the method of firing. Scripts that are performing measurement should be deployed at the "loaded" event.

const (
	EventLoaded      EventType = 1 // loaded: Delivered as a part of the creative markup. Creative may be pre-cached or pre-loaded; prior to initial rendering.
	EventImpression  EventType = 2 // impression: Ad impression per IAB/MRC Ad Impression Measurement Guidelines.
	EventViewMRC50   EventType = 3 // viewable-mrc50: Visible impression using MRC definition of 50% in view for 1 second.
	EventViewMRC100  EventType = 4 // viewable-mrc100: 100% in view for 1 second (i.e., the GroupM standard).
	EventViewVideo50 EventType = 5 // viewable-video50: Visible impression for video using MRC definition of 50% in view for 2 seconds.
)

Types of ad events available for tracking

Values of 500+ hold vendor-specific codes.

type ExpandableDirection

type ExpandableDirection int8

ExpandableDirection represents directions in which an expandable ad may expand, given the positioning of the ad unit on the page and constraints imposed by the content.

const (
	ExpandableLeft       ExpandableDirection = 1 // Left
	ExpandableRight      ExpandableDirection = 2 // Right
	ExpandableUp         ExpandableDirection = 3 // Up
	ExpandableDown       ExpandableDirection = 4 // Down
	ExpandableFullScreen ExpandableDirection = 5 // Full Screen
	ExpandableResize     ExpandableDirection = 6 // Resize/Minimize (make smaller)
)

Directions in which an expandable ad may expand.

type ExtendedIdentifier

type ExtendedIdentifier struct {
	// Attribute:
	//   source
	// Type:
	//   string
	// Definition:
	//   Source or technology provider responsible for the set of included IDs.
	//   Expressed as a top-level domain.
	Source string `json:"source,omitempty"`

	// Attribute:
	//   uids
	// Type:
	//   object array
	// Definition:
	//   Array of extended ID UID objects from the given source. Refer to Object: Extended Identifier UIDs.
	UIDs []ExtendedIdentifierUID `json:"uids,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

ExtendedIdentifier support in the OpenRTB specification allows buyers to use audience data in real-time bidding. The exchange should ensure that business agreements allow for the sending of this data. Note, it is assumed that exchanges and DSPs will collaborate with the appropriate regulatory agencies and ID vendor(s) to ensure compliance.

type ExtendedIdentifierUID

type ExtendedIdentifierUID struct {
	// Attribute:
	//   id
	// Type:
	//   string
	// Definition:
	//   Cookie or platform-native identifier.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   atype
	// Type:
	//   integer
	// Definition:
	//   Type of user agent the match is from.
	//   It is highly recommended to set this, as many DSPs separate app-native IDs from browser-based IDs and require a type value for ID resolution.
	//   Refer to List: Agent Types.
	AType AgentType `json:"atype,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

type FeedType

type FeedType int8

FeedType represents types of feeds, typically for audio.

const (
	FeedMusicService   FeedType = 1 // Music Service
	FeedRadioBroadcast FeedType = 2 // FM/AM Broadcast
	FeedPodcast        FeedType = 3 // Podcast
)

Types of feeds, typically for audio.

type Geo

type Geo struct {
	// Attribute:
	//   type
	// Type:
	//   integer
	// Definition:
	//   Source of location data; recommended when passing lat/lon.
	//   Refer to List: Location Types.
	Type LocationType `json:"type,omitempty"`

	// Attribute:
	//   lat
	// Type:
	//   float
	// Definition:
	//   Latitude from -90.0 to +90.0, where negative is south.
	Lat float64 `json:"lat,omitempty"`

	// Attribute:
	//   lon
	// Type:
	//   float
	// Definition:
	//   Longitude from -180.0 to +180.0, where negative is west.
	Lon float64 `json:"lon,omitempty"`

	// Attribute:
	//   accur
	// Type:
	//   integer
	// Definition:
	//   Estimated location accuracy in meters; recommended when lat/lon are specified and derived from a device's location services (i.e., type = 1).
	//   Note that this is the accuracy as reported from the device.
	//   Consult OS specific documentation (e.g., Android, iOS) for exact interpretation.
	Accur int64 `json:"accur,omitempty"`

	// Attribute:
	//   lastfix
	// Type:
	//   integer
	// Definition:
	//   Number of seconds since this geolocation fix was established.
	//   Note that devices may cache location data across multiple fetches.
	//   Ideally, this value should be from the time the actual fix was taken.
	LastFix int64 `json:"lastfix,omitempty"`

	// Attribute:
	//   ipserv
	// Type:
	//   integer
	// Definition:
	//   Service or provider used to determine geolocation from IP address if applicable (i.e., type = 2).
	//   Refer to List: IP Location Services.
	IPServ IPLocationService `json:"ipserv,omitempty"`

	// Attribute:
	//   country
	// Type:
	//   string
	// Definition:
	//   Country code using ISO-3166-1-alpha-2.
	//   Note that alpha-3 codes may be encountered and vendors are encouraged to be tolerant of them.
	Country string `json:"country,omitempty"`

	// Attribute:
	//   region
	// Type:
	//   string
	// Definition:
	//   Region code using ISO-3166-2; 2-letter state code if USA.
	Region string `json:"region,omitempty"`

	// Attribute:
	//   metro
	// Type:
	//   string
	// Definition:
	//   Regional marketing areas such as Nielsen's DMA codes or other similar taxonomy to be agreed among vendors prior to use.
	//   Note that DMA is a trademarked asset of The Nielsen Company.
	//   Vendors are encouraged to ensure their use of DMAs is properly licensed.
	Metro string `json:"metro,omitempty"`

	// Attribute:
	//   city
	// Type:
	//   string
	// Definition:
	//   City using United Nations Code for Trade & Transport Locations “UN/LOCODE” with the space between country and city suppressed (e.g., Boston MA, USA = “USBOS”).
	//   Refer to UN/LOCODE Code List.
	City string `json:"city,omitempty"`

	// Attribute:
	//   zip
	// Type:
	//   string
	// Definition:
	//   ZIP or postal code.
	ZIP string `json:"zip,omitempty"`

	// Attribute:
	//   utcoffset
	// Type:
	//   integer
	// Definition:
	//   Local time as the number +/- of minutes from UTC.
	UTCOffset int64 `json:"utcoffset,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Geo object encapsulates various methods for specifying a geographic location. When subordinate to a Device object, it indicates the location of the device which can also be interpreted as the user's current location. When subordinate to a User object, it indicates the location of the user's home base (i.e., not necessarily their current location).

The lat and lon attributes should only be passed if they conform to the accuracy depicted in the type attribute. For example, the centroid of a large region (e.g., postal code) should not be passed.

type IPLocationService

type IPLocationService int8

IPLocationService represents services and/or vendors used for resolving IP addresses to geolocations.

const (
	LocationServiceIP2Location IPLocationService = 1 // ip2location
	LocationServiceNeustar     IPLocationService = 2 // Neustar (Quova)
	LocationServiceMaxMind     IPLocationService = 3 // MaxMind
	LocationServiceNetAcuity   IPLocationService = 4 // NetAcuity (Digital Element)
)

Services and/or vendors used for resolving IP addresses to geolocations.

type ImageAsset

type ImageAsset struct {
	// Attribute:
	//   url
	// Type:
	//   string; required
	// Definition:
	//   A URL that returns the image for the asset.
	URL string `json:"url,omitempty"`

	// Attribute:
	//   w
	// Type:
	//   integer; recommended
	// Definition:
	//   Width of the image asset in device independent pixels (DIPS).
	W int64 `json:"w,omitempty"`

	// Attribute:
	//   h
	// Type:
	//   integer; recommended
	// Definition:
	//   Height of the image asset in device independent pixels (DIPS).
	H int64 `json:"h,omitempty"`

	// Attribute:
	//   type
	// Type:
	//   integer
	// Definition:
	//   The type of image represented by this asset.
	//   Refer to List: Native Image Asset Types.
	Type NativeImageAssetType `json:"type,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

ImageAsset object identifies the native asset as a image asset. Image assets are use for such elements as the actual creative images and icons.

type ImageAssetFormat

type ImageAssetFormat struct {
	// Attribute:
	//   type
	// Type:
	//   integer
	// Definition:
	//   The type of image asset supported.
	//   Refer to List: Native Image Asset Types.
	Type NativeImageAssetType `json:"type,omitempty"`

	// Attribute:
	//   mime
	// Type:
	//   string array
	// Definition:
	//   Array of supported mime types (e.g., “image/jpeg”, “image/gif”).
	//   If omitted, all types are assumed.
	MIME []string `json:"mime,omitempty"`

	// Attribute:
	//   w
	// Type:
	//   integer
	// Definition:
	//   Absolute width of the image asset in device independent pixels (DIPS).
	//   Note that mixing absolute and relative sizes is not recommended.
	W int64 `json:"w,omitempty"`

	// Attribute:
	//   h
	// Type:
	//   integer
	// Definition:
	//   Absolute height of the image asset in device independent pixels (DIPS).
	//   Note that mixing absolute and relative sizes is not recommended.
	H int64 `json:"h,omitempty"`

	// Attribute:
	//   wmin
	// Type:
	//   integer
	// Definition:
	//   The minimum requested absolute width of the image in device independent pixels (DIPS).
	//   This option should be used for any scaling of images by the client.
	WMin int64 `json:"wmin,omitempty"`

	// Attribute:
	//   hmin
	// Type:
	//   integer
	// Definition:
	//   The minimum requested absolute height of the image in device independent pixels (DIPS).
	//   This option should be used for any scaling of images by the client.
	HMin int64 `json:"hmin,omitempty"`

	// Attribute:
	//   wratio
	// Type:
	//   integer
	// Definition:
	//   Relative width of the image asset when expressing size as a ratio.
	//   Note that mixing absolute and relative sizes is not recommended.
	// Dev note:
	//   This is kept as `int8` because ratio values are expected to be quite small (like 16:9).
	WRatio int8 `json:"wratio,omitempty"`

	// Attribute:
	//   hratio
	// Type:
	//   integer
	// Definition:
	//   Relative height of the image asset when expressing size as a ratio.
	//   Note that mixing absolute and relative sizes is not recommended.
	// Dev note:
	//   This is kept as `int8` because ratio values are expected to be quite small (like 16:9).
	HRatio int8 `json:"hratio,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

ImageAssetFormat object is used to provide native asset format specifications for an image element. Image elements are typically used for the actual creative image and icons.

type ItemSpec

type ItemSpec struct {
	Placement *Placement `json:"placement,omitempty"`
}

ItemSpec represents a bunch of data for OpenRTB 3 Item.spec field. Refer to OpenRTB 3.0 specification for details.

For AdCOM v1.x, the objects allowed here are Placement and any objects subordinate to these as specified by AdCOM.

type LinearityMode

type LinearityMode int8

LinearityMode represents options for media linearity, typically for video.

const (
	LinearityLinear    LinearityMode = 1 // Linear (i.e., In-Stream such as Pre-Roll, Mid-Roll, Post-Roll)
	LinearityNonLinear LinearityMode = 2 // Non-Linear (i.e., Overlay)
)

Options for media linearity, typically for video.

type LinkAsset

type LinkAsset struct {
	// Attribute:
	//   url
	// Type:
	//   string; required
	// Definition:
	//   Landing URL of the clickable link.
	URL string `json:"url,omitempty"`

	// Attribute:
	//   urlfb
	// Type:
	//   string
	// Definition:
	//   Fallback URL for deep-link to be used if the URL specified in url is not supported by the device.
	URLFB string `json:"urlfb,omitempty"`

	// Attribute:
	//   trkr
	// Type:
	//   string array
	// Definition:
	//   List of third-party tracker URLs to be fired on click.
	Trkr []string `json:"trkr,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

LinkAsset object identifies the native asset as a link asset and is used to define navigation for call-to-action or other activations (i.e., clicks) A link asset can be independent or associated with the overall native ad (i.e., a default for all assets).

type LocationType

type LocationType int8

LocationType represents options to indicate how the geographic information was determined.

const (
	LocationGPS          LocationType = 1 // GPS/Location Services
	LocationIP           LocationType = 2 // IP Address
	LocationUserProvided LocationType = 3 // User Provided (e.g., registration data)
)

Options to indicate how the geographic information was determined.

type MediaCreativeSubtype

type MediaCreativeSubtype int8

MediaCreativeSubtype represents subtypes of audio and video ad creatives.

const (
	CreativeVAST10         MediaCreativeSubtype = 1  // VAST 1.0
	CreativeVAST20         MediaCreativeSubtype = 2  // VAST 2.0
	CreativeVAST30         MediaCreativeSubtype = 3  // VAST 3.0
	CreativeVAST10Wrapper  MediaCreativeSubtype = 4  // VAST 1.0 Wrapper
	CreativeVAST20Wrapper  MediaCreativeSubtype = 5  // VAST 2.0 Wrapper
	CreativeVAST30Wrapper  MediaCreativeSubtype = 6  // VAST 3.0 Wrapper
	CreativeVAST40         MediaCreativeSubtype = 7  // VAST 4.0
	CreativeVAST40Wrapper  MediaCreativeSubtype = 8  // VAST 4.0 Wrapper
	CreativeDAAST10        MediaCreativeSubtype = 9  // DAAST 1.0
	CreativeDAAST10Wrapper MediaCreativeSubtype = 10 // DAAST 1.0 Wrapper
	CreativeVAST41         MediaCreativeSubtype = 11 // VAST 4.1
	CreativeVAST41Wrapper  MediaCreativeSubtype = 12 // VAST 4.1 Wrapper
	CreativeVAST42         MediaCreativeSubtype = 13 // VAST 4.2
	CreativeVAST42Wrapper  MediaCreativeSubtype = 14 // VAST 4.2 Wrapper
)

Subtypes of audio and video ad creatives.

type MediaRating

type MediaRating int8

MediaRating represents media ratings used in describing content based on the TAG Inventory Quality Guidelines (IQG) v2.1 categorization. Refer to www.iab.com/guidelines/digital-video-suite for more information.

const (
	MediaRatingAll    MediaRating = 1 // All Audiences
	MediaRatingOver12 MediaRating = 2 // Everyone Over Age 12
	MediaRatingMature MediaRating = 3 // Mature Audiences
)

Media ratings used in describing content based on the TAG Inventory Quality Guidelines (IQG) v2.1 categorization.

type Native

type Native struct {
	// Attribute:
	//   link
	// Type:
	//   object
	// Definition:
	//   Default destination link for the native ad overall; used if an asset is activated (e.g., clicked) that doesn't specify it's own destination link.
	//   Refer to Object: LinkAsset.
	Link *LinkAsset `json:"link,omitempty"`

	// Attribute:
	//   asset
	// Type:
	//   object array
	// Definition:
	//   Array of assets that comprise the native ad.
	//   Refer to Object: Asset.
	Asset []Asset `json:"asset,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Native object is the root of a structure that defines a native display ad.

type NativeDataAssetType

type NativeDataAssetType int

NativeDataAssetType represents data asset types. This list is non-exhaustive and is intended to be expanded over time. Size recommendations are noted as "maximum length of at least", which means the publisher or supply platform should support a maximum length of at least this value and the buying platform knows that a string of this size should be accepted.

const (
	DataAssetSponsored  NativeDataAssetType = 1  // sponsored: "Sponsored By" message which should contain the brand name of the sponsor. Recommended maximum length of at least 25 characters.
	DataAssetDesc       NativeDataAssetType = 2  // desc: Descriptive text associated with the product or service being advertised. Long text lengths may be truncated or ellipsed when rendered. Recommended maximum length of at least 140 characters.
	DataAssetRating     NativeDataAssetType = 3  // rating: Numeric rating of the product (e.g., an app's rating). Recommended integer range of 0-5.
	DataAssetLikes      NativeDataAssetType = 4  // likes: Number of social ratings or "likes" of the product.
	DataAssetDownloads  NativeDataAssetType = 5  // downloads: Number downloads and/or installs of the product.
	DataAssetPrice      NativeDataAssetType = 6  // price: Price of the product, app, or in-app purchase. Value should include currency symbol in localized format (e.g., "$10").
	DataAssetSalePrice  NativeDataAssetType = 7  // saleprice: Sale price that can be used together with "price" to indicate a comparative discounted price. Value should include currency symbol in localized format (e.g., "$8.50").
	DataAssetPhone      NativeDataAssetType = 8  // phone: A formatted phone number.
	DataAssetAddress    NativeDataAssetType = 9  // address: A formatted address.
	DataAssetDesc2      NativeDataAssetType = 10 // desc2: Additional descriptive text associated with the product.
	DataAssetDisplayURL NativeDataAssetType = 11 // displayurl: Display URL for the ad. To be used when sponsoring entity doesn't own the content (e.g., "Sponsored by Brand on Site", where Site is specified in this data asset).
	DataAssetCTAText    NativeDataAssetType = 12 // ctatext: Description of the call to action (CTA) button for the destination URL. Recommended maximum length of at least 15 characters.
)

Common data asset types.

Values of 500+ hold vendor-specific codes.

type NativeFormat

type NativeFormat struct {
	// Attribute:
	//   asset
	// Type:
	//   object array; required
	// Definition:
	//   Array of objects that specify the set of native assets and their permitted formats.
	//   Refer to Object: AssetFormat.
	Asset []AssetFormat `json:"asset"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

NativeFormat object refines a display placement to be specifically a native display placement. It serves as the root of a structure that includes the specifications for each of the assets that comprise the native placement.

type NativeImageAssetType

type NativeImageAssetType int

NativeImageAssetType represents image asset types. This list is non-exhaustive and is intended to be expanded over time. Size recommendations are noted as "maximum height or width of at least", which means the publisher or supply platform should support a maximum height or width of at least this value and the buying platform knows that an image of this size should be accepted.

const (
	// Icon: Icon image. Maximum height at least 50 device independent pixels (DIPS); aspect ratio 1:1.
	ImageAssetIcon NativeImageAssetType = 1

	// Main: Large image preview for the ad. At least one of 2 size variants required:
	//
	// Small: Maximum height at least 627 DIPS; maximum width at least 627, 836, or 1198 DIPS (i.e., aspect ratios of 1:1, 4:3, or 1.91:1, respectively).
	//
	// Large: Maximum height at least 200 DIPS; maximum width at least 200, 267, or 382 DIPS (i.e., aspect ratios of 1:1, 4:3, or 1.91:1, respectively).
	ImageAssetMain NativeImageAssetType = 3
)

Common image asset types.

Values 500+ hold vendor-specific codes.

type Network

type Network struct {
	// Attribute:
	//   id
	// Type:
	//   string
	// Definition:
	//   A unique identifier assigned by the publisher.
	//   This may not be a unique identifier across all supply sources.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   name
	// Type:
	//   string
	// Definition:
	//   Network the content is on (e.g., a TV network like "ABC").
	Name string `json:"name,omitempty"`

	// Attribute:
	//   domain
	// Type:
	//   string
	// Definition:
	//   The primary domain of the network (e.g., “abc.com” in the case of the network ABC).
	//   It is recommended to include the top private domain (PSL+1) for DSP targeting normalization purposes.
	Domain string `json:"domain,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Network describes the network an ad will be displayed on. A Network is defined as the parent entity of the Channel object’s entity for the purposes of organizing Channels. Examples are companies that own and/or license a collection of content channels (Viacom, Discovery, CBS, WarnerMedia, Turner and others), or studio that creates such content and self-distributes content. Name is human-readable field while domain and id can be used for reporting and targeting purposes.

type OperatingSystem

type OperatingSystem int

OperatingSystem represents device operating system.

const (
	OSNotListed   OperatingSystem = 0  // Other Not Listed
	OS3DS         OperatingSystem = 1  // 3DS System Software
	OSAndroid     OperatingSystem = 2  // Android
	OSAppleTV     OperatingSystem = 3  // Apple TV Software
	OSAsha        OperatingSystem = 4  // Asha
	OSBada        OperatingSystem = 5  // Bada
	OSBlackBerry  OperatingSystem = 6  // BlackBerry
	OSBREW        OperatingSystem = 7  // BREW
	OSChromeOS    OperatingSystem = 8  // ChromeOS
	OSDarwin      OperatingSystem = 9  // Darwin
	OSFireOS      OperatingSystem = 10 // FireOS
	OSFirefoxOS   OperatingSystem = 11 // FirefoxOS
	OSHelenOS     OperatingSystem = 12 // HelenOS
	OSIOS         OperatingSystem = 13 // iOS
	OSLinux       OperatingSystem = 14 // Linux
	OSMacOS       OperatingSystem = 15 // MacOS
	OSMeeGo       OperatingSystem = 16 // MeeGo
	OSMorphOS     OperatingSystem = 17 // MorphOS
	OSNetBSD      OperatingSystem = 18 // NetBSD
	OSNucleusPLUS OperatingSystem = 19 // NucleusPLUS
	OSPSVita      OperatingSystem = 20 // PS Vita System Software
	OSPS3         OperatingSystem = 21 // PS3 System Software
	OSPS4         OperatingSystem = 22 // PS4 Software
	OSPSP         OperatingSystem = 23 // PSP System Software
	OSSymbian     OperatingSystem = 24 // Symbian
	OSTizen       OperatingSystem = 25 // Tizen
	OSWatchOS     OperatingSystem = 26 // WatchOS
	OSWebOS       OperatingSystem = 27 // WebOS
	OSWindows     OperatingSystem = 28 // Windows
)

Options for device operating system.

Values of 500+ hold vendor-specific codes.

type Placement

type Placement struct {
	// Attribute:
	//   tagid
	// Type:
	//   string
	// Definition:
	//   Identifier for specific ad placement or ad tag; unique within a distribution channel.
	TagID string `json:"tagid,omitempty"`

	// Attribute:
	//   ssai
	// Type:
	//   Integer; default 0
	// Definition:
	//   Indicates if server-side ad insertion (e.g., stitching an ad into an audio or video stream) is in use and the impact of this on asset and tracker retrieval, where 0 = status unknown, 1 = all client-side (i.e., not server-side), 2 = assets stitched server-side but tracking pixels fired client-side, 3 = all server-side.
	SSAI int8 `json:"ssai,omitempty"`

	// Attribute:
	//   sdk
	// Type:
	//   string
	// Definition:
	//   Name of ad mediation partner, SDK technology, or player responsible for rendering ad (typically video, audio, or mobile); used by some ad servers to customize ad code by partner.
	SDK string `json:"sdk,omitempty"`

	// Attribute:
	//   sdkver
	// Type:
	//   string
	// Definition:
	//   Version of the SDK specified in the sdk attribute.
	SDKVer string `json:"sdkver,omitempty"`

	// Attribute:
	//   reward
	// Type:
	//   integer; default 0
	// Definition:
	//   Indicates if this is a rewarded placement, where 0 = no, 1 = yes.
	Reward int8 `json:"reward,omitempty"`

	// Attribute:
	//   wlang
	// Type:
	//   string array
	// Definition:
	//   Whitelist of permitted languages of the creative using ISO-639-1-alpha-2.
	//   In practice, vendors using this object may elect an alternate standard (e.g., BCP-47) in which case this must be communicated a priori.
	//   Omission of this attribute indicates there are no restrictions.
	WLang []string `json:"wlang,omitempty"`

	// Attribute:
	//   secure
	// Type:
	//   integer
	// Definition:
	//   Flag to indicate if the creative is secure (i.e., uses HTTPS for all assets and markup), where 0 = no, 1 = yes.
	//   There is no default and thus if omitted, the secure state is unknown.
	//   However, as a practical matter, the safe assumption is to treat unknown as non-secure.
	Secure int8 `json:"secure,omitempty"`

	// Attribute:
	//   admx
	// Type:
	//   integer
	// Definition:
	//   Indicates if including markup is supported (i.e., the various adm attributes throughout the Placement structure), where 0 = no, 1 = yes.
	AdMX int8 `json:"admx,omitempty"`

	// Attribute:
	//   curlx
	// Type:
	//   integer
	// Definition:
	//   Indicates if retrieving markup via URL reference is supported (i.e., the various curl attributes throughout the Placement structure), where 0 = no, 1 = yes.
	CURLX int8 `json:"curlx,omitempty"`

	// Attribute:
	//   display
	// Type:
	//   object; required *
	// Definition:
	//   Placement Subtype Object that indicates that this may be a display placement and provides additional detail related thereto.
	//   Refer to Object: DisplayPlacement.
	//   * At least one placement subtype object is required.
	Display *DisplayPlacement `json:"display,omitempty"`

	// Attribute:
	//   video
	// Type:
	//   object; required *
	// Definition:
	//   Placement Subtype Object that indicates that this may be a video placement and provides additional detail related thereto.
	//   Refer to Object: VideoPlacement.
	//   * At least one placement subtype object is required.
	Video *VideoPlacement `json:"video,omitempty"`

	// Attribute:
	//   audio
	// Type:
	//   object; required *
	// Definition:
	//   Placement Subtype Object that indicates that this may be an audio placement and provides additional detail related thereto.
	//   Refer to Object: AudioPlacement.
	//   * At least one placement subtype object is required.
	Audio *AudioPlacement `json:"audio,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Placement object represents the properties of a placement and the characteristics of ads permitted to be rendering within them. Placements of all types begin with this object as their root. It contains one or more subtype objects (i.e., display, video, audio) that define the kinds of media permitted as well as media specific placement behaviors.

The other attributes in this object apply to all aspects and substructures of the placement (i.e., the same language, secure status, etc. apply to all media types and native assets as applicable).

type PlacementPosition

type PlacementPosition int8

PlacementPosition represents placement positions as a relative measure of visibility or prominence. This table has values derived from the TAG Inventory Quality Guidelines (IQG).

const (
	PositionUnknown    PlacementPosition = 0 // Unknown
	PositionAboveFold  PlacementPosition = 1 // Above The Fold
	PositionLocked     PlacementPosition = 2 // Locked (i.e., fixed position)
	PositionBelowFold  PlacementPosition = 3 // Below The Fold
	PositionHeader     PlacementPosition = 4 // Header
	PositionFooter     PlacementPosition = 5 // Footer
	PositionSideBar    PlacementPosition = 6 // Sidebar
	PositionFullScreen PlacementPosition = 7 // Fullscreen
)

Placement positions.

func (PlacementPosition) Ptr

Ptr returns pointer to own value.

func (*PlacementPosition) Val

Val safely dereferences pointer, returning default value (PositionUnknown) for nil.

type PlaybackCessationMode

type PlaybackCessationMode int8

PlaybackCessationMode represents modes for when media playback terminates.

const (
	PlaybackCompletion      PlaybackCessationMode = 1 // On Video Completion or when Terminated by User
	PlaybackLeavingViewport PlaybackCessationMode = 2 // On Leaving Viewport or when Terminated by User
	PlaybackFloating        PlaybackCessationMode = 3 // On Leaving Viewport Continues as a Floating/Slider Unit until Video Completion or when Terminated by User
)

Modes for when media playback terminates.

type PlaybackMethod

type PlaybackMethod int8

PlaybackMethod represents media playback methods.

const (
	PlaybackPageLoadSoundOn  PlaybackMethod = 1 // Initiates on Page Load with Sound On
	PlaybackPageLoadSoundOff PlaybackMethod = 2 // Initiates on Page Load with Sound Off by Default
	PlaybackClickSoundOn     PlaybackMethod = 3 // Initiates on Click with Sound On
	PlaybackMouseOverSoundOn PlaybackMethod = 4 // Initiates on Mouse-Over with Sound On
	PlaybackViewportSoundOn  PlaybackMethod = 5 // Initiates on Entering Viewport with Sound On
	PlaybackViewportSoundOff PlaybackMethod = 6 // Initiates on Entering Viewport with Sound Off by Default
	PlaybackContinuous       PlaybackMethod = 7 // Continuous Playback - Media playback is set to play additional media automatically without user interaction. The media player will keep playing additional media (playlist or generated) for the user until the user actively stops this from happening.
)

Media playback methods.

type PodSequence

type PodSequence int8

PodSequence identifies the pod sequence field, for use in audio and video content streams with one or more ad pods.

const (
	PodSeqLast  PodSequence = -1 // Last pod in the content stream.
	PodSeqAny   PodSequence = 0  // Any pod in the content stream.
	PodSeqFirst PodSequence = 1  // First pod in the content stream.
)

PodSequence options.

type Producer

type Producer struct {
	// Attribute:
	//   id
	// Type:
	//   string, recommended
	// Definition:
	//   Vendor-specific unique producer identifier.
	//   Useful if content is syndicated and may be posted on a site using embed tags.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   name
	// Type:
	//   string
	// Definition:
	//   Displayable name of the producer.
	Name string `json:"name,omitempty"`

	// Attribute:
	//   domain
	// Type:
	//   string
	// Definition:
	//   Highest level domain of the producer (e.g., “producer.com”).
	Domain string `json:"domain,omitempty"`

	// Attribute:
	//   cat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories that describe the producer using IDs from the taxonomy indicated in cattax.
	Cat []string `json:"cat,omitempty"`

	// Attribute:
	//   cattax
	// Type:
	//   integer
	// Definition:
	//   The taxonomy in use for the cat attribute.
	//   Refer to List: Category Taxonomies.
	CatTax CategoryTaxonomy `json:"cattax,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Producer object defines the producer of the content in which ad will be displayed. This is particularly useful when the content is syndicated and may be distributed through different publishers and thus when the producer and publisher are not necessarily the same entity.

type ProductionQuality

type ProductionQuality int8

ProductionQuality represents content quality.

const (
	ProductionUnknown      ProductionQuality = 0 // Unknown
	ProductionProfessional ProductionQuality = 1 // Professionally Produced
	ProductionProsumer     ProductionQuality = 2 // Prosumer
	ProductionUser         ProductionQuality = 3 // User Generated (UGC)
)

Options for content quality. These values are defined by the IAB; refer to www.iab.com/wp-content/uploads/2015/03/long-form-video-final.pdf for more information.

type Publisher

type Publisher struct {
	// Attribute:
	//   id
	// Type:
	//   string, recommended
	// Definition:
	//   Vendor-specific unique publisher identifier, as used in ads.txt files.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   name
	// Type:
	//   string
	// Definition:
	//   Displayable name of the publisher.
	Name string `json:"name,omitempty"`

	// Attribute:
	//   domain
	// Type:
	//   string
	// Definition:
	//   Highest level domain of the publisher (e.g., “publisher.com”).
	Domain string `json:"domain,omitempty"`

	// Attribute:
	//   cat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories that describe the publisher using IDs from the taxonomy indicated in cattax.
	Cat []string `json:"cat,omitempty"`

	// Attribute:
	//   cattax
	// Type:
	//   integer
	// Definition:
	//   The taxonomy in use for the cat attribute.
	//   Refer to List: Category Taxonomies.
	CatTax CategoryTaxonomy `json:"cattax,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Publisher object describes the publisher of the media in which ads will be displayed.

type Regs

type Regs struct {
	// Attribute:
	//   coppa
	// Type:
	//   integer
	// Definition:
	//   Flag indicating if COPPA regulations apply, where 0 = no, 1 = yes.
	//   The Children's Online Privacy Protection Act (COPPA) was established by the U.S. Federal Trade Commission.
	COPPA int8 `json:"coppa,omitempty"`

	// Attribute:
	//   gdpr
	// Type:
	//   integer
	// Definition:
	//   Flag indicating if GDPR regulations apply, where 0 = no, 1 = yes.
	//   The General Data Protection Regulation (GDPR) is a regulation of the European Union.
	GDPR int8 `json:"gdpr,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Regs object contains any known legal, governmental, or industry regulations that are in effect.

type RequestContext

type RequestContext struct {
	Site *Site `json:"site,omitempty"`
	App  *App  `json:"app,omitempty"`
	DOOH *DOOH `json:"dooh,omitempty"`

	User         *User         `json:"user,omitempty"`
	Device       *Device       `json:"device,omitempty"`
	Regs         *Regs         `json:"regs,omitempty"`
	Restrictions *Restrictions `json:"restrictions,omitempty"`
}

RequestContext represents a bunch of data for OpenRTB 3 Request.context field. Refer to OpenRTB 3.0 specification for details.

For AdCOM v1.x, the objects allowed here all of which are optional are one of the DistributionChannel subtypes (i.e., Site, App, or Dooh), User, Device, Regs, Restrictions, and any objects subordinate to these as specified by AdCOM.

type Restrictions

type Restrictions struct {
	// Attribute:
	//   bcat
	// Type:
	//   string array
	// Definition:
	//   Block list of content categories using IDs from the taxonomy indicated in cattax.
	BCat []string `json:"bcat,omitempty"`

	// Attribute:
	//   cattax
	// Type:
	//   integer; default 2
	// Definition:
	//   The taxonomy in use for the bcat attribute
	//   Refer to List: Category Taxonomies.
	CatTax CategoryTaxonomy `json:"cattax,omitempty"`

	// Attribute:
	//   badv
	// Type:
	//   string array
	// Definition:
	//   Block list of advertisers by their domains (e.g., “ford.com”).
	BAdv []string `json:"badv,omitempty"`

	// Attribute:
	//   bapp
	// Type:
	//   string array
	// Definition:
	//   Block list of apps for which ads are disallowed
	//   These should be bundle or package names (e.g., “com.foo.mygame”) and should NOT be app store IDs (e.g., not iTunes store IDs).
	BApp []string `json:"bapp,omitempty"`

	// Attribute:
	//   battr
	// Type:
	//   integer array
	// Definition:
	//   Block list of creative attributes
	//   Refer to List: Creative Attributes.
	BAttr []CreativeAttribute `json:"battr,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Restrictions object allows lists of restrictions on ad responses to be specified including specific content categories, advertisers, ads pertaining to specific apps, or creative attributes.

type Segment

type Segment struct {
	// Attribute:
	//   id
	// Type:
	//   string
	// Definition:
	//   ID of the data segment specific to the data provider.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   name
	// Type:
	//   string
	// Definition:
	//   Displayable name of the data segment specific to the data provider.
	Name string `json:"name,omitempty"`

	// Attribute:
	//   value
	// Type:
	//   string
	// Definition:
	//   String representation of the data segment value.
	Value string `json:"value,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Segment objects are essentially key-value pairs that convey specific units of data. The parent Data object is a collection of such values from a given data provider. When in use, vendor-specific IDs should be communicated a priori among the parties.

type Site

type Site struct {
	DistributionChannel

	// Attribute:
	//   domain
	// Type:
	//   string
	// Definition:
	//   Domain of the site (e.g., “mysite.foo.com”).
	Domain string `json:"domain,omitempty"`

	// Attribute:
	//   cat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories describing the site using IDs from the taxonomy indicated in cattax.
	Cat []string `json:"cat,omitempty"`

	// Attribute:
	//   sectcat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories describing the current section of the site using IDs from the taxonomy indicated in cattax.
	SectCat []string `json:"sectcat,omitempty"`

	// Attribute:
	//   pagecat
	// Type:
	//   string array
	// Definition:
	//   Array of content categories describing the current page or view of the site using IDs from the taxonomy indicated in cattax.
	PageCat []string `json:"pagecat,omitempty"`

	// Attribute:
	//   cattax
	// Type:
	//   integer
	// Definition:
	//   The taxonomy in use for the cat, sectcat and pagecat attributes.
	//   Refer to List: Category Taxonomies.
	CatTax CategoryTaxonomy `json:"cattax,omitempty"`

	// Attribute:
	//   privpolicy
	// Type:
	//   integer
	// Definition:
	//   Indicates if the site has a privacy policy, where 0 = no, 1 = yes.
	PrivPolicy int8 `json:"privpolicy,omitempty"`

	// Attribute:
	//   keywords
	// Type:
	//   string; DEPRECATED
	// Definition:
	//   Comma-separated list of keywords about the app.
	//   Only one of 'keywords' or 'kwarray' may be present.
	//   NOTE: this field is deprecated, use 'kwarray' instead.
	Keywords string `json:"keywords,omitempty"`

	// Attribute:
	//   kwarray
	// Type:
	//   string array
	// Definition:
	//   Array of keywords about the site. Only one of 'keywords' or 'kwarray' may be present.
	KwArray []string `json:"kwarray,omitempty"`

	// Attribute:
	//   page
	// Type:
	//   string
	// Definition:
	//   URL of the page within the site.
	Page string `json:"page,omitempty"`

	// Attribute:
	//   ref
	// Type:
	//   string
	// Definition:
	//   Referrer URL that caused navigation to the current page.
	Ref string `json:"ref,omitempty"`

	// Attribute:
	//   search
	// Type:
	//   string
	// Definition:
	//   Search string that caused navigation to the current page.
	Search string `json:"search,omitempty"`

	// Attribute:
	//   mobile
	// Type:
	//   integer
	// Definition:
	//   Indicates if the site has been programmed to optimize layout when viewed on mobile devices, where 0 = no, 1 = yes.
	Mobile int8 `json:"mobile,omitempty"`

	// Attribute:
	//   amp
	// Type:
	//   integer
	// Definition:
	//   Indicates if the page is built with AMP HTML, where 0 = no, 1 = yes.
	AMP int8 `json:"amp,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Site object is used to define an ad supported website, in contrast to a non-browser application, for example. As a derived class, a Site object inherits all DistributionChannel attributes and adds those defined below.

type SizeUnit

type SizeUnit int8

SizeUnit represents units of height and width used by creatives, assets, and placement specifications where noted.

const (
	SizeDIP SizeUnit = 1 // Device Independent Pixels (DIPS)
	SizeIn  SizeUnit = 2 // Inches
	SizeCm  SizeUnit = 3 // Centimeters
)

Units of height and width used by creatives, assets, and placement specifications where noted.

type SlotPositionInPod

type SlotPositionInPod int8

SlotPositionInPod identifies the slot position in pod field, for use in audio and video ad pods.

const (
	SlotPosLast        SlotPositionInPod = -1 // Last ad in the pod.
	SlotPosAny         SlotPositionInPod = 0  // Any ad in the pod.
	SlotPosFirst       SlotPositionInPod = 1  // First ad in the pod.
	SlotPosFirstOrLast SlotPositionInPod = 2  // First or Last ad in the pod.
)

SlotPositionInPod options.

type StartDelay

type StartDelay int64

StartDelay represents video or audio start delay.

const (
	StartPreRoll  StartDelay = 0  // Pre-Roll
	StartMidRoll  StartDelay = -1 // Generic Mid-Roll
	StartPostRoll StartDelay = -2 // Generic Post-Roll
)

Options for the video or audio start delay. If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.

func (StartDelay) Ptr

func (d StartDelay) Ptr() *StartDelay

Ptr returns pointer to own value.

func (*StartDelay) Val

func (d *StartDelay) Val() StartDelay

Val safely dereferences pointer, returning default value (StartDelayPreRoll) for nil.

type TitleAsset

type TitleAsset struct {
	// Attribute:
	//   text
	// Type:
	//   string; required
	// Definition:
	//   The text content of the text element.
	Text string `json:"text,omitempty"`

	// Attribute:
	//   len
	// Type:
	//   integer
	// Definition:
	//   The length of the contents of the text attribute.
	Len int64 `json:"len,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

TitleAsset object identifies the native asset as a title asset, which is essentially just a plain text string with specified length.

type TitleAssetFormat

type TitleAssetFormat struct {
	// Attribute:
	//   len
	// Type:
	//   integer; required
	// Definition:
	//   The maximum allowed length of the title value.
	//   Recommended lengths are 25, 90, or 140.
	Len int64 `json:"len,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

TitleAssetFormat object is used to provide native asset format specifications for a title element. Title elements are simple strings.

type User

type User struct {
	// Attribute:
	//   id
	// Type:
	//   string; recommended
	// Definition:
	//   Vendor-specific ID for the user.
	//   At least one of id or buyeruid is strongly recommended.
	ID string `json:"id,omitempty"`

	// Attribute:
	//   buyeruid
	// Type:
	//   string; recommended
	// Definition:
	//   Buyer-specific ID for the user as mapped by an exchange for the buyer.
	//   At least one of id or buyeruid is strongly recommended.
	BuyerUID string `json:"buyeruid,omitempty"`

	// Attribute:
	//   yob
	// Type:
	//   integer; DEPRECATED
	// Definition:
	//   Year of birth as a 4-digit integer.
	YOB int64 `json:"yob,omitempty"`

	// Attribute:
	//   gender
	// Type:
	//   string; DEPRECATED
	// Definition:
	//   Gender, where “M” = male, “F” = female, “O” = known to be other (i.e., omitted is unknown).
	Gender string `json:"gender,omitempty"`

	// Attribute:
	//   keywords
	// Type:
	//   string; DEPRECATED
	// Definition:
	//   Comma-separated list of keywords, interests, or intent.
	//   Only one of 'keywords' or 'kwarray' may be present.
	//   NOTE: this field is deprecated, use 'kwarray' instead.
	Keywords string `json:"keywords,omitempty"`

	// Attribute:
	//   kwarray
	// Type:
	//   string array
	// Definition:
	//   Array of keywords about the site. Only one of 'keywords' or 'kwarray' may be present.
	KwArray []string `json:"kwarray,omitempty"`

	// Attribute:
	//   consent
	// Type:
	//   string
	// Definition:
	//   GDPR consent string if applicable, complying with the comply with the IAB standard Consent String Format in the Transparency and Consent Framework technical specifications.
	Consent string `json:"consent,omitempty"`

	// Attribute:
	//   geo
	// Type:
	//   object
	// Definition:
	//   Location of the user's home base (i.e., not necessarily their current location).
	//   Refer to Object: Geo.
	Geo *Geo `json:"geo,omitempty"`

	// Attribute:
	//   data
	// Type:
	//   object array
	// Definition:
	//   Additional user data.
	//   Each Data object represents a different data source.
	//   Refer to Object: Data.
	Data []Data `json:"data,omitempty"`

	// Attribute:
	//   eids
	// Type:
	//   object array
	// Definition:
	//   Extended (third-party) identifiers for this user. Refer to Object: Extended Identifiers.
	EIDs []ExtendedIdentifier `json:"eids,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

User object contains information known or derived about the human user of the device (i.e., the audience for advertising). The user ID is a vendor-specific artifact and may be subject to rotation or other privacy policies. However, this user ID must be stable long enough to serve reasonably as the basis for frequency capping and retargeting.

type UserAgent

type UserAgent struct {
	// Attribute:
	//   browsers
	// Type:
	//   object array; recommended
	// Definition:
	//   Each BrandVersion object identifies a browser or similar software component.
	//   Refer to Object: BrandVersion.
	//   Implementers should send brands and versions derived from the Sec-CH-UA-Full-Version-List header.
	Browsers []BrandVersion `json:"browsers,omitempty"`

	// Attribute:
	//   platform
	// Type:
	//   object; recommended
	// Definition:
	//   Refer to Object: BrandVersion that identifies the user agent’s execution platform / OS.
	//   Implementers should send a brand derived from the Sec-CH-UA-Platform header, and version derived from the Sec-CH-UA-Platform-Version header.
	Platform *BrandVersion `json:"platform,omitempty"`

	// Attribute:
	//   mobile
	// Type:
	//   integer
	// Definition:
	//   1 if the agent prefers a “mobile” version of the content, if available, i.e. optimized for small screens or touch input.
	//   0 if the agent prefers the “desktop” or “full” content.
	//   Implementers should derive this value from the Sec-CH-UA-Mobile header.
	Mobile int8 `json:"mobile,omitempty"`

	// Attribute:
	//   architecture
	// Type:
	//   string
	// Definition:
	//   Device’s major binary architecture, e.g. “x86” or “arm”.
	//   Implementers should retrieve this value from the Sec-CH-UA-Arch header.
	Architecture string `json:"architecture,omitempty"`

	// Attribute:
	//   bitness
	// Type:
	//   string
	// Definition:
	//   Device’s bitness, e.g. “64” for 64-bit architecture.
	//   Implementers should retrieve this value from the Sec-CH-UA-Bitness header.
	Bitness string `json:"bitness,omitempty"`

	// Attribute:
	//   model
	// Type:
	//   string
	// Definition:
	//   Device model.
	//   Implementers should retrieve this value from the Sec-CH-UA-Model header.
	Model string `json:"model,omitempty"`

	// Attribute:
	//   source
	// Type:
	//   integer
	// Definition:
	//   The source of data used to create this object.
	//   Refer to List: User-Agent Source
	Source UserAgentSource `json:"source,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

UserAgent represents Structured user agent information provided when client supports User-Agent Client Hints. If both device.ua and device.sua are present in the bid request, device.sua should be considered the more accurate representation of the device attributes. This is because the device.ua may contain a frozen or reduced UserAgent string.

type UserAgentSource

type UserAgentSource int8

UserAgentSource represents the source of a user agent.

const (
	UASourceUnknown     UserAgentSource = 0 // Unspecified/unknown
	UASourceLowEntropy  UserAgentSource = 1 // User-Agent Client Hints (only low-entropy headers were available)
	UASourceHighEntropy UserAgentSource = 2 // User-Agent Client Hints (with high-entropy headers available)
	UASourceParsed      UserAgentSource = 3 // Parsed from User-Agent header (the same string carried by the ua field)
)

Options for the user agent source.

type Video

type Video struct {
	// Attribute:
	//   mime
	// Type:
	//   string array
	// Definition:
	//   Mime type(s) of the ad creative(s) (e.g., “video/mp4”).
	MIME []string `json:"mime,omitempty"`

	// Attribute:
	//   api
	// Type:
	//   integer array
	// Definition:
	//   API required by the ad if applicable.
	//   Refer to List: API Frameworks.
	API []APIFramework `json:"api,omitempty"`

	// Attribute:
	//   ctype
	// Type:
	//   integer
	// Definition:
	//   Subtype of video creative.
	//   Refer to List: Creative Subtypes - Audio/Video.
	CType MediaCreativeSubtype `json:"ctype,omitempty"`

	// Attribute:
	//   dur
	// Type:
	//   integer
	// Definition:
	//   Duration of the video creative in seconds.
	Dur int64 `json:"dur,omitempty"`

	// Attribute:
	//   adm
	// Type:
	//   string
	// Definition:
	//   Video markup (e.g., VAST).
	//   Note that including both adm and curl is not recommended.
	AdM string `json:"adm,omitempty"`

	// Attribute:
	//   curl
	// Type:
	//   string
	// Definition:
	//   Optional means of retrieving markup by reference; a URL that returns video markup (e.g., VAST).
	//   If this ad is matched to a Placement specification, the Placement.curlx attribute indicates if this markup retrieval option is supported.
	//   Note that including both adm and curl is not recommended.
	CURL string `json:"curl,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

Video object provides additional detail about an ad specifically for video ads.

type VideoAsset

type VideoAsset struct {
	// Attribute:
	//   adm
	// Type:
	//   string; required *
	// Definition:
	//   Video markup (e.g., VAST document) for the asset.
	//   * Exactly one of adm and curl is required.
	//   Including both is not recommended.
	AdM string `json:"adm,omitempty"`

	// Attribute:
	//   curl
	// Type:
	//   string; required *
	// Definition:
	//   A URL that returns the video markup (e.g., VAST document) for the asset.
	//   If this ad is matched to a placement specification, the Placement.curlx attribute indicates if this markup retrieval option is supported.
	//   * Exactly one of adm and curl is required.
	//   Including both is not recommended.
	CURL string `json:"curl,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

VideoAsset object identifies the native asset as a video asset. Video markup (e.g., VAST) must be either included or referenced.

type VideoPlacement

type VideoPlacement struct {
	// Attribute:
	//   ptype
	// Type:
	//   integer
	// Definition:
	//   Placement subtype.
	//   Refer to List: Placement Subtypes - Video.
	PType VideoPlacementSubtype `json:"ptype,omitempty"`

	// Attribute:
	//   pos
	// Type:
	//   integer
	// Definition:
	//   Placement position on screen.
	//   Refer to List: Placement Positions.
	Pos PlacementPosition `json:"pos,omitempty"`

	// Attribute:
	//   delay
	// Type:
	//   integer
	// Definition:
	//   Indicates the start delay in seconds for pre-roll, mid-roll, or post-roll placements.
	//   For additional generic values, refer to List: Start Delay Modes.
	Delay StartDelay `json:"delay,omitempty"`

	// Attribute:
	//   skip
	// Type:
	//   integer
	// Definition:
	//   Indicates if the placement imposes ad skippability, where 0 = no, 1 = yes.
	Skip int8 `json:"skip,omitempty"`

	// Attribute:
	//   skipmin
	// Type:
	//   integer; default 0
	// Definition:
	//   The placement allows creatives of total duration greater than this number of seconds to be skipped; only applicable if the ad is skippable.
	SkipMin int64 `json:"skipmin,omitempty"`

	// Attribute:
	//   skipafter
	// Type:
	//   integer; default 0
	// Definition:
	//   Number of seconds a creative must play before the placement enables skipping; only applicable if the ad is skippable.
	SkipAfter int64 `json:"skipafter,omitempty"`

	// Attribute:
	//   playmethod
	// Type:
	//   integer
	// Definition:
	//   Playback method in use for this placement.
	//   Refer to List: Playback Methods.
	PlayMethod PlaybackMethod `json:"playmethod,omitempty"`

	// Attribute:
	//   playend
	// Type:
	//   integer
	// Definition:
	//   The event that causes playback to end for this placement.
	//   Refer to List: Playback Cessation Modes.
	PlayEnd PlaybackCessationMode `json:"playend,omitempty"`

	// Attribute:
	//   clktype
	// Type:
	//   integer
	// Definition:
	//   Indicates the click type of the placement.
	//   Refer to List: Click Types.
	ClkType ClickType `json:"clktype,omitempty"`

	// Attribute:
	//   mime
	// Type:
	//   string array; required
	// Definition:
	//   Array of supported mime types (e.g., “video/mp4”).
	//   If omitted, all types are assumed.
	MIME []string `json:"mime,omitempty"`

	// Attribute:
	//   api
	// Type:
	//   integer array
	// Definition:
	//   List of supported APIs for this placement.
	//   If an API is not explicitly listed, it is assumed to be unsupported.
	//   Refer to List: API Frameworks.
	API []APIFramework `json:"api,omitempty"`

	// Attribute:
	//   ctype
	// Type:
	//   integer array
	// Definition:
	//   Creative subtypes permitted for this placement.
	//   Refer to List: Creative Subtypes - Audio/Video.
	CType []MediaCreativeSubtype `json:"ctype,omitempty"`

	// Attribute:
	//   w
	// Type:
	//   integer
	// Definition:
	//   Width of the placement in units specified by unit.
	W int64 `json:"w,omitempty"`

	// Attribute:
	//   h
	// Type:
	//   integer
	// Definition:
	//   Height of the placement in units specified by unit.
	H int64 `json:"h,omitempty"`

	// Attribute:
	//   unit
	// Type:
	//   integer; default 1
	// Definition:
	//   Units of size used for w and h attributes.
	//   Refer to List: Size Units.
	Unit SizeUnit `json:"unit,omitempty"`

	// Attribute:
	//   mindur
	// Type:
	//   integer
	// Definition:
	//   Minimum creative duration in seconds.
	MinDur int64 `json:"mindur,omitempty"`

	// Attribute:
	//   maxdur
	// Type:
	//   integer
	// Definition:
	//   Maximum creative duration in seconds.
	MaxDur int64 `json:"maxdur,omitempty"`

	// Attribute:
	//   rqddurs
	// Type:
	//   integer array
	// Definition:
	//   Precise acceptable durations for video creatives in seconds. This field specifically
	//   targets the Live TV use case where non-exact ad durations would result in undesirable
	//   'dead air'. This field is mutually exclusive with mindur and maxdur; if rqddurs is
	//   specified, mindur and maxdur must not be specified and vice versa.
	RqdDurs []int64 `json:"rqddurs,omitempty"`

	// Attribute:
	//   maxext
	// Type:
	//   integer; default 0
	// Definition:
	//   Maximum extended creative duration if extension is allowed.
	//   If 0, extension is not allowed.
	//   If -1, extension is allowed and there is no time limit imposed.
	//   If greater than 0, then the value represents the number of seconds of extended play supported beyond the maxdur value.
	MaxExt int64 `json:"maxext,omitempty"`

	// Attribute:
	//   minbitr
	// Type:
	//   integer
	// Definition:
	//   Minimum bit rate of the creative in Kbps.
	MinBitR int64 `json:"minbitr,omitempty"`

	// Attribute:
	//   maxbitr
	// Type:
	//   integer
	// Definition:
	//   Maximum bit rate of the creative in Kbps.
	MaxBitR int64 `json:"maxbitr,omitempty"`

	// Attribute:
	//   delivery
	// Type:
	//   integer array
	// Definition:
	//   Array of supported creative delivery methods.
	//   If omitted, all can be assumed.
	//   Refer to List: Delivery Methods.
	Delivery []DeliveryMethod `json:"delivery,omitempty"`

	// Attribute:
	//   maxseq
	// Type:
	//   integer
	// Definition:
	//   The maximum number of ads that can be played in an ad pod.
	MaxSeq int64 `json:"maxseq,omitempty"`

	// Attribute:
	//   poddur
	// Type:
	//   integer
	// Definition:
	//   Indicates the total amount of time in seconds that advertisers may fill
	//   for a “dynamic” video ad pod, or the dynamic portion of a “hybrid” ad pod.
	//   This field is required only for the dynamic portion(s) of video ad pods.
	//   This field refers to the length of the entire ad break, whereas
	//   mindur/maxdur/rqddurs are constraints relating to the slots that make up the pod.
	PodDur int64 `json:"poddur,omitempty"`

	// Attribute:
	//   podid
	// Type:
	//   integer
	// Definition:
	//   Unique identifier indicating that an impression opportunity belongs to a
	//   video ad pod. If multiple impression opportunities within a bid request
	//   share the same podid, this indicates that those impression opportunities
	//   belong to the same video ad pod.
	PodID int64 `json:"podid,omitempty"`

	// Attribute:
	//   podseq
	// Type:
	//   integer; default 0
	// Definition:
	//   The sequence (position) of the video ad pod within a content stream.
	//   Refer to List: Pod Sequence for guidance on the use of this field.
	PodSeq PodSequence `json:"podseq,omitempty"`

	// Attribute:
	//   slotinpod
	// Type:
	//   integer; default 0
	// Definition:
	//   For video ad pods, this value indicates that the seller can guarantee delivery
	//   against the indicated slot position in the pod.
	//   Refer to List: Slot Position in Pod for guidance on the use of this field.
	SlotInPod SlotPositionInPod `json:"slotinpod,omitempty"`

	// Attribute:
	//   mincpmpersec
	// Type:
	//   float
	// Definition:
	//   Minimum CPM per second. This is a price floor for the “dynamic” portion of a
	//   video ad pod, relative to the duration of bids an advertiser may submit.
	MinCPMPerSec float64 `json:"mincpmpersec,omitempty"`

	// Attribute:
	//   linear
	// Type:
	//   integer
	// Definition:
	//   Indicates if the creative must be linear, nonlinear, etc.
	//   If none specified, no restrictions are assumed.
	//   Refer to List: Linearity Modes.
	Linear LinearityMode `json:"linear,omitempty"`

	// Attribute:
	//   boxing
	// Type:
	//   integer; default 1
	// Definition:
	//   Indicates if letterboxing of 4:3 creatives into a 16:9 window is allowed, where 0 = no, 1 = yes.
	Boxing int8 `json:"boxing,omitempty"`

	// Attribute:
	//   comp
	// Type:
	//   object array
	// Definition:
	//   Array of objects indicating that companion ads are available and providing the specifications thereof.
	//   Refer to Object: Companion.
	Comp []Companion `json:"comp,omitempty"`

	// Attribute:
	//   comptype
	// Type:
	//   integer array
	// Definition:
	//   Supported companion ad types; recommended if companion ads are specified in comp.
	//   Refer to List: Companion Types.
	CompType []CompanionType `json:"comptype,omitempty"`

	// Attribute:
	//   expdir
	// Type:
	//   integer array
	// Definition:
	//   Directions in which the creative (video placement) is permitted to expand.
	//   Refer to List: Expandable Directions.
	ExpDir []ExpandableDirection `json:"expdir,omitempty"`

	// Attribute:
	//   overlayexpdir
	// Type:
	//   integer array
	// Definition:
	//   Directions in which the creative (video overlay) is permitted to expand.
	//   This is primarily used for non-linear videos.
	//   Refer to List: Expandable Directions.
	OverlayExpDir []ExpandableDirection `json:"overlayexpdir,omitempty"`

	// Attribute:
	//   ext
	// Type:
	//   object
	// Definition:
	//   Optional vendor-specific extensions.
	Ext json.RawMessage `json:"ext,omitempty"`
}

VideoPlacement object signals that the placement may be a video placement and provides additional detail about permitted video ads (e.g., VAST).

type VideoPlacementSubtype

type VideoPlacementSubtype int8

VideoPlacementSubtype represents types of video placements derived largely from the IAB Digital Video Guidelines.

const (
	VideoInStream      VideoPlacementSubtype = 1 // In-Stream: Played before, during or after the streaming video content that the consumer has requested (e.g., Pre-roll, Mid-roll, Post-roll).
	VideoInBanner      VideoPlacementSubtype = 2 // In-Banner: Exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery.
	VideoInArticle     VideoPlacementSubtype = 3 // In-Article: Loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message.
	VideoInFeed        VideoPlacementSubtype = 4 // In-Feed: Found in content, social, or product feeds.
	VideoAlwaysVisible VideoPlacementSubtype = 5 // Interstitial/Slider/Floating: Covers the entire or a portion of screen area, but is always on screen while displayed (i.e. cannot be scrolled out of view).
)

Types of video placements derived largely from the IAB Digital Video Guidelines.

type VolumeNormalizationMode

type VolumeNormalizationMode int8

VolumeNormalizationMode represents types of volume normalization modes, typically for audio.

const (
	VolumeNormNone     VolumeNormalizationMode = 0 // None
	VolumeNormAvg      VolumeNormalizationMode = 1 // Ad Volume Average Normalized to Content
	VolumeNormPeak     VolumeNormalizationMode = 2 // Ad Volume Peak Normalized to Content
	VolumeNormLoudness VolumeNormalizationMode = 3 // Ad Loudness Normalized to Content
	VolumeNormCustom   VolumeNormalizationMode = 4 // Custom Volume Normalization
)

Types of volume normalization modes, typically for audio.

func (VolumeNormalizationMode) Ptr

Ptr returns pointer to own value.

func (*VolumeNormalizationMode) Val

Val safely dereferences pointer, returning default value (VolumeNormNone) for nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL