
open_rtb.BidThrift Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package open_rtb;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* 4.3.3 Bid Object
* For each bid, the “nurl” attribute contains the win notice URL. If the bidder wins the impression, the exchange calls this notice URL a) to inform the bidder of the win and b) to convey certain information using substitution macros (see Section 4.6 Substitution Macros).
* The “adomain” attribute can be used to check advertiser block list compliance. The “iurl” attribute can provide a link to an image that is representative of the campaign’s content (irrespective of whether the campaign may have multiple creatives). This enables human review for spotting inappropriate content. The “cid” attribute can be used to block ads that were previously identified as inappropriate; essentially a safety net beyond the block lists. The “crid” attribute can be helpful in reporting creative issues back to bidders. Finally, the “attr” array indicates the creative attributes that describe the ad to be served.
* BEST PRACTICE: Substitution macros may allow a bidder to use a static notice URL for all of its bids. Thus, exchanges should offer the option of a default notice URL that can be pre- configured per bidder to reduce redundant data transfer.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-6-3")
public class BidThrift implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BidThrift");
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField IMPID_FIELD_DESC = new org.apache.thrift.protocol.TField("impid", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("price", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
private static final org.apache.thrift.protocol.TField ADID_FIELD_DESC = new org.apache.thrift.protocol.TField("adid", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField NURL_FIELD_DESC = new org.apache.thrift.protocol.TField("nurl", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField ADM_FIELD_DESC = new org.apache.thrift.protocol.TField("adm", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField ADOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("adomain", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.protocol.TField LURL_FIELD_DESC = new org.apache.thrift.protocol.TField("lurl", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.protocol.TField CID_FIELD_DESC = new org.apache.thrift.protocol.TField("cid", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.protocol.TField CRID_FIELD_DESC = new org.apache.thrift.protocol.TField("crid", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField ATTR_FIELD_DESC = new org.apache.thrift.protocol.TField("attr", org.apache.thrift.protocol.TType.LIST, (short)11);
private static final org.apache.thrift.protocol.TField DEALID_FIELD_DESC = new org.apache.thrift.protocol.TField("dealid", org.apache.thrift.protocol.TType.STRING, (short)12);
private static final org.apache.thrift.protocol.TField W_FIELD_DESC = new org.apache.thrift.protocol.TField("w", org.apache.thrift.protocol.TType.I32, (short)13);
private static final org.apache.thrift.protocol.TField H_FIELD_DESC = new org.apache.thrift.protocol.TField("h", org.apache.thrift.protocol.TType.I32, (short)14);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new BidThriftStandardSchemeFactory());
schemes.put(TupleScheme.class, new BidThriftTupleSchemeFactory());
}
/**
* ID for the bid object chosen by the bidder for tracking and debugging purposes. Useful when multiple bids are submitted for a single impression for a given seat.
*/
public String id; // optional
/**
* ID of the impression object to which this bid applies.
*/
public String impid; // optional
/**
* Bid price in CPM. WARNING/Best Practice Note: Although this value is a float, OpenRTB strongly suggests using integer math for accounting to avoid rounding errors.
*/
public double price; // optional
/**
* ID that references the ad to be served if the bid wins.
*/
public String adid; // optional
/**
* Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL.
*/
public String nurl; // optional
/**
* Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object.
*/
public String adm; // optional
/**
* Advertiser’s primary or top-level domain for advertiser checking. This can be a list of domains if there is a rotating creative. However, exchanges may mandate that only one landing domain is allowed.
*/
public List adomain; // optional
/**
* Sample image URL (without cache busting) for content checking.
*/
public String lurl; // optional
/**
* Campaign ID or similar that appears within the ad markup.
*/
public String cid; // optional
/**
* Creative ID for reporting content issues or defects. This could also be used as a reference to a creative ID that is posted with an exchange.
*/
public String crid; // optional
/**
* Array of creative attributes. See Table 6.3 Creative Attributes.
*/
public List attr; // optional
/**
* A unique identifier for the direct deal associated with the bid. If the bid is associated and in response to a dealid in the request object it is _required_ in the response object.
*/
public String dealid; // optional
/**
* Width of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin optional fields it is recommended that the response bid contains this field to signal the size of ad chosen.
*/
public int w; // optional
/**
* Height of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin optional fields it is recommended that the response bid contains this field to signal the size of ad chosen.
*/
public int h; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* ID for the bid object chosen by the bidder for tracking and debugging purposes. Useful when multiple bids are submitted for a single impression for a given seat.
*/
ID((short)1, "id"),
/**
* ID of the impression object to which this bid applies.
*/
IMPID((short)2, "impid"),
/**
* Bid price in CPM. WARNING/Best Practice Note: Although this value is a float, OpenRTB strongly suggests using integer math for accounting to avoid rounding errors.
*/
PRICE((short)3, "price"),
/**
* ID that references the ad to be served if the bid wins.
*/
ADID((short)4, "adid"),
/**
* Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL.
*/
NURL((short)5, "nurl"),
/**
* Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object.
*/
ADM((short)6, "adm"),
/**
* Advertiser’s primary or top-level domain for advertiser checking. This can be a list of domains if there is a rotating creative. However, exchanges may mandate that only one landing domain is allowed.
*/
ADOMAIN((short)7, "adomain"),
/**
* Sample image URL (without cache busting) for content checking.
*/
LURL((short)8, "lurl"),
/**
* Campaign ID or similar that appears within the ad markup.
*/
CID((short)9, "cid"),
/**
* Creative ID for reporting content issues or defects. This could also be used as a reference to a creative ID that is posted with an exchange.
*/
CRID((short)10, "crid"),
/**
* Array of creative attributes. See Table 6.3 Creative Attributes.
*/
ATTR((short)11, "attr"),
/**
* A unique identifier for the direct deal associated with the bid. If the bid is associated and in response to a dealid in the request object it is _required_ in the response object.
*/
DEALID((short)12, "dealid"),
/**
* Width of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin optional fields it is recommended that the response bid contains this field to signal the size of ad chosen.
*/
W((short)13, "w"),
/**
* Height of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin optional fields it is recommended that the response bid contains this field to signal the size of ad chosen.
*/
H((short)14, "h");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ID
return ID;
case 2: // IMPID
return IMPID;
case 3: // PRICE
return PRICE;
case 4: // ADID
return ADID;
case 5: // NURL
return NURL;
case 6: // ADM
return ADM;
case 7: // ADOMAIN
return ADOMAIN;
case 8: // LURL
return LURL;
case 9: // CID
return CID;
case 10: // CRID
return CRID;
case 11: // ATTR
return ATTR;
case 12: // DEALID
return DEALID;
case 13: // W
return W;
case 14: // H
return H;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __PRICE_ISSET_ID = 0;
private static final int __W_ISSET_ID = 1;
private static final int __H_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ID,_Fields.IMPID,_Fields.PRICE,_Fields.ADID,_Fields.NURL,_Fields.ADM,_Fields.ADOMAIN,_Fields.LURL,_Fields.CID,_Fields.CRID,_Fields.ATTR,_Fields.DEALID,_Fields.W,_Fields.H};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.IMPID, new org.apache.thrift.meta_data.FieldMetaData("impid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PRICE, new org.apache.thrift.meta_data.FieldMetaData("price", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.ADID, new org.apache.thrift.meta_data.FieldMetaData("adid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NURL, new org.apache.thrift.meta_data.FieldMetaData("nurl", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ADM, new org.apache.thrift.meta_data.FieldMetaData("adm", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ADOMAIN, new org.apache.thrift.meta_data.FieldMetaData("adomain", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.LURL, new org.apache.thrift.meta_data.FieldMetaData("lurl", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CID, new org.apache.thrift.meta_data.FieldMetaData("cid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CRID, new org.apache.thrift.meta_data.FieldMetaData("crid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ATTR, new org.apache.thrift.meta_data.FieldMetaData("attr", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))));
tmpMap.put(_Fields.DEALID, new org.apache.thrift.meta_data.FieldMetaData("dealid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.W, new org.apache.thrift.meta_data.FieldMetaData("w", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.H, new org.apache.thrift.meta_data.FieldMetaData("h", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BidThrift.class, metaDataMap);
}
public BidThrift() {
this.id = "";
this.impid = "";
this.price = 0;
this.adid = "";
this.nurl = "";
this.adm = "";
this.lurl = "";
this.cid = "";
this.crid = "";
this.dealid = "";
this.w = 0;
this.h = 0;
}
/**
* Performs a deep copy on other.
*/
public BidThrift(BidThrift other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetId()) {
this.id = other.id;
}
if (other.isSetImpid()) {
this.impid = other.impid;
}
this.price = other.price;
if (other.isSetAdid()) {
this.adid = other.adid;
}
if (other.isSetNurl()) {
this.nurl = other.nurl;
}
if (other.isSetAdm()) {
this.adm = other.adm;
}
if (other.isSetAdomain()) {
List __this__adomain = new ArrayList(other.adomain);
this.adomain = __this__adomain;
}
if (other.isSetLurl()) {
this.lurl = other.lurl;
}
if (other.isSetCid()) {
this.cid = other.cid;
}
if (other.isSetCrid()) {
this.crid = other.crid;
}
if (other.isSetAttr()) {
List __this__attr = new ArrayList(other.attr);
this.attr = __this__attr;
}
if (other.isSetDealid()) {
this.dealid = other.dealid;
}
this.w = other.w;
this.h = other.h;
}
public BidThrift deepCopy() {
return new BidThrift(this);
}
@Override
public void clear() {
this.id = "";
this.impid = "";
this.price = 0;
this.adid = "";
this.nurl = "";
this.adm = "";
this.adomain = null;
this.lurl = "";
this.cid = "";
this.crid = "";
this.attr = null;
this.dealid = "";
this.w = 0;
this.h = 0;
}
/**
* ID for the bid object chosen by the bidder for tracking and debugging purposes. Useful when multiple bids are submitted for a single impression for a given seat.
*/
public String getId() {
return this.id;
}
/**
* ID for the bid object chosen by the bidder for tracking and debugging purposes. Useful when multiple bids are submitted for a single impression for a given seat.
*/
public BidThrift setId(String id) {
this.id = id;
return this;
}
public void unsetId() {
this.id = null;
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return this.id != null;
}
public void setIdIsSet(boolean value) {
if (!value) {
this.id = null;
}
}
/**
* ID of the impression object to which this bid applies.
*/
public String getImpid() {
return this.impid;
}
/**
* ID of the impression object to which this bid applies.
*/
public BidThrift setImpid(String impid) {
this.impid = impid;
return this;
}
public void unsetImpid() {
this.impid = null;
}
/** Returns true if field impid is set (has been assigned a value) and false otherwise */
public boolean isSetImpid() {
return this.impid != null;
}
public void setImpidIsSet(boolean value) {
if (!value) {
this.impid = null;
}
}
/**
* Bid price in CPM. WARNING/Best Practice Note: Although this value is a float, OpenRTB strongly suggests using integer math for accounting to avoid rounding errors.
*/
public double getPrice() {
return this.price;
}
/**
* Bid price in CPM. WARNING/Best Practice Note: Although this value is a float, OpenRTB strongly suggests using integer math for accounting to avoid rounding errors.
*/
public BidThrift setPrice(double price) {
this.price = price;
setPriceIsSet(true);
return this;
}
public void unsetPrice() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRICE_ISSET_ID);
}
/** Returns true if field price is set (has been assigned a value) and false otherwise */
public boolean isSetPrice() {
return EncodingUtils.testBit(__isset_bitfield, __PRICE_ISSET_ID);
}
public void setPriceIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRICE_ISSET_ID, value);
}
/**
* ID that references the ad to be served if the bid wins.
*/
public String getAdid() {
return this.adid;
}
/**
* ID that references the ad to be served if the bid wins.
*/
public BidThrift setAdid(String adid) {
this.adid = adid;
return this;
}
public void unsetAdid() {
this.adid = null;
}
/** Returns true if field adid is set (has been assigned a value) and false otherwise */
public boolean isSetAdid() {
return this.adid != null;
}
public void setAdidIsSet(boolean value) {
if (!value) {
this.adid = null;
}
}
/**
* Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL.
*/
public String getNurl() {
return this.nurl;
}
/**
* Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL.
*/
public BidThrift setNurl(String nurl) {
this.nurl = nurl;
return this;
}
public void unsetNurl() {
this.nurl = null;
}
/** Returns true if field nurl is set (has been assigned a value) and false otherwise */
public boolean isSetNurl() {
return this.nurl != null;
}
public void setNurlIsSet(boolean value) {
if (!value) {
this.nurl = null;
}
}
/**
* Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object.
*/
public String getAdm() {
return this.adm;
}
/**
* Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object.
*/
public BidThrift setAdm(String adm) {
this.adm = adm;
return this;
}
public void unsetAdm() {
this.adm = null;
}
/** Returns true if field adm is set (has been assigned a value) and false otherwise */
public boolean isSetAdm() {
return this.adm != null;
}
public void setAdmIsSet(boolean value) {
if (!value) {
this.adm = null;
}
}
public int getAdomainSize() {
return (this.adomain == null) ? 0 : this.adomain.size();
}
public java.util.Iterator getAdomainIterator() {
return (this.adomain == null) ? null : this.adomain.iterator();
}
public void addToAdomain(String elem) {
if (this.adomain == null) {
this.adomain = new ArrayList();
}
this.adomain.add(elem);
}
/**
* Advertiser’s primary or top-level domain for advertiser checking. This can be a list of domains if there is a rotating creative. However, exchanges may mandate that only one landing domain is allowed.
*/
public List getAdomain() {
return this.adomain;
}
/**
* Advertiser’s primary or top-level domain for advertiser checking. This can be a list of domains if there is a rotating creative. However, exchanges may mandate that only one landing domain is allowed.
*/
public BidThrift setAdomain(List adomain) {
this.adomain = adomain;
return this;
}
public void unsetAdomain() {
this.adomain = null;
}
/** Returns true if field adomain is set (has been assigned a value) and false otherwise */
public boolean isSetAdomain() {
return this.adomain != null;
}
public void setAdomainIsSet(boolean value) {
if (!value) {
this.adomain = null;
}
}
/**
* Sample image URL (without cache busting) for content checking.
*/
public String getLurl() {
return this.lurl;
}
/**
* Sample image URL (without cache busting) for content checking.
*/
public BidThrift setLurl(String lurl) {
this.lurl = lurl;
return this;
}
public void unsetLurl() {
this.lurl = null;
}
/** Returns true if field lurl is set (has been assigned a value) and false otherwise */
public boolean isSetLurl() {
return this.lurl != null;
}
public void setLurlIsSet(boolean value) {
if (!value) {
this.lurl = null;
}
}
/**
* Campaign ID or similar that appears within the ad markup.
*/
public String getCid() {
return this.cid;
}
/**
* Campaign ID or similar that appears within the ad markup.
*/
public BidThrift setCid(String cid) {
this.cid = cid;
return this;
}
public void unsetCid() {
this.cid = null;
}
/** Returns true if field cid is set (has been assigned a value) and false otherwise */
public boolean isSetCid() {
return this.cid != null;
}
public void setCidIsSet(boolean value) {
if (!value) {
this.cid = null;
}
}
/**
* Creative ID for reporting content issues or defects. This could also be used as a reference to a creative ID that is posted with an exchange.
*/
public String getCrid() {
return this.crid;
}
/**
* Creative ID for reporting content issues or defects. This could also be used as a reference to a creative ID that is posted with an exchange.
*/
public BidThrift setCrid(String crid) {
this.crid = crid;
return this;
}
public void unsetCrid() {
this.crid = null;
}
/** Returns true if field crid is set (has been assigned a value) and false otherwise */
public boolean isSetCrid() {
return this.crid != null;
}
public void setCridIsSet(boolean value) {
if (!value) {
this.crid = null;
}
}
public int getAttrSize() {
return (this.attr == null) ? 0 : this.attr.size();
}
public java.util.Iterator getAttrIterator() {
return (this.attr == null) ? null : this.attr.iterator();
}
public void addToAttr(short elem) {
if (this.attr == null) {
this.attr = new ArrayList();
}
this.attr.add(elem);
}
/**
* Array of creative attributes. See Table 6.3 Creative Attributes.
*/
public List getAttr() {
return this.attr;
}
/**
* Array of creative attributes. See Table 6.3 Creative Attributes.
*/
public BidThrift setAttr(List attr) {
this.attr = attr;
return this;
}
public void unsetAttr() {
this.attr = null;
}
/** Returns true if field attr is set (has been assigned a value) and false otherwise */
public boolean isSetAttr() {
return this.attr != null;
}
public void setAttrIsSet(boolean value) {
if (!value) {
this.attr = null;
}
}
/**
* A unique identifier for the direct deal associated with the bid. If the bid is associated and in response to a dealid in the request object it is _required_ in the response object.
*/
public String getDealid() {
return this.dealid;
}
/**
* A unique identifier for the direct deal associated with the bid. If the bid is associated and in response to a dealid in the request object it is _required_ in the response object.
*/
public BidThrift setDealid(String dealid) {
this.dealid = dealid;
return this;
}
public void unsetDealid() {
this.dealid = null;
}
/** Returns true if field dealid is set (has been assigned a value) and false otherwise */
public boolean isSetDealid() {
return this.dealid != null;
}
public void setDealidIsSet(boolean value) {
if (!value) {
this.dealid = null;
}
}
/**
* Width of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin optional fields it is recommended that the response bid contains this field to signal the size of ad chosen.
*/
public int getW() {
return this.w;
}
/**
* Width of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin optional fields it is recommended that the response bid contains this field to signal the size of ad chosen.
*/
public BidThrift setW(int w) {
this.w = w;
setWIsSet(true);
return this;
}
public void unsetW() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __W_ISSET_ID);
}
/** Returns true if field w is set (has been assigned a value) and false otherwise */
public boolean isSetW() {
return EncodingUtils.testBit(__isset_bitfield, __W_ISSET_ID);
}
public void setWIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __W_ISSET_ID, value);
}
/**
* Height of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin optional fields it is recommended that the response bid contains this field to signal the size of ad chosen.
*/
public int getH() {
return this.h;
}
/**
* Height of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin optional fields it is recommended that the response bid contains this field to signal the size of ad chosen.
*/
public BidThrift setH(int h) {
this.h = h;
setHIsSet(true);
return this;
}
public void unsetH() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __H_ISSET_ID);
}
/** Returns true if field h is set (has been assigned a value) and false otherwise */
public boolean isSetH() {
return EncodingUtils.testBit(__isset_bitfield, __H_ISSET_ID);
}
public void setHIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __H_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ID:
if (value == null) {
unsetId();
} else {
setId((String)value);
}
break;
case IMPID:
if (value == null) {
unsetImpid();
} else {
setImpid((String)value);
}
break;
case PRICE:
if (value == null) {
unsetPrice();
} else {
setPrice((Double)value);
}
break;
case ADID:
if (value == null) {
unsetAdid();
} else {
setAdid((String)value);
}
break;
case NURL:
if (value == null) {
unsetNurl();
} else {
setNurl((String)value);
}
break;
case ADM:
if (value == null) {
unsetAdm();
} else {
setAdm((String)value);
}
break;
case ADOMAIN:
if (value == null) {
unsetAdomain();
} else {
setAdomain((List)value);
}
break;
case LURL:
if (value == null) {
unsetLurl();
} else {
setLurl((String)value);
}
break;
case CID:
if (value == null) {
unsetCid();
} else {
setCid((String)value);
}
break;
case CRID:
if (value == null) {
unsetCrid();
} else {
setCrid((String)value);
}
break;
case ATTR:
if (value == null) {
unsetAttr();
} else {
setAttr((List)value);
}
break;
case DEALID:
if (value == null) {
unsetDealid();
} else {
setDealid((String)value);
}
break;
case W:
if (value == null) {
unsetW();
} else {
setW((Integer)value);
}
break;
case H:
if (value == null) {
unsetH();
} else {
setH((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return getId();
case IMPID:
return getImpid();
case PRICE:
return Double.valueOf(getPrice());
case ADID:
return getAdid();
case NURL:
return getNurl();
case ADM:
return getAdm();
case ADOMAIN:
return getAdomain();
case LURL:
return getLurl();
case CID:
return getCid();
case CRID:
return getCrid();
case ATTR:
return getAttr();
case DEALID:
return getDealid();
case W:
return Integer.valueOf(getW());
case H:
return Integer.valueOf(getH());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case ID:
return isSetId();
case IMPID:
return isSetImpid();
case PRICE:
return isSetPrice();
case ADID:
return isSetAdid();
case NURL:
return isSetNurl();
case ADM:
return isSetAdm();
case ADOMAIN:
return isSetAdomain();
case LURL:
return isSetLurl();
case CID:
return isSetCid();
case CRID:
return isSetCrid();
case ATTR:
return isSetAttr();
case DEALID:
return isSetDealid();
case W:
return isSetW();
case H:
return isSetH();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof BidThrift)
return this.equals((BidThrift)that);
return false;
}
public boolean equals(BidThrift that) {
if (that == null)
return false;
boolean this_present_id = true && this.isSetId();
boolean that_present_id = true && that.isSetId();
if (this_present_id || that_present_id) {
if (!(this_present_id && that_present_id))
return false;
if (!this.id.equals(that.id))
return false;
}
boolean this_present_impid = true && this.isSetImpid();
boolean that_present_impid = true && that.isSetImpid();
if (this_present_impid || that_present_impid) {
if (!(this_present_impid && that_present_impid))
return false;
if (!this.impid.equals(that.impid))
return false;
}
boolean this_present_price = true && this.isSetPrice();
boolean that_present_price = true && that.isSetPrice();
if (this_present_price || that_present_price) {
if (!(this_present_price && that_present_price))
return false;
if (this.price != that.price)
return false;
}
boolean this_present_adid = true && this.isSetAdid();
boolean that_present_adid = true && that.isSetAdid();
if (this_present_adid || that_present_adid) {
if (!(this_present_adid && that_present_adid))
return false;
if (!this.adid.equals(that.adid))
return false;
}
boolean this_present_nurl = true && this.isSetNurl();
boolean that_present_nurl = true && that.isSetNurl();
if (this_present_nurl || that_present_nurl) {
if (!(this_present_nurl && that_present_nurl))
return false;
if (!this.nurl.equals(that.nurl))
return false;
}
boolean this_present_adm = true && this.isSetAdm();
boolean that_present_adm = true && that.isSetAdm();
if (this_present_adm || that_present_adm) {
if (!(this_present_adm && that_present_adm))
return false;
if (!this.adm.equals(that.adm))
return false;
}
boolean this_present_adomain = true && this.isSetAdomain();
boolean that_present_adomain = true && that.isSetAdomain();
if (this_present_adomain || that_present_adomain) {
if (!(this_present_adomain && that_present_adomain))
return false;
if (!this.adomain.equals(that.adomain))
return false;
}
boolean this_present_lurl = true && this.isSetLurl();
boolean that_present_lurl = true && that.isSetLurl();
if (this_present_lurl || that_present_lurl) {
if (!(this_present_lurl && that_present_lurl))
return false;
if (!this.lurl.equals(that.lurl))
return false;
}
boolean this_present_cid = true && this.isSetCid();
boolean that_present_cid = true && that.isSetCid();
if (this_present_cid || that_present_cid) {
if (!(this_present_cid && that_present_cid))
return false;
if (!this.cid.equals(that.cid))
return false;
}
boolean this_present_crid = true && this.isSetCrid();
boolean that_present_crid = true && that.isSetCrid();
if (this_present_crid || that_present_crid) {
if (!(this_present_crid && that_present_crid))
return false;
if (!this.crid.equals(that.crid))
return false;
}
boolean this_present_attr = true && this.isSetAttr();
boolean that_present_attr = true && that.isSetAttr();
if (this_present_attr || that_present_attr) {
if (!(this_present_attr && that_present_attr))
return false;
if (!this.attr.equals(that.attr))
return false;
}
boolean this_present_dealid = true && this.isSetDealid();
boolean that_present_dealid = true && that.isSetDealid();
if (this_present_dealid || that_present_dealid) {
if (!(this_present_dealid && that_present_dealid))
return false;
if (!this.dealid.equals(that.dealid))
return false;
}
boolean this_present_w = true && this.isSetW();
boolean that_present_w = true && that.isSetW();
if (this_present_w || that_present_w) {
if (!(this_present_w && that_present_w))
return false;
if (this.w != that.w)
return false;
}
boolean this_present_h = true && this.isSetH();
boolean that_present_h = true && that.isSetH();
if (this_present_h || that_present_h) {
if (!(this_present_h && that_present_h))
return false;
if (this.h != that.h)
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy