mirror of
https://github.com/prebid/openrtb.git
synced 2026-06-14 14:06:38 +03:00
adcom1: placement objects draft
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 AssetFormat struct {
|
||||
// Attribute:
|
||||
// id
|
||||
// Type:
|
||||
// integer; required
|
||||
// Definition:
|
||||
// Asset ID, unique within the scope of this placement specification.
|
||||
ID int `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 interface{} `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 interface{} `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 interface{} `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 interface{} `json:"data,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// AudioPlacement object signals that the placement may be an audio placement and provides additional detail about permitted audio ads (e.g., DAAST).
|
||||
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 int64 `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 interface{} `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 interface{} `json:"playend,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// feed
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Type of audio feed of this placement.
|
||||
// Refer to List: Feed Types.
|
||||
Feed interface{} `json:"feed,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// nvol
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Volume normalization mode of this placement.
|
||||
// Refer to List: Volume Normalization Modes.
|
||||
NVol interface{} `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 []interface{} `json:"api,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ctype
|
||||
// Type:
|
||||
// integer array
|
||||
// Definition:
|
||||
// Creative subtypes permitted for this placement.
|
||||
// Refer to List: Creative Subtypes - Audio/Video.
|
||||
CType []interface{} `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:
|
||||
// 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 uint64 `json:"minbitr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxbitr
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Maximum bit rate of the creative in Kbps.
|
||||
MaxBitR uint64 `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 []interface{} `json:"delivery,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxseq
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// The maximum number of ads that can be played in an ad pod.
|
||||
MaxSeq int `json:"maxseq,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 []interface{} `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 []interface{} `json:"comptype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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 interface{} `json:"display,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 DataAssetFormat struct {
|
||||
// Attribute:
|
||||
// type
|
||||
// Type:
|
||||
// integer; required
|
||||
// Definition:
|
||||
// The type of data asset supported. Refer to List: Native Data Asset Types.
|
||||
Type interface{} `json:"type,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// len
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// The maximum allowed length of the data value.
|
||||
Len int `json:"len,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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 int `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 int `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.
|
||||
WRatio int `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.
|
||||
HRatio int `json:"hratio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// expdir
|
||||
// Type:
|
||||
// integer array
|
||||
// Definition:
|
||||
// Directions in which the creative is permitted to expand.
|
||||
// Refer to List: Expandable Directions.
|
||||
ExpDir []interface{} `json:"expdir,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 DisplayPlacement struct {
|
||||
// Attribute:
|
||||
// pos
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Placement position on screen.
|
||||
// Refer to List: Placement Positions.
|
||||
Pos interface{} `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 interface{} `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 interface{} `json:"ptype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// context
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Definition:
|
||||
// The context of the placement.
|
||||
// Refer to List: Display Context Types.
|
||||
Context interface{} `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 []interface{} `json:"api,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ctype
|
||||
// Type:
|
||||
// integer array
|
||||
// Definition:
|
||||
// Creative subtypes permitted.
|
||||
// Refer to List: Creative Subtypes - Display.
|
||||
CType []interface{} `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 int `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 int `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 interface{} `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 []interface{} `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 interface{} `json:"nativefmt,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// event
|
||||
// Type:
|
||||
// object array
|
||||
// Definition:
|
||||
// Array of supported ad tracking events.
|
||||
// Refer to Object: EventSpec.
|
||||
Event []interface{} `json:"event,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 EventSpec struct {
|
||||
// Attribute:
|
||||
// type
|
||||
// Type:
|
||||
// integer; required
|
||||
// Definition:
|
||||
// Type of supported ad tracking event.
|
||||
// Refer to List: Event Types.
|
||||
Type interface{} `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 []interface{} `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 []interface{} `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"`
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 ImageAssetFormat struct {
|
||||
// Attribute:
|
||||
// type
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// The type of image asset supported. Refer to List: Native Image Asset Types.
|
||||
Type interface{} `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 int `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 int `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 int `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 int `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.
|
||||
WRatio int `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.
|
||||
HRatio int `json:"hratio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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 []interface{} `json:"asset"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"` // TODO: make an enum?
|
||||
|
||||
// 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 interface{} `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 interface{} `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 interface{} `json:"audio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// TitleAssetFormat object is used to provide native asset format specifications for a title element.
|
||||
// Title elements are simple strings.
|
||||
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 int `json:"len,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
package adcom
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// VideoPlacement object signals that the placement may be a video placement and provides additional detail about permitted video ads (e.g., VAST).
|
||||
type VideoPlacement struct {
|
||||
// Attribute:
|
||||
// ptype
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Placement subtype. Refer to List: Placement Subtypes - Video.
|
||||
PType interface{} `json:"ptype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// pos
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Placement position on screen. Refer to List: Placement Positions.
|
||||
Pos interface{} `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 int64 `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 interface{} `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 interface{} `json:"playend,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// clktype
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Indicates the click type of the placement. Refer to List: Click Types.
|
||||
ClkType interface{} `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 []interface{} `json:"api,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ctype
|
||||
// Type:
|
||||
// integer array
|
||||
// Definition:
|
||||
// Creative subtypes permitted for this placement. Refer to List: Creative Subtypes - Audio/Video.
|
||||
CType []interface{} `json:"ctype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// w
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Width of the placement in units specified by unit.
|
||||
W int `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Height of the placement in units specified by unit.
|
||||
H int `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 interface{} `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:
|
||||
// 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 uint64 `json:"minbitr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxbitr
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Maximum bit rate of the creative in Kbps.
|
||||
MaxBitR uint64 `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 []interface{} `json:"delivery,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxseq
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// The maximum number of ads that can be played in an ad pod.
|
||||
MaxSeq int `json:"maxseq,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 interface{} `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 []interface{} `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 []interface{} `json:"comptype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user