Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet Maven / Gradle / Ivy
The newest version!
/**
* 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 ChannelDataFrameSet extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -4600255038005712977L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ChannelDataFrameSet\",\"namespace\":\"Energistics.Protocol.ChannelDataFrame\",\"fields\":[{\"name\":\"channels\",\"type\":{\"type\":\"array\",\"items\":\"long\"}},{\"name\":\"data\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"DataFrame\",\"namespace\":\"Energistics.Datatypes.ChannelData\",\"fields\":[{\"name\":\"index\",\"type\":{\"type\":\"array\",\"items\":\"long\"}},{\"name\":\"data\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"DataValue\",\"namespace\":\"Energistics.Datatypes\",\"fields\":[{\"name\":\"item\",\"type\":[\"null\",\"double\",\"float\",\"int\",\"long\",\"string\",{\"type\":\"record\",\"name\":\"ArrayOfDouble\",\"fields\":[{\"name\":\"values\",\"type\":{\"type\":\"array\",\"items\":\"double\"}}],\"fullName\":\"Energistics.Datatypes.ArrayOfDouble\",\"depends\":[]},\"boolean\",\"bytes\"]}],\"fullName\":\"Energistics.Datatypes.DataValue\",\"depends\":[\"Energistics.Datatypes.ArrayOfDouble\"]}}}],\"fullName\":\"Energistics.Datatypes.ChannelData.DataFrame\",\"depends\":[\"Energistics.Datatypes.DataValue\"]}}}],\"messageType\":\"4\",\"protocol\":\"2\",\"senderRole\":\"producer\",\"protocolRoles\":\"producer,consumer\",\"fullName\":\"Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet\",\"depends\":[\"Energistics.Datatypes.ChannelData.DataFrame\"]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
@Deprecated public java.util.List channels;
@Deprecated public java.util.List data;
/**
* 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 ChannelDataFrameSet() {}
/**
* All-args constructor.
* @param channels The new value for channels
* @param data The new value for data
*/
public ChannelDataFrameSet(java.util.List channels, java.util.List data) {
this.channels = channels;
this.data = data;
}
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 channels;
case 1: return data;
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: channels = (java.util.List)value$; break;
case 1: data = (java.util.List)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'channels' field.
* @return The value of the 'channels' field.
*/
public java.util.List getChannels() {
return channels;
}
/**
* Sets the value of the 'channels' field.
* @param value the value to set.
*/
public void setChannels(java.util.List value) {
this.channels = value;
}
/**
* Gets the value of the 'data' field.
* @return The value of the 'data' field.
*/
public java.util.List getData() {
return data;
}
/**
* Sets the value of the 'data' field.
* @param value the value to set.
*/
public void setData(java.util.List value) {
this.data = value;
}
/**
* Creates a new ChannelDataFrameSet RecordBuilder.
* @return A new ChannelDataFrameSet RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder newBuilder() {
return new Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder();
}
/**
* Creates a new ChannelDataFrameSet RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new ChannelDataFrameSet RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder newBuilder(Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder other) {
return new Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder(other);
}
/**
* Creates a new ChannelDataFrameSet RecordBuilder by copying an existing ChannelDataFrameSet instance.
* @param other The existing instance to copy.
* @return A new ChannelDataFrameSet RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder newBuilder(Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet other) {
return new Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder(other);
}
/**
* RecordBuilder for ChannelDataFrameSet instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.util.List channels;
private java.util.List data;
/** 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.ChannelDataFrameSet.Builder other) {
super(other);
if (isValidValue(fields()[0], other.channels)) {
this.channels = data().deepCopy(fields()[0].schema(), other.channels);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.data)) {
this.data = data().deepCopy(fields()[1].schema(), other.data);
fieldSetFlags()[1] = true;
}
}
/**
* Creates a Builder by copying an existing ChannelDataFrameSet instance
* @param other The existing instance to copy.
*/
private Builder(Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.channels)) {
this.channels = data().deepCopy(fields()[0].schema(), other.channels);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.data)) {
this.data = data().deepCopy(fields()[1].schema(), other.data);
fieldSetFlags()[1] = true;
}
}
/**
* Gets the value of the 'channels' field.
* @return The value.
*/
public java.util.List getChannels() {
return channels;
}
/**
* Sets the value of the 'channels' field.
* @param value The value of 'channels'.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder setChannels(java.util.List value) {
validate(fields()[0], value);
this.channels = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'channels' field has been set.
* @return True if the 'channels' field has been set, false otherwise.
*/
public boolean hasChannels() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'channels' field.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder clearChannels() {
channels = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'data' field.
* @return The value.
*/
public java.util.List getData() {
return data;
}
/**
* Sets the value of the 'data' field.
* @param value The value of 'data'.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder setData(java.util.List value) {
validate(fields()[1], value);
this.data = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'data' field has been set.
* @return True if the 'data' field has been set, false otherwise.
*/
public boolean hasData() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'data' field.
* @return This builder.
*/
public Energistics.Protocol.ChannelDataFrame.ChannelDataFrameSet.Builder clearData() {
data = null;
fieldSetFlags()[1] = false;
return this;
}
@Override
public ChannelDataFrameSet build() {
try {
ChannelDataFrameSet record = new ChannelDataFrameSet();
record.channels = fieldSetFlags()[0] ? this.channels : (java.util.List) defaultValue(fields()[0]);
record.data = fieldSetFlags()[1] ? this.data : (java.util.List) defaultValue(fields()[1]);
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