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

com.adgear.avro.openrtb.Bid Maven / Gradle / Ivy

Go to download

Test module for other Anoa modules, which exposes complex records (OpenRTB bid requests) through utility classes for use in unit tests within other Anoa modules (anoa-core, for instance).

The newest version!
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package com.adgear.avro.openrtb;  


/** 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. */
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class Bid extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Bid\",\"namespace\":\"com.adgear.avro.openrtb\",\"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\":\"[01] 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.\"},{\"name\":\"impid\",\"type\":\"string\",\"doc\":\"[02] ID of the impression object to which this bid applies.\"},{\"name\":\"price\",\"type\":\"double\",\"doc\":\"[03] 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.\"},{\"name\":\"adid\",\"type\":[\"null\",\"string\"],\"doc\":\"[04] ID that references the ad to be served if the bid wins.\",\"default\":null},{\"name\":\"nurl\",\"type\":[\"null\",\"string\"],\"doc\":\"[05] Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL.\",\"default\":null},{\"name\":\"adm\",\"type\":[\"null\",\"string\"],\"doc\":\"[06] Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object.\",\"default\":null},{\"name\":\"adomain\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"string\"}],\"doc\":\"[07] 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\":null},{\"name\":\"lurl\",\"type\":[\"null\",\"string\"],\"doc\":\"[08] Sample image URL (without cache busting) for content checking.\",\"default\":null},{\"name\":\"cid\",\"type\":[\"null\",\"string\"],\"doc\":\"[09] Campaign ID or similar that appears within the ad markup.\",\"default\":null},{\"name\":\"crid\",\"type\":[\"null\",\"string\"],\"doc\":\"[10] 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\":null},{\"name\":\"attr\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"int\"}],\"doc\":\"[11] Array of creative attributes. See Table 6.3 Creative Attributes.\",\"default\":null},{\"name\":\"dealid\",\"type\":[\"null\",\"string\"],\"doc\":\"[12] 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\":null},{\"name\":\"w\",\"type\":[\"null\",\"int\"],\"doc\":\"[13] 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\":null},{\"name\":\"h\",\"type\":[\"null\",\"int\"],\"doc\":\"[14] 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\":null}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** [01] 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. */
  @Deprecated public java.lang.CharSequence id;
  /** [02] ID of the impression object to which this bid applies. */
  @Deprecated public java.lang.CharSequence impid;
  /** [03] 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. */
  @Deprecated public double price;
  /** [04] ID that references the ad to be served if the bid wins. */
  @Deprecated public java.lang.CharSequence adid;
  /** [05] Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL. */
  @Deprecated public java.lang.CharSequence nurl;
  /** [06] Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object. */
  @Deprecated public java.lang.CharSequence adm;
  /** [07] 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. */
  @Deprecated public java.util.List adomain;
  /** [08] Sample image URL (without cache busting) for content checking. */
  @Deprecated public java.lang.CharSequence lurl;
  /** [09] Campaign ID or similar that appears within the ad markup. */
  @Deprecated public java.lang.CharSequence cid;
  /** [10] 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. */
  @Deprecated public java.lang.CharSequence crid;
  /** [11] Array of creative attributes. See Table 6.3 Creative Attributes. */
  @Deprecated public java.util.List attr;
  /** [12] 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. */
  @Deprecated public java.lang.CharSequence dealid;
  /** [13] 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. */
  @Deprecated public java.lang.Integer w;
  /** [14] 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. */
  @Deprecated public java.lang.Integer h;

  /**
   * Default constructor.
   */
  public Bid() {}

  /**
   * All-args constructor.
   */
  public Bid(java.lang.CharSequence id, java.lang.CharSequence impid, java.lang.Double price, java.lang.CharSequence adid, java.lang.CharSequence nurl, java.lang.CharSequence adm, java.util.List adomain, java.lang.CharSequence lurl, java.lang.CharSequence cid, java.lang.CharSequence crid, java.util.List attr, java.lang.CharSequence dealid, java.lang.Integer w, java.lang.Integer h) {
    this.id = id;
    this.impid = impid;
    this.price = price;
    this.adid = adid;
    this.nurl = nurl;
    this.adm = adm;
    this.adomain = adomain;
    this.lurl = lurl;
    this.cid = cid;
    this.crid = crid;
    this.attr = attr;
    this.dealid = dealid;
    this.w = w;
    this.h = h;
  }

  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
  // Used by DatumWriter.  Applications should not call. 
  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");
    }
  }
  // Used by DatumReader.  Applications should not call. 
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value$) {
    switch (field$) {
    case 0: id = (java.lang.CharSequence)value$; break;
    case 1: impid = (java.lang.CharSequence)value$; break;
    case 2: price = (java.lang.Double)value$; break;
    case 3: adid = (java.lang.CharSequence)value$; break;
    case 4: nurl = (java.lang.CharSequence)value$; break;
    case 5: adm = (java.lang.CharSequence)value$; break;
    case 6: adomain = (java.util.List)value$; break;
    case 7: lurl = (java.lang.CharSequence)value$; break;
    case 8: cid = (java.lang.CharSequence)value$; break;
    case 9: crid = (java.lang.CharSequence)value$; break;
    case 10: attr = (java.util.List)value$; break;
    case 11: dealid = (java.lang.CharSequence)value$; break;
    case 12: w = (java.lang.Integer)value$; break;
    case 13: h = (java.lang.Integer)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'id' field.
   * [01] 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 java.lang.CharSequence getId() {
    return id;
  }

  /**
   * Sets the value of the 'id' field.
   * [01] 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.
   * @param value the value to set.
   */
  public void setId(java.lang.CharSequence value) {
    this.id = value;
  }

  /**
   * Gets the value of the 'impid' field.
   * [02] ID of the impression object to which this bid applies.
   */
  public java.lang.CharSequence getImpid() {
    return impid;
  }

  /**
   * Sets the value of the 'impid' field.
   * [02] ID of the impression object to which this bid applies.
   * @param value the value to set.
   */
  public void setImpid(java.lang.CharSequence value) {
    this.impid = value;
  }

  /**
   * Gets the value of the 'price' field.
   * [03] 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 java.lang.Double getPrice() {
    return price;
  }

  /**
   * Sets the value of the 'price' field.
   * [03] 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.
   * @param value the value to set.
   */
  public void setPrice(java.lang.Double value) {
    this.price = value;
  }

  /**
   * Gets the value of the 'adid' field.
   * [04] ID that references the ad to be served if the bid wins.
   */
  public java.lang.CharSequence getAdid() {
    return adid;
  }

  /**
   * Sets the value of the 'adid' field.
   * [04] ID that references the ad to be served if the bid wins.
   * @param value the value to set.
   */
  public void setAdid(java.lang.CharSequence value) {
    this.adid = value;
  }

  /**
   * Gets the value of the 'nurl' field.
   * [05] Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL.
   */
  public java.lang.CharSequence getNurl() {
    return nurl;
  }

  /**
   * Sets the value of the 'nurl' field.
   * [05] Win notice URL. Note that ad markup is also typically, but not necessarily, returned via this URL.
   * @param value the value to set.
   */
  public void setNurl(java.lang.CharSequence value) {
    this.nurl = value;
  }

  /**
   * Gets the value of the 'adm' field.
   * [06] Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object.
   */
  public java.lang.CharSequence getAdm() {
    return adm;
  }

  /**
   * Sets the value of the 'adm' field.
   * [06] Actual ad markup. XHTML if a response to a banner object, or VAST XML if a response to a video object.
   * @param value the value to set.
   */
  public void setAdm(java.lang.CharSequence value) {
    this.adm = value;
  }

  /**
   * Gets the value of the 'adomain' field.
   * [07] 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 java.util.List getAdomain() {
    return adomain;
  }

  /**
   * Sets the value of the 'adomain' field.
   * [07] 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.
   * @param value the value to set.
   */
  public void setAdomain(java.util.List value) {
    this.adomain = value;
  }

  /**
   * Gets the value of the 'lurl' field.
   * [08] Sample image URL (without cache busting) for content checking.
   */
  public java.lang.CharSequence getLurl() {
    return lurl;
  }

  /**
   * Sets the value of the 'lurl' field.
   * [08] Sample image URL (without cache busting) for content checking.
   * @param value the value to set.
   */
  public void setLurl(java.lang.CharSequence value) {
    this.lurl = value;
  }

  /**
   * Gets the value of the 'cid' field.
   * [09] Campaign ID or similar that appears within the ad markup.
   */
  public java.lang.CharSequence getCid() {
    return cid;
  }

  /**
   * Sets the value of the 'cid' field.
   * [09] Campaign ID or similar that appears within the ad markup.
   * @param value the value to set.
   */
  public void setCid(java.lang.CharSequence value) {
    this.cid = value;
  }

  /**
   * Gets the value of the 'crid' field.
   * [10] 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 java.lang.CharSequence getCrid() {
    return crid;
  }

  /**
   * Sets the value of the 'crid' field.
   * [10] 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.
   * @param value the value to set.
   */
  public void setCrid(java.lang.CharSequence value) {
    this.crid = value;
  }

  /**
   * Gets the value of the 'attr' field.
   * [11] Array of creative attributes. See Table 6.3 Creative Attributes.
   */
  public java.util.List getAttr() {
    return attr;
  }

  /**
   * Sets the value of the 'attr' field.
   * [11] Array of creative attributes. See Table 6.3 Creative Attributes.
   * @param value the value to set.
   */
  public void setAttr(java.util.List value) {
    this.attr = value;
  }

  /**
   * Gets the value of the 'dealid' field.
   * [12] 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 java.lang.CharSequence getDealid() {
    return dealid;
  }

  /**
   * Sets the value of the 'dealid' field.
   * [12] 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.
   * @param value the value to set.
   */
  public void setDealid(java.lang.CharSequence value) {
    this.dealid = value;
  }

  /**
   * Gets the value of the 'w' field.
   * [13] 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 java.lang.Integer getW() {
    return w;
  }

  /**
   * Sets the value of the 'w' field.
   * [13] 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.
   * @param value the value to set.
   */
  public void setW(java.lang.Integer value) {
    this.w = value;
  }

  /**
   * Gets the value of the 'h' field.
   * [14] 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 java.lang.Integer getH() {
    return h;
  }

  /**
   * Sets the value of the 'h' field.
   * [14] 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.
   * @param value the value to set.
   */
  public void setH(java.lang.Integer value) {
    this.h = value;
  }

  /** Creates a new Bid RecordBuilder */
  public static com.adgear.avro.openrtb.Bid.Builder newBuilder() {
    return new com.adgear.avro.openrtb.Bid.Builder();
  }
  
  /** Creates a new Bid RecordBuilder by copying an existing Builder */
  public static com.adgear.avro.openrtb.Bid.Builder newBuilder(com.adgear.avro.openrtb.Bid.Builder other) {
    return new com.adgear.avro.openrtb.Bid.Builder(other);
  }
  
  /** Creates a new Bid RecordBuilder by copying an existing Bid instance */
  public static com.adgear.avro.openrtb.Bid.Builder newBuilder(com.adgear.avro.openrtb.Bid other) {
    return new com.adgear.avro.openrtb.Bid.Builder(other);
  }

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

    private java.lang.CharSequence id;
    private java.lang.CharSequence impid;
    private double price;
    private java.lang.CharSequence adid;
    private java.lang.CharSequence nurl;
    private java.lang.CharSequence adm;
    private java.util.List adomain;
    private java.lang.CharSequence lurl;
    private java.lang.CharSequence cid;
    private java.lang.CharSequence crid;
    private java.util.List attr;
    private java.lang.CharSequence dealid;
    private java.lang.Integer w;
    private java.lang.Integer h;

    /** Creates a new Builder */
    private Builder() {
      super(com.adgear.avro.openrtb.Bid.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(com.adgear.avro.openrtb.Bid.Builder other) {
      super(other);
    }
    
    /** Creates a Builder by copying an existing Bid instance */
    private Builder(com.adgear.avro.openrtb.Bid other) {
      super(com.adgear.avro.openrtb.Bid.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 java.lang.CharSequence getId() {
      return id;
    }

    /** Sets the value of the 'id' field */
    public com.adgear.avro.openrtb.Bid.Builder setId(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearId() {
      id = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'impid' field */
    public java.lang.CharSequence getImpid() {
      return impid;
    }

    /** Sets the value of the 'impid' field */
    public com.adgear.avro.openrtb.Bid.Builder setImpid(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearImpid() {
      impid = null;
      fieldSetFlags()[1] = false;
      return this;
    }

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

    /** Sets the value of the 'price' field */
    public com.adgear.avro.openrtb.Bid.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 com.adgear.avro.openrtb.Bid.Builder clearPrice() {
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'adid' field */
    public java.lang.CharSequence getAdid() {
      return adid;
    }

    /** Sets the value of the 'adid' field */
    public com.adgear.avro.openrtb.Bid.Builder setAdid(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearAdid() {
      adid = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'nurl' field */
    public java.lang.CharSequence getNurl() {
      return nurl;
    }

    /** Sets the value of the 'nurl' field */
    public com.adgear.avro.openrtb.Bid.Builder setNurl(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearNurl() {
      nurl = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'adm' field */
    public java.lang.CharSequence getAdm() {
      return adm;
    }

    /** Sets the value of the 'adm' field */
    public com.adgear.avro.openrtb.Bid.Builder setAdm(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearAdm() {
      adm = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'adomain' field */
    public java.util.List getAdomain() {
      return adomain;
    }

    /** Sets the value of the 'adomain' field */
    public com.adgear.avro.openrtb.Bid.Builder setAdomain(java.util.List 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 com.adgear.avro.openrtb.Bid.Builder clearAdomain() {
      adomain = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    /** Gets the value of the 'lurl' field */
    public java.lang.CharSequence getLurl() {
      return lurl;
    }

    /** Sets the value of the 'lurl' field */
    public com.adgear.avro.openrtb.Bid.Builder setLurl(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearLurl() {
      lurl = null;
      fieldSetFlags()[7] = false;
      return this;
    }

    /** Gets the value of the 'cid' field */
    public java.lang.CharSequence getCid() {
      return cid;
    }

    /** Sets the value of the 'cid' field */
    public com.adgear.avro.openrtb.Bid.Builder setCid(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearCid() {
      cid = null;
      fieldSetFlags()[8] = false;
      return this;
    }

    /** Gets the value of the 'crid' field */
    public java.lang.CharSequence getCrid() {
      return crid;
    }

    /** Sets the value of the 'crid' field */
    public com.adgear.avro.openrtb.Bid.Builder setCrid(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearCrid() {
      crid = null;
      fieldSetFlags()[9] = false;
      return this;
    }

    /** Gets the value of the 'attr' field */
    public java.util.List getAttr() {
      return attr;
    }

    /** Sets the value of the 'attr' field */
    public com.adgear.avro.openrtb.Bid.Builder setAttr(java.util.List 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 com.adgear.avro.openrtb.Bid.Builder clearAttr() {
      attr = null;
      fieldSetFlags()[10] = false;
      return this;
    }

    /** Gets the value of the 'dealid' field */
    public java.lang.CharSequence getDealid() {
      return dealid;
    }

    /** Sets the value of the 'dealid' field */
    public com.adgear.avro.openrtb.Bid.Builder setDealid(java.lang.CharSequence 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 com.adgear.avro.openrtb.Bid.Builder clearDealid() {
      dealid = null;
      fieldSetFlags()[11] = false;
      return this;
    }

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

    /** Sets the value of the 'w' field */
    public com.adgear.avro.openrtb.Bid.Builder setW(java.lang.Integer 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 com.adgear.avro.openrtb.Bid.Builder clearW() {
      w = null;
      fieldSetFlags()[12] = false;
      return this;
    }

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

    /** Sets the value of the 'h' field */
    public com.adgear.avro.openrtb.Bid.Builder setH(java.lang.Integer 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 com.adgear.avro.openrtb.Bid.Builder clearH() {
      h = null;
      fieldSetFlags()[13] = false;
      return this;
    }

    @Override
    public Bid build() {
      try {
        Bid record = new Bid();
        record.id = fieldSetFlags()[0] ? this.id : (java.lang.CharSequence) defaultValue(fields()[0]);
        record.impid = fieldSetFlags()[1] ? this.impid : (java.lang.CharSequence) defaultValue(fields()[1]);
        record.price = fieldSetFlags()[2] ? this.price : (java.lang.Double) defaultValue(fields()[2]);
        record.adid = fieldSetFlags()[3] ? this.adid : (java.lang.CharSequence) defaultValue(fields()[3]);
        record.nurl = fieldSetFlags()[4] ? this.nurl : (java.lang.CharSequence) defaultValue(fields()[4]);
        record.adm = fieldSetFlags()[5] ? this.adm : (java.lang.CharSequence) defaultValue(fields()[5]);
        record.adomain = fieldSetFlags()[6] ? this.adomain : (java.util.List) defaultValue(fields()[6]);
        record.lurl = fieldSetFlags()[7] ? this.lurl : (java.lang.CharSequence) defaultValue(fields()[7]);
        record.cid = fieldSetFlags()[8] ? this.cid : (java.lang.CharSequence) defaultValue(fields()[8]);
        record.crid = fieldSetFlags()[9] ? this.crid : (java.lang.CharSequence) defaultValue(fields()[9]);
        record.attr = fieldSetFlags()[10] ? this.attr : (java.util.List) defaultValue(fields()[10]);
        record.dealid = fieldSetFlags()[11] ? this.dealid : (java.lang.CharSequence) defaultValue(fields()[11]);
        record.w = fieldSetFlags()[12] ? this.w : (java.lang.Integer) defaultValue(fields()[12]);
        record.h = fieldSetFlags()[13] ? this.h : (java.lang.Integer) defaultValue(fields()[13]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy