/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.wikipedia.miner.extract.model.struct;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class PageDepthSummary 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\":\"PageDepthSummary\",\"namespace\":\"org.wikipedia.miner.extract.model.struct\",\"fields\":[{\"name\":\"depth\",\"type\":[\"int\",\"null\"]},{\"name\":\"depthForwarded\",\"type\":\"boolean\"},{\"name\":\"childIds\",\"type\":{\"type\":\"array\",\"items\":\"int\"}}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
@Deprecated public java.lang.Integer depth;
@Deprecated public boolean depthForwarded;
@Deprecated public java.util.List<java.lang.Integer> childIds;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use {@link \#newBuilder()}.
*/
public PageDepthSummary() {}
/**
* All-args constructor.
*/
public PageDepthSummary(java.lang.Integer depth, java.lang.Boolean depthForwarded, java.util.List<java.lang.Integer> childIds) {
this.depth = depth;
this.depthForwarded = depthForwarded;
this.childIds = childIds;
}
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 depth;
case 1: return depthForwarded;
case 2: return childIds;
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: depth = (java.lang.Integer)value$; break;
case 1: depthForwarded = (java.lang.Boolean)value$; break;
case 2: childIds = (java.util.List<java.lang.Integer>)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'depth' field.
*/
public java.lang.Integer getDepth() {
return depth;
}
/**
* Sets the value of the 'depth' field.
* @param value the value to set.
*/
public void setDepth(java.lang.Integer value) {
this.depth = value;
}
/**
* Gets the value of the 'depthForwarded' field.
*/
public java.lang.Boolean getDepthForwarded() {
return depthForwarded;
}
/**
* Sets the value of the 'depthForwarded' field.
* @param value the value to set.
*/
public void setDepthForwarded(java.lang.Boolean value) {
this.depthForwarded = value;
}
/**
* Gets the value of the 'childIds' field.
*/
public java.util.List<java.lang.Integer> getChildIds() {
return childIds;
}
/**
* Sets the value of the 'childIds' field.
* @param value the value to set.
*/
public void setChildIds(java.util.List<java.lang.Integer> value) {
this.childIds = value;
}
/** Creates a new PageDepthSummary RecordBuilder */
public static org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder newBuilder() {
return new org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder();
}
/** Creates a new PageDepthSummary RecordBuilder by copying an existing Builder */
public static org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder newBuilder(org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder other) {
return new org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder(other);
}
/** Creates a new PageDepthSummary RecordBuilder by copying an existing PageDepthSummary instance */
public static org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder newBuilder(org.wikipedia.miner.extract.model.struct.PageDepthSummary other) {
return new org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder(other);
}
/**
* RecordBuilder for PageDepthSummary instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<PageDepthSummary>
implements org.apache.avro.data.RecordBuilder<PageDepthSummary> {
private java.lang.Integer depth;
private boolean depthForwarded;
private java.util.List<java.lang.Integer> childIds;
/** Creates a new Builder */
private Builder() {
super(org.wikipedia.miner.extract.model.struct.PageDepthSummary.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder other) {
super(other);
if (isValidValue(fields()[0], other.depth)) {
this.depth = data().deepCopy(fields()[0].schema(), other.depth);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.depthForwarded)) {
this.depthForwarded = data().deepCopy(fields()[1].schema(), other.depthForwarded);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.childIds)) {
this.childIds = data().deepCopy(fields()[2].schema(), other.childIds);
fieldSetFlags()[2] = true;
}
}
/** Creates a Builder by copying an existing PageDepthSummary instance */
private Builder(org.wikipedia.miner.extract.model.struct.PageDepthSummary other) {
super(org.wikipedia.miner.extract.model.struct.PageDepthSummary.SCHEMA$);
if (isValidValue(fields()[0], other.depth)) {
this.depth = data().deepCopy(fields()[0].schema(), other.depth);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.depthForwarded)) {
this.depthForwarded = data().deepCopy(fields()[1].schema(), other.depthForwarded);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.childIds)) {
this.childIds = data().deepCopy(fields()[2].schema(), other.childIds);
fieldSetFlags()[2] = true;
}
}
/** Gets the value of the 'depth' field */
public java.lang.Integer getDepth() {
return depth;
}
/** Sets the value of the 'depth' field */
public org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder setDepth(java.lang.Integer value) {
validate(fields()[0], value);
this.depth = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'depth' field has been set */
public boolean hasDepth() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'depth' field */
public org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder clearDepth() {
depth = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'depthForwarded' field */
public java.lang.Boolean getDepthForwarded() {
return depthForwarded;
}
/** Sets the value of the 'depthForwarded' field */
public org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder setDepthForwarded(boolean value) {
validate(fields()[1], value);
this.depthForwarded = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'depthForwarded' field has been set */
public boolean hasDepthForwarded() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'depthForwarded' field */
public org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder clearDepthForwarded() {
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'childIds' field */
public java.util.List<java.lang.Integer> getChildIds() {
return childIds;
}
/** Sets the value of the 'childIds' field */
public org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder setChildIds(java.util.List<java.lang.Integer> value) {
validate(fields()[2], value);
this.childIds = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'childIds' field has been set */
public boolean hasChildIds() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'childIds' field */
public org.wikipedia.miner.extract.model.struct.PageDepthSummary.Builder clearChildIds() {
childIds = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public PageDepthSummary build() {
try {
PageDepthSummary record = new PageDepthSummary();
record.depth = fieldSetFlags()[0] ? this.depth : (java.lang.Integer) defaultValue(fields()[0]);
record.depthForwarded = fieldSetFlags()[1] ? this.depthForwarded : (java.lang.Boolean) defaultValue(fields()[1]);
record.childIds = fieldSetFlags()[2] ? this.childIds : (java.util.List<java.lang.Integer>) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}