Energistics.Protocol.ChannelDataFrame.RequestChannelData Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package Energistics.Protocol.ChannelDataFrame;
import org.apache.avro.specific.SpecificData;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class RequestChannelData extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -8612973399257565735L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"RequestChannelData\",\"namespace\":\"Energistics.Protocol.ChannelDataFrame\",\"fields\":[{\"name\":\"uri\",\"type\":\"string\"},{\"name\":\"fromIndex\",\"type\":[\"null\",\"long\"]},{\"name\":\"toIndex\",\"type\":[\"null\",\"long\"]}],\"messageType\":\"1\",\"protocol\":\"2\",\"senderRole\":\"consumer\",\"protocolRoles\":\"producer,consumer\",\"fullName\":\"Energistics.Protocol.ChannelDataFrame.RequestChannelData\",\"depends\":[]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
@Deprecated public java.lang.CharSequence uri;
@Deprecated public java.lang.Long fromIndex;
@Deprecated public java.lang.Long toIndex;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use newBuilder()
.
*/
public RequestChannelData() {}
/**
* All-args constructor.
* @param uri The new value for uri
* @param fromIndex The new value for fromIndex
* @param toIndex The new value for toIndex
*/
public RequestChannelData(java.lang.CharSequence uri, java.lang.Long fromIndex, java.lang.Long toIndex) {
this.uri = uri;
this.fromIndex = fromIndex;
this.toIndex = toIndex;
}
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 uri;
case 1: return fromIndex;
case 2: return toIndex;
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: uri = (java.lang.CharSequence)value$; break;
case 1: fromIndex = (java.lang.Long)value$; break;
case 2: toIndex = (java.lang.Long)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'uri' field.
* @return The value of the 'uri' field.
*/
public java.lang.CharSequence getUri() {
return uri;
}
/**
* Sets the value of the 'uri' field.
* @param value the value to set.
*/
public void setUri(java.lang.CharSequence value) {
this.uri = value;
}
/**
* Gets the value of the 'fromIndex' field.
* @return The value of the 'fromIndex' field.
*/
public java.lang.Long getFromIndex() {
return fromIndex;
}
/**
* Sets the value of the 'fromIndex' field.
* @param value the value to set.
*/
public void setFromIndex(java.lang.Long value) {
this.fromIndex = value;
}
/**
* Gets the value of the 'toIndex' field.
* @return The value of the 'toIndex' field.
*/
public java.lang.Long getToIndex() {
return toIndex;
}
/**
* Sets the value of the 'toIndex' field.
* @param value the value to set.
*/
public void setToIndex(java.lang.Long value) {
this.toIndex = value;
}
/**
* Creates a new RequestChannelData RecordBuilder.
* @return A new RequestChannelData RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder newBuilder() {
return new Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder();
}
/**
* Creates a new RequestChannelData RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new RequestChannelData RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder newBuilder(Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder other) {
return new Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder(other);
}
/**
* Creates a new RequestChannelData RecordBuilder by copying an existing RequestChannelData instance.
* @param other The existing instance to copy.
* @return A new RequestChannelData RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder newBuilder(Energistics.Protocol.ChannelDataFrame.RequestChannelData other) {
return new Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder(other);
}
/**
* RecordBuilder for RequestChannelData instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.CharSequence uri;
private java.lang.Long fromIndex;
private java.lang.Long toIndex;
/** Creates a new Builder */
private Builder() {
super(SCHEMA$);
}
/**
* Creates a Builder by copying an existing Builder.
* @param other The existing Builder to copy.
*/
private Builder(Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder other) {
super(other);
if (isValidValue(fields()[0], other.uri)) {
this.uri = data().deepCopy(fields()[0].schema(), other.uri);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.fromIndex)) {
this.fromIndex = data().deepCopy(fields()[1].schema(), other.fromIndex);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.toIndex)) {
this.toIndex = data().deepCopy(fields()[2].schema(), other.toIndex);
fieldSetFlags()[2] = true;
}
}
/**
* Creates a Builder by copying an existing RequestChannelData instance
* @param other The existing instance to copy.
*/
private Builder(Energistics.Protocol.ChannelDataFrame.RequestChannelData other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.uri)) {
this.uri = data().deepCopy(fields()[0].schema(), other.uri);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.fromIndex)) {
this.fromIndex = data().deepCopy(fields()[1].schema(), other.fromIndex);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.toIndex)) {
this.toIndex = data().deepCopy(fields()[2].schema(), other.toIndex);
fieldSetFlags()[2] = true;
}
}
/**
* Gets the value of the 'uri' field.
* @return The value.
*/
public java.lang.CharSequence getUri() {
return uri;
}
/**
* Sets the value of the 'uri' field.
* @param value The value of 'uri'.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder setUri(java.lang.CharSequence value) {
validate(fields()[0], value);
this.uri = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'uri' field has been set.
* @return True if the 'uri' field has been set, false otherwise.
*/
public boolean hasUri() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'uri' field.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder clearUri() {
uri = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'fromIndex' field.
* @return The value.
*/
public java.lang.Long getFromIndex() {
return fromIndex;
}
/**
* Sets the value of the 'fromIndex' field.
* @param value The value of 'fromIndex'.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder setFromIndex(java.lang.Long value) {
validate(fields()[1], value);
this.fromIndex = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'fromIndex' field has been set.
* @return True if the 'fromIndex' field has been set, false otherwise.
*/
public boolean hasFromIndex() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'fromIndex' field.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder clearFromIndex() {
fromIndex = null;
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'toIndex' field.
* @return The value.
*/
public java.lang.Long getToIndex() {
return toIndex;
}
/**
* Sets the value of the 'toIndex' field.
* @param value The value of 'toIndex'.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder setToIndex(java.lang.Long value) {
validate(fields()[2], value);
this.toIndex = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'toIndex' field has been set.
* @return True if the 'toIndex' field has been set, false otherwise.
*/
public boolean hasToIndex() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'toIndex' field.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.RequestChannelData.Builder clearToIndex() {
toIndex = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public RequestChannelData build() {
try {
RequestChannelData record = new RequestChannelData();
record.uri = fieldSetFlags()[0] ? this.uri : (java.lang.CharSequence) defaultValue(fields()[0]);
record.fromIndex = fieldSetFlags()[1] ? this.fromIndex : (java.lang.Long) defaultValue(fields()[1]);
record.toIndex = fieldSetFlags()[2] ? this.toIndex : (java.lang.Long) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
private static final org.apache.avro.io.DatumWriter
WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
@Override public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException {
WRITER$.write(this, SpecificData.getEncoder(out));
}
private static final org.apache.avro.io.DatumReader
READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
@Override public void readExternal(java.io.ObjectInput in)
throws java.io.IOException {
READER$.read(this, SpecificData.getDecoder(in));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy