Enums (except 5.1 Content Categories) + some fixes (missing attrs)

This commit is contained in:
Max Cherry
2017-10-01 11:57:06 +03:00
parent 7ef1e0d1b9
commit 5bbe78d9ff
33 changed files with 448 additions and 43 deletions
+20
View File
@@ -0,0 +1,20 @@
package openrtb
// 5.4 Ad Position
//
// Position of the ad as a relative measure of visibility or prominence.
// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
// Practitioners should keep in sync with updates to the IQG values as published on IAB.com.
// Values “4” - “7” apply to apps per the mobile addendum to IQG version 2.1.
type AdPosition int8
const (
AdPositionUnknown AdPosition = 0 // Unknown
AdPositionAboveTheFold AdPosition = 1 // Above the Fold
AdPositionMayOrMayNotBeInitiallyVisible AdPosition = 2 // DEPRECATED - May or may not be initially visible depending on screen size/resolution.
AdPositionBelowTheFold AdPosition = 3 // Below the Fold
AdPositionHeader AdPosition = 4 // Header
AdPositionFooter AdPosition = 5 // Footer
AdPositionSidebar AdPosition = 6 // Sidebar
AdPositionFullScreen AdPosition = 7 // Full Screen
)
+15
View File
@@ -0,0 +1,15 @@
package openrtb
// 5.6 API Frameworks
//
// List of API frameworks supported by the publisher.
type APIFramework int8
const (
APIFrameworkVPAID10 APIFramework = 1 // VPAID 1.0
APIFrameworkVPAID20 APIFramework = 2 // VPAID 2.0
APIFrameworkMRAID1 APIFramework = 3 // MRAID-1
APIFrameworkORMMA APIFramework = 4 // ORMMA
APIFrameworkMRAID2 APIFramework = 5 // MRAID-2
APIFrameworkMRAID3 APIFramework = 6 // MRAID-3
)
+16 -11
View File
@@ -44,7 +44,7 @@ type Audio struct {
// integer array; recommended
// Description:
// Array of supported audio protocols. Refer to List 5.8.
Protocols []int8 `json:"protocols,omitempty"`
Protocols []Protocol `json:"protocols,omitempty"`
// Attribute:
// startdelay
@@ -53,7 +53,7 @@ type Audio struct {
// Description:
// Indicates the start delay in seconds for pre-roll, mid-roll, or
// post-roll ad placements. Refer to List 5.12.
StartDelay *int64 `json:"startdelay,omitempty"`
StartDelay *StartDelay `json:"startdelay,omitempty"`
// Attribute:
// sequence
@@ -71,7 +71,7 @@ type Audio struct {
// integer array
// Description:
// Blocked creative attributes. Refer to List 5.3.
BAttr []int8 `json:"battr,omitempty"`
BAttr []CreativeAttribute `json:"battr,omitempty"`
// Attribute:
// maxextended
@@ -99,10 +99,17 @@ type Audio struct {
// integer
// Description:
// Maximum bit rate in Kbps.
// delivery integer array Supported delivery methods (e.g., streaming, progressive). If
// none specified, assume all are supported. Refer to List 5.15.
MaxBitrate uint64 `json:"maxbitrate,omitempty"`
// Attribute:
// delivery
// Type:
// integer array
// Description:
// Supported delivery methods (e.g., streaming, progressive). If
// none specified, assume all are supported. Refer to List 5.15.
Delivery []ContentDeliveryMethod `json:"delivery,omitempty"`
// Attribute:
// companionad
// Type:
@@ -120,7 +127,7 @@ type Audio struct {
// List of supported API frameworks for this impression. Refer to
// List 5.6. If an API is not explicitly listed, it is assumed not to be
// supported.
API []int8 `json:"api,omitempty"`
API []APIFramework `json:"api,omitempty"`
// Attribute:
// companiontype
@@ -130,7 +137,7 @@ type Audio struct {
// Supported DAAST companion ad types. Refer to List 5.14.
// Recommended if companion Banner objects are included via
// the companionad array.
CompanionType []int8 `json:"companiontype,omitempty"`
CompanionType []CompanionType `json:"companiontype,omitempty"`
// Attribute:
// maxseq
@@ -148,9 +155,7 @@ type Audio struct {
// integer
// Description:
// Type of audio feed. Refer to List 5.16.
// stitched integer Indicates if the ad is stitched with audio content or delivered
// independently, where 0 = no, 1 = yes.
Feed int8 `json:"feed,omitempty"`
Feed FeedType `json:"feed,omitempty"`
// Attribute:
// stitched
@@ -167,7 +172,7 @@ type Audio struct {
// integer
// Description:
// Volume normalization mode. Refer to List 5.17.
NVol *int8 `json:"nvol,omitempty"`
NVol *VolumeNormalizationMode `json:"nvol,omitempty"`
// Attribute:
// ext
+5 -5
View File
@@ -84,7 +84,7 @@ type Banner struct {
// integer array
// Description:
// Blocked banner ad types. Refer to List 5.2.
BType []int8 `json:"btype,omitempty"`
BType []BannerAdType `json:"btype,omitempty"`
// Attribute:
// battr
@@ -92,7 +92,7 @@ type Banner struct {
// integer array
// Description:
// Blocked creative attributes. Refer to List 5.3.
BAttr []int8 `json:"battr,omitempty"`
BAttr []CreativeAttribute `json:"battr,omitempty"`
// Attribute:
// pos
@@ -100,7 +100,7 @@ type Banner struct {
// integer
// Description:
// Ad position on screen. Refer to List 5.4.
Pos *int8 `json:"pos,omitempty"`
Pos *AdPosition `json:"pos,omitempty"`
// Attribute:
// mimes
@@ -127,7 +127,7 @@ type Banner struct {
// integer array
// Description:
// Directions in which the banner may expand. Refer to List 5.5.
ExpDir []int8 `json:"expdir,omitempty"`
ExpDir []ExpandableDirection `json:"expdir,omitempty"`
// Attribute:
// api
@@ -137,7 +137,7 @@ type Banner struct {
// List of supported API frameworks for this impression. Refer to
// List 5.6. If an API is not explicitly listed, it is assumed not to be
// supported.
API []int8 `json:"api,omitempty"`
API []APIFramework `json:"api,omitempty"`
// Attribute:
// id
+13
View File
@@ -0,0 +1,13 @@
package openrtb
// 5.2 Banner Ad Types
//
// Types of ads that can be accepted by the exchange unless restricted by publisher site settings.
type BannerAdType int8
const (
BannerAdTypeXHTMLTextAd BannerAdType = 1 // XHTML Text Ad (usually mobile)
BannerAdTypeXHTMLBannerAd BannerAdType = 2 // XHTML Banner Ad. (usually mobile)
BannerAdTypeJavaScriptAd BannerAdType = 3 // JavaScript Ad; must be valid XHTML (i.e., Script Tags Included)
BannerAdTypeIframe BannerAdType = 4 // iframe
)
+4 -4
View File
@@ -185,7 +185,7 @@ type Bid struct {
// integer array
// Description:
// Set of attributes describing the creative. Refer to List 5.3.
Attr []int8 `json:"attr,omitempty"`
Attr []CreativeAttribute `json:"attr,omitempty"`
// Attribute:
// api
@@ -193,7 +193,7 @@ type Bid struct {
// integer
// Description:
// API required by the markup if applicable. Refer to List 5.6.
API int8 `json:"api,omitempty"`
API APIFramework `json:"api,omitempty"`
// Attribute:
// protocol
@@ -202,7 +202,7 @@ type Bid struct {
// Description:
// Video response protocol of the markup if applicable. Refer to
// List 5.8.
Protocol int8 `json:"protocol,omitempty"`
Protocol Protocol `json:"protocol,omitempty"`
// Attribute:
// qagmediarating
@@ -210,7 +210,7 @@ type Bid struct {
// integer
// Description:
// Creative media rating per IQG guidelines. Refer to List 5.19.
QAGMediaRating int8 `json:"qagmediarating,omitempty"`
QAGMediaRating IQGMediaRating `json:"qagmediarating,omitempty"`
// Attribute:
// language
+1 -1
View File
@@ -62,7 +62,7 @@ type BidResponse struct {
// integer
// Description:
// Reason for not bidding. Refer to List 5.24.
NBR *int8 `json:"nbr,omitempty"`
NBR *NoBidReasonCode `json:"nbr,omitempty"`
// Attribute:
// ext
+14
View File
@@ -0,0 +1,14 @@
package openrtb
// 5.14 Companion Types
//
// 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.
// Refer to www.iab.com/guidelines/digital-video-suite for more information.
type CompanionType int8
const (
CompanionTypeStatic CompanionType = 1 // Static Resource
CompanionTypeHTML CompanionType = 2 // HTML Resource
CompanionTypeIframe CompanionType = 3 // iframe Resource
)
+16
View File
@@ -0,0 +1,16 @@
package openrtb
// 5.22 Connection Type
//
// Various options for the type of device connectivity.
type ConnectionType int8
const (
ConnectionTypeUnknown ConnectionType = 0 // Unknown
ConnectionTypeEthernet ConnectionType = 1 // Ethernet
ConnectionTypeWIFI ConnectionType = 2 // WIFI
ConnectionTypeCellularNetworkUnknownGeneration ConnectionType = 3 // Cellular Network Unknown Generation
ConnectionTypeCellularNetwork2G ConnectionType = 4 // Cellular Network 2G
ConnectionTypeCellularNetwork3G ConnectionType = 5 // Cellular Network 3G
ConnectionTypeCellularNetwork4G ConnectionType = 6 // Cellular Network 4G
)
+4 -4
View File
@@ -120,7 +120,7 @@ type Content struct {
// integer
// Description:
// Production quality. Refer to List 5.13
ProdQ *int8 `json:"prodq,omitempty"`
ProdQ *ProductionQuality `json:"prodq,omitempty"`
// Attribute:
// videoquality
@@ -129,7 +129,7 @@ type Content struct {
// Description:
// Note: Deprecated in favor of prodq.
// Video quality. Refer to List 5.13.
VideoQuality int8 `json:"videoquality,omitempty"`
VideoQuality *ProductionQuality `json:"videoquality,omitempty"`
// Attribute:
// context
@@ -137,7 +137,7 @@ type Content struct {
// integer
// Description:
// Type of content (game, video, text, etc.). Refer to List 5.18.
Context int8 `json:"context,omitempty"`
Context ContentContext `json:"context,omitempty"`
// Attribute:
// contentrating
@@ -161,7 +161,7 @@ type Content struct {
// integer
// Description:
// Media rating per IQG guidelines. Refer to List 5.19.
QAGMediaRating int8 `json:"qagmediarating,omitempty"`
QAGMediaRating IQGMediaRating `json:"qagmediarating,omitempty"`
// Attribute:
// keywords
+18
View File
@@ -0,0 +1,18 @@
package openrtb
// 5.18 Content Context
//
// Various options for indicating the type of content being used or consumed by the user in which the impression will appear.
// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
// Practitioners should keep in sync with updates to the IQG values.
type ContentContext int8
const (
ContentContextVideo ContentContext = 1 // Video (i.e., video file or stream such as Internet TV broadcasts)
ContentContextGame ContentContext = 2 // Game (i.e., an interactive software game)
ContentContextMusic ContentContext = 3 // Music (i.e., audio file or stream such as Internet radio broadcasts)
ContentContextApplication ContentContext = 4 // Application (i.e., an interactive software application)
ContentContextText ContentContext = 5 // Text (i.e., primarily textual document such as a web page, eBook, or news article)
ContentContextOther ContentContext = 6 // Other (i.e., none of the other categories applies)
ContentContextUnknown ContentContext = 7 // Unknown
)
+12
View File
@@ -0,0 +1,12 @@
package openrtb
// 5.15 Content Delivery Methods
//
// Various options for the delivery of video or audio content.
type ContentDeliveryMethod int8
const (
ContentDeliveryMethodStreaming ContentDeliveryMethod = 1 // Streaming
ContentDeliveryMethodProgressive ContentDeliveryMethod = 2 // Progressive
ContentDeliveryMethodDownload ContentDeliveryMethod = 3 // Download
)
+26
View File
@@ -0,0 +1,26 @@
package openrtb
// 5.3 Creative Attributes
//
// Standard list of creative attributes that can describe an ad being served or serve as restrictions of thereof.
type CreativeAttribute int8
const (
CreativeAttributeAudioAdAutoPlay CreativeAttribute = 1 // Audio Ad (Auto-Play)
CreativeAttributeAudioAdUserInitiated CreativeAttribute = 2 // Audio Ad (User Initiated)
CreativeAttributeExpandableAutomatic CreativeAttribute = 3 // Expandable (Automatic)
CreativeAttributeExpandableUserInitiatedClick CreativeAttribute = 4 // Expandable (User Initiated - Click)
CreativeAttributeExpandableUserInitiatedRollover CreativeAttribute = 5 // Expandable (User Initiated - Rollover)
CreativeAttributeInBannerVideoAdAutoPlay CreativeAttribute = 6 // In-Banner Video Ad (Auto-Play)
CreativeAttributeInBannerVideoAdUserInitiated CreativeAttribute = 7 // In-Banner Video Ad (User Initiated)
CreativeAttributePop CreativeAttribute = 8 // Pop (e.g., Over, Under, or Upon Exit)
CreativeAttributeProvocativeOrSuggestiveImagery CreativeAttribute = 9 // Provocative or Suggestive Imagery
CreativeAttributeShakyFlashingFlickeringExtremeAnimationSmileys CreativeAttribute = 10 // Shaky, Flashing, Flickering, Extreme Animation, Smileys
CreativeAttributeSurveys CreativeAttribute = 11 // Surveys
CreativeAttributeTextOnly CreativeAttribute = 12 // Text Only
CreativeAttributeUserInteractive CreativeAttribute = 13 // User Interactive (e.g., Embedded Games)
CreativeAttributeWindowsDialogOrAlertStyle CreativeAttribute = 14 // Windows Dialog or Alert Style
CreativeAttributeHasAudioOnOffButton CreativeAttribute = 15 // Has Audio On/Off Button
CreativeAttributeAdProvidesSkipButton CreativeAttribute = 16 // Ad Provides Skip Button (e.g. VPAID-rendered skip button on pre-roll video)
CreativeAttributeAdobeFlash CreativeAttribute = 17 // Adobe Flash
)
+2 -2
View File
@@ -75,7 +75,7 @@ type Device struct {
// integer
// Description:
// The general type of device. Refer to List 5.21.
DeviceType int8 `json:"devicetype,omitempty"`
DeviceType DeviceType `json:"devicetype,omitempty"`
// Attribute:
// make
@@ -209,7 +209,7 @@ type Device struct {
// integer
// Description:
// Network connection type. Refer to List 5.22.
ConnectionType *int8 `json:"connectiontype,omitempty"`
ConnectionType *ConnectionType `json:"connectiontype,omitempty"`
// Attribute:
// ifa
+22
View File
@@ -0,0 +1,22 @@
package openrtb
// 5.21 Device Type
//
// Type of device from which the impression originated.
//
// OpenRTB version 2.2 of the specification added distinct values for Mobile and Tablet.
// It is recommended that any bidder adding support for 2.2 treat a value of 1 as an acceptable alias of 4 & 5.
//
// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
// Practitioners should keep in sync with updates to the IQG values.
type DeviceType int8
const (
DeviceTypeMobileTablet DeviceType = 1 // Mobile/Tablet (Version 2.0)
DeviceTypePersonalComputer DeviceType = 2 // Personal Computer (Version 2.0)
DeviceTypeConnectedTV DeviceType = 3 // Connected TV (Version 2.0)
DeviceTypePhone DeviceType = 4 // Phone (New for Version 2.2)
DeviceTypeTablet DeviceType = 5 // Tablet (New for Version 2.2)
DeviceTypeConnectedDevice DeviceType = 6 // Connected Device (New for Version 2.2)
DeviceTypeSetTopBox DeviceType = 7 // Set Top Box (New for Version 2.2)
)
+14
View File
@@ -0,0 +1,14 @@
package openrtb
// 5.5 Expandable Direction
//
// 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
const (
ExpandableDirectionLeft ExpandableDirection = 1 // Left
ExpandableDirectionRight ExpandableDirection = 2 // Right
ExpandableDirectionUp ExpandableDirection = 3 // Up
ExpandableDirectionDown ExpandableDirection = 4 // Down
ExpandableDirectionFullScreen ExpandableDirection = 5 // Full Screen
)
+12
View File
@@ -0,0 +1,12 @@
package openrtb
// 5.16 Feed Types
//
// Types of feeds, typically for audio.
type FeedType int8
const (
FeedTypeMusicService FeedType = 1 // Music Service
FeedTypeFMAMBroadcast FeedType = 2 // FM/AM Broadcast
FeedTypePodcast FeedType = 3 // Podcast
)
+2 -2
View File
@@ -34,7 +34,7 @@ type Geo struct {
// Description:
// Source of location data; recommended when passing
// lat/lon. Refer to List 5.20.
Type int8 `json:"type,omitempty"`
Type LocationType `json:"type,omitempty"`
// Attribute:
// accuracy
@@ -66,7 +66,7 @@ type Geo struct {
// Description:
// Service or provider used to determine geolocation from IP
// address if applicable (i.e., type = 2). Refer to List 5.23.
IPService int8 `json:"ipservice,omitempty"`
IPService IPLocationService `json:"ipservice,omitempty"`
// Attribute:
// country
+13
View File
@@ -0,0 +1,13 @@
package openrtb
// 5.23 IP Location Services
//
// Services and/or vendors used for resolving IP addresses to geolocations.
type IPLocationService int8
const (
IPLocationServiceIP2location IPLocationService = 1 // ip2location
IPLocationServiceNeustar IPLocationService = 2 // Neustar (Quova)
IPLocationServiceMaxMind IPLocationService = 3 // MaxMind
IPLocationServiceNetAcuity IPLocationService = 4 // NetAcuity (Digital Element)
)
+13
View File
@@ -0,0 +1,13 @@
package openrtb
// 5.19 IQG Media Ratings
//
// Media ratings used in describing content based on the IQG 2.1 categorization.
// Refer to www.iab.com/guidelines/digital-video-suite for more information.
type IQGMediaRating int8
const (
IQGMediaRatingAll IQGMediaRating = 1 // All Audiences
IQGMediaRatingOver12 IQGMediaRating = 2 // Everyone Over 12
IQGMediaRatingMature IQGMediaRating = 3 // Mature Audiences
)
+12
View File
@@ -0,0 +1,12 @@
package openrtb
// 5.20 Location Type
//
// Options to indicate how the geographic information was determined.
type LocationType int8
const (
LocationTypeGPSLocationServices LocationType = 1 // GPS/Location Services
LocationTypeIPAddress LocationType = 2 // IP Address
LocationTypeUserProvided LocationType = 3 // User provided (e.g., registration data)
)
+41
View File
@@ -0,0 +1,41 @@
package openrtb
// 5.25 Loss Reason Codes
//
// Options for an exchange to inform a bidder as to the reason why they did not win an impression.
type LossReasonCode int64
const (
LossReasonCodeBidWon LossReasonCode = 0 // Bid Won
LossReasonCodeInternalError LossReasonCode = 1 // Internal Error
LossReasonCodeImpressionOpportunityExpired LossReasonCode = 2 // Impression Opportunity Expired
LossReasonCodeInvalidBidResponse LossReasonCode = 3 // Invalid Bid Response
LossReasonCodeInvalidDealID LossReasonCode = 4 // Invalid Deal ID
LossReasonCodeInvalidAuctionID LossReasonCode = 5 // Invalid Auction ID
LossReasonCodeInvalidAdvertiserDomain LossReasonCode = 6 // Invalid (i.e., malformed) Advertiser Domain
LossReasonCodeMissingMarkup LossReasonCode = 7 // Missing Markup
LossReasonCodeMissingCreativeID LossReasonCode = 8 // Missing Creative ID
LossReasonCodeMissingBidPrice LossReasonCode = 9 // Missing Bid Price
LossReasonCodeMissingMinimumCreativeApprovalData LossReasonCode = 10 // Missing Minimum Creative Approval Data
LossReasonCodeBidBelowAuctionFloor LossReasonCode = 100 // Bid was Below Auction Floor
LossReasonCodeBidBelowDealFloor LossReasonCode = 101 // Bid was Below Deal Floor
LossReasonCodeLostToHigherBid LossReasonCode = 102 // Lost to Higher Bid
LossReasonCodeLostToBidForPMPDeal LossReasonCode = 103 // Lost to a Bid for a PMP Deal
LossReasonCodeBuyerSeatBlocked LossReasonCode = 104 // Buyer Seat Blocked
LossReasonCodeCreativeFilteredGeneral LossReasonCode = 200 // Creative Filtered General; reason unknown.
LossReasonCodeCreativeFilteredPendingProcessingByExchange LossReasonCode = 201 // Creative Filtered Pending processing by Exchange (e.g., approval, transcoding, etc.)
LossReasonCodeCreativeFilteredDisapprovedByExchange LossReasonCode = 202 // Creative Filtered Disapproved by Exchange
LossReasonCodeCreativeFilteredSizeNotAllowed LossReasonCode = 203 // Creative Filtered Size Not Allowed
LossReasonCodeCreativeFilteredIncorrectCreativeFormat LossReasonCode = 204 // Creative Filtered Incorrect Creative Format
LossReasonCodeCreativeFilteredAdvertiserExclusions LossReasonCode = 205 // Creative Filtered Advertiser Exclusions
LossReasonCodeCreativeFilteredAppBundleExclusions LossReasonCode = 206 // Creative Filtered App Bundle Exclusions
LossReasonCodeCreativeFilteredNotSecure LossReasonCode = 207 // Creative Filtered Not Secure
LossReasonCodeCreativeFilteredLanguageExclusions LossReasonCode = 208 // Creative Filtered Language Exclusions
LossReasonCodeCreativeFilteredCategoryExclusions LossReasonCode = 209 // Creative Filtered Category Exclusions
LossReasonCodeCreativeFilteredCreativeAttributeExclusions LossReasonCode = 210 // Creative Filtered Creative Attribute Exclusions
LossReasonCodeCreativeFilteredAdTypeExclusions LossReasonCode = 211 // Creative Filtered Ad Type Exclusions
LossReasonCodeCreativeFilteredAnimationTooLong LossReasonCode = 212 // Creative Filtered Animation Too Long
LossReasonCodeCreativeFilteredNotAllowedInPMPDeal LossReasonCode = 213 // Creative Filtered Not Allowed in PMP Deal
// ≥ 1000 Exchange specific (should be communicated to bidders a priori)
)
+2 -2
View File
@@ -43,7 +43,7 @@ type Native struct {
// List of supported API frameworks for this impression. Refer to
// List 5.6. If an API is not explicitly listed, it is assumed not to be
// supported.
API []int8 `json:"api,omitempty"`
API []APIFramework `json:"api,omitempty"`
// Attribute:
// sequence
@@ -51,7 +51,7 @@ type Native struct {
// integer array
// Description:
// Blocked creative attributes. Refer to List 5.3.
BAttr []int8 `json:"battr,omitempty"`
BAttr []CreativeAttribute `json:"battr,omitempty"`
// Attribute:
// ext
+20
View File
@@ -0,0 +1,20 @@
package openrtb
// 5.24 No-Bid Reason Codes
//
// Options for a bidder to signal the exchange as to why it did not offer a bid for the impression.
type NoBidReasonCode int8
const (
NoBidReasonCodeUnknownError NoBidReasonCode = 0 // Unknown Error
NoBidReasonCodeTechnicalError NoBidReasonCode = 1 // Technical Error
NoBidReasonCodeInvalidRequest NoBidReasonCode = 2 // Invalid Request
NoBidReasonCodeKnownWebSpider NoBidReasonCode = 3 // Known Web Spider
NoBidReasonCodeSuspectedNonHumanTraffic NoBidReasonCode = 4 // Suspected Non-Human Traffic
NoBidReasonCodeCloudDataCenterProxyIP NoBidReasonCode = 5 // Cloud, Data center, or Proxy IP
NoBidReasonCodeUnsupportedDevice NoBidReasonCode = 6 // Unsupported Device
NoBidReasonCodeBlockedPublisherOrSite NoBidReasonCode = 7 // Blocked Publisher or Site
NoBidReasonCodeUnmatchedUser NoBidReasonCode = 8 // Unmatched User
NoBidReasonCodeDailyReaderCapMet NoBidReasonCode = 9 // Daily Reader Cap Met
NoBidReasonCodeDailyDomainCapMet NoBidReasonCode = 10 // Daily Domain Cap Met
)
+12
View File
@@ -0,0 +1,12 @@
package openrtb
// 5.11 Playback Cessation Modes
//
// Various modes for when playback terminates.
type PlaybackCessationMode int8
const (
PlaybackCessationModeVideoCompletionOrTerminatedByUser PlaybackCessationMode = 1 // On Video Completion or when Terminated by User
PlaybackCessationModeLeavingViewportOrTerminatedByUser PlaybackCessationMode = 2 // On Leaving Viewport or when Terminated by User
PlaybackCessationModeLeavingViewportUntilVideoCompletionOrTerminatedByUser PlaybackCessationMode = 3 // On Leaving Viewport Continues as a Floating/Slider Unit until Video Completion or when Terminated by User
)
+15
View File
@@ -0,0 +1,15 @@
package openrtb
// 5.10 Playback Methods
//
// Various playback methods.
type PlaybackMethod int8
const (
PlaybackMethodPageLoadSoundOn PlaybackMethod = 1 // Initiates on Page Load with Sound On
PlaybackMethodPageLoadSoundOff PlaybackMethod = 2 // Initiates on Page Load with Sound Off by Default
PlaybackMethodClickSoundOn PlaybackMethod = 3 // Initiates on Click with Sound On
PlaybackMethodMouseOverSoundOn PlaybackMethod = 4 // Initiates on Mouse-Over with Sound On
PlaybackMethodEnteringViewportSoundOn PlaybackMethod = 5 // Initiates on Entering Viewport with Sound On
PlaybackMethodEnteringViewportSoundOff PlaybackMethod = 6 // Initiates on Entering Viewport with Sound Off by Default
)
+14
View File
@@ -0,0 +1,14 @@
package openrtb
// 5.13 Production Quality
//
// Options for content quality.
// These values are defined by the IAB; refer to www.iab.com/wp-content/uploads/2015/03/long-form-video-final.pdf for more information.
type ProductionQuality int8
const (
ProductionQualityUnknown ProductionQuality = 0 // Unknown
ProductionQualityProfessionallyProduced ProductionQuality = 1 // Professionally Produced
ProductionQualityProsumer ProductionQuality = 2 // Prosumer
ProductionQualityUserGenerated ProductionQuality = 3 // User Generated (UGC)
)
+19
View File
@@ -0,0 +1,19 @@
package openrtb
// 5.8 Protocols
//
// Options for the various bid response protocols that could be supported by an exchange.
type Protocol int8
const (
ProtocolVAST10 Protocol = 1 // VAST 1.0
ProtocolVAST20 Protocol = 2 // VAST 2.0
ProtocolVAST30 Protocol = 3 // VAST 3.0
ProtocolVAST10Wrapper Protocol = 4 // VAST 1.0 Wrapper
ProtocolVAST20Wrapper Protocol = 5 // VAST 2.0 Wrapper
ProtocolVAST30Wrapper Protocol = 6 // VAST 3.0 Wrapper
ProtocolVAST40 Protocol = 7 // VAST 4.0
ProtocolVAST40Wrapper Protocol = 8 // VAST 4.0 Wrapper
ProtocolDAAST10 Protocol = 9 // DAAST 1.0
ProtocolDAAST10Wrapper Protocol = 10 // DAAST 1.0 Wrapper
)
+15
View File
@@ -0,0 +1,15 @@
package openrtb
// 5.12 Start Delay
//
// Various 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.
type StartDelay int64
const (
// > 0 Mid-Roll (value indicates start delay in second)
StartDelayPreRoll StartDelay = 0 // Pre-Roll
StartDelayGenericMidRoll StartDelay = -1 // Generic Mid-Roll
StartDelayGenericPostRoll StartDelay = -2 // Generic Post-Roll
)
+12 -12
View File
@@ -47,7 +47,7 @@ type Video struct {
// Array of supported video protocols. Refer to List 5.8. At least
// one supported protocol must be specified in either the
// protocol or protocols attribute.
Protocols []int8 `json:"protocols,omitempty"`
Protocols []Protocol `json:"protocols,omitempty"`
// Attribute:
// protocol
@@ -58,7 +58,7 @@ type Video struct {
// Supported video protocol. Refer to List 5.8. At least one
// supported protocol must be specified in either the protocol
// or protocols attribute.
Protocol int8 `json:"protocol,omitempty"`
Protocol Protocol `json:"protocol,omitempty"`
// Attribute:
// w
@@ -84,7 +84,7 @@ type Video struct {
// Indicates the start delay in seconds for pre-roll, mid-roll, or
// post-roll ad placements. Refer to List 5.12 for additional
// generic values.
StartDelay *int64 `json:"startdelay,omitempty"`
StartDelay *StartDelay `json:"startdelay,omitempty"`
// Attribute:
// placement
@@ -92,7 +92,7 @@ type Video struct {
// integer
// Description:
// Placement type for the impression. Refer to List 5.9.
Placement int8 `json:"placement,omitempty"`
Placement VideoPlacementType `json:"placement,omitempty"`
// Attribute:
// linearity
@@ -101,7 +101,7 @@ type Video struct {
// Description:
// Indicates if the impression must be linear, nonlinear, etc. If
// none specified, assume all are allowed. Refer to List 5.7.
Linearity int8 `json:"linearity,omitempty"`
Linearity VideoLinearity `json:"linearity,omitempty"`
// Attribute:
// skip
@@ -149,7 +149,7 @@ type Video struct {
// integer array
// Description:
// Blocked creative attributes. Refer to List 5.3.
BAttr []int8 `json:"battr,omitempty"`
BAttr []CreativeAttribute `json:"battr,omitempty"`
// Attribute:
// maxextended
@@ -199,7 +199,7 @@ type Video struct {
// be converted to an integer in a future version of the
// specification. It is strongly advised to use only the first
// element of this array in preparation for this change.
PlaybackMethod []int8 `json:"playbackmethod,omitempty"`
PlaybackMethod []PlaybackMethod `json:"playbackmethod,omitempty"`
// Attribute:
// playbackend
@@ -207,7 +207,7 @@ type Video struct {
// integer
// Description:
// The event that causes playback to end. Refer to List 5.11.
PlaybackEnd int8 `json:"playbackend,omitempty"`
PlaybackEnd PlaybackCessationMode `json:"playbackend,omitempty"`
// Attribute:
// delivery
@@ -216,7 +216,7 @@ type Video struct {
// Description:
// Supported delivery methods (e.g., streaming, progressive). If
// none specified, assume all are supported. Refer to List 5.15.
Delivery []int8 `json:"delivery,omitempty"`
Delivery []ContentDeliveryMethod `json:"delivery,omitempty"`
// Attribute:
// pos
@@ -224,7 +224,7 @@ type Video struct {
// integer
// Description:
// Ad position on screen. Refer to List 5.4.
Pos *int8 `json:"pos,omitempty"`
Pos *AdPosition `json:"pos,omitempty"`
// Attribute:
// companionad
@@ -243,7 +243,7 @@ type Video struct {
// List of supported API frameworks for this impression. Refer to
// List 5.6. If an API is not explicitly listed, it is assumed not to be
// supported.
API []int8 `json:"api,omitempty"`
API []APIFramework `json:"api,omitempty"`
// Attribute:
// companiontype
@@ -255,7 +255,7 @@ type Video struct {
// the companionad array. If one of these banners will be
// rendered as an end-card, this can be specified using the vcm
// attribute with the particular banner (Section 3.2.6).
CompanionType []int8 `json:"companiontype,omitempty"`
CompanionType []CompanionType `json:"companiontype,omitempty"`
// Attribute:
// ext
+16
View File
@@ -0,0 +1,16 @@
package openrtb
// 5.7 Video Linearity
//
// Options for video linearity.
// “In-stream” or “linear” video refers to preroll, post-roll, or mid-roll video ads where the user is forced to watch ad in order to see the video content.
// “Overlay” or “non-linear” refer to ads that are shown on top of the video content.
//
// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
// Practitioners should keep in sync with updates to the IQG values.
type VideoLinearity int8
const (
VideoLinearityLinearInStream VideoLinearity = 1 // Linear / In-Stream
VideoLinearityNonLinearOverlay VideoLinearity = 2 // Non-Linear / Overlay
)
+14
View File
@@ -0,0 +1,14 @@
package openrtb
// 5.9 Video Placement Types
//
// Various types of video placements derived largely from the IAB Digital Video Guidelines.
type VideoPlacementType int8
const (
VideoPlacementTypeInStream VideoPlacementType = 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).
VideoPlacementTypeInBanner VideoPlacementType = 2 // In-Banner. Exists within a web banner that leverages the banner space to deliver a video experience asopposed to another static or rich media format. The format relies on the existence of displayad inventory on the page for its delivery.
VideoPlacementTypeInArticle VideoPlacementType = 3 // In-Article. Loads and plays dynamically between paragraphs of editorial content; existing as a standalonebranded message.
VideoPlacementTypeInFeed VideoPlacementType = 4 // In-Feed. Found in content, social, or product feeds.
VideoPlacementTypeInterstitialSliderFloating VideoPlacementType = 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). Note that a full-screen interstitial (e.g., in mobile) can bedistinguished from a floating/slider unit by the imp.instl field.
)
+14
View File
@@ -0,0 +1,14 @@
package openrtb
// 5.17 Volume Normalization Modes
//
// Types of volume normalization modes, typically for audio.
type VolumeNormalizationMode int8
const (
VolumeNormalizationModeNone VolumeNormalizationMode = 0 // None
VolumeNormalizationModeAdVolumeAverageNormalizedToContent VolumeNormalizationMode = 1 // Ad Volume Average Normalized to Content
VolumeNormalizationModeAdVolumePeakNormalizedToContent VolumeNormalizationMode = 2 // Ad Volume Peak Normalized to Content
VolumeNormalizationModeAdLoudnessNormalizedToContent VolumeNormalizationMode = 3 // Ad Loudness Normalized to Content
VolumeNormalizationModeCustomVolumeNormalizationMode VolumeNormalizationMode = 4 // Custom Volume Normalization
)