Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.prebid.server.functional.model.request.auction

import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString
import org.prebid.server.functional.util.PBSUtils

@EqualsAndHashCode
@ToString(includeNames = true, ignoreNulls = true)
class Device {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package org.prebid.server.functional.model.request.auction

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonValue
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString

@EqualsAndHashCode
@ToString
class DeviceExt {

Atts atts
String cdep
@JsonProperty("ifa_type")
String ifaType

enum Atts {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,10 @@ class Imp {
(audio ? AUDIO : null)
].findAll { it }
}

@JsonIgnore
Object getSingleMediaTypeData() {
return banner ?: video ?: nativeObj ?: audio
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class Prebid {
List<String> profileNames
@JsonProperty("kvps")
Map<String, String> keyValuePairs
String outputFormat
String outputModule

static class Channel {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.prebid.server.functional.model.request.auction

import inet.ipaddr.IPAddressString

enum PublicCountryIp {

USA_IP("209.232.44.21", "d646:2414:17b2:f371:9b62:f176:b4c0:51cd"),
Expand All @@ -14,4 +16,8 @@ enum PublicCountryIp {
this.v4 = v4
this.v6 = ipV6
}

String getMaskedIPv6() {
new IPAddressString(this.v6).toAddress().mask(new IPAddressString("::/64").toAddress().getNetworkMask()).toCanonicalString()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Regs {

Integer coppa
Integer gdpr
Integer gpc
String usPrivacy
String gpp
List<Integer> gppSid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package org.prebid.server.functional.model.request.auction

import com.fasterxml.jackson.annotation.JsonProperty
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString
import org.prebid.server.functional.model.response.auction.SeatBid

@EqualsAndHashCode
@ToString(includeNames = true, ignoreNulls = true)
class StoredAuctionResponse {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
package org.prebid.server.functional.model.request.get

import com.fasterxml.jackson.annotation.JsonProperty
import org.prebid.server.functional.model.request.amp.ConsentType
import org.prebid.server.functional.model.request.auction.DebugCondition
import org.prebid.server.functional.model.request.auction.DeviceType
import org.prebid.server.functional.model.request.auction.VideoPlacementSubtypes
import org.prebid.server.functional.model.request.auction.VideoPlcmtSubtype
import org.prebid.server.functional.util.PBSUtils

import static org.prebid.server.functional.model.request.auction.DebugCondition.ENABLED

class GeneralGetRequest {

@JsonProperty("srid")
String storedRequestId

@JsonProperty("tag_id")
String storedRequestIdLegacy

@JsonProperty("pubid")
String accountId

@JsonProperty("account")
String accountIdLegacy

@JsonProperty("tmax")
Integer timeoutMax

DebugCondition debug

@JsonProperty("of")
String outputFormat

@JsonProperty("om")
String outputModule

@JsonProperty("rprof")
List<String> requestProfiles

@JsonProperty("iprof")
List<String> impProfiles

@JsonProperty("sarid")
String storedAuctionResponseId

List<String> mimes

@JsonProperty("w")
Integer width

@JsonProperty("h")
Integer height

@JsonProperty("ow")
Integer originalWidth

@JsonProperty("oh")
Integer originalHeight

Object sizes

@JsonProperty("ms")
Object sizesLegacy

String slot

@JsonProperty("mindur")
Integer minDuration

@JsonProperty("maxdur")
Integer maxDuration

List<Integer> api

@JsonProperty("battr")
List<Integer> blockAttributes

List<Integer> delivery

Integer linearity

@JsonProperty("minbr")
Integer minBitrate

@JsonProperty("maxbr")
Integer maxBitrate

@JsonProperty("maxex")
Integer maxExtended

@JsonProperty("maxseq")
Integer maxSequence

@JsonProperty("mincpms")
Integer minCpmPerSec

@JsonProperty("poddur")
Integer podDuration

@JsonProperty("podid")
Integer podId

@JsonProperty("podseq")
Integer podSequence

@JsonProperty("proto")
List<Integer> protocols

@JsonProperty("rqddurs")
List<Integer> requiredDurations

@JsonProperty("seq")
Integer sequence

@JsonProperty("slotinpod")
Integer slotInPod

@JsonProperty("startdelay")
Integer startDelay

Integer skip

@JsonProperty("skipafter")
Integer skipAfter

@JsonProperty("skipmin")
Integer skipMin

@JsonProperty("pos")
Integer position

@JsonProperty("stitched")
Integer stitched

Integer feed

@JsonProperty("nvol")
Integer normalizedVolume

VideoPlacementSubtypes placement

@JsonProperty("plcmt")
VideoPlcmtSubtype placementSubtype

@JsonProperty("playbackend")
Integer playbackEnd

@JsonProperty("playbackmethod")
List<Integer> playbackMethods

@JsonProperty("boxingallowed")
Integer boxingAllowed

@JsonProperty("btype")
List<Integer> bannerTypes

@JsonProperty("expdir")
List<Integer> expandableDirections

@JsonProperty("topframe")
Integer topFrame

String targeting

@JsonProperty("tcfc")
String consent

@JsonProperty("gdpr_consent")
String consentLegacy

@JsonProperty("consent_string")
String consentStringLegacy

Integer gdpr

@JsonProperty("privacy")
Integer gdprPrivacy

@JsonProperty("gdpr_applies")
String gdprApplies

@JsonProperty("usp")
String usPrivacy

@JsonProperty("addtl_consent")
String additionalConsent

@JsonProperty("consent_type")
ConsentType consentType

@JsonProperty("gpp_sid")
List<Integer> gppSid

Integer coppa

@JsonProperty("gpc")
Integer globalPrivacyControl

@JsonProperty("dnt")
Integer doNotTrack

@JsonProperty("lmt")
Integer limitAdTracking

@JsonProperty("bcat")
List<String> blockedCategories

@JsonProperty("badv")
List<String> blockedAdvertisers

String page

@JsonProperty("bundle")
String appBundle

@JsonProperty("name")
String appName

@JsonProperty("storeurl")
String storeUrl

@JsonProperty("cgenre")
String contentGenre

@JsonProperty("clang")
String contentLanguage

@JsonProperty("crating")
String contentRating

@JsonProperty("ccat")
Integer contentCategory

@JsonProperty("ccattax")
List<Integer> contentCategoryTaxonomy

@JsonProperty("cseries")
String contentSeries

@JsonProperty("rss_feed")
String contentSeriesAlias

@JsonProperty("ctitle")
String contentTitle

@JsonProperty("curl")
String contentUrl

@JsonProperty("clivestream")
String contentLivestream

@JsonProperty("ip")
String deviceIp

@JsonProperty("ua")
String deviceUa

@JsonProperty("dtype")
DeviceType deviceType

@JsonProperty("ifa")
String deviceIfa

@JsonProperty("ifat")
String deviceIfaType

String unknown

@JsonProperty("unknown_alias")
String unknownAlias

static GeneralGetRequest getDefault(String storedRequestId = PBSUtils.randomNumber) {
new GeneralGetRequest(storedRequestId: storedRequestId, debug: ENABLED)
}

String resolveStoredRequestId() {
storedRequestId ?: storedRequestIdLegacy
}

String resolveAccountId() {
accountId ?: accountIdLegacy
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.prebid.server.functional.model.response.get

import groovy.transform.ToString
import org.prebid.server.functional.model.response.amp.AmpResponseExt

@ToString(includeNames = true, ignoreNulls = true)
class GeneralGetResponse {

Map<String, String> targeting
GeneralGetResponseExt ext
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.prebid.server.functional.model.response.get

import groovy.transform.ToString
import org.prebid.server.functional.model.response.BidderError
import org.prebid.server.functional.model.response.Debug
import org.prebid.server.functional.model.response.auction.ErrorType

@ToString(includeNames = true, ignoreNulls = true)
class GeneralGetResponseExt {

Debug debug
Map<ErrorType, List<BidderError>> errors
Map<ErrorType, List<BidderError>> warnings
}
Loading
Loading