
open_rtb.VideoAvro Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package open_rtb;
/** 3.3.4 Video Object
The “video” object _must_ be included directly in the impression object if the impression offered for auction is an in-stream video ad opportunity.
Note that for the video object, many of the fields are non-essential for a minimally viable exchange interfaces. These parameters do not necessarily need to be specified to the bidder, if they are always the same for all impression, of if the exchange chooses not to supply the additional information to the bidder. */
@org.apache.avro.specific.AvroGenerated
final public class VideoAvro extends org.apache.avro.specific.SpecificRecordBase {
/** Content MIME types supported. Popular MIME types include, but are not limited to “video/x-ms- wmv” for Windows Media, and “video/x-flv” for Flash Video. */
org.apache.avro.generic.GenericData.Array mimes;
/** Minimum video ad duration in seconds. */
int minduration;
/** Maximum video ad duration in seconds. */
int maxduration;
/** Video bid response protocols. See Table 6.7 Video Bid Response Protocols for a list of possible values. NOTE: Use “protocols” when multiple protocols are supported. Its use is also highly recommended even for one since this “protocol” attribute is likely to be deprecated in a future version.
At least one supported protocol must be specified in either the “protocol” or “protocols” attribute. */
int protocol;
/** Video bid response protocols. See Table 6.7 Video Bid Response Protocols for a list of possible values.
At least one supported protocol must be specified in either the “protocol” or “protocols” attribute. */
org.apache.avro.generic.GenericData.Array protocols;
/** Width of the player in pixels. This field is not required, but it’s highly recommended that this information be included. */
int w;
/** Height of the player in pixels. This field is not required, but it’s highly recommended that this information be included. */
int h;
/** Indicates the start delay in seconds for preroll, midroll, or postroll ad placement. See Table 6.9 Video Start Delay for generic placement values. */
int startdelay;
/** Indicates whether the ad impression must be linear, non- linear or can be of any type (field not set). See Table 6.6 Video Linearity for a list of the possible values and recommended bidder interpretation. */
int linearity;
/** If multiple ad impressions are offered in the same bid request, the sequence number will allow for the coordinated delivery of multiple creatives. */
int sequence;
/** Blocked creative attributes. See Table 6.3 Creative Attributes. If blank assume all types are allowed. */
org.apache.avro.generic.GenericData.Array battr;
/** Maximum extended video ad duration, if extension is allowed. If blank or 0, extension is not allowed. If -1, extension is allowed, and there is no time limit imposed. If greater than 0, then the value represents the number of seconds of extended play supported beyond the maxduration value. */
int maxextended;
/** Minimum bit rate in Kbps. Exchange may set this dynamically, or universally across their set of publishers. */
int minbitrate;
/** Maximum bit rate in Kbps. Exchange may set this dynamically, or universally across their set of publishers. */
int maxbitrate;
/** If exchange publisher has rules preventing letter boxing of 4x3 content to play in a 16x9 window, then this should be set to false. Default setting is true, which assumes that boxing of content to fit into a window is allowed. “1” indicates boxing is allowed. “0” indicates it is not allowed. */
int boxingallowed;
/** List of allowed playback methods. If blank, assume that all are allowed. See Table 6.8 Video Playback Methods for a list of possible values. */
org.apache.avro.generic.GenericData.Array playbackmethod;
/** List of supported delivery methods (streaming, progressive). If blank, assume all are supported. See Table 6.12 Content Delivery Methods for a list of possible values. */
org.apache.avro.generic.GenericData.Array deliverymethod;
/** Ad Position (see table 6.5). Default: unknown. */
int pos;
/** If companion ads are available, they can be listed as an array of banner objects. See Banner Object. */
org.apache.avro.generic.GenericData.Array companionad;
/** List of supported API frameworks for this impression. (See Table 6.4 API Frameworks). If an API is not explicitly listed it is assumed not to be supported. */
org.apache.avro.generic.GenericData.Array api;
/** Recommended if companion objects are included. See Table 6.17 VAST Companion Types for a list of possible values. */
org.apache.avro.generic.GenericData.Array vast_companion_type;
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 VideoAvro() {}
public VideoAvro freeze() {
_frozen = true;
companionad.forEach(e -> e.freeze());
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 mimes;
case 1: return minduration;
case 2: return maxduration;
case 3: return protocol;
case 4: return protocols;
case 5: return w;
case 6: return h;
case 7: return startdelay;
case 8: return linearity;
case 9: return sequence;
case 10: return battr;
case 11: return maxextended;
case 12: return minbitrate;
case 13: return maxbitrate;
case 14: return boxingallowed;
case 15: return playbackmethod;
case 16: return deliverymethod;
case 17: return pos;
case 18: return companionad;
case 19: return api;
case 20: return vast_companion_type;
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.writeArrayStart(); _encoder.setItemCount(mimes.size()); for (org.apache.avro.util.Utf8 e : mimes) { _encoder.writeString(e); } _encoder.writeArrayEnd();
_encoder.writeInt(minduration);
_encoder.writeInt(maxduration);
_encoder.writeInt(protocol);
_encoder.writeArrayStart(); _encoder.setItemCount(protocols.size()); for (java.lang.Integer e : protocols) { _encoder.writeInt(e); } _encoder.writeArrayEnd();
_encoder.writeInt(w);
_encoder.writeInt(h);
_encoder.writeInt(startdelay);
_encoder.writeInt(linearity);
_encoder.writeInt(sequence);
_encoder.writeArrayStart(); _encoder.setItemCount(battr.size()); for (java.lang.Integer e : battr) { _encoder.writeInt(e); } _encoder.writeArrayEnd();
_encoder.writeInt(maxextended);
_encoder.writeInt(minbitrate);
_encoder.writeInt(maxbitrate);
_encoder.writeInt(boxingallowed);
_encoder.writeArrayStart(); _encoder.setItemCount(playbackmethod.size()); for (java.lang.Integer e : playbackmethod) { _encoder.writeInt(e); } _encoder.writeArrayEnd();
_encoder.writeArrayStart(); _encoder.setItemCount(deliverymethod.size()); for (java.lang.Integer e : deliverymethod) { _encoder.writeInt(e); } _encoder.writeArrayEnd();
_encoder.writeInt(pos);
_encoder.writeArrayStart(); _encoder.setItemCount(companionad.size()); for (open_rtb.BannerAvro e : companionad) { e.encode(_encoder); } _encoder.writeArrayEnd();
_encoder.writeArrayStart(); _encoder.setItemCount(api.size()); for (java.lang.Integer e : api) { _encoder.writeInt(e); } _encoder.writeArrayEnd();
_encoder.writeArrayStart(); _encoder.setItemCount(vast_companion_type.size()); for (java.lang.Integer e : vast_companion_type) { _encoder.writeInt(e); } _encoder.writeArrayEnd();
}
// 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: mimes = (org.apache.avro.generic.GenericData.Array) value$; break;
case 1: minduration = (int) value$; break;
case 2: maxduration = (int) value$; break;
case 3: protocol = (int) value$; break;
case 4: protocols = (org.apache.avro.generic.GenericData.Array) value$; break;
case 5: w = (int) value$; break;
case 6: h = (int) value$; break;
case 7: startdelay = (int) value$; break;
case 8: linearity = (int) value$; break;
case 9: sequence = (int) value$; break;
case 10: battr = (org.apache.avro.generic.GenericData.Array) value$; break;
case 11: maxextended = (int) value$; break;
case 12: minbitrate = (int) value$; break;
case 13: maxbitrate = (int) value$; break;
case 14: boxingallowed = (int) value$; break;
case 15: playbackmethod = (org.apache.avro.generic.GenericData.Array) value$; break;
case 16: deliverymethod = (org.apache.avro.generic.GenericData.Array) value$; break;
case 17: pos = (int) value$; break;
case 18: companionad = (org.apache.avro.generic.GenericData.Array) value$; break;
case 19: api = (org.apache.avro.generic.GenericData.Array) value$; break;
case 20: vast_companion_type = (org.apache.avro.generic.GenericData.Array) value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/** Reads record from Avro Decoder. */
public VideoAvro 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.");
}
long _i0 = _decoder.readArrayStart(); mimes = new org.apache.avro.generic.GenericData.Array((int) _i0, SCHEMA$.getFields().get(0).schema()); for(; _i0 != 0; _i0 = _decoder.arrayNext()) { for (long _j0= 0; _j0 < _i0; _j0++) { mimes.add(_decoder.readString(null)); } }
minduration = _decoder.readInt();
maxduration = _decoder.readInt();
protocol = _decoder.readInt();
long _i4 = _decoder.readArrayStart(); protocols = new org.apache.avro.generic.GenericData.Array((int) _i4, SCHEMA$.getFields().get(4).schema()); for(; _i4 != 0; _i4 = _decoder.arrayNext()) { for (long _j4= 0; _j4 < _i4; _j4++) { protocols.add(_decoder.readInt()); } }
w = _decoder.readInt();
h = _decoder.readInt();
startdelay = _decoder.readInt();
linearity = _decoder.readInt();
sequence = _decoder.readInt();
long _i10 = _decoder.readArrayStart(); battr = 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++) { battr.add(_decoder.readInt()); } }
maxextended = _decoder.readInt();
minbitrate = _decoder.readInt();
maxbitrate = _decoder.readInt();
boxingallowed = _decoder.readInt();
long _i15 = _decoder.readArrayStart(); playbackmethod = new org.apache.avro.generic.GenericData.Array((int) _i15, SCHEMA$.getFields().get(15).schema()); for(; _i15 != 0; _i15 = _decoder.arrayNext()) { for (long _j15= 0; _j15 < _i15; _j15++) { playbackmethod.add(_decoder.readInt()); } }
long _i16 = _decoder.readArrayStart(); deliverymethod = new org.apache.avro.generic.GenericData.Array((int) _i16, SCHEMA$.getFields().get(16).schema()); for(; _i16 != 0; _i16 = _decoder.arrayNext()) { for (long _j16= 0; _j16 < _i16; _j16++) { deliverymethod.add(_decoder.readInt()); } }
pos = _decoder.readInt();
long _i18 = _decoder.readArrayStart(); companionad = new org.apache.avro.generic.GenericData.Array((int) _i18, SCHEMA$.getFields().get(18).schema()); for(; _i18 != 0; _i18 = _decoder.arrayNext()) { for (long _j18= 0; _j18 < _i18; _j18++) { companionad.add(new open_rtb.BannerAvro().decode(_decoder)); } }
long _i19 = _decoder.readArrayStart(); api = new org.apache.avro.generic.GenericData.Array((int) _i19, SCHEMA$.getFields().get(19).schema()); for(; _i19 != 0; _i19 = _decoder.arrayNext()) { for (long _j19= 0; _j19 < _i19; _j19++) { api.add(_decoder.readInt()); } }
long _i20 = _decoder.readArrayStart(); vast_companion_type = new org.apache.avro.generic.GenericData.Array((int) _i20, SCHEMA$.getFields().get(20).schema()); for(; _i20 != 0; _i20 = _decoder.arrayNext()) { for (long _j20= 0; _j20 < _i20; _j20++) { vast_companion_type.add(_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.generic.GenericData.Array mimes;
private int minduration;
private int maxduration;
private int protocol;
private org.apache.avro.generic.GenericData.Array protocols;
private int w;
private int h;
private int startdelay;
private int linearity;
private int sequence;
private org.apache.avro.generic.GenericData.Array battr;
private int maxextended;
private int minbitrate;
private int maxbitrate;
private int boxingallowed;
private org.apache.avro.generic.GenericData.Array playbackmethod;
private org.apache.avro.generic.GenericData.Array deliverymethod;
private int pos;
private org.apache.avro.generic.GenericData.Array companionad;
private org.apache.avro.generic.GenericData.Array api;
private org.apache.avro.generic.GenericData.Array vast_companion_type;
public Builder() {
super(VideoAvro.SCHEMA$);
}
public Builder(VideoAvro.Builder other) {
super(other);
if (isValidValue(fields()[0], other.mimes)) {
this.mimes = data().deepCopy(fields()[0].schema(), other.mimes);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.minduration)) {
this.minduration = data().deepCopy(fields()[1].schema(), other.minduration);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.maxduration)) {
this.maxduration = data().deepCopy(fields()[2].schema(), other.maxduration);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.protocol)) {
this.protocol = data().deepCopy(fields()[3].schema(), other.protocol);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.protocols)) {
this.protocols = data().deepCopy(fields()[4].schema(), other.protocols);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.w)) {
this.w = data().deepCopy(fields()[5].schema(), other.w);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.h)) {
this.h = data().deepCopy(fields()[6].schema(), other.h);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.startdelay)) {
this.startdelay = data().deepCopy(fields()[7].schema(), other.startdelay);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.linearity)) {
this.linearity = data().deepCopy(fields()[8].schema(), other.linearity);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.sequence)) {
this.sequence = data().deepCopy(fields()[9].schema(), other.sequence);
fieldSetFlags()[9] = true;
}
if (isValidValue(fields()[10], other.battr)) {
this.battr = data().deepCopy(fields()[10].schema(), other.battr);
fieldSetFlags()[10] = true;
}
if (isValidValue(fields()[11], other.maxextended)) {
this.maxextended = data().deepCopy(fields()[11].schema(), other.maxextended);
fieldSetFlags()[11] = true;
}
if (isValidValue(fields()[12], other.minbitrate)) {
this.minbitrate = data().deepCopy(fields()[12].schema(), other.minbitrate);
fieldSetFlags()[12] = true;
}
if (isValidValue(fields()[13], other.maxbitrate)) {
this.maxbitrate = data().deepCopy(fields()[13].schema(), other.maxbitrate);
fieldSetFlags()[13] = true;
}
if (isValidValue(fields()[14], other.boxingallowed)) {
this.boxingallowed = data().deepCopy(fields()[14].schema(), other.boxingallowed);
fieldSetFlags()[14] = true;
}
if (isValidValue(fields()[15], other.playbackmethod)) {
this.playbackmethod = data().deepCopy(fields()[15].schema(), other.playbackmethod);
fieldSetFlags()[15] = true;
}
if (isValidValue(fields()[16], other.deliverymethod)) {
this.deliverymethod = data().deepCopy(fields()[16].schema(), other.deliverymethod);
fieldSetFlags()[16] = true;
}
if (isValidValue(fields()[17], other.pos)) {
this.pos = data().deepCopy(fields()[17].schema(), other.pos);
fieldSetFlags()[17] = true;
}
if (isValidValue(fields()[18], other.companionad)) {
this.companionad = data().deepCopy(fields()[18].schema(), other.companionad);
fieldSetFlags()[18] = true;
}
if (isValidValue(fields()[19], other.api)) {
this.api = data().deepCopy(fields()[19].schema(), other.api);
fieldSetFlags()[19] = true;
}
if (isValidValue(fields()[20], other.vast_companion_type)) {
this.vast_companion_type = data().deepCopy(fields()[20].schema(), other.vast_companion_type);
fieldSetFlags()[20] = true;
}
}
public Builder(VideoAvro other) {
super(VideoAvro.SCHEMA$);
if (isValidValue(fields()[0], other.mimes)) {
this.mimes = data().deepCopy(fields()[0].schema(), other.mimes);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.minduration)) {
this.minduration = data().deepCopy(fields()[1].schema(), other.minduration);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.maxduration)) {
this.maxduration = data().deepCopy(fields()[2].schema(), other.maxduration);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.protocol)) {
this.protocol = data().deepCopy(fields()[3].schema(), other.protocol);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.protocols)) {
this.protocols = data().deepCopy(fields()[4].schema(), other.protocols);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.w)) {
this.w = data().deepCopy(fields()[5].schema(), other.w);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.h)) {
this.h = data().deepCopy(fields()[6].schema(), other.h);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.startdelay)) {
this.startdelay = data().deepCopy(fields()[7].schema(), other.startdelay);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.linearity)) {
this.linearity = data().deepCopy(fields()[8].schema(), other.linearity);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.sequence)) {
this.sequence = data().deepCopy(fields()[9].schema(), other.sequence);
fieldSetFlags()[9] = true;
}
if (isValidValue(fields()[10], other.battr)) {
this.battr = data().deepCopy(fields()[10].schema(), other.battr);
fieldSetFlags()[10] = true;
}
if (isValidValue(fields()[11], other.maxextended)) {
this.maxextended = data().deepCopy(fields()[11].schema(), other.maxextended);
fieldSetFlags()[11] = true;
}
if (isValidValue(fields()[12], other.minbitrate)) {
this.minbitrate = data().deepCopy(fields()[12].schema(), other.minbitrate);
fieldSetFlags()[12] = true;
}
if (isValidValue(fields()[13], other.maxbitrate)) {
this.maxbitrate = data().deepCopy(fields()[13].schema(), other.maxbitrate);
fieldSetFlags()[13] = true;
}
if (isValidValue(fields()[14], other.boxingallowed)) {
this.boxingallowed = data().deepCopy(fields()[14].schema(), other.boxingallowed);
fieldSetFlags()[14] = true;
}
if (isValidValue(fields()[15], other.playbackmethod)) {
this.playbackmethod = data().deepCopy(fields()[15].schema(), other.playbackmethod);
fieldSetFlags()[15] = true;
}
if (isValidValue(fields()[16], other.deliverymethod)) {
this.deliverymethod = data().deepCopy(fields()[16].schema(), other.deliverymethod);
fieldSetFlags()[16] = true;
}
if (isValidValue(fields()[17], other.pos)) {
this.pos = data().deepCopy(fields()[17].schema(), other.pos);
fieldSetFlags()[17] = true;
}
if (isValidValue(fields()[18], other.companionad)) {
this.companionad = data().deepCopy(fields()[18].schema(), other.companionad);
fieldSetFlags()[18] = true;
}
if (isValidValue(fields()[19], other.api)) {
this.api = data().deepCopy(fields()[19].schema(), other.api);
fieldSetFlags()[19] = true;
}
if (isValidValue(fields()[20], other.vast_companion_type)) {
this.vast_companion_type = data().deepCopy(fields()[20].schema(), other.vast_companion_type);
fieldSetFlags()[20] = true;
}
}
/** Gets the value of the 'mimes' field. */
public org.apache.avro.generic.GenericData.Array getMimes() {
return mimes;
}
/** Sets the value of the 'mimes' field. */
public VideoAvro.Builder setMimes(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[0], value);
this.mimes = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'mimes' field has been set. */
public boolean hasMimes() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'mimes' field. */
public VideoAvro.Builder clearMimes() {
mimes = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'minduration' field. */
public int getMinduration() {
return minduration;
}
/** Sets the value of the 'minduration' field. */
public VideoAvro.Builder setMinduration(int value) {
validate(fields()[1], value);
this.minduration = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'minduration' field has been set. */
public boolean hasMinduration() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'minduration' field. */
public VideoAvro.Builder clearMinduration() {
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'maxduration' field. */
public int getMaxduration() {
return maxduration;
}
/** Sets the value of the 'maxduration' field. */
public VideoAvro.Builder setMaxduration(int value) {
validate(fields()[2], value);
this.maxduration = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'maxduration' field has been set. */
public boolean hasMaxduration() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'maxduration' field. */
public VideoAvro.Builder clearMaxduration() {
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'protocol' field. */
public int getProtocol() {
return protocol;
}
/** Sets the value of the 'protocol' field. */
public VideoAvro.Builder setProtocol(int value) {
validate(fields()[3], value);
this.protocol = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'protocol' field has been set. */
public boolean hasProtocol() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'protocol' field. */
public VideoAvro.Builder clearProtocol() {
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'protocols' field. */
public org.apache.avro.generic.GenericData.Array getProtocols() {
return protocols;
}
/** Sets the value of the 'protocols' field. */
public VideoAvro.Builder setProtocols(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[4], value);
this.protocols = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'protocols' field has been set. */
public boolean hasProtocols() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'protocols' field. */
public VideoAvro.Builder clearProtocols() {
protocols = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'w' field. */
public int getW() {
return w;
}
/** Sets the value of the 'w' field. */
public VideoAvro.Builder setW(int value) {
validate(fields()[5], value);
this.w = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'w' field has been set. */
public boolean hasW() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'w' field. */
public VideoAvro.Builder clearW() {
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'h' field. */
public int getH() {
return h;
}
/** Sets the value of the 'h' field. */
public VideoAvro.Builder setH(int value) {
validate(fields()[6], value);
this.h = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'h' field has been set. */
public boolean hasH() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'h' field. */
public VideoAvro.Builder clearH() {
fieldSetFlags()[6] = false;
return this;
}
/** Gets the value of the 'startdelay' field. */
public int getStartdelay() {
return startdelay;
}
/** Sets the value of the 'startdelay' field. */
public VideoAvro.Builder setStartdelay(int value) {
validate(fields()[7], value);
this.startdelay = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'startdelay' field has been set. */
public boolean hasStartdelay() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'startdelay' field. */
public VideoAvro.Builder clearStartdelay() {
fieldSetFlags()[7] = false;
return this;
}
/** Gets the value of the 'linearity' field. */
public int getLinearity() {
return linearity;
}
/** Sets the value of the 'linearity' field. */
public VideoAvro.Builder setLinearity(int value) {
validate(fields()[8], value);
this.linearity = value;
fieldSetFlags()[8] = true;
return this;
}
/** Checks whether the 'linearity' field has been set. */
public boolean hasLinearity() {
return fieldSetFlags()[8];
}
/** Clears the value of the 'linearity' field. */
public VideoAvro.Builder clearLinearity() {
fieldSetFlags()[8] = false;
return this;
}
/** Gets the value of the 'sequence' field. */
public int getSequence() {
return sequence;
}
/** Sets the value of the 'sequence' field. */
public VideoAvro.Builder setSequence(int value) {
validate(fields()[9], value);
this.sequence = value;
fieldSetFlags()[9] = true;
return this;
}
/** Checks whether the 'sequence' field has been set. */
public boolean hasSequence() {
return fieldSetFlags()[9];
}
/** Clears the value of the 'sequence' field. */
public VideoAvro.Builder clearSequence() {
fieldSetFlags()[9] = false;
return this;
}
/** Gets the value of the 'battr' field. */
public org.apache.avro.generic.GenericData.Array getBattr() {
return battr;
}
/** Sets the value of the 'battr' field. */
public VideoAvro.Builder setBattr(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[10], value);
this.battr = value;
fieldSetFlags()[10] = true;
return this;
}
/** Checks whether the 'battr' field has been set. */
public boolean hasBattr() {
return fieldSetFlags()[10];
}
/** Clears the value of the 'battr' field. */
public VideoAvro.Builder clearBattr() {
battr = null;
fieldSetFlags()[10] = false;
return this;
}
/** Gets the value of the 'maxextended' field. */
public int getMaxextended() {
return maxextended;
}
/** Sets the value of the 'maxextended' field. */
public VideoAvro.Builder setMaxextended(int value) {
validate(fields()[11], value);
this.maxextended = value;
fieldSetFlags()[11] = true;
return this;
}
/** Checks whether the 'maxextended' field has been set. */
public boolean hasMaxextended() {
return fieldSetFlags()[11];
}
/** Clears the value of the 'maxextended' field. */
public VideoAvro.Builder clearMaxextended() {
fieldSetFlags()[11] = false;
return this;
}
/** Gets the value of the 'minbitrate' field. */
public int getMinbitrate() {
return minbitrate;
}
/** Sets the value of the 'minbitrate' field. */
public VideoAvro.Builder setMinbitrate(int value) {
validate(fields()[12], value);
this.minbitrate = value;
fieldSetFlags()[12] = true;
return this;
}
/** Checks whether the 'minbitrate' field has been set. */
public boolean hasMinbitrate() {
return fieldSetFlags()[12];
}
/** Clears the value of the 'minbitrate' field. */
public VideoAvro.Builder clearMinbitrate() {
fieldSetFlags()[12] = false;
return this;
}
/** Gets the value of the 'maxbitrate' field. */
public int getMaxbitrate() {
return maxbitrate;
}
/** Sets the value of the 'maxbitrate' field. */
public VideoAvro.Builder setMaxbitrate(int value) {
validate(fields()[13], value);
this.maxbitrate = value;
fieldSetFlags()[13] = true;
return this;
}
/** Checks whether the 'maxbitrate' field has been set. */
public boolean hasMaxbitrate() {
return fieldSetFlags()[13];
}
/** Clears the value of the 'maxbitrate' field. */
public VideoAvro.Builder clearMaxbitrate() {
fieldSetFlags()[13] = false;
return this;
}
/** Gets the value of the 'boxingallowed' field. */
public int getBoxingallowed() {
return boxingallowed;
}
/** Sets the value of the 'boxingallowed' field. */
public VideoAvro.Builder setBoxingallowed(int value) {
validate(fields()[14], value);
this.boxingallowed = value;
fieldSetFlags()[14] = true;
return this;
}
/** Checks whether the 'boxingallowed' field has been set. */
public boolean hasBoxingallowed() {
return fieldSetFlags()[14];
}
/** Clears the value of the 'boxingallowed' field. */
public VideoAvro.Builder clearBoxingallowed() {
fieldSetFlags()[14] = false;
return this;
}
/** Gets the value of the 'playbackmethod' field. */
public org.apache.avro.generic.GenericData.Array getPlaybackmethod() {
return playbackmethod;
}
/** Sets the value of the 'playbackmethod' field. */
public VideoAvro.Builder setPlaybackmethod(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[15], value);
this.playbackmethod = value;
fieldSetFlags()[15] = true;
return this;
}
/** Checks whether the 'playbackmethod' field has been set. */
public boolean hasPlaybackmethod() {
return fieldSetFlags()[15];
}
/** Clears the value of the 'playbackmethod' field. */
public VideoAvro.Builder clearPlaybackmethod() {
playbackmethod = null;
fieldSetFlags()[15] = false;
return this;
}
/** Gets the value of the 'deliverymethod' field. */
public org.apache.avro.generic.GenericData.Array getDeliverymethod() {
return deliverymethod;
}
/** Sets the value of the 'deliverymethod' field. */
public VideoAvro.Builder setDeliverymethod(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[16], value);
this.deliverymethod = value;
fieldSetFlags()[16] = true;
return this;
}
/** Checks whether the 'deliverymethod' field has been set. */
public boolean hasDeliverymethod() {
return fieldSetFlags()[16];
}
/** Clears the value of the 'deliverymethod' field. */
public VideoAvro.Builder clearDeliverymethod() {
deliverymethod = null;
fieldSetFlags()[16] = false;
return this;
}
/** Gets the value of the 'pos' field. */
public int getPos() {
return pos;
}
/** Sets the value of the 'pos' field. */
public VideoAvro.Builder setPos(int value) {
validate(fields()[17], value);
this.pos = value;
fieldSetFlags()[17] = true;
return this;
}
/** Checks whether the 'pos' field has been set. */
public boolean hasPos() {
return fieldSetFlags()[17];
}
/** Clears the value of the 'pos' field. */
public VideoAvro.Builder clearPos() {
fieldSetFlags()[17] = false;
return this;
}
/** Gets the value of the 'companionad' field. */
public org.apache.avro.generic.GenericData.Array getCompanionad() {
return companionad;
}
/** Sets the value of the 'companionad' field. */
public VideoAvro.Builder setCompanionad(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[18], value);
this.companionad = value;
fieldSetFlags()[18] = true;
return this;
}
/** Checks whether the 'companionad' field has been set. */
public boolean hasCompanionad() {
return fieldSetFlags()[18];
}
/** Clears the value of the 'companionad' field. */
public VideoAvro.Builder clearCompanionad() {
companionad = null;
fieldSetFlags()[18] = false;
return this;
}
/** Gets the value of the 'api' field. */
public org.apache.avro.generic.GenericData.Array getApi() {
return api;
}
/** Sets the value of the 'api' field. */
public VideoAvro.Builder setApi(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[19], value);
this.api = value;
fieldSetFlags()[19] = true;
return this;
}
/** Checks whether the 'api' field has been set. */
public boolean hasApi() {
return fieldSetFlags()[19];
}
/** Clears the value of the 'api' field. */
public VideoAvro.Builder clearApi() {
api = null;
fieldSetFlags()[19] = false;
return this;
}
/** Gets the value of the 'vast_companion_type' field. */
public org.apache.avro.generic.GenericData.Array getVastCompanionType() {
return vast_companion_type;
}
/** Sets the value of the 'vast_companion_type' field. */
public VideoAvro.Builder setVastCompanionType(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[20], value);
this.vast_companion_type = value;
fieldSetFlags()[20] = true;
return this;
}
/** Checks whether the 'vast_companion_type' field has been set. */
public boolean hasVastCompanionType() {
return fieldSetFlags()[20];
}
/** Clears the value of the 'vast_companion_type' field. */
public VideoAvro.Builder clearVastCompanionType() {
vast_companion_type = null;
fieldSetFlags()[20] = false;
return this;
}
@Override
public VideoAvro build() {
final VideoAvro record;
try {
record = new VideoAvro();
record.mimes = fieldSetFlags()[0] ? this.mimes : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[0]);
record.minduration = fieldSetFlags()[1] ? this.minduration : (int) defaultValue(fields()[1]);
record.maxduration = fieldSetFlags()[2] ? this.maxduration : (int) defaultValue(fields()[2]);
record.protocol = fieldSetFlags()[3] ? this.protocol : (int) defaultValue(fields()[3]);
record.protocols = fieldSetFlags()[4] ? this.protocols : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[4]);
record.w = fieldSetFlags()[5] ? this.w : (int) defaultValue(fields()[5]);
record.h = fieldSetFlags()[6] ? this.h : (int) defaultValue(fields()[6]);
record.startdelay = fieldSetFlags()[7] ? this.startdelay : (int) defaultValue(fields()[7]);
record.linearity = fieldSetFlags()[8] ? this.linearity : (int) defaultValue(fields()[8]);
record.sequence = fieldSetFlags()[9] ? this.sequence : (int) defaultValue(fields()[9]);
record.battr = fieldSetFlags()[10] ? this.battr : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[10]);
record.maxextended = fieldSetFlags()[11] ? this.maxextended : (int) defaultValue(fields()[11]);
record.minbitrate = fieldSetFlags()[12] ? this.minbitrate : (int) defaultValue(fields()[12]);
record.maxbitrate = fieldSetFlags()[13] ? this.maxbitrate : (int) defaultValue(fields()[13]);
record.boxingallowed = fieldSetFlags()[14] ? this.boxingallowed : (int) defaultValue(fields()[14]);
record.playbackmethod = fieldSetFlags()[15] ? this.playbackmethod : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[15]);
record.deliverymethod = fieldSetFlags()[16] ? this.deliverymethod : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[16]);
record.pos = fieldSetFlags()[17] ? this.pos : (int) defaultValue(fields()[17]);
record.companionad = fieldSetFlags()[18] ? this.companionad : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[18]);
record.api = fieldSetFlags()[19] ? this.api : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[19]);
record.vast_companion_type = fieldSetFlags()[20] ? this.vast_companion_type : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[20]);
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
return record.freeze();
}
}
/** Creates a new VideoAvro RecordBuilder. */
static public VideoAvro.Builder newBuilder() {
return new VideoAvro.Builder();
}
/** Creates a new VideoAvro RecordBuilder by copying an existing VideoAvro.Builder instance. */
static public VideoAvro.Builder newBuilder(VideoAvro.Builder other) {
return new VideoAvro.Builder(other);
}
/** Creates a new VideoAvro RecordBuilder by copying an existing VideoAvro instance. */
static public VideoAvro.Builder newBuilder(VideoAvro other) {
return new VideoAvro.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\":\"VideoAvro\",\"namespace\":\"open_rtb\",\"doc\":\"3.3.4 Video Object\\nThe “video” object _must_ be included directly in the impression object if the impression offered for auction is an in-stream video ad opportunity.\\nNote that for the video object, many of the fields are non-essential for a minimally viable exchange interfaces. These parameters do not necessarily need to be specified to the bidder, if they are always the same for all impression, of if the exchange chooses not to supply the additional information to the bidder.\",\"fields\":[{\"name\":\"mimes\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"Content MIME types supported. Popular MIME types include, but are not limited to “video/x-ms- wmv” for Windows Media, and “video/x-flv” for Flash Video.\",\"default\":[],\"ordinal_\":1},{\"name\":\"minduration\",\"type\":{\"type\":\"int\",\"max\":2147483647,\"min\":-1},\"doc\":\"Minimum video ad duration in seconds.\",\"default\":-1,\"ordinal_\":2},{\"name\":\"maxduration\",\"type\":{\"type\":\"int\",\"max\":2147483647,\"min\":-1},\"doc\":\"Maximum video ad duration in seconds.\",\"default\":-1,\"ordinal_\":3},{\"name\":\"protocol\",\"type\":{\"type\":\"int\",\"max\":255,\"min\":0},\"doc\":\"Video bid response protocols. See Table 6.7 Video Bid Response Protocols for a list of possible values. NOTE: Use “protocols” when multiple protocols are supported. Its use is also highly recommended even for one since this “protocol” attribute is likely to be deprecated in a future version.\\n At least one supported protocol must be specified in either the “protocol” or “protocols” attribute.\",\"default\":0,\"ordinal_\":4},{\"name\":\"protocols\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"Video bid response protocols. See Table 6.7 Video Bid Response Protocols for a list of possible values.\\n At least one supported protocol must be specified in either the “protocol” or “protocols” attribute.\",\"default\":[],\"ordinal_\":5},{\"name\":\"w\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Width of the player in pixels. This field is not required, but it’s highly recommended that this information be included.\",\"default\":0,\"ordinal_\":6},{\"name\":\"h\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Height of the player in pixels. This field is not required, but it’s highly recommended that this information be included.\",\"default\":0,\"ordinal_\":7},{\"name\":\"startdelay\",\"type\":{\"type\":\"int\",\"max\":127,\"min\":-128},\"doc\":\"Indicates the start delay in seconds for preroll, midroll, or postroll ad placement. See Table 6.9 Video Start Delay for generic placement values.\",\"default\":0,\"ordinal_\":8},{\"name\":\"linearity\",\"type\":{\"type\":\"int\",\"max\":255,\"min\":0},\"doc\":\"Indicates whether the ad impression must be linear, non- linear or can be of any type (field not set). See Table 6.6 Video Linearity for a list of the possible values and recommended bidder interpretation.\",\"default\":0,\"ordinal_\":9},{\"name\":\"sequence\",\"type\":{\"type\":\"int\",\"max\":65535,\"min\":0},\"doc\":\"If multiple ad impressions are offered in the same bid request, the sequence number will allow for the coordinated delivery of multiple creatives.\",\"default\":1,\"ordinal_\":10},{\"name\":\"battr\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"Blocked creative attributes. See Table 6.3 Creative Attributes. If blank assume all types are allowed.\",\"default\":[],\"ordinal_\":11},{\"name\":\"maxextended\",\"type\":{\"type\":\"int\",\"max\":2147483647,\"min\":-1},\"doc\":\"Maximum extended video ad duration, if extension is allowed. If blank or 0, extension is not allowed. If -1, extension is allowed, and there is no time limit imposed. If greater than 0, then the value represents the number of seconds of extended play supported beyond the maxduration value.\",\"default\":0,\"ordinal_\":12},{\"name\":\"minbitrate\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Minimum bit rate in Kbps. Exchange may set this dynamically, or universally across their set of publishers.\",\"default\":0,\"ordinal_\":13},{\"name\":\"maxbitrate\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Maximum bit rate in Kbps. Exchange may set this dynamically, or universally across their set of publishers.\",\"default\":0,\"ordinal_\":14},{\"name\":\"boxingallowed\",\"type\":{\"type\":\"int\",\"max\":1,\"min\":0},\"doc\":\"If exchange publisher has rules preventing letter boxing of 4x3 content to play in a 16x9 window, then this should be set to false. Default setting is true, which assumes that boxing of content to fit into a window is allowed. “1” indicates boxing is allowed. “0” indicates it is not allowed.\",\"default\":1,\"ordinal_\":15},{\"name\":\"playbackmethod\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"List of allowed playback methods. If blank, assume that all are allowed. See Table 6.8 Video Playback Methods for a list of possible values.\",\"default\":[],\"ordinal_\":16},{\"name\":\"deliverymethod\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"List of supported delivery methods (streaming, progressive). If blank, assume all are supported. See Table 6.12 Content Delivery Methods for a list of possible values.\",\"default\":[],\"ordinal_\":17},{\"name\":\"pos\",\"type\":{\"type\":\"int\",\"max\":255,\"min\":0},\"doc\":\"Ad Position (see table 6.5). Default: unknown.\",\"default\":0,\"ordinal_\":18},{\"name\":\"companionad\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"BannerAvro\",\"doc\":\"3.3.3 Banner Object\\nThe “banner” object _must_ be included directly in the impression object if the impression offered for auction is display or rich media, or it may be _optionally_ embedded in the video object to describe the companion banners available for the linear or non-linear video ad. The banner object may include a unique identifier; this can be useful if these IDs can be leveraged in the VAST response to dictate placement of the companion creatives when multiple companion ad opportunities of the same size are available on a page.\",\"fields\":[{\"name\":\"w\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Width of the impression in pixels. Since some ad types are not restricted by size this field is not required, but it’s highly recommended that this information be included when possible.\",\"default\":0,\"ordinal_\":1},{\"name\":\"h\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Height of the impression in pixels. Since some ad types are not restricted by size this field is not required, but it’s highly recommended that this information be included when possible.\",\"default\":0,\"ordinal_\":2},{\"name\":\"wmax\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Maximum width of the impression in pixels. If included, it indicates that a range of sizes is allowed with this maximum width and \\\"w\\\" is taken as recommended. If not included, then \\\"w\\\" should be considered an exact requirement.\",\"default\":0,\"ordinal_\":3},{\"name\":\"hmax\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Maximum height of the impression in pixels. If included, it indicates that a range of sizes is allowed with this maximum height and \\\"h\\\" is taken as recommended. If not included, then \\\"h\\\" should be considered an exact requirement.\",\"default\":0,\"ordinal_\":4},{\"name\":\"wmin\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Minimum width of the impression in pixels. If included, it indicates that a range of sizes is allowed with this minimum width and \\\"w\\\" is taken as recommended. If not included, then \\\"w\\\" should be considered an exact requirement.\",\"default\":0,\"ordinal_\":5},{\"name\":\"hmin\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Minimum height of the impression in pixels. If included, it indicates that a range of sizes is allowed with this minimum height and \\\"h\\\" is taken as recommended. If not included, then \\\"h\\\" should be considered an exact requirement.\",\"default\":0,\"ordinal_\":6},{\"name\":\"id\",\"type\":\"string\",\"doc\":\"Unique identifier for this banner object. Useful for tracking multiple banner objects (e.g., in companion banner array). Usually starts with 1, increasing with each object. Combination of impression id banner object should be unique.\",\"default\":\"\",\"ordinal_\":7},{\"name\":\"pos\",\"type\":{\"type\":\"int\",\"max\":255,\"min\":0},\"doc\":\"Ad Position. Use Table 6.5\",\"default\"",":0,\"ordinal_\":8},{\"name\":\"btype\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"Blocked creative types. See Table 6.2 Banner Ad Types. If blank, assume all types are allowed.\",\"default\":[],\"ordinal_\":9},{\"name\":\"battr\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":65535,\"min\":0}},\"doc\":\"Blocked creative attributes. See Table 6.3 Creative Attributes. If blank assume all types are allowed.\",\"default\":[],\"ordinal_\":10},{\"name\":\"mimes\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"Whitelist of content MIME types supported. Popular MIME types include, but are not limited to “image/jpg”, “image/gif” and “application/x-shockwave-flash”.\",\"default\":[],\"ordinal_\":11},{\"name\":\"topframe\",\"type\":{\"type\":\"int\",\"max\":1,\"min\":0},\"doc\":\"Specify if the banner is delivered in the top frame or in an iframe. “0” means it is not in the top frame, and “1” means that it is.\",\"default\":0,\"ordinal_\":12},{\"name\":\"expdir\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"Specify properties for an expandable ad. See Table 6.11 Expandable Direction for possible values.\",\"default\":[],\"ordinal_\":13},{\"name\":\"api\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"List of supported API frameworks for this banner. (See Table 6.4 API Frameworks). If an API is not explicitly listed it is assumed not to be supported.\",\"default\":[],\"ordinal_\":14}]}},\"doc\":\"If companion ads are available, they can be listed as an array of banner objects. See Banner Object.\",\"default\":[],\"ordinal_\":19},{\"name\":\"api\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"List of supported API frameworks for this impression. (See Table 6.4 API Frameworks). If an API is not explicitly listed it is assumed not to be supported.\",\"default\":[],\"ordinal_\":20},{\"name\":\"vast_companion_type\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"int\",\"max\":255,\"min\":0}},\"doc\":\"Recommended if companion objects are included. See Table 6.17 VAST Companion Types for a list of possible values.\",\"default\":[],\"ordinal_\":21}]}");
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy