forked from mxmCherry/openrtb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathno_bid_reason_code.go
33 lines (29 loc) · 1.41 KB
/
no_bid_reason_code.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package openrtb2
// 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
)
// Ptr returns pointer to own value.
func (c NoBidReasonCode) Ptr() *NoBidReasonCode {
return &c
}
// Val safely dereferences pointer, returning default value (NoBidReasonCodeUnknownError) for nil.
func (c *NoBidReasonCode) Val() NoBidReasonCode {
if c == nil {
return NoBidReasonCodeUnknownError
}
return *c
}