
sunnylabs.event.ReportEvent Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package sunnylabs.event;
@SuppressWarnings("all")
public class ReportEvent 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\":\"ReportEvent\",\"namespace\":\"sunnylabs.event\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":\"long\"},{\"name\":\"endTime\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}},{\"name\":\"hosts\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},\"default\":[]},{\"name\":\"summarizedEvents\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"tags\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"default\":null},{\"name\":\"isUserEvent\",\"type\":[\"null\",\"boolean\"],\"default\":null},{\"name\":\"table\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"default\":\"tsdb\"}]}");
private java.lang.String name;
private long startTime;
private java.lang.Long endTime;
private java.util.Map annotations;
private java.util.List hosts;
private java.lang.Long summarizedEvents;
private java.util.List tags;
private java.lang.Boolean isUserEvent;
private java.lang.String table;
/**
* Default constructor.
*/
public ReportEvent() {}
/**
* All-args constructor.
*/
public ReportEvent(java.lang.String name, java.lang.Long startTime, java.lang.Long endTime, java.util.Map annotations, java.util.List hosts, java.lang.Long summarizedEvents, java.util.List tags, java.lang.Boolean isUserEvent, java.lang.String table) {
this.name = name;
this.startTime = startTime;
this.endTime = endTime;
this.annotations = annotations;
this.hosts = hosts;
this.summarizedEvents = summarizedEvents;
this.tags = tags;
this.isUserEvent = isUserEvent;
this.table = table;
}
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 name;
case 1: return startTime;
case 2: return endTime;
case 3: return annotations;
case 4: return hosts;
case 5: return summarizedEvents;
case 6: return tags;
case 7: return isUserEvent;
case 8: return table;
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: name = (java.lang.String)value$; break;
case 1: startTime = (java.lang.Long)value$; break;
case 2: endTime = (java.lang.Long)value$; break;
case 3: annotations = (java.util.Map)value$; break;
case 4: hosts = (java.util.List)value$; break;
case 5: summarizedEvents = (java.lang.Long)value$; break;
case 6: tags = (java.util.List)value$; break;
case 7: isUserEvent = (java.lang.Boolean)value$; break;
case 8: table = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'name' field.
*/
public java.lang.String getName() {
return name;
}
/**
* Sets the value of the 'name' field.
* @param value the value to set.
*/
public void setName(java.lang.String value) {
this.name = value;
}
/**
* Gets the value of the 'startTime' field.
*/
public java.lang.Long getStartTime() {
return startTime;
}
/**
* Sets the value of the 'startTime' field.
* @param value the value to set.
*/
public void setStartTime(java.lang.Long value) {
this.startTime = value;
}
/**
* Gets the value of the 'endTime' field.
*/
public java.lang.Long getEndTime() {
return endTime;
}
/**
* Sets the value of the 'endTime' field.
* @param value the value to set.
*/
public void setEndTime(java.lang.Long value) {
this.endTime = value;
}
/**
* Gets the value of the 'annotations' field.
*/
public java.util.Map getAnnotations() {
return annotations;
}
/**
* Sets the value of the 'annotations' field.
* @param value the value to set.
*/
public void setAnnotations(java.util.Map value) {
this.annotations = value;
}
/**
* Gets the value of the 'hosts' field.
*/
public java.util.List getHosts() {
return hosts;
}
/**
* Sets the value of the 'hosts' field.
* @param value the value to set.
*/
public void setHosts(java.util.List value) {
this.hosts = value;
}
/**
* Gets the value of the 'summarizedEvents' field.
*/
public java.lang.Long getSummarizedEvents() {
return summarizedEvents;
}
/**
* Sets the value of the 'summarizedEvents' field.
* @param value the value to set.
*/
public void setSummarizedEvents(java.lang.Long value) {
this.summarizedEvents = value;
}
/**
* Gets the value of the 'tags' field.
*/
public java.util.List getTags() {
return tags;
}
/**
* Sets the value of the 'tags' field.
* @param value the value to set.
*/
public void setTags(java.util.List value) {
this.tags = value;
}
/**
* Gets the value of the 'isUserEvent' field.
*/
public java.lang.Boolean getIsUserEvent() {
return isUserEvent;
}
/**
* Sets the value of the 'isUserEvent' field.
* @param value the value to set.
*/
public void setIsUserEvent(java.lang.Boolean value) {
this.isUserEvent = value;
}
/**
* Gets the value of the 'table' field.
*/
public java.lang.String getTable() {
return table;
}
/**
* Sets the value of the 'table' field.
* @param value the value to set.
*/
public void setTable(java.lang.String value) {
this.table = value;
}
/** Creates a new ReportEvent RecordBuilder */
public static sunnylabs.event.ReportEvent.Builder newBuilder() {
return new sunnylabs.event.ReportEvent.Builder();
}
/** Creates a new ReportEvent RecordBuilder by copying an existing Builder */
public static sunnylabs.event.ReportEvent.Builder newBuilder(sunnylabs.event.ReportEvent.Builder other) {
return new sunnylabs.event.ReportEvent.Builder(other);
}
/** Creates a new ReportEvent RecordBuilder by copying an existing ReportEvent instance */
public static sunnylabs.event.ReportEvent.Builder newBuilder(sunnylabs.event.ReportEvent other) {
return new sunnylabs.event.ReportEvent.Builder(other);
}
/**
* RecordBuilder for ReportEvent instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String name;
private long startTime;
private java.lang.Long endTime;
private java.util.Map annotations;
private java.util.List hosts;
private java.lang.Long summarizedEvents;
private java.util.List tags;
private java.lang.Boolean isUserEvent;
private java.lang.String table;
/** Creates a new Builder */
private Builder() {
super(sunnylabs.event.ReportEvent.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(sunnylabs.event.ReportEvent.Builder other) {
super(other);
}
/** Creates a Builder by copying an existing ReportEvent instance */
private Builder(sunnylabs.event.ReportEvent other) {
super(sunnylabs.event.ReportEvent.SCHEMA$);
if (isValidValue(fields()[0], other.name)) {
this.name = (java.lang.String) data().deepCopy(fields()[0].schema(), other.name);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.startTime)) {
this.startTime = (java.lang.Long) data().deepCopy(fields()[1].schema(), other.startTime);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.endTime)) {
this.endTime = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.endTime);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.annotations)) {
this.annotations = (java.util.Map) data().deepCopy(fields()[3].schema(), other.annotations);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.hosts)) {
this.hosts = (java.util.List) data().deepCopy(fields()[4].schema(), other.hosts);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.summarizedEvents)) {
this.summarizedEvents = (java.lang.Long) data().deepCopy(fields()[5].schema(), other.summarizedEvents);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.tags)) {
this.tags = (java.util.List) data().deepCopy(fields()[6].schema(), other.tags);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.isUserEvent)) {
this.isUserEvent = (java.lang.Boolean) data().deepCopy(fields()[7].schema(), other.isUserEvent);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.table)) {
this.table = (java.lang.String) data().deepCopy(fields()[8].schema(), other.table);
fieldSetFlags()[8] = true;
}
}
/** Gets the value of the 'name' field */
public java.lang.String getName() {
return name;
}
/** Sets the value of the 'name' field */
public sunnylabs.event.ReportEvent.Builder setName(java.lang.String value) {
validate(fields()[0], value);
this.name = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'name' field has been set */
public boolean hasName() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'name' field */
public sunnylabs.event.ReportEvent.Builder clearName() {
name = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'startTime' field */
public java.lang.Long getStartTime() {
return startTime;
}
/** Sets the value of the 'startTime' field */
public sunnylabs.event.ReportEvent.Builder setStartTime(long value) {
validate(fields()[1], value);
this.startTime = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'startTime' field has been set */
public boolean hasStartTime() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'startTime' field */
public sunnylabs.event.ReportEvent.Builder clearStartTime() {
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'endTime' field */
public java.lang.Long getEndTime() {
return endTime;
}
/** Sets the value of the 'endTime' field */
public sunnylabs.event.ReportEvent.Builder setEndTime(java.lang.Long value) {
validate(fields()[2], value);
this.endTime = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'endTime' field has been set */
public boolean hasEndTime() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'endTime' field */
public sunnylabs.event.ReportEvent.Builder clearEndTime() {
endTime = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'annotations' field */
public java.util.Map getAnnotations() {
return annotations;
}
/** Sets the value of the 'annotations' field */
public sunnylabs.event.ReportEvent.Builder setAnnotations(java.util.Map value) {
validate(fields()[3], value);
this.annotations = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'annotations' field has been set */
public boolean hasAnnotations() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'annotations' field */
public sunnylabs.event.ReportEvent.Builder clearAnnotations() {
annotations = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'hosts' field */
public java.util.List getHosts() {
return hosts;
}
/** Sets the value of the 'hosts' field */
public sunnylabs.event.ReportEvent.Builder setHosts(java.util.List value) {
validate(fields()[4], value);
this.hosts = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'hosts' field has been set */
public boolean hasHosts() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'hosts' field */
public sunnylabs.event.ReportEvent.Builder clearHosts() {
hosts = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'summarizedEvents' field */
public java.lang.Long getSummarizedEvents() {
return summarizedEvents;
}
/** Sets the value of the 'summarizedEvents' field */
public sunnylabs.event.ReportEvent.Builder setSummarizedEvents(java.lang.Long value) {
validate(fields()[5], value);
this.summarizedEvents = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'summarizedEvents' field has been set */
public boolean hasSummarizedEvents() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'summarizedEvents' field */
public sunnylabs.event.ReportEvent.Builder clearSummarizedEvents() {
summarizedEvents = null;
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'tags' field */
public java.util.List getTags() {
return tags;
}
/** Sets the value of the 'tags' field */
public sunnylabs.event.ReportEvent.Builder setTags(java.util.List value) {
validate(fields()[6], value);
this.tags = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'tags' field has been set */
public boolean hasTags() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'tags' field */
public sunnylabs.event.ReportEvent.Builder clearTags() {
tags = null;
fieldSetFlags()[6] = false;
return this;
}
/** Gets the value of the 'isUserEvent' field */
public java.lang.Boolean getIsUserEvent() {
return isUserEvent;
}
/** Sets the value of the 'isUserEvent' field */
public sunnylabs.event.ReportEvent.Builder setIsUserEvent(java.lang.Boolean value) {
validate(fields()[7], value);
this.isUserEvent = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'isUserEvent' field has been set */
public boolean hasIsUserEvent() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'isUserEvent' field */
public sunnylabs.event.ReportEvent.Builder clearIsUserEvent() {
isUserEvent = null;
fieldSetFlags()[7] = false;
return this;
}
/** Gets the value of the 'table' field */
public java.lang.String getTable() {
return table;
}
/** Sets the value of the 'table' field */
public sunnylabs.event.ReportEvent.Builder setTable(java.lang.String value) {
validate(fields()[8], value);
this.table = value;
fieldSetFlags()[8] = true;
return this;
}
/** Checks whether the 'table' field has been set */
public boolean hasTable() {
return fieldSetFlags()[8];
}
/** Clears the value of the 'table' field */
public sunnylabs.event.ReportEvent.Builder clearTable() {
table = null;
fieldSetFlags()[8] = false;
return this;
}
@Override
public ReportEvent build() {
try {
ReportEvent record = new ReportEvent();
record.name = fieldSetFlags()[0] ? this.name : (java.lang.String) defaultValue(fields()[0]);
record.startTime = fieldSetFlags()[1] ? this.startTime : (java.lang.Long) defaultValue(fields()[1]);
record.endTime = fieldSetFlags()[2] ? this.endTime : (java.lang.Long) defaultValue(fields()[2]);
record.annotations = fieldSetFlags()[3] ? this.annotations : (java.util.Map) defaultValue(fields()[3]);
record.hosts = fieldSetFlags()[4] ? this.hosts : (java.util.List) defaultValue(fields()[4]);
record.summarizedEvents = fieldSetFlags()[5] ? this.summarizedEvents : (java.lang.Long) defaultValue(fields()[5]);
record.tags = fieldSetFlags()[6] ? this.tags : (java.util.List) defaultValue(fields()[6]);
record.isUserEvent = fieldSetFlags()[7] ? this.isUserEvent : (java.lang.Boolean) defaultValue(fields()[7]);
record.table = fieldSetFlags()[8] ? this.table : (java.lang.String) defaultValue(fields()[8]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy