Energistics.Protocol.ChannelDataFrame.ChannelMetadata 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 ChannelMetadata extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -1380764404126585880L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ChannelMetadata\",\"namespace\":\"Energistics.Protocol.ChannelDataFrame\",\"fields\":[{\"name\":\"channels\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChannelMetadataRecord\",\"namespace\":\"Energistics.Datatypes.ChannelData\",\"fields\":[{\"name\":\"channelUri\",\"type\":\"string\"},{\"name\":\"channelId\",\"type\":\"long\"},{\"name\":\"indexes\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"IndexMetadataRecord\",\"fields\":[{\"name\":\"indexType\",\"type\":{\"type\":\"enum\",\"name\":\"ChannelIndexTypes\",\"symbols\":[\"Time\",\"Depth\"],\"fullName\":\"Energistics.Datatypes.ChannelData.ChannelIndexTypes\",\"depends\":[]}},{\"name\":\"uom\",\"type\":\"string\"},{\"name\":\"depthDatum\",\"type\":[\"null\",\"string\"]},{\"name\":\"direction\",\"type\":{\"type\":\"enum\",\"name\":\"IndexDirections\",\"symbols\":[\"Increasing\",\"Decreasing\"],\"fullName\":\"Energistics.Datatypes.ChannelData.IndexDirections\",\"depends\":[]}},{\"name\":\"mnemonic\",\"type\":[\"null\",\"string\"]},{\"name\":\"description\",\"type\":[\"null\",\"string\"]},{\"name\":\"uri\",\"type\":[\"null\",\"string\"]},{\"name\":\"customData\",\"type\":{\"type\":\"map\",\"values\":{\"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\"]}}},{\"name\":\"scale\",\"type\":\"int\"},{\"name\":\"timeDatum\",\"type\":[\"null\",\"string\"]}],\"fullName\":\"Energistics.Datatypes.ChannelData.IndexMetadataRecord\",\"depends\":[\"Energistics.Datatypes.ChannelData.ChannelIndexTypes\",\"Energistics.Datatypes.ChannelData.IndexDirections\",\"Energistics.Datatypes.DataValue\"]}}},{\"name\":\"channelName\",\"type\":\"string\"},{\"name\":\"dataType\",\"type\":\"string\"},{\"name\":\"uom\",\"type\":\"string\"},{\"name\":\"startIndex\",\"type\":[\"null\",\"long\"]},{\"name\":\"endIndex\",\"type\":[\"null\",\"long\"]},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"status\",\"type\":{\"type\":\"enum\",\"name\":\"ChannelStatuses\",\"symbols\":[\"Active\",\"Inactive\",\"Closed\"],\"fullName\":\"Energistics.Datatypes.ChannelData.ChannelStatuses\",\"depends\":[]}},{\"name\":\"contentType\",\"type\":[\"null\",\"string\"]},{\"name\":\"source\",\"type\":\"string\"},{\"name\":\"measureClass\",\"type\":\"string\"},{\"name\":\"uuid\",\"type\":[\"null\",\"string\"]},{\"name\":\"customData\",\"type\":{\"type\":\"map\",\"values\":\"Energistics.Datatypes.DataValue\"}},{\"name\":\"domainObject\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"DataObject\",\"namespace\":\"Energistics.Datatypes.Object\",\"fields\":[{\"name\":\"resource\",\"type\":{\"type\":\"record\",\"name\":\"Resource\",\"fields\":[{\"name\":\"uri\",\"type\":\"string\"},{\"name\":\"contentType\",\"type\":\"string\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"channelSubscribable\",\"type\":\"boolean\"},{\"name\":\"customData\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"resourceType\",\"type\":\"string\"},{\"name\":\"hasChildren\",\"type\":\"int\"},{\"name\":\"uuid\",\"type\":[\"null\",\"string\"]},{\"name\":\"lastChanged\",\"type\":\"long\"},{\"name\":\"objectNotifiable\",\"type\":\"boolean\"}],\"fullName\":\"Energistics.Datatypes.Object.Resource\",\"depends\":[]}},{\"name\":\"contentEncoding\",\"type\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"fullName\":\"Energistics.Datatypes.Object.DataObject\",\"depends\":[\"Energistics.Datatypes.Object.Resource\"]}]}],\"fullName\":\"Energistics.Datatypes.ChannelData.ChannelMetadataRecord\",\"depends\":[\"Energistics.Datatypes.ChannelData.IndexMetadataRecord\",\"Energistics.Datatypes.ChannelData.ChannelStatuses\",\"Energistics.Datatypes.DataValue\",\"Energistics.Datatypes.Object.DataObject\"]}}}],\"messageType\":\"3\",\"protocol\":\"2\",\"senderRole\":\"producer\",\"protocolRoles\":\"producer,consumer\",\"fullName\":\"Energistics.Protocol.ChannelDataFrame.ChannelMetadata\",\"depends\":[\"Energistics.Datatypes.ChannelData.ChannelMetadataRecord\"]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
@Deprecated public java.util.List channels;
/**
* 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 ChannelMetadata() {}
/**
* All-args constructor.
* @param channels The new value for channels
*/
public ChannelMetadata(java.util.List channels) {
this.channels = channels;
}
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;
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;
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;
}
/**
* Creates a new ChannelMetadata RecordBuilder.
* @return A new ChannelMetadata RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.ChannelMetadata.Builder newBuilder() {
return new Energistics.Protocol.ChannelDataFrame.ChannelMetadata.Builder();
}
/**
* Creates a new ChannelMetadata RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new ChannelMetadata RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.ChannelMetadata.Builder newBuilder(Energistics.Protocol.ChannelDataFrame.ChannelMetadata.Builder other) {
return new Energistics.Protocol.ChannelDataFrame.ChannelMetadata.Builder(other);
}
/**
* Creates a new ChannelMetadata RecordBuilder by copying an existing ChannelMetadata instance.
* @param other The existing instance to copy.
* @return A new ChannelMetadata RecordBuilder
*/
public static Energistics.Protocol.ChannelDataFrame.ChannelMetadata.Builder newBuilder(Energistics.Protocol.ChannelDataFrame.ChannelMetadata other) {
return new Energistics.Protocol.ChannelDataFrame.ChannelMetadata.Builder(other);
}
/**
* RecordBuilder for ChannelMetadata instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.util.List channels;
/** 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.ChannelMetadata.Builder other) {
super(other);
if (isValidValue(fields()[0], other.channels)) {
this.channels = data().deepCopy(fields()[0].schema(), other.channels);
fieldSetFlags()[0] = true;
}
}
/**
* Creates a Builder by copying an existing ChannelMetadata instance
* @param other The existing instance to copy.
*/
private Builder(Energistics.Protocol.ChannelDataFrame.ChannelMetadata other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.channels)) {
this.channels = data().deepCopy(fields()[0].schema(), other.channels);
fieldSetFlags()[0] = 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.ChannelMetadata.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.ChannelMetadata.Builder clearChannels() {
channels = null;
fieldSetFlags()[0] = false;
return this;
}
@Override
public ChannelMetadata build() {
try {
ChannelMetadata record = new ChannelMetadata();
record.channels = fieldSetFlags()[0] ? this.channels : (java.util.List) defaultValue(fields()[0]);
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