All Downloads are FREE. Search and download functionalities are using the official Maven repository.

open_rtb.BidAvro Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package open_rtb;

/** 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. */
@org.apache.avro.specific.AvroGenerated
final public class BidAvro extends org.apache.avro.specific.SpecificRecordBase {

  /** 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. */
  org.apache.avro.util.Utf8 id;
  /** ID of the impression object to which this bid applies. */
  org.apache.avro.util.Utf8 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. */
  double price;
  /** ID that references the ad to be served if the bid wins. */
  org.apache.avro.util.Utf8 adid;
  /** Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL. */
  org.apache.avro.util.Utf8 nurl;
  /** Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object. */
  org.apache.avro.util.Utf8 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. */
  org.apache.avro.generic.GenericData.Array adomain;
  /** Sample image URL (without cache busting) for content checking. */
  org.apache.avro.util.Utf8 lurl;
  /** Campaign ID or similar that appears within the ad markup. */
  org.apache.avro.util.Utf8 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. */
  org.apache.avro.util.Utf8 crid;
  /** Array of creative attributes. See Table 6.3 Creative Attributes. */
  org.apache.avro.generic.GenericData.Array 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. */
  org.apache.avro.util.Utf8 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. */
  int 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. */
  int h;

  private boolean _frozen = false;

  /** Default constructor, does not initialize fields to their default values from the schema. Only use this if you know what you are doing. */
  public BidAvro() {}

  public BidAvro freeze() {
    _frozen = true;
    return this;
  }

  @Override
  public org.apache.avro.Schema getSchema() { return SCHEMA$; }

