github.com/prebid/prebid-server@v0.275.0/openrtb_ext/imp.go (about) 1 package openrtb_ext 2 3 import ( 4 "encoding/json" 5 ) 6 7 // AuctionEnvironmentType is a Google Privacy Sandbox flag indicating where the auction may take place 8 type AuctionEnvironmentType int8 9 10 const ( 11 // 0 Standard server-side auction 12 ServerSideAuction AuctionEnvironmentType = 0 13 // 1 On-device interest group auction (FLEDGE) 14 OnDeviceIGAuctionFledge AuctionEnvironmentType = 1 15 // 2 Server-side with interest group simulation 16 ServerSideWithIGSimulation AuctionEnvironmentType = 2 17 ) 18 19 // IsRewardedInventoryKey is the json key for ExtImpPrebid.IsRewardedInventory 20 const IsRewardedInventoryKey = "is_rewarded_inventory" 21 22 // OptionsKey is the json key for ExtImpPrebid.Options 23 const OptionsKey = "options" 24 25 // ExtImpPrebid defines the contract for bidrequest.imp[i].ext.prebid 26 type ExtImpPrebid struct { 27 // StoredRequest specifies which stored impression to use, if any. 28 StoredRequest *ExtStoredRequest `json:"storedrequest,omitempty"` 29 30 // StoredResponse specifies which stored impression to use, if any. 31 StoredAuctionResponse *ExtStoredAuctionResponse `json:"storedauctionresponse,omitempty"` 32 33 // Stored bid response determines if imp has stored bid response for bidder 34 StoredBidResponse []ExtStoredBidResponse `json:"storedbidresponse,omitempty"` 35 36 // IsRewardedInventory is a signal intended for video impressions. Must be 0 or 1. 37 IsRewardedInventory *int8 `json:"is_rewarded_inventory,omitempty"` 38 39 // Bidder is the preferred approach for providing parameters to be interpreted by the bidder's adapter. 40 Bidder map[string]json.RawMessage `json:"bidder,omitempty"` 41 42 Options *Options `json:"options,omitempty"` 43 44 Passthrough json.RawMessage `json:"passthrough,omitempty"` 45 46 Floors *ExtImpPrebidFloors `json:"floors,omitempty"` 47 } 48 49 type ExtImpDataAdServer struct { 50 Name string `json:"name"` 51 AdSlot string `json:"adslot"` 52 } 53 54 type ExtImpData struct { 55 PbAdslot string `json:"pbadslot,omitempty"` 56 AdServer *ExtImpDataAdServer `json:"adserver,omitempty"` 57 } 58 59 type ExtImpPrebidFloors struct { 60 FloorRule string `json:"floorrule,omitempty"` 61 FloorRuleValue float64 `json:"floorrulevalue,omitempty"` 62 FloorValue float64 `json:"floorvalue,omitempty"` 63 FloorMin float64 `json:"floormin,omitempty"` 64 FloorMinCur string `json:"floorminCur,omitempty"` 65 } 66 67 // ExtStoredRequest defines the contract for bidrequest.imp[i].ext.prebid.storedrequest 68 type ExtStoredRequest struct { 69 ID string `json:"id"` 70 } 71 72 // ExtStoredAuctionResponse defines the contract for bidrequest.imp[i].ext.prebid.storedauctionresponse 73 type ExtStoredAuctionResponse struct { 74 ID string `json:"id"` 75 } 76 77 // ExtStoredBidResponse defines the contract for bidrequest.imp[i].ext.prebid.storedbidresponse 78 type ExtStoredBidResponse struct { 79 ID string `json:"id"` 80 Bidder string `json:"bidder"` 81 ReplaceImpId *bool `json:"replaceimpid"` 82 } 83 84 type Options struct { 85 EchoVideoAttrs bool `json:"echovideoattrs"` 86 }