
open_rtb.ContentAvro Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package open_rtb;
/** 3.3.7 Content Object
The content object itself and all of its parameters are optional, so default values are not provided. If an optional parameter is not specified, it should be considered unknown. This object describes the content in which the impression will appear (may be syndicated or non- syndicated content).
This object may be useful in the situation where syndicated content contains impressions and does not necessarily match the publisher’s general content. The exchange might or might not have knowledge of the page where the content is running, as a result of the syndication method. (For example, video impressions embedded in an iframe on an unknown web property or device.) */
@org.apache.avro.specific.AvroGenerated
final public class ContentAvro extends org.apache.avro.specific.SpecificRecordBase {
/** ID uniquely identifying the content. */
org.apache.avro.util.Utf8 id;
/** Content episode number (typically applies to video content). */
int episode;
/** Content title.
Video examples: “Search Committee” (television) or “A New Hope” (movie) or “Endgame” (made for web)
Non-video example: “Why an Antarctic Glacier Is Melting So Quickly” (Time magazine article) */
org.apache.avro.util.Utf8 title;
/** Content series.
Video examples: “The Office” (television) or “Star Wars” (movie) or “Arby ‘N’ The Chief” (made for web)
Non-video example: “Ecocentric” (Time magazine blog) */
org.apache.avro.util.Utf8 series;
/** Content season. E.g., “Season 3” (typically applies to video content). */
org.apache.avro.util.Utf8 season;
/** Original URL of the content, for buy-side contextualization or review. */
org.apache.avro.util.Utf8 url;
/** Array of IAB content categories for the content. See Table 6.1 Content Categories. */
org.apache.avro.generic.GenericData.Array cat;
/** Video quality per the IAB’s classification. See Table 6.14 Video Quality. */
int videoquality;
/** Comma separated list of keywords describing the content. */
org.apache.avro.util.Utf8 keywords;
/** Content rating (e.g., MPAA) */
org.apache.avro.util.Utf8 contentrating;
/** User rating of the content (e.g., number of stars, likes, etc.). */
org.apache.avro.util.Utf8 userrating;
/** Specifies the type of content (game, video, text, etc.). See Table 6.13 Content Context. */
org.apache.avro.util.Utf8 context;
/** Is content live? E.g., live video stream, live blog. “1” means content is live. “0” means it is not live. */
int livestream;
/** 1 for “direct”; 0 for “indirect”. */
int sourcerelationship;
/** See Producer Object. */
open_rtb.ProducerAvro producer;
/** Length of content (appropriate for video or audio) in seconds. */
int len;
/** Media rating of the content, per QAG guidelines. See Table 0 QAG Media Ratings for list of possible values. */
int qagmediarating;
/** From QAG Video Addendum. If content can be embedded (such as an embeddable video player) this value should be set to “1”. If content cannot be embedded, then this should be set to “0”. */
int embeddable;
/** Language of the content. Use alpha-2/ISO 639-1 codes. */
org.apache.avro.util.Utf8 language;
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 ContentAvro() {}
public ContentAvro freeze() {
_frozen = true;
producer.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 id;
case 1: return episode;
case 2: return title;
case 3: return series;
case 4: return season;
case 5: return url;
case 6: return cat;
case 7: return videoquality;
case 8: return keywords;
case 9: return contentrating;
case 10: return userrating;
case 11: return context;
case 12: return livestream;
case 13: return sourcerelationship;
case 14: return producer;
case 15: return len;
case 16: return qagmediarating;
case 17: return embeddable;
case 18: return language;
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.writeInt(episode);
_encoder.writeString(title);
_encoder.writeString(series);
_encoder.writeString(season);
_encoder.writeString(url);
_encoder.writeArrayStart(); _encoder.setItemCount(cat.size()); for (org.apache.avro.util.Utf8 e : cat) { _encoder.writeString(e); } _encoder.writeArrayEnd();
_encoder.writeInt(videoquality);
_encoder.writeString(keywords);
_encoder.writeString(contentrating);
_encoder.writeString(userrating);
_encoder.writeString(context);
_encoder.writeInt(livestream);
_encoder.writeInt(sourcerelationship);
producer.encode(_encoder);
_encoder.writeInt(len);
_encoder.writeInt(qagmediarating);
_encoder.writeInt(embeddable);
_encoder.writeString(language);
}
// 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: episode = (int) value$; break;
case 2: title = (org.apache.avro.util.Utf8) value$; break;
case 3: series = (org.apache.avro.util.Utf8) value$; break;
case 4: season = (org.apache.avro.util.Utf8) value$; break;
case 5: url = (org.apache.avro.util.Utf8) value$; break;
case 6: cat = (org.apache.avro.generic.GenericData.Array) value$; break;
case 7: videoquality = (int) value$; break;
case 8: keywords = (org.apache.avro.util.Utf8) value$; break;
case 9: contentrating = (org.apache.avro.util.Utf8) value$; break;
case 10: userrating = (org.apache.avro.util.Utf8) value$; break;
case 11: context = (org.apache.avro.util.Utf8) value$; break;
case 12: livestream = (int) value$; break;
case 13: sourcerelationship = (int) value$; break;
case 14: producer = (open_rtb.ProducerAvro) value$; break;
case 15: len = (int) value$; break;
case 16: qagmediarating = (int) value$; break;
case 17: embeddable = (int) value$; break;
case 18: language = (org.apache.avro.util.Utf8) value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/** Reads record from Avro Decoder. */
public ContentAvro 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);
episode = _decoder.readInt();
title = _decoder.readString(title);
series = _decoder.readString(series);
season = _decoder.readString(season);
url = _decoder.readString(url);
long _i6 = _decoder.readArrayStart(); cat = 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++) { cat.add(_decoder.readString(null)); } }
videoquality = _decoder.readInt();
keywords = _decoder.readString(keywords);
contentrating = _decoder.readString(contentrating);
userrating = _decoder.readString(userrating);
context = _decoder.readString(context);
livestream = _decoder.readInt();
sourcerelationship = _decoder.readInt();
producer = java.util.Optional.ofNullable(producer).orElseGet(open_rtb.ProducerAvro::new).decode(_decoder);
len = _decoder.readInt();
qagmediarating = _decoder.readInt();
embeddable = _decoder.readInt();
language = _decoder.readString(language);
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 int episode;
private org.apache.avro.util.Utf8 title;
private org.apache.avro.util.Utf8 series;
private org.apache.avro.util.Utf8 season;
private org.apache.avro.util.Utf8 url;
private org.apache.avro.generic.GenericData.Array cat;
private int videoquality;
private org.apache.avro.util.Utf8 keywords;
private org.apache.avro.util.Utf8 contentrating;
private org.apache.avro.util.Utf8 userrating;
private org.apache.avro.util.Utf8 context;
private int livestream;
private int sourcerelationship;
private open_rtb.ProducerAvro producer;
private int len;
private int qagmediarating;
private int embeddable;
private org.apache.avro.util.Utf8 language;
public Builder() {
super(ContentAvro.SCHEMA$);
}
public Builder(ContentAvro.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.episode)) {
this.episode = data().deepCopy(fields()[1].schema(), other.episode);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.title)) {
this.title = data().deepCopy(fields()[2].schema(), other.title);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.series)) {
this.series = data().deepCopy(fields()[3].schema(), other.series);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.season)) {
this.season = data().deepCopy(fields()[4].schema(), other.season);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.url)) {
this.url = data().deepCopy(fields()[5].schema(), other.url);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.cat)) {
this.cat = data().deepCopy(fields()[6].schema(), other.cat);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.videoquality)) {
this.videoquality = data().deepCopy(fields()[7].schema(), other.videoquality);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.keywords)) {
this.keywords = data().deepCopy(fields()[8].schema(), other.keywords);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.contentrating)) {
this.contentrating = data().deepCopy(fields()[9].schema(), other.contentrating);
fieldSetFlags()[9] = true;
}
if (isValidValue(fields()[10], other.userrating)) {
this.userrating = data().deepCopy(fields()[10].schema(), other.userrating);
fieldSetFlags()[10] = true;
}
if (isValidValue(fields()[11], other.context)) {
this.context = data().deepCopy(fields()[11].schema(), other.context);
fieldSetFlags()[11] = true;
}
if (isValidValue(fields()[12], other.livestream)) {
this.livestream = data().deepCopy(fields()[12].schema(), other.livestream);
fieldSetFlags()[12] = true;
}
if (isValidValue(fields()[13], other.sourcerelationship)) {
this.sourcerelationship = data().deepCopy(fields()[13].schema(), other.sourcerelationship);
fieldSetFlags()[13] = true;
}
if (isValidValue(fields()[14], other.producer)) {
this.producer = data().deepCopy(fields()[14].schema(), other.producer);
fieldSetFlags()[14] = true;
}
if (isValidValue(fields()[15], other.len)) {
this.len = data().deepCopy(fields()[15].schema(), other.len);
fieldSetFlags()[15] = true;
}
if (isValidValue(fields()[16], other.qagmediarating)) {
this.qagmediarating = data().deepCopy(fields()[16].schema(), other.qagmediarating);
fieldSetFlags()[16] = true;
}
if (isValidValue(fields()[17], other.embeddable)) {
this.embeddable = data().deepCopy(fields()[17].schema(), other.embeddable);
fieldSetFlags()[17] = true;
}
if (isValidValue(fields()[18], other.language)) {
this.language = data().deepCopy(fields()[18].schema(), other.language);
fieldSetFlags()[18] = true;
}
}
public Builder(ContentAvro other) {
super(ContentAvro.SCHEMA$);
if (isValidValue(fields()[0], other.id)) {
this.id = data().deepCopy(fields()[0].schema(), other.id);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.episode)) {
this.episode = data().deepCopy(fields()[1].schema(), other.episode);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.title)) {
this.title = data().deepCopy(fields()[2].schema(), other.title);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.series)) {
this.series = data().deepCopy(fields()[3].schema(), other.series);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.season)) {
this.season = data().deepCopy(fields()[4].schema(), other.season);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.url)) {
this.url = data().deepCopy(fields()[5].schema(), other.url);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.cat)) {
this.cat = data().deepCopy(fields()[6].schema(), other.cat);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.videoquality)) {
this.videoquality = data().deepCopy(fields()[7].schema(), other.videoquality);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.keywords)) {
this.keywords = data().deepCopy(fields()[8].schema(), other.keywords);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.contentrating)) {
this.contentrating = data().deepCopy(fields()[9].schema(), other.contentrating);
fieldSetFlags()[9] = true;
}
if (isValidValue(fields()[10], other.userrating)) {
this.userrating = data().deepCopy(fields()[10].schema(), other.userrating);
fieldSetFlags()[10] = true;
}
if (isValidValue(fields()[11], other.context)) {
this.context = data().deepCopy(fields()[11].schema(), other.context);
fieldSetFlags()[11] = true;
}
if (isValidValue(fields()[12], other.livestream)) {
this.livestream = data().deepCopy(fields()[12].schema(), other.livestream);
fieldSetFlags()[12] = true;
}
if (isValidValue(fields()[13], other.sourcerelationship)) {
this.sourcerelationship = data().deepCopy(fields()[13].schema(), other.sourcerelationship);
fieldSetFlags()[13] = true;
}
if (isValidValue(fields()[14], other.producer)) {
this.producer = data().deepCopy(fields()[14].schema(), other.producer);
fieldSetFlags()[14] = true;
}
if (isValidValue(fields()[15], other.len)) {
this.len = data().deepCopy(fields()[15].schema(), other.len);
fieldSetFlags()[15] = true;
}
if (isValidValue(fields()[16], other.qagmediarating)) {
this.qagmediarating = data().deepCopy(fields()[16].schema(), other.qagmediarating);
fieldSetFlags()[16] = true;
}
if (isValidValue(fields()[17], other.embeddable)) {
this.embeddable = data().deepCopy(fields()[17].schema(), other.embeddable);
fieldSetFlags()[17] = true;
}
if (isValidValue(fields()[18], other.language)) {
this.language = data().deepCopy(fields()[18].schema(), other.language);
fieldSetFlags()[18] = 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 ContentAvro.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 ContentAvro.Builder clearId() {
id = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'episode' field. */
public int getEpisode() {
return episode;
}
/** Sets the value of the 'episode' field. */
public ContentAvro.Builder setEpisode(int value) {
validate(fields()[1], value);
this.episode = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'episode' field has been set. */
public boolean hasEpisode() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'episode' field. */
public ContentAvro.Builder clearEpisode() {
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'title' field. */
public org.apache.avro.util.Utf8 getTitle() {
return title;
}
/** Sets the value of the 'title' field. */
public ContentAvro.Builder setTitle(org.apache.avro.util.Utf8 value) {
validate(fields()[2], value);
this.title = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'title' field has been set. */
public boolean hasTitle() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'title' field. */
public ContentAvro.Builder clearTitle() {
title = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'series' field. */
public org.apache.avro.util.Utf8 getSeries() {
return series;
}
/** Sets the value of the 'series' field. */
public ContentAvro.Builder setSeries(org.apache.avro.util.Utf8 value) {
validate(fields()[3], value);
this.series = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'series' field has been set. */
public boolean hasSeries() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'series' field. */
public ContentAvro.Builder clearSeries() {
series = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'season' field. */
public org.apache.avro.util.Utf8 getSeason() {
return season;
}
/** Sets the value of the 'season' field. */
public ContentAvro.Builder setSeason(org.apache.avro.util.Utf8 value) {
validate(fields()[4], value);
this.season = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'season' field has been set. */
public boolean hasSeason() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'season' field. */
public ContentAvro.Builder clearSeason() {
season = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'url' field. */
public org.apache.avro.util.Utf8 getUrl() {
return url;
}
/** Sets the value of the 'url' field. */
public ContentAvro.Builder setUrl(org.apache.avro.util.Utf8 value) {
validate(fields()[5], value);
this.url = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'url' field has been set. */
public boolean hasUrl() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'url' field. */
public ContentAvro.Builder clearUrl() {
url = null;
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'cat' field. */
public org.apache.avro.generic.GenericData.Array getCat() {
return cat;
}
/** Sets the value of the 'cat' field. */
public ContentAvro.Builder setCat(org.apache.avro.generic.GenericData.Array value) {
validate(fields()[6], value);
this.cat = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'cat' field has been set. */
public boolean hasCat() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'cat' field. */
public ContentAvro.Builder clearCat() {
cat = null;
fieldSetFlags()[6] = false;
return this;
}
/** Gets the value of the 'videoquality' field. */
public int getVideoquality() {
return videoquality;
}
/** Sets the value of the 'videoquality' field. */
public ContentAvro.Builder setVideoquality(int value) {
validate(fields()[7], value);
this.videoquality = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'videoquality' field has been set. */
public boolean hasVideoquality() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'videoquality' field. */
public ContentAvro.Builder clearVideoquality() {
fieldSetFlags()[7] = false;
return this;
}
/** Gets the value of the 'keywords' field. */
public org.apache.avro.util.Utf8 getKeywords() {
return keywords;
}
/** Sets the value of the 'keywords' field. */
public ContentAvro.Builder setKeywords(org.apache.avro.util.Utf8 value) {
validate(fields()[8], value);
this.keywords = value;
fieldSetFlags()[8] = true;
return this;
}
/** Checks whether the 'keywords' field has been set. */
public boolean hasKeywords() {
return fieldSetFlags()[8];
}
/** Clears the value of the 'keywords' field. */
public ContentAvro.Builder clearKeywords() {
keywords = null;
fieldSetFlags()[8] = false;
return this;
}
/** Gets the value of the 'contentrating' field. */
public org.apache.avro.util.Utf8 getContentrating() {
return contentrating;
}
/** Sets the value of the 'contentrating' field. */
public ContentAvro.Builder setContentrating(org.apache.avro.util.Utf8 value) {
validate(fields()[9], value);
this.contentrating = value;
fieldSetFlags()[9] = true;
return this;
}
/** Checks whether the 'contentrating' field has been set. */
public boolean hasContentrating() {
return fieldSetFlags()[9];
}
/** Clears the value of the 'contentrating' field. */
public ContentAvro.Builder clearContentrating() {
contentrating = null;
fieldSetFlags()[9] = false;
return this;
}
/** Gets the value of the 'userrating' field. */
public org.apache.avro.util.Utf8 getUserrating() {
return userrating;
}
/** Sets the value of the 'userrating' field. */
public ContentAvro.Builder setUserrating(org.apache.avro.util.Utf8 value) {
validate(fields()[10], value);
this.userrating = value;
fieldSetFlags()[10] = true;
return this;
}
/** Checks whether the 'userrating' field has been set. */
public boolean hasUserrating() {
return fieldSetFlags()[10];
}
/** Clears the value of the 'userrating' field. */
public ContentAvro.Builder clearUserrating() {
userrating = null;
fieldSetFlags()[10] = false;
return this;
}
/** Gets the value of the 'context' field. */
public org.apache.avro.util.Utf8 getContext() {
return context;
}
/** Sets the value of the 'context' field. */
public ContentAvro.Builder setContext(org.apache.avro.util.Utf8 value) {
validate(fields()[11], value);
this.context = value;
fieldSetFlags()[11] = true;
return this;
}
/** Checks whether the 'context' field has been set. */
public boolean hasContext() {
return fieldSetFlags()[11];
}
/** Clears the value of the 'context' field. */
public ContentAvro.Builder clearContext() {
context = null;
fieldSetFlags()[11] = false;
return this;
}
/** Gets the value of the 'livestream' field. */
public int getLivestream() {
return livestream;
}
/** Sets the value of the 'livestream' field. */
public ContentAvro.Builder setLivestream(int value) {
validate(fields()[12], value);
this.livestream = value;
fieldSetFlags()[12] = true;
return this;
}
/** Checks whether the 'livestream' field has been set. */
public boolean hasLivestream() {
return fieldSetFlags()[12];
}
/** Clears the value of the 'livestream' field. */
public ContentAvro.Builder clearLivestream() {
fieldSetFlags()[12] = false;
return this;
}
/** Gets the value of the 'sourcerelationship' field. */
public int getSourcerelationship() {
return sourcerelationship;
}
/** Sets the value of the 'sourcerelationship' field. */
public ContentAvro.Builder setSourcerelationship(int value) {
validate(fields()[13], value);
this.sourcerelationship = value;
fieldSetFlags()[13] = true;
return this;
}
/** Checks whether the 'sourcerelationship' field has been set. */
public boolean hasSourcerelationship() {
return fieldSetFlags()[13];
}
/** Clears the value of the 'sourcerelationship' field. */
public ContentAvro.Builder clearSourcerelationship() {
fieldSetFlags()[13] = false;
return this;
}
/** Gets the value of the 'producer' field. */
public open_rtb.ProducerAvro getProducer() {
return producer;
}
/** Sets the value of the 'producer' field. */
public ContentAvro.Builder setProducer(open_rtb.ProducerAvro value) {
validate(fields()[14], value);
this.producer = value;
fieldSetFlags()[14] = true;
return this;
}
/** Checks whether the 'producer' field has been set. */
public boolean hasProducer() {
return fieldSetFlags()[14];
}
/** Clears the value of the 'producer' field. */
public ContentAvro.Builder clearProducer() {
producer = null;
fieldSetFlags()[14] = false;
return this;
}
/** Gets the value of the 'len' field. */
public int getLen() {
return len;
}
/** Sets the value of the 'len' field. */
public ContentAvro.Builder setLen(int value) {
validate(fields()[15], value);
this.len = value;
fieldSetFlags()[15] = true;
return this;
}
/** Checks whether the 'len' field has been set. */
public boolean hasLen() {
return fieldSetFlags()[15];
}
/** Clears the value of the 'len' field. */
public ContentAvro.Builder clearLen() {
fieldSetFlags()[15] = false;
return this;
}
/** Gets the value of the 'qagmediarating' field. */
public int getQagmediarating() {
return qagmediarating;
}
/** Sets the value of the 'qagmediarating' field. */
public ContentAvro.Builder setQagmediarating(int value) {
validate(fields()[16], value);
this.qagmediarating = value;
fieldSetFlags()[16] = true;
return this;
}
/** Checks whether the 'qagmediarating' field has been set. */
public boolean hasQagmediarating() {
return fieldSetFlags()[16];
}
/** Clears the value of the 'qagmediarating' field. */
public ContentAvro.Builder clearQagmediarating() {
fieldSetFlags()[16] = false;
return this;
}
/** Gets the value of the 'embeddable' field. */
public int getEmbeddable() {
return embeddable;
}
/** Sets the value of the 'embeddable' field. */
public ContentAvro.Builder setEmbeddable(int value) {
validate(fields()[17], value);
this.embeddable = value;
fieldSetFlags()[17] = true;
return this;
}
/** Checks whether the 'embeddable' field has been set. */
public boolean hasEmbeddable() {
return fieldSetFlags()[17];
}
/** Clears the value of the 'embeddable' field. */
public ContentAvro.Builder clearEmbeddable() {
fieldSetFlags()[17] = false;
return this;
}
/** Gets the value of the 'language' field. */
public org.apache.avro.util.Utf8 getLanguage() {
return language;
}
/** Sets the value of the 'language' field. */
public ContentAvro.Builder setLanguage(org.apache.avro.util.Utf8 value) {
validate(fields()[18], value);
this.language = value;
fieldSetFlags()[18] = true;
return this;
}
/** Checks whether the 'language' field has been set. */
public boolean hasLanguage() {
return fieldSetFlags()[18];
}
/** Clears the value of the 'language' field. */
public ContentAvro.Builder clearLanguage() {
language = null;
fieldSetFlags()[18] = false;
return this;
}
@Override
public ContentAvro build() {
final ContentAvro record;
try {
record = new ContentAvro();
record.id = fieldSetFlags()[0] ? this.id : (org.apache.avro.util.Utf8) defaultValue(fields()[0]);
record.episode = fieldSetFlags()[1] ? this.episode : (int) defaultValue(fields()[1]);
record.title = fieldSetFlags()[2] ? this.title : (org.apache.avro.util.Utf8) defaultValue(fields()[2]);
record.series = fieldSetFlags()[3] ? this.series : (org.apache.avro.util.Utf8) defaultValue(fields()[3]);
record.season = fieldSetFlags()[4] ? this.season : (org.apache.avro.util.Utf8) defaultValue(fields()[4]);
record.url = fieldSetFlags()[5] ? this.url : (org.apache.avro.util.Utf8) defaultValue(fields()[5]);
record.cat = fieldSetFlags()[6] ? this.cat : (org.apache.avro.generic.GenericData.Array) defaultValue(fields()[6]);
record.videoquality = fieldSetFlags()[7] ? this.videoquality : (int) defaultValue(fields()[7]);
record.keywords = fieldSetFlags()[8] ? this.keywords : (org.apache.avro.util.Utf8) defaultValue(fields()[8]);
record.contentrating = fieldSetFlags()[9] ? this.contentrating : (org.apache.avro.util.Utf8) defaultValue(fields()[9]);
record.userrating = fieldSetFlags()[10] ? this.userrating : (org.apache.avro.util.Utf8) defaultValue(fields()[10]);
record.context = fieldSetFlags()[11] ? this.context : (org.apache.avro.util.Utf8) defaultValue(fields()[11]);
record.livestream = fieldSetFlags()[12] ? this.livestream : (int) defaultValue(fields()[12]);
record.sourcerelationship = fieldSetFlags()[13] ? this.sourcerelationship : (int) defaultValue(fields()[13]);
record.producer = fieldSetFlags()[14] ? this.producer : (open_rtb.ProducerAvro) defaultValue(fields()[14]);
record.len = fieldSetFlags()[15] ? this.len : (int) defaultValue(fields()[15]);
record.qagmediarating = fieldSetFlags()[16] ? this.qagmediarating : (int) defaultValue(fields()[16]);
record.embeddable = fieldSetFlags()[17] ? this.embeddable : (int) defaultValue(fields()[17]);
record.language = fieldSetFlags()[18] ? this.language : (org.apache.avro.util.Utf8) defaultValue(fields()[18]);
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
return record.freeze();
}
}
/** Creates a new ContentAvro RecordBuilder. */
static public ContentAvro.Builder newBuilder() {
return new ContentAvro.Builder();
}
/** Creates a new ContentAvro RecordBuilder by copying an existing ContentAvro.Builder instance. */
static public ContentAvro.Builder newBuilder(ContentAvro.Builder other) {
return new ContentAvro.Builder(other);
}
/** Creates a new ContentAvro RecordBuilder by copying an existing ContentAvro instance. */
static public ContentAvro.Builder newBuilder(ContentAvro other) {
return new ContentAvro.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\":\"ContentAvro\",\"namespace\":\"open_rtb\",\"doc\":\"3.3.7 Content Object\\nThe content object itself and all of its parameters are optional, so default values are not provided. If an optional parameter is not specified, it should be considered unknown. This object describes the content in which the impression will appear (may be syndicated or non- syndicated content).\\nThis object may be useful in the situation where syndicated content contains impressions and does not necessarily match the publisher’s general content. The exchange might or might not have knowledge of the page where the content is running, as a result of the syndication method. (For example, video impressions embedded in an iframe on an unknown web property or device.)\",\"fields\":[{\"name\":\"id\",\"type\":\"string\",\"doc\":\"ID uniquely identifying the content.\",\"default\":\"\",\"ordinal_\":1},{\"name\":\"episode\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Content episode number (typically applies to video content).\",\"default\":0,\"ordinal_\":2},{\"name\":\"title\",\"type\":\"string\",\"doc\":\"Content title.\\n Video examples: “Search Committee” (television) or “A New Hope” (movie) or “Endgame” (made for web)\\n Non-video example: “Why an Antarctic Glacier Is Melting So Quickly” (Time magazine article)\",\"default\":\"\",\"ordinal_\":3},{\"name\":\"series\",\"type\":\"string\",\"doc\":\"Content series.\\n Video examples: “The Office” (television) or “Star Wars” (movie) or “Arby ‘N’ The Chief” (made for web)\\n Non-video example: “Ecocentric” (Time magazine blog)\",\"default\":\"\",\"ordinal_\":4},{\"name\":\"season\",\"type\":\"string\",\"doc\":\"Content season. E.g., “Season 3” (typically applies to video content).\",\"default\":\"\",\"ordinal_\":5},{\"name\":\"url\",\"type\":\"string\",\"doc\":\"Original URL of the content, for buy-side contextualization or review.\",\"default\":\"\",\"ordinal_\":6},{\"name\":\"cat\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"Array of IAB content categories for the content. See Table 6.1 Content Categories.\",\"default\":[],\"ordinal_\":7},{\"name\":\"videoquality\",\"type\":{\"type\":\"int\",\"max\":255,\"min\":0},\"doc\":\"Video quality per the IAB’s classification. See Table 6.14 Video Quality.\",\"default\":0,\"ordinal_\":8},{\"name\":\"keywords\",\"type\":\"string\",\"doc\":\"Comma separated list of keywords describing the content.\",\"default\":\"\",\"ordinal_\":9},{\"name\":\"contentrating\",\"type\":\"string\",\"doc\":\"Content rating (e.g., MPAA)\",\"default\":\"\",\"ordinal_\":10},{\"name\":\"userrating\",\"type\":\"string\",\"doc\":\"User rating of the content (e.g., number of stars, likes, etc.).\",\"default\":\"\",\"ordinal_\":11},{\"name\":\"context\",\"type\":\"string\",\"doc\":\"Specifies the type of content (game, video, text, etc.). See Table 6.13 Content Context.\",\"default\":\"\",\"ordinal_\":12},{\"name\":\"livestream\",\"type\":{\"type\":\"int\",\"max\":1,\"min\":0},\"doc\":\"Is content live? E.g., live video stream, live blog. “1” means content is live. “0” means it is not live.\",\"default\":0,\"ordinal_\":13},{\"name\":\"sourcerelationship\",\"type\":{\"type\":\"int\",\"max\":1,\"min\":0},\"doc\":\"1 for “direct”; 0 for “indirect”.\",\"default\":0,\"ordinal_\":14},{\"name\":\"producer\",\"type\":{\"type\":\"record\",\"name\":\"ProducerAvro\",\"doc\":\"3.3.9 Producer Object\\nThe producer is useful when content where the ad is shown is syndicated, and may appear on a completely different publisher. The producer object itself and all of its parameters are optional, so default values are not provided. If an optional parameter is not specified, it should be considered unknown. This object is optional, but useful if the content producer is different from the site publisher.\",\"fields\":[{\"name\":\"id\",\"type\":\"string\",\"doc\":\"Content producer or originator ID. Useful if content is syndicated, and may be posted on a site using embed tags.\",\"default\":\"\",\"ordinal_\":1},{\"name\":\"name\",\"type\":\"string\",\"doc\":\"Content producer or originator name (e.g., “Warner Bros”).\",\"default\":\"\",\"ordinal_\":2},{\"name\":\"cat\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"Array of IAB content categories for the content producer. See Table 6.1 Content Categories.\",\"default\":[],\"ordinal_\":3},{\"name\":\"domain\",\"type\":\"string\",\"doc\":\"URL of the content producer.\",\"default\":\"\",\"ordinal_\":4}]},\"doc\":\"See Producer Object.\",\"default\":{},\"ordinal_\":15},{\"name\":\"len\",\"type\":{\"type\":\"int\",\"max\":4294967295,\"min\":0},\"doc\":\"Length of content (appropriate for video or audio) in seconds.\",\"default\":0,\"ordinal_\":16},{\"name\":\"qagmediarating\",\"type\":{\"type\":\"int\",\"max\":255,\"min\":0},\"doc\":\"Media rating of the content, per QAG guidelines. See Table 0 QAG Media Ratings for list of possible values.\",\"default\":0,\"ordinal_\":17},{\"name\":\"embeddable\",\"type\":{\"type\":\"int\",\"max\":1,\"min\":0},\"doc\":\"From QAG Video Addendum. If content can be embedded (such as an embeddable video player) this value should be set to “1”. If content cannot be embedded, then this should be set to “0”.\",\"default\":0,\"ordinal_\":18},{\"name\":\"language\",\"type\":\"string\",\"doc\":\"Language of the content. Use alpha-2/ISO 639-1 codes.\",\"default\":\"\",\"ordinal_\":19}]}");
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy