Коммит
1b58583824
|
@ -0,0 +1,3 @@
|
|||
# adcom1
|
||||
|
||||
[AdCOM](https://github.com/InteractiveAdvertisingBureau/AdCOM) [v1.0](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/AdCOM%20v1.0%20FINAL.md) types for Go programming language (Golang)
|
|
@ -0,0 +1,161 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// Package adcom1 implements types for AdCOM Specification v1.0
|
||||
// https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/AdCOM%20v1.0%20FINAL.md
|
||||
package adcom1
|
||||
|
||||
/*
|
||||
|
||||
// (.+?)\t((.+?)(?:;.+?)?)\t(.+?)\n
|
||||
// Attribute:\n\t// $1\n\t// Type:\n\t// $2\n\t// Definition:\n\t// $4\n\t$1 $3 `json:"$1,omitempty"`\n\n
|
||||
|
||||
*/
|
|
@ -0,0 +1,17 @@
|
|||
package adcom1
|
||||
|
||||
// APIFramework represents API frameworks either supported by a placement or required by an ad.
|
||||
type APIFramework int
|
||||
|
||||
// API frameworks either supported by a placement or required by an ad.
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
const (
|
||||
APIVPAID1 APIFramework = 1 // VPAID 1.0
|
||||
APIVPAID2 APIFramework = 2 // VPAID 2.0
|
||||
APIMRAID1 APIFramework = 3 // MRAID 1.0
|
||||
APIORMMA APIFramework = 4 // ORMMA
|
||||
APIMRAID2 APIFramework = 5 // MRAID 2.0
|
||||
APIMRAID3 APIFramework = 6 // MRAID 3.0
|
||||
APIOMID1 APIFramework = 7 // OMID 1.0
|
||||
)
|
|
@ -0,0 +1,114 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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
|
||||
// Definition:
|
||||
// Comma separated list of keywords about the app.
|
||||
Keywords string `json:"keywords,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"`
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package adcom1
|
||||
|
||||
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 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"`
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// Audio object provides additional detail about an ad specifically for audio ads.
|
||||
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 CreativeSubtypeAV `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"`
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
package adcom1
|
||||
|
||||
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 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 []CreativeSubtypeAV `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 []DeliveryMethod `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 []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:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package adcom1
|
||||
|
||||
// AuditStatus represents codes used in Audit objects to reflect status or workflow state.
|
||||
type AuditStatus int
|
||||
|
||||
// Codes used in Audit objects to reflect status or workflow state.
|
||||
//
|
||||
// Values of 500+ hold endor-specific codes.
|
||||
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.
|
||||
)
|
|
@ -0,0 +1,32 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package adcom1
|
||||
|
||||
// CategoryTaxonomy identifies the taxonomy in effect when content categories are listed.
|
||||
type CategoryTaxonomy int
|
||||
|
||||
// CategoryTaxonomy options.
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
const (
|
||||
CatTaxIABContent1 CategoryTaxonomy = 1 // 1 IAB Content Category Taxonomy 1.0.
|
||||
CatTaxIABContent2 CategoryTaxonomy = 2 // 2 IAB Content Category Taxonomy 2.0: www.iab.com/guidelines/taxonomy
|
||||
CatTaxIABProduct1 CategoryTaxonomy = 3 // 3 IAB Ad Product Taxonomy 1.0.
|
||||
)
|
|
@ -0,0 +1,14 @@
|
|||
package adcom1
|
||||
|
||||
// ClickType represents types of creative activation (i.e., click) behavior types.
|
||||
type ClickType int
|
||||
|
||||
// Types of creative activation (i.e., click) behavior types.
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
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
|
||||
)
|
|
@ -0,0 +1,41 @@
|
|||
package adcom1
|
||||
|
||||
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 *DisplayPlacement `json:"display,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package adcom1
|
||||
|
||||
// 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.
|
||||
type CompanionType int8
|
||||
|
||||
// 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
|
||||
)
|
|
@ -0,0 +1,15 @@
|
|||
package adcom1
|
||||
|
||||
// ConnectionType represents options for the type of device connectivity.
|
||||
type ConnectionType int8
|
||||
|
||||
// Options for the type of device connectivity.
|
||||
const (
|
||||
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
|
||||
)
|
|
@ -0,0 +1,227 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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 uint16 `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
|
||||
// Definition:
|
||||
// Comma separated list of keywords describing the content.
|
||||
Keywords string `json:"keywords,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:
|
||||
// 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"`
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package adcom1
|
||||
|
||||
// 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).
|
||||
type ContentContext int8
|
||||
|
||||
// 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
|
||||
)
|
|
@ -0,0 +1,28 @@
|
|||
package adcom1
|
||||
|
||||
// CreativeAttribute specifies a standard list of creative attributes that can describe an actual ad or restrictions relative to a given placement.
|
||||
type CreativeAttribute int
|
||||
|
||||
// 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.
|
||||
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)
|
||||
)
|
|
@ -0,0 +1,20 @@
|
|||
package adcom1
|
||||
|
||||
// CreativeSubtypeAV represents subtypes of audio and video ad creatives.
|
||||
type CreativeSubtypeAV int8 // TODO: rename to smth like AudioVideoCreativeSubtype? (sounds more natural)
|
||||
|
||||
// Subtypes of audio and video ad creatives.
|
||||
const (
|
||||
CreativeVAST1 CreativeSubtypeAV = 1 // VAST 1.0
|
||||
CreativeVAST2 CreativeSubtypeAV = 2 // VAST 2.0
|
||||
CreativeVAST3 CreativeSubtypeAV = 3 // VAST 3.0
|
||||
CreativeVAST1Wrapper CreativeSubtypeAV = 4 // VAST 1.0 Wrapper
|
||||
CreativeVAST2Wrapper CreativeSubtypeAV = 5 // VAST 2.0 Wrapper
|
||||
CreativeVAST3Wrapper CreativeSubtypeAV = 6 // VAST 3.0 Wrapper
|
||||
CreativeVAST4 CreativeSubtypeAV = 7 // VAST 4.0
|
||||
CreativeVAST4Wrapper CreativeSubtypeAV = 8 // VAST 4.0 Wrapper
|
||||
CreativeDAAST1 CreativeSubtypeAV = 9 // DAAST 1.0
|
||||
CreativeDAAST1Wrapper CreativeSubtypeAV = 10 // DAAST 1.0 Wrapper
|
||||
CreativeVAST41 CreativeSubtypeAV = 11 // VAST 4.1
|
||||
CreativeVAST41Wrapper CreativeSubtypeAV = 12 // VAST 4.1 Wrapper
|
||||
)
|
|
@ -0,0 +1,12 @@
|
|||
package adcom1
|
||||
|
||||
// CreativeSubtypeDisplay represents subtypes of display ad creatives.
|
||||
type CreativeSubtypeDisplay int8 // TODO: rename to smth like DisplayCreativeSubtype? (sounds more natural)
|
||||
|
||||
// Subtypes of display ad creatives.
|
||||
const (
|
||||
CreativeHTML CreativeSubtypeDisplay = 1 // HTML
|
||||
CreativeAMP CreativeSubtypeDisplay = 2 // AMPHTML
|
||||
CreativeImage CreativeSubtypeDisplay = 3 // Structured Image Object
|
||||
CreativeNative CreativeSubtypeDisplay = 4 // Structured Native Object
|
||||
)
|
|
@ -0,0 +1,41 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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 int `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"`
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package adcom1
|
||||
|
||||
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 NativeDataAssetType `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,11 @@
|
|||
package adcom1
|
||||
|
||||
// DeliveryMethod represents options for the delivery of video or audio content.
|
||||
type DeliveryMethod int8
|
||||
|
||||
// Options for the delivery of video or audio content.
|
||||
const (
|
||||
DeliveryStreaming DeliveryMethod = 1 // Streaming
|
||||
DeliveryProgressive DeliveryMethod = 2 // Progressive
|
||||
DeliveryDownload DeliveryMethod = 3 // Download
|
||||
)
|
|
@ -0,0 +1,233 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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:
|
||||
// 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 uint64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// w
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Physical width of the screen in pixels.
|
||||
W uint64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ppi
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Screen size as pixels per linear inch.
|
||||
PPI uint16 `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:
|
||||
// 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"`
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package adcom1
|
||||
|
||||
// DeviceType represents types of devices.
|
||||
// This table has values derived from the TAG Inventory Quality Guidelines (IQG).
|
||||
type DeviceType int8
|
||||
|
||||
// Types of devices.
|
||||
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
|
||||
)
|
|
@ -0,0 +1,137 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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 CreativeSubtypeDisplay `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 uint64 `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 uint64 `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 `uint8` because ratio values are expected to be quite small (like 16:9).
|
||||
WRatio uint8 `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 `uint8` because ratio values are expected to be quite small (like 16:9).
|
||||
HRatio uint8 `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"`
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package adcom1
|
||||
|
||||
// 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).
|
||||
type DisplayContextType int
|
||||
|
||||
// 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.
|
||||
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.
|
||||
)
|
|
@ -0,0 +1,63 @@
|
|||
package adcom1
|
||||
|
||||
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 uint64 `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 uint64 `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 `uint8` because ratio values are expected to be quite small (like 16:9).
|
||||
WRatio uint8 `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 `uint8` because ratio values are expected to be quite small (like 16:9).
|
||||
HRatio uint8 `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"`
|
||||
}
|
|
@ -0,0 +1,175 @@
|
|||
package adcom1
|
||||
|
||||
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 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 []CreativeSubtypeDisplay `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 uint64 `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 uint64 `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"`
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package adcom1
|
||||
|
||||
// DisplayPlacementType represents types of display placements; the locations where a native ad may be shown in relationship to the surrounding content.
|
||||
type DisplayPlacementType int
|
||||
|
||||
// General types of display placements.
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
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.
|
||||
)
|
|
@ -0,0 +1,43 @@
|
|||
package adcom1
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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 uint16 `json:"dpi,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package adcom1
|
||||
|
||||
// DOOHVenueType represents the digital out-of-home venue types and is derived from DPAA Programmatic Standards.
|
||||
type DOOHVenueType int
|
||||
|
||||
// Digital out-of-home venue types.
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
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
|
||||
)
|
|
@ -0,0 +1,59 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package adcom1
|
||||
|
||||
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 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"`
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package adcom1
|
||||
|
||||
// EventTrackingMethod represents methods of tracking of ad events.
|
||||
// Vendor specific codes may include custom measurement companies (e.g., Moat, Doubleverify, IAS, etc.).
|
||||
type EventTrackingMethod int
|
||||
|
||||
// Available methods of tracking of ad events.
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
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.
|
||||
)
|
|
@ -0,0 +1,17 @@
|
|||
package adcom1
|
||||
|
||||
// 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.
|
||||
type EventType int
|
||||
|
||||
// Types of ad events available for tracking
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
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.
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
package adcom1
|
||||
|
||||
// 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.
|
||||
type ExpandableDirection int8
|
||||
|
||||
// Directions in which an expandable ad may expand.
|
||||
const (
|
||||
ExpandableLeft ExpandableDirection = 1 // Left
|
||||
ExpandableRight ExpandableDirection = 2 // Right
|
||||
ExpandableUp ExpandableDirection = 3 // Up
|
||||
ExpandableDown ExpandableDirection = 4 // Down
|
||||
ExpandableFullScreen ExpandableDirection = 5 // Full Screen
|
||||
)
|
|
@ -0,0 +1,11 @@
|
|||
package adcom1
|
||||
|
||||
// FeedType represents types of feeds, typically for audio.
|
||||
type FeedType int8
|
||||
|
||||
// Types of feeds, typically for audio.
|
||||
const (
|
||||
FeedMusicService FeedType = 1 // Music Service
|
||||
FeedRadioBroadcast FeedType = 2 // FM/AM Broadcast
|
||||
FeedPodcast FeedType = 3 // Podcast
|
||||
)
|
|
@ -0,0 +1,127 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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.
|
||||
// Dev note:
|
||||
// This field is kept as `int` to follow type choice for timezone offset in std. `time` package.
|
||||
UTCOffset int `json:"utcoffset,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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 uint64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Definition:
|
||||
// Height of the image asset in device independent pixels (DIPS).
|
||||
H uint64 `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"`
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
package adcom1
|
||||
|
||||
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 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 uint64 `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 uint64 `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 uint64 `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 uint64 `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 `uint8` because ratio values are expected to be quite small (like 16:9).
|
||||
WRatio uint8 `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 `uint8` because ratio values are expected to be quite small (like 16:9).
|
||||
HRatio uint8 `json:"hratio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package adcom1
|
||||
|
||||
// IPLocationService represents services and/or vendors used for resolving IP addresses to geolocations.
|
||||
type IPLocationService int8
|
||||
|
||||
// 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)
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
package adcom1
|
||||
|
||||
// LinearityMode represents options for media linearity, typically for video.
|
||||
type LinearityMode int8
|
||||
|
||||
// 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)
|
||||
)
|
|
@ -0,0 +1,39 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package adcom1
|
||||
|
||||
// LocationType represents options to indicate how the geographic information was determined.
|
||||
type LocationType int8
|
||||
|
||||
// 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)
|
||||
)
|
|
@ -0,0 +1,12 @@
|
|||
package adcom1
|
||||
|
||||
// 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.
|
||||
type MediaRating int8
|
||||
|
||||
// Media ratings used in describing content based on the TAG Inventory Quality Guidelines (IQG) v2.1 categorization.
|
||||
const (
|
||||
MediaRatingAll MediaRating = 1 // All Audiences
|
||||
MediaRatingOver12 MediaRating = 2 // Everyone Over Age 12
|
||||
MediaRatingMature MediaRating = 3 // Mature Audiences
|
||||
)
|
|
@ -0,0 +1,32 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// Native object is the root of a structure that defines a native display ad.
|
||||
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"`
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package adcom1
|
||||
|
||||
// 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.
|
||||
type NativeDataAssetType int
|
||||
|
||||
// Common data asset types.
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
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.
|
||||
)
|
|
@ -0,0 +1,24 @@
|
|||
package adcom1
|
||||
|
||||
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 []AssetFormat `json:"asset"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package adcom1
|
||||
|
||||
// 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.
|
||||
type NativeImageAssetType int
|
||||
|
||||
// Common image asset types.
|
||||
//
|
||||
// Values 500+ hold vendor-specific codes.
|
||||
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
|
||||
)
|
|
@ -0,0 +1,39 @@
|
|||
package adcom1
|
||||
|
||||
// OperatingSystem represents device operating system.
|
||||
type OperatingSystem int
|
||||
|
||||
// Options for device operating system.
|
||||
//
|
||||
// Values of 500+ hold vendor-specific codes.
|
||||
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
|
||||
)
|
|
@ -0,0 +1,124 @@
|
|||
package adcom1
|
||||
|
||||
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"`
|
||||
|
||||
// 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"`
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package adcom1
|
||||
|
||||
// PlacementPosition represents placement positions as a relative measure of visibility or prominence.
|
||||
// This table has values derived from the TAG Inventory Quality Guidelines (IQG).
|
||||
type PlacementPosition int8
|
||||
|
||||
// Placement positions.
|
||||
const (
|
||||
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
|
||||
)
|
|
@ -0,0 +1,11 @@
|
|||
package adcom1
|
||||
|
||||
// PlaybackCessationMode represents modes for when media playback terminates.
|
||||
type PlaybackCessationMode int8
|
||||
|
||||
// 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
|
||||
)
|
|
@ -0,0 +1,14 @@
|
|||
package adcom1
|
||||
|
||||
// PlaybackMethod represents media playback methods.
|
||||
type PlaybackMethod int8
|
||||
|
||||
// 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
|
||||
)
|
|
@ -0,0 +1,57 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package adcom1
|
||||
|
||||
// ProductionQuality represents content quality.
|
||||
type ProductionQuality int8
|
||||
|
||||
// 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.
|
||||
const (
|
||||
ProductionProfessional ProductionQuality = 1 // Professionally Produced
|
||||
ProductionProsumer ProductionQuality = 2 // Prosumer
|
||||
ProductionUser ProductionQuality = 3 // User Generated (UGC)
|
||||
)
|
|
@ -0,0 +1,55 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// Publisher object describes the publisher of the media in which ads will be displayed.
|
||||
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"`
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// Regs object contains any known legal, governmental, or industry regulations that are in effect.
|
||||
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"`
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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"`
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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
|
||||
// Definition:
|
||||
// Comma separated list of keywords about the site.
|
||||
Keywords string `json:"keywords,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"`
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package adcom1
|
||||
|
||||
// SizeUnit represents units of height and width used by creatives, assets, and placement specifications where noted.
|
||||
type SizeUnit int8
|
||||
|
||||
// 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
|
||||
)
|
|
@ -0,0 +1,12 @@
|
|||
package adcom1
|
||||
|
||||
// StartDelayMode represents video or audio start delay.
|
||||
type StartDelayMode int64
|
||||
|
||||
// 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.
|
||||
const (
|
||||
StartDelayPreRoll StartDelayMode = 0 // Pre-Roll
|
||||
StartDelayGenericMidRoll StartDelayMode = -1 // Generic Mid-Roll
|
||||
StartDelayGenericPostRoll StartDelayMode = -2 // Generic Post-Roll
|
||||
)
|
|
@ -0,0 +1,30 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// TitleAsset object identifies the native asset as a title asset, which is essentially just a plain text string with specified length.
|
||||
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 int `json:"len,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package adcom1
|
||||
|
||||
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,85 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// 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 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
|
||||
// Definition:
|
||||
// Year of birth as a 4-digit integer.
|
||||
YOB uint16 `json:"yob,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// gender
|
||||
// Type:
|
||||
// string
|
||||
// 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
|
||||
// Definition:
|
||||
// Comma separated list of keywords, interests, or intent.
|
||||
Keywords string `json:"keywords,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:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// Video object provides additional detail about an ad specifically for video ads.
|
||||
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 CreativeSubtypeAV `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"`
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package adcom1
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// VideoAsset object identifies the native asset as a video asset.
|
||||
// Video markup (e.g., VAST) must be either included or referenced.
|
||||
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"`
|
||||
}
|
|
@ -0,0 +1,242 @@
|
|||
package adcom1
|
||||
|
||||
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 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 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 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 []CreativeSubtypeAV `json:"ctype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// w
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Width of the placement in units specified by unit.
|
||||
W uint64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
// Type:
|
||||
// integer
|
||||
// Definition:
|
||||
// Height of the placement in units specified by unit.
|
||||
H uint64 `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:
|
||||
// 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 []DeliveryMethod `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 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:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Definition:
|
||||
// Optional vendor-specific extensions.
|
||||
Ext json.RawMessage `json:"ext,omitempty"`
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package adcom1
|
||||
|
||||
// VideoPlacementSubtype represents types of video placements derived largely from the IAB Digital Video Guidelines.
|
||||
type VideoPlacementSubtype int8
|
||||
|
||||
// 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).
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
package adcom1
|
||||
|
||||
// VolumeNormalizationMode represents types of volume normalization modes, typically for audio.
|
||||
type VolumeNormalizationMode int8
|
||||
|
||||
// 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
|
||||
)
|
Загрузка…
Ссылка в новой задаче