  // Used by DatumWriter. Applications should not call.
  @Override
  public java.lang.Object get(int field$) {
    switch (field$) {
      case 0: return id;
      case 1: return impid;
      case 2: return price;
      case 3: return adid;
      case 4: return nurl;
      case 5: return adm;
      case 6: return adomain;
      case 7: return lurl;
      case 8: return cid;
      case 9: return crid;
      case 10: return attr;
      case 11: return dealid;
      case 12: return w;
      case 13: return h;
      default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /** Writes record to Avro Encoder. */
  public void encode(org.apache.avro.io.Encoder _encoder) throws java.io.IOException {
    _encoder.writeString(id);
    _encoder.writeString(impid);
    _encoder.writeDouble(price);
    _encoder.writeString(adid);
    _encoder.writeString(nurl);
    _encoder.writeString(adm);
    _encoder.writeArrayStart(); _encoder.setItemCount(adomain.size()); for (org.apache.avro.util.Utf8 e : adomain) { _encoder.writeString(e); } _encoder.writeArrayEnd(); 
    _encoder.writeString(lurl);
    _encoder.writeString(cid);
    _encoder.writeString(crid);
    _encoder.writeArrayStart(); _encoder.setItemCount(attr.size()); for (java.lang.Integer e : attr) { _encoder.writeInt(e); } _encoder.writeArrayEnd(); 
    _encoder.writeString(dealid);
    _encoder.writeInt(w);
    _encoder.writeInt(h);
  }

  // Used by DatumReader.  Applications should not call.
  @Override
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value$) {
    if (_frozen) {
      throw new org.apache.avro.AvroRuntimeException("this Anoa SpecificRecord instance has already been frozen.");
    }
    switch (field$) {
      case 0: id = (org.apache.avro.util.Utf8) value$; break;
      case 1: impid = (org.apache.avro.util.Utf8) value$; break;
      case 2: price = (double) value$; break;
      case 3: adid = (org.apache.avro.util.Utf8) value$; break;
      case 4: nurl = (org.apache.avro.util.Utf8) value$; break;
      case 5: adm = (org.apache.avro.util.Utf8) value$; break;
      case 6: adomain = (org.apache.avro.generic.GenericData.Array) value$; break;
      case 7: lurl = (org.apache.avro.util.Utf8) value$; break;
      case 8: cid = (org.apache.avro.util.Utf8) value$; break;
      case 9: crid = (org.apache.avro.util.Utf8) value$; break;
      case 10: attr = (org.apache.avro.generic.GenericData.Array) value$; break;
      case 11: dealid = (org.apache.avro.util.Utf8) value$; break;
      case 12: w = (int) value$; break;
      case 13: h = (int) value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /** Reads record from Avro Decoder. */
  public BidAvro decode(org.apache.avro.io.Decoder _decoder) throws java.io.IOException {
    if (_frozen) {
      throw new org.apache.avro.AvroRuntimeException("this Anoa SpecificRecord instance has already been frozen.");
    }
    id = _decoder.readString(id);
    impid = _decoder.readString(impid);
    price = _decoder.readDouble();
    adid = _decoder.readString(adid);
    nurl = _decoder.readString(nurl);
    adm = _decoder.readString(adm);
    long _i6 = _decoder.readArrayStart(); adomain = new org.apache.avro.generic.GenericData.Array((int) _i6, SCHEMA$.getFields().get(6).schema()); for(; _i6 != 0; _i6 = _decoder.arrayNext()) { for (long _j6= 0; _j6 < _i6; _j6++) { adomain.add(_decoder.readString(null)); } }
    lurl = _decoder.readString(lurl);
    cid = _decoder.readString(cid);
    crid = _decoder.readString(crid);
    long _i10 = _decoder.readArrayStart(); attr = new org.apache.avro.generic.GenericData.Array((int) _i10, SCHEMA$.getFields().get(10).schema()); for(; _i10 != 0; _i10 = _decoder.arrayNext()) { for (long _j10= 0; _j10 < _i10; _j10++) { attr.add(_decoder.readInt()); } }
    dealid = _decoder.readString(dealid);
    w = _decoder.readInt();
    h = _decoder.readInt();
    return freeze();
  }

  /**
   * RecordBuilder for Avro instances.
   */
  static public class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase implements org.apache.avro.data.RecordBuilder {

    private org.apache.avro.util.Utf8 id;
    private org.apache.avro.util.Utf8 impid;
    private double price;
    private org.apache.avro.util.Utf8 adid;
    private org.apache.avro.util.Utf8 nurl;
    private org.apache.avro.util.Utf8 adm;
    private org.apache.avro.generic.GenericData.Array adomain;
    private org.apache.avro.util.Utf8 lurl;
    private org.apache.avro.util.Utf8 cid;
    private org.apache.avro.util.Utf8 crid;
    private org.apache.avro.generic.GenericData.Array attr;
    private org.apache.avro.util.Utf8 dealid;
    private int w;
    private int h;

    public Builder() {
      super(BidAvro.SCHEMA$);
    }

    public Builder(BidAvro.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.id)) {
        this.id = data().deepCopy(fields()[0].schema(), other.id);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.impid)) {
        this.impid = data().deepCopy(fields()[1].schema(), other.impid);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.price)) {
        this.price = data().deepCopy(fields()[2].schema(), other.price);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.adid)) {
        this.adid = data().deepCopy(fields()[3].schema(), other.adid);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.nurl)) {
        this.nurl = data().deepCopy(fields()[4].schema(), other.nurl);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.adm)) {
        this.adm = data().deepCopy(fields()[5].schema(), other.adm);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.adomain)) {
        this.adomain = data().deepCopy(fields()[6].schema(), other.adomain);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.lurl)) {
        this.lurl = data().deepCopy(fields()[7].schema(), other.lurl);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.cid)) {
        this.cid = data().deepCopy(fields()[8].schema(), other.cid);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.crid)) {
        this.crid = data().deepCopy(fields()[9].schema(), other.crid);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.attr)) {
        this.attr = data().deepCopy(fields()[10].schema(), other.attr);
        fieldSetFlags()[10] = true;
      }
      if (isValidValue(fields()[11], other.dealid)) {
        this.dealid = data().deepCopy(fields()[11].schema(), other.dealid);
        fieldSetFlags()[11] = true;
      }
      if (isValidValue(fields()[12], other.w)) {
        this.w = data().deepCopy(fields()[12].schema(), other.w);
        fieldSetFlags()[12] = true;
      }
      if (isValidValue(fields()[13], other.h)) {
        this.h = data().deepCopy(fields()[13].schema(), other.h);
        fieldSetFlags()[13] = true;
      }
    }

    public Builder(BidAvro other) {
      super(BidAvro.SCHEMA$);
      if (isValidValue(fields()[0], other.id)) {
        this.id = data().deepCopy(fields()[0].schema(), other.id);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.impid)) {
        this.impid = data().deepCopy(fields()[1].schema(), other.impid);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.price)) {
        this.price = data().deepCopy(fields()[2].schema(), other.price);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.adid)) {
        this.adid = data().deepCopy(fields()[3].schema(), other.adid);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.nurl)) {
        this.nurl = data().deepCopy(fields()[4].schema(), other.nurl);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.adm)) {
        this.adm = data().deepCopy(fields()[5].schema(), other.adm);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.adomain)) {
        this.adomain = data().deepCopy(fields()[6].schema(), other.adomain);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.lurl)) {
        this.lurl = data().deepCopy(fields()[7].schema(), other.lurl);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.cid)) {
        this.cid = data().deepCopy(fields()[8].schema(), other.cid);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.crid)) {
        this.crid = data().deepCopy(fields()[9].schema(), other.crid);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.attr)) {
        this.attr = data().deepCopy(fields()[10].schema(), other.attr);
        fieldSetFlags()[10] = true;
      }
      if (isValidValue(fields()[11], other.dealid)) {
        this.dealid = data().deepCopy(fields()[11].schema(), other.dealid);
        fieldSetFlags()[11] = true;
      }
      if (isValidValue(fields()[12], other.w)) {
        this.w = data().deepCopy(fields()[12].schema(), other.w);
        fieldSetFlags()[12] = true;
      }
      if (isValidValue(fields()[13], other.h)) {
        this.h = data().deepCopy(fields()[13].schema(), other.h);
        fieldSetFlags()[13] = true;
      }
    }

    /** Gets the value of the 'id' field. */
    public org.apache.avro.util.Utf8 getId() {
      return id;
    }

    /** Sets the value of the 'id' field. */
    public BidAvro.Builder setId(org.apache.avro.util.Utf8 value) {
      validate(fields()[0], value);
      this.id = value;
      fieldSetFlags()[0] = true;
      return this;
    }

    /** Checks whether the 'id' field has been set. */
    public boolean hasId() {
      return fieldSetFlags()[0];
    }

    /** Clears the value of the 'id' field. */
    public BidAvro.Builder clearId() {
      id = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'impid' field. */
    public org.apache.avro.util.Utf8 getImpid() {
      return impid;
    }

    /** Sets the value of the 'impid' field. */
    public BidAvro.Builder setImpid(org.apache.avro.util.Utf8 value) {
      validate(fields()[1], value);
      this.impid = value;
      fieldSetFlags()[1] = true;
      return this;
    }

    /** Checks whether the 'impid' field has been set. */
    public boolean hasImpid() {
      return fieldSetFlags()[1];
    }

    /** Clears the value of the 'impid' field. */
    public BidAvro.Builder clearImpid() {
      impid = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'price' field. */
    public double getPrice() {
      return price;
    }

    /** Sets the value of the 'price' field. */
    public BidAvro.Builder setPrice(double value) {
      validate(fields()[2], value);
      this.price = value;
      fieldSetFlags()[2] = true;
      return this;
    }

    /** Checks whether the 'price' field has been set. */
    public boolean hasPrice() {
      return fieldSetFlags()[2];
    }

    /** Clears the value of the 'price' field. */
    public BidAvro.Builder clearPrice() {
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'adid' field. */
    public org.apache.avro.util.Utf8 getAdid() {
      return adid;
    }

    /** Sets the value of the 'adid' field. */
    public BidAvro.Builder setAdid(org.apache.avro.util.Utf8 value) {
      validate(fields()[3], value);
      this.adid = value;
      fieldSetFlags()[3] = true;
      return this;
    }

    /** Checks whether the 'adid' field has been set. */
    public boolean hasAdid() {
      return fieldSetFlags()[3];
    }

    /** Clears the value of the 'adid' field. */
    public BidAvro.Builder clearAdid() {
      adid = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'nurl' field. */
    public org.apache.avro.util.Utf8 getNurl() {
      return nurl;
    }

    /** Sets the value of the 'nurl' field. */
    public BidAvro.Builder setNurl(org.apache.avro.util.Utf8 value) {
      validate(fields()[4], value);
      this.nurl = value;
      fieldSetFlags()[4] = true;
      return this;
    }

    /** Checks whether the 'nurl' field has been set. */
    public boolean hasNurl() {
      return fieldSetFlags()[4];
    }

    /** Clears the value of the 'nurl' field. */
    public BidAvro.Builder clearNurl() {
      nurl = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'adm' field. */
    public org.apache.avro.util.Utf8 getAdm() {
      return adm;
    }

    /** Sets the value of the 'adm' field. */
    public BidAvro.Builder setAdm(org.apache.avro.util.Utf8 value) {
      validate(fields()[5], value);
      this.adm = value;
      fieldSetFlags()[5] = true;
      return this;
    }

    /** Checks whether the 'adm' field has been set. */
    public boolean hasAdm() {
      return fieldSetFlags()[5];
    }

    /** Clears the value of the 'adm' field. */
    public BidAvro.Builder clearAdm() {
      adm = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'adomain' field. */
    public org.apache.avro.generic.GenericData.Array getAdomain() {
      return adomain;
    }

    /** Sets the value of the 'adomain' field. */
    public BidAvro.Builder setAdomain(org.apache.avro.generic.GenericData.Array value) {
      validate(fields()[6], value);
      this.adomain = value;
      fieldSetFlags()[6] = true;
      return this;
    }

    /** Checks whether the 'adomain' field has been set. */
    public boolean hasAdomain() {
      return fieldSetFlags()[6];
    }

    /** Clears the value of the 'adomain' field. */
    public BidAvro.Builder clearAdomain() {
      adomain = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    /** Gets the value of the 'lurl' field. */
    public org.apache.avro.util.Utf8 getLurl() {
      return lurl;
    }

    /** Sets the value of the 'lurl' field. */
    public BidAvro.Builder setLurl(org.apache.avro.util.Utf8 value) {
      validate(fields()[7], value);
      this.lurl = value;
      fieldSetFlags()[7] = true;
      return this;
    }

    /** Checks whether the 'lurl' field has been set. */
    public boolean hasLurl() {
      return fieldSetFlags()[7];
    }

    /** Clears the value of the 'lurl' field. */
    public BidAvro.Builder clearLurl() {
      lurl = null;
      fieldSetFlags()[7] = false;
      return this;
    }

    /** Gets the value of the 'cid' field. */
    public org.apache.avro.util.Utf8 getCid() {
      return cid;
    }

    /** Sets the value of the 'cid' field. */
    public BidAvro.Builder setCid(org.apache.avro.util.Utf8 value) {
      validate(fields()[8], value);
      this.cid = value;
      fieldSetFlags()[8] = true;
      return this;
    }

    /** Checks whether the 'cid' field has been set. */
    public boolean hasCid() {
      return fieldSetFlags()[8];
    }

    /** Clears the value of the 'cid' field. */
    public BidAvro.Builder clearCid() {
      cid = null;
      fieldSetFlags()[8] = false;
      return this;
    }

    /** Gets the value of the 'crid' field. */
    public org.apache.avro.util.Utf8 getCrid() {
      return crid;
    }

    /** Sets the value of the 'crid' field. */
    public BidAvro.Builder setCrid(org.apache.avro.util.Utf8 value) {
      validate(fields()[9], value);
      this.crid = value;
      fieldSetFlags()[9] = true;
      return this;
    }

    /** Checks whether the 'crid' field has been set. */
    public boolean hasCrid() {
      return fieldSetFlags()[9];
    }

    /** Clears the value of the 'crid' field. */
    public BidAvro.Builder clearCrid() {
      crid = null;
      fieldSetFlags()[9] = false;
      return this;
    }

    /** Gets the value of the 'attr' field. */
    public org.apache.avro.generic.GenericData.Array getAttr() {
      return attr;
    }

    /** Sets the value of the 'attr' field. */
    public BidAvro.Builder setAttr(org.apache.avro.generic.GenericData.Array value) {
      validate(fields()[10], value);
      this.attr = value;
      fieldSetFlags()[10] = true;
      return this;
    }

    /** Checks whether the 'attr' field has been set. */
    public boolean hasAttr() {
      return fieldSetFlags()[10];
    }

    /** Clears the value of the 'attr' field. */
    public BidAvro.Builder clearAttr() {
      attr = null;
      fieldSetFlags()[10] = false;
      return this;
    }

    /** Gets the value of the 'dealid' field. */
    public org.apache.avro.util.Utf8 getDealid() {
      return dealid;
    }

    /** Sets the value of the 'dealid' field. */
    public BidAvro.Builder setDealid(org.apache.avro.util.Utf8 value) {
      validate(fields()[11], value);
      this.dealid = value;
      fieldSetFlags()[11] = true;
      return this;
    }

    /** Checks whether the 'dealid' field has been set. */
    public boolean hasDealid() {
      return fieldSetFlags()[11];
    }

    /** Clears the value of the 'dealid' field. */
    public BidAvro.Builder clearDealid() {
      dealid = null;
      fieldSetFlags()[11] = false;
      return this;
    }

    /** Gets the value of the 'w' field. */
    public int getW() {
      return w;
    }

    /** Sets the value of the 'w' field. */
    public BidAvro.Builder setW(int value) {
      validate(fields()[12], value);
      this.w = value;
      fieldSetFlags()[12] = true;
      return this;
    }

    /** Checks whether the 'w' field has been set. */
    public boolean hasW() {
      return fieldSetFlags()[12];
    }

    /** Clears the value of the 'w' field. */
    public BidAvro.Builder clearW() {
      fieldSetFlags()[12] = false;
      return this;
    }

    /** Gets the value of the 'h' field. */
    public int getH() {
      return h;
    }

    /** Sets the value of the 'h' field. */
    public BidAvro.Builder setH(int value) {
      validate(fields()[13], value);
      this.h = value;
      fieldSetFlags()[13] = true;
      return this;
    }

    /** Checks whether the 'h' field has been set. */
    public boolean hasH() {
      return fieldSetFlags()[13];
    }

    /** Clears the value of the 'h' field. */
    public BidAvro.Builder clearH() {
      fieldSetFlags()[13] = false;
      return this;
    }

    @Override
    public BidAvro build() {
      final BidAvro record;
      try {
        record = new BidAvro();
        record.id = fieldSetFlags()[0] ? this.id : (org.apache.avro.util.Utf8) defaultValue(fields()[0]);
        record.impid = fieldSetFlags()[1] ? this.impid : (org.apache.avro.util.Utf8) defaultValue(fields()[1]);
        record.price = fieldSetFlags()[2] ? this.price : (double) defaultValue(fields()[2]);
        record.adid = fieldSetFlags()[3] ? this.adid : (org.apache.avro.util.Utf8) defaultValue(fields()[3]);
        record.nurl = fieldSetFlags()[4] ? this.nurl : (org.apache.avro.util.Utf8) defaultValue(fields()[4]);
        record.adm = fieldSetFlags()[5] ? this.adm : (org.apache.avro.util.Utf8) defaultValue(fields()[5]);
        record.adomain = fieldSetFlags()[6] ? this.adomain : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[6]);
        record.lurl = fieldSetFlags()[7] ? this.lurl : (org.apache.avro.util.Utf8) defaultValue(fields()[7]);
        record.cid = fieldSetFlags()[8] ? this.cid : (org.apache.avro.util.Utf8) defaultValue(fields()[8]);
        record.crid = fieldSetFlags()[9] ? this.crid : (org.apache.avro.util.Utf8) defaultValue(fields()[9]);
        record.attr = fieldSetFlags()[10] ? this.attr : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[10]);
        record.dealid = fieldSetFlags()[11] ? this.dealid : (org.apache.avro.util.Utf8) defaultValue(fields()[11]);
        record.w = fieldSetFlags()[12] ? this.w : (int) defaultValue(fields()[12]);
        record.h = fieldSetFlags()[13] ? this.h : (int) defaultValue(fields()[13]);
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
      return record.freeze();
    }
  }

  /** Creates a new BidAvro RecordBuilder. */
  static public BidAvro.Builder newBuilder() {
    return new BidAvro.Builder();
  }

  /** Creates a new BidAvro RecordBuilder by copying an existing BidAvro.Builder instance. */
  static public BidAvro.Builder newBuilder(BidAvro.Builder other) {
    return new BidAvro.Builder(other);
  }

  /** Creates a new BidAvro RecordBuilder by copying an existing BidAvro instance. */
  static public BidAvro.Builder newBuilder(BidAvro other) {
    return new BidAvro.Builder(other);
  }

  /** Returns Avro record schema. */
  static public org.apache.avro.Schema getClassSchema() { return SCHEMA$; }

  static public final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"BidAvro\",\"namespace\":\"open_rtb\",\"doc\":\"4.3.3 Bid Object\\nFor 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).\\nThe “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.\\nBEST 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.\",\"fields\":[{\"name\":\"id\",\"type\":\"string\",\"doc\":\"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.\",\"default\":\"\",\"ordinal_\":1},{\"name\":\"impid\",\"type\":\"string\",\"doc\":\"ID of the impression object to which this bid applies.\",\"default\":\"\",\"ordinal_\":2},{\"name\":\"price\",\"type\":{\"type\":\"double\",\"min\":0.0},\"doc\":\"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.\",\"default\":0.0,\"ordinal_\":3},{\"name\":\"adid\",\"type\":\"string\",\"doc\":\"ID that references the ad to be served if the bid wins.\",\"default\":\"\",\"ordinal_\":4},{\"name\":\"nurl\",\"type\":\"string\",\"doc\":\"Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL.\",\"default\":\"\",\"ordinal_\":5},{\"name\":\"adm\",\"type\":\"string\",\"doc\":\"Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object.\",\"default\":\"\",\"ordinal_\":6},{\"name\":\"adomain\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"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.\",\"default\":[],\"ordinal_\":7},{\"name\":\"lurl\",\"type\":\"string\",\"doc\":\"Sample image URL (without cache busting) for content checking.\",\"default\":\"\",\"ordinal_\":8},{\"name\":\"cid\",\"type\":\"string\",\"doc\":\"Campaign ID or similar that appears within the ad markup.\",\"default\":\"\",\"ordinal_\":9},{\"name\":\"crid\",\"type\":\"string\",\"doc\":\"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.\",\"default\":\"\",\"ordinal_\":10},{\"name\":\"attr\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"Array of creative attributes. See Table 6.3 Creative Attributes.\",\"default\":[],\"ordinal_\":11},{\"name\":\"dealid\",\"type\":\"string\",\"doc\":\"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.\",\"default\":\"\",\"ordinal_\":12},{\"name\":\"w\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"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.\",\"default\":0,\"ordinal_\":13},{\"name\":\"h\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"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.\",\"default\":0,\"ordinal_\":14}]}");
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy