Nimbus Android SDK

//sdk/com.adsbynimbus.openrtb.request/BidRequest

BidRequest

@Serializable

class BidRequest(var imp: Array<Impression> = emptyArray(), var app: App? = null, var device: Device? = null, var format: Format = Format(0, 0), var user: User? = null, var test: Byte = 0, var tmax: Int = 500, var badv: Array<String>? = null, var source: Source? = null, var regs: Regs? = null, var customSignals: Signals? = null, val ext: MutableMap<String, String> = mutableMapOf())

The top-level bid request object contains a globally unique bid request or auction ID.

This id attribute is required as is at least one impression object (Section 3.2.4). Other attributes in this top-level object establish rules and restrictions that apply to all impressions being offered. There are also several subordinate objects that provide detailed data to potential buyers. Among these are the Site and App objects, which describe the type of published media in which the impression(s) appear. These objects are highly recommended, but only one applies to a given bid request depending on whether the media is browser-based web content or a non-browser application, respectively.

OpenRTB Section 3.2.1

Constructors

BidRequest constructor(imp: Array<Impression> = emptyArray(), app: App? = null, device: Device? = null, format: Format = Format(0, 0), user: User? = null, test: Byte = 0, tmax: Int = 500, badv: Array<String>? = null, source: Source? = null, regs: Regs? = null, customSignals: Signals? = null, ext: MutableMap<String, String> = mutableMapOf())

Types

Name Summary
Companion object Companion

Properties

Name Summary
app @JvmField
var app: App?
Details about the publisher’s app (i.e., non-browser applications).
badv @JvmField
var badv: Array<String>?
Block list of advertisers by their domains (e.g., "ford.com").
customSignals @JvmField
var customSignals: Signals?
Custom signals for this request
device @JvmField
var device: Device?
Details about the user’s device to which the impression will be delivered.
ext @JvmField
val ext: MutableMap<String, String>
Placeholder for exchange-specific extensions to OpenRTB.
format @JvmField
var format: Format
A format object representing the width and height of the device. This is not part of the spec, adding this here for convenience allows height and width to be passed without the video/banner object to backwards support the GET
imp @JvmField
var imp: Array<Impression>
Array of impression objects representing the impressions offered. Only 1 impression object is supported.
isRewardedVideo val BidRequest.isRewardedVideo: Boolean
regs @JvmField
var regs: Regs?
A Regs object that specifies any industry, legal, or governmental regulations in force for this request.
session_id var session_id: String
Any unique string value to identify the session.
source @JvmField
var source: Source?
A Source object that provides data about the inventory source and which entity makes the final decision.
test @JvmField
var test: Byte
Indicator of test mode in which auctions are not billable (0: live, 1: test)
tmax @JvmField
var tmax: Int
Maximum time in milliseconds the exchange allows for bids to be received including Internet latency to avoid timeout. This value supersedes any a priori guidance from the exchange. If this value is omitted Nimbus will default to 500.
user @JvmField
var user: User?
Details about the human user of the device; the advertising audience.

Functions

Name Summary
toJson @JvmStatic
@JvmOverloads
fun BidRequest.toJson(jsonSerializer: Json = lenientSerializer): String
Encodes a BidRequest to a Json string using the built in serializer