Package com.google.openrtb.snippet
Enum OpenRtbMacros
- java.lang.Object
-
- java.lang.Enum<OpenRtbMacros>
-
- com.google.openrtb.snippet.OpenRtbMacros
-
- All Implemented Interfaces:
SnippetMacroType,Serializable,Comparable<OpenRtbMacros>
public enum OpenRtbMacros extends Enum<OpenRtbMacros> implements SnippetMacroType
OpenRTB 4.6: Standard OpenRTB macros.All
Bidproperties of type String can use macros. Important notes about macro expansion:- All properties can safely use macros that refer to values from the request:
AUCTION_ID, AUCTION_CURRENCY, AUCTION_IMP_ID, AUCTION_SEAT_ID. - All properties can also safely use macros that refer to properties that have
non-String type, so they cannot contain macros:
AUCTION_PRICE. - Properties are processed in two stages. The first stage resolves properties that can
contain macros AND feed other macros;
adid => AUCTION_AD_ID, id => AUCTION_BID_IDare currently the only items in this group. In the second stage, we process the properties that support macros but don't provide values for any macro, which are:adm,cid,crid,dealid,iurl,nurl. - Notice that {code impid} is expected to be set to
AUCTION_IMP_ID; you can use the macro or set the value manually but in the latter case they should match. All other properties that use the macroAUCTION_IMP_IDwill resolve that to the bid's {code Imp.id}, not to the bid's own {code impid} property.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUCTION_AD_IDID of the ad markup the bid wishes to serve; from "adid" attribute.AUCTION_BID_IDID of the bid; from "bidid" attribute.AUCTION_CURRENCYThe currency used in the bid (explicit or implied); for confirmation only.AUCTION_IDID of the bid request; from "id" attribute.AUCTION_IMP_IDID of the impression just won; from "impid" attribute.AUCTION_LOSSLoss reason codes, for loss notices.AUCTION_MBRMarket Bid Ratio, defined as: (clearance price / bid price).AUCTION_PRICESettlement price using the same currency and units as the bid.AUCTION_SEAT_IDID of the bidder's seat for whom the bid was made.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringkey()Returns the key for this macro (string that will be substituted when the macro is processed).static OpenRtbMacrosvalueOf(String name)Returns the enum constant of this type with the specified name.static OpenRtbMacrosvalueOfKey(String key)static OpenRtbMacros[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUCTION_AD_ID
public static final OpenRtbMacros AUCTION_AD_ID
ID of the ad markup the bid wishes to serve; from "adid" attribute.
-
AUCTION_BID_ID
public static final OpenRtbMacros AUCTION_BID_ID
ID of the bid; from "bidid" attribute.
-
AUCTION_CURRENCY
public static final OpenRtbMacros AUCTION_CURRENCY
The currency used in the bid (explicit or implied); for confirmation only.WARNING: May not be supported by all exchanges.
-
AUCTION_ID
public static final OpenRtbMacros AUCTION_ID
ID of the bid request; from "id" attribute.
-
AUCTION_IMP_ID
public static final OpenRtbMacros AUCTION_IMP_ID
ID of the impression just won; from "impid" attribute.WARNING: May not be supported by all exchanges.
-
AUCTION_PRICE
public static final OpenRtbMacros AUCTION_PRICE
Settlement price using the same currency and units as the bid.WARNING: May not be supported by all exchanges.
-
AUCTION_SEAT_ID
public static final OpenRtbMacros AUCTION_SEAT_ID
ID of the bidder's seat for whom the bid was made.
-
AUCTION_LOSS
public static final OpenRtbMacros AUCTION_LOSS
Loss reason codes, for loss notices.WARNING: May not be supported by all exchanges.
-
AUCTION_MBR
public static final OpenRtbMacros AUCTION_MBR
Market Bid Ratio, defined as: (clearance price / bid price).WARNING: May not be supported by all exchanges.
-
-
Method Detail
-
values
public static OpenRtbMacros[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OpenRtbMacros c : OpenRtbMacros.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OpenRtbMacros valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
key
public final String key()
Returns the key for this macro (string that will be substituted when the macro is processed).- Specified by:
keyin interfaceSnippetMacroType
-
valueOfKey
public static OpenRtbMacros valueOfKey(String key)
- Returns:
OpenRtbMacrosinstance by key name
-
-