openrtb2: extract AdInsertion enum from Bid.ssai prop

This commit is contained in:
mxmCherry
2022-05-19 14:08:58 +03:00
parent 01ddfd5217
commit 576d9f1aea
3 changed files with 24 additions and 6 deletions
+15
View File
@@ -0,0 +1,15 @@
package openrtb2
// SSAI 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.
//
// Originates from Imp.ssai property, not a separately-defined enum.
type AdInsertion int8
const (
AdInsertUnknown AdInsertion = 0 // status unknown
AdInsertClient AdInsertion = 1 // all client-side (i.e., not server-side)
AdInsertServerStitchClientTrack AdInsertion = 2 // assets stitched server-side but tracking pixels fired client-side
AdInsertServer AdInsertion = 3 // all server-side
)
+1 -1
View File
@@ -188,7 +188,7 @@ type Imp struct {
// 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"`
SSAI AdInsertion `json:"ssai,omitempty"`
// Attribute:
// exp
+8 -5
View File
@@ -1,11 +1,14 @@
package openrtb2
// MarkupType defines enum for creative markup type (Bid.mtype property).
// MarkupType defines the type of the creative markup so that it can properly be
// associated with the right sub-object of the BidRequest.Imp.
//
// Originates from Bid.mtype property, not a separately-defined enum.
type MarkupType int8
const (
MarkupBanner = 1
MarkupVideo = 2
MarkupAudio = 3
MarkupNative = 4
MarkupBanner MarkupType = 1
MarkupVideo MarkupType = 2
MarkupAudio MarkupType = 3
MarkupNative MarkupType = 4
)