/scala/timeseries/trunk/src/main/java/org/elec/timeseries/TimeseriesProto.java
http://findataweb.googlecode.com/ · Java · 1931 lines · 1732 code · 151 blank · 48 comment · 266 complexity · 304570984229e98dfe51549b1c9a284c MD5 · raw file
Large files are truncated click here to view the full file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: timeseries.proto
- package org.elec.timeseries;
- public final class TimeseriesProto {
- private TimeseriesProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public interface ObservationOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // required int64 dtStart = 1;
- boolean hasDtStart();
- long getDtStart();
-
- // required int64 dtEnd = 2;
- boolean hasDtEnd();
- long getDtEnd();
-
- // required double value = 3;
- boolean hasValue();
- double getValue();
- }
- public static final class Observation extends
- com.google.protobuf.GeneratedMessage
- implements ObservationOrBuilder {
- // Use Observation.newBuilder() to construct.
- private Observation(Builder builder) {
- super(builder);
- }
- private Observation(boolean noInit) {}
-
- private static final Observation defaultInstance;
- public static Observation getDefaultInstance() {
- return defaultInstance;
- }
-
- public Observation getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Observation_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Observation_fieldAccessorTable;
- }
-
- private int bitField0_;
- // required int64 dtStart = 1;
- public static final int DTSTART_FIELD_NUMBER = 1;
- private long dtStart_;
- public boolean hasDtStart() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public long getDtStart() {
- return dtStart_;
- }
-
- // required int64 dtEnd = 2;
- public static final int DTEND_FIELD_NUMBER = 2;
- private long dtEnd_;
- public boolean hasDtEnd() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public long getDtEnd() {
- return dtEnd_;
- }
-
- // required double value = 3;
- public static final int VALUE_FIELD_NUMBER = 3;
- private double value_;
- public boolean hasValue() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public double getValue() {
- return value_;
- }
-
- private void initFields() {
- dtStart_ = 0L;
- dtEnd_ = 0L;
- value_ = 0D;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasDtStart()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasDtEnd()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasValue()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeInt64(1, dtStart_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeInt64(2, dtEnd_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeDouble(3, value_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, dtStart_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(2, dtEnd_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeDoubleSize(3, value_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.elec.timeseries.TimeseriesProto.Observation prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements org.elec.timeseries.TimeseriesProto.ObservationOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Observation_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Observation_fieldAccessorTable;
- }
-
- // Construct using org.elec.timeseries.TimeseriesProto.Observation.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- dtStart_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- dtEnd_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000002);
- value_ = 0D;
- bitField0_ = (bitField0_ & ~0x00000004);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.elec.timeseries.TimeseriesProto.Observation.getDescriptor();
- }
-
- public org.elec.timeseries.TimeseriesProto.Observation getDefaultInstanceForType() {
- return org.elec.timeseries.TimeseriesProto.Observation.getDefaultInstance();
- }
-
- public org.elec.timeseries.TimeseriesProto.Observation build() {
- org.elec.timeseries.TimeseriesProto.Observation result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private org.elec.timeseries.TimeseriesProto.Observation buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- org.elec.timeseries.TimeseriesProto.Observation result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public org.elec.timeseries.TimeseriesProto.Observation buildPartial() {
- org.elec.timeseries.TimeseriesProto.Observation result = new org.elec.timeseries.TimeseriesProto.Observation(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.dtStart_ = dtStart_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.dtEnd_ = dtEnd_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.value_ = value_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.elec.timeseries.TimeseriesProto.Observation) {
- return mergeFrom((org.elec.timeseries.TimeseriesProto.Observation)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.elec.timeseries.TimeseriesProto.Observation other) {
- if (other == org.elec.timeseries.TimeseriesProto.Observation.getDefaultInstance()) return this;
- if (other.hasDtStart()) {
- setDtStart(other.getDtStart());
- }
- if (other.hasDtEnd()) {
- setDtEnd(other.getDtEnd());
- }
- if (other.hasValue()) {
- setValue(other.getValue());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasDtStart()) {
-
- return false;
- }
- if (!hasDtEnd()) {
-
- return false;
- }
- if (!hasValue()) {
-
- return false;
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- dtStart_ = input.readInt64();
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- dtEnd_ = input.readInt64();
- break;
- }
- case 25: {
- bitField0_ |= 0x00000004;
- value_ = input.readDouble();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // required int64 dtStart = 1;
- private long dtStart_ ;
- public boolean hasDtStart() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public long getDtStart() {
- return dtStart_;
- }
- public Builder setDtStart(long value) {
- bitField0_ |= 0x00000001;
- dtStart_ = value;
- onChanged();
- return this;
- }
- public Builder clearDtStart() {
- bitField0_ = (bitField0_ & ~0x00000001);
- dtStart_ = 0L;
- onChanged();
- return this;
- }
-
- // required int64 dtEnd = 2;
- private long dtEnd_ ;
- public boolean hasDtEnd() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public long getDtEnd() {
- return dtEnd_;
- }
- public Builder setDtEnd(long value) {
- bitField0_ |= 0x00000002;
- dtEnd_ = value;
- onChanged();
- return this;
- }
- public Builder clearDtEnd() {
- bitField0_ = (bitField0_ & ~0x00000002);
- dtEnd_ = 0L;
- onChanged();
- return this;
- }
-
- // required double value = 3;
- private double value_ ;
- public boolean hasValue() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public double getValue() {
- return value_;
- }
- public Builder setValue(double value) {
- bitField0_ |= 0x00000004;
- value_ = value;
- onChanged();
- return this;
- }
- public Builder clearValue() {
- bitField0_ = (bitField0_ & ~0x00000004);
- value_ = 0D;
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:timeseries.Observation)
- }
-
- static {
- defaultInstance = new Observation(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:timeseries.Observation)
- }
-
- public interface CommentOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // required int64 dtStart = 1;
- boolean hasDtStart();
- long getDtStart();
-
- // required int64 dtEnd = 2;
- boolean hasDtEnd();
- long getDtEnd();
-
- // required string value = 3;
- boolean hasValue();
- String getValue();
-
- // optional string user = 4;
- boolean hasUser();
- String getUser();
- }
- public static final class Comment extends
- com.google.protobuf.GeneratedMessage
- implements CommentOrBuilder {
- // Use Comment.newBuilder() to construct.
- private Comment(Builder builder) {
- super(builder);
- }
- private Comment(boolean noInit) {}
-
- private static final Comment defaultInstance;
- public static Comment getDefaultInstance() {
- return defaultInstance;
- }
-
- public Comment getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Comment_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Comment_fieldAccessorTable;
- }
-
- private int bitField0_;
- // required int64 dtStart = 1;
- public static final int DTSTART_FIELD_NUMBER = 1;
- private long dtStart_;
- public boolean hasDtStart() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public long getDtStart() {
- return dtStart_;
- }
-
- // required int64 dtEnd = 2;
- public static final int DTEND_FIELD_NUMBER = 2;
- private long dtEnd_;
- public boolean hasDtEnd() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public long getDtEnd() {
- return dtEnd_;
- }
-
- // required string value = 3;
- public static final int VALUE_FIELD_NUMBER = 3;
- private java.lang.Object value_;
- public boolean hasValue() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public String getValue() {
- java.lang.Object ref = value_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- value_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getValueBytes() {
- java.lang.Object ref = value_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- value_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string user = 4;
- public static final int USER_FIELD_NUMBER = 4;
- private java.lang.Object user_;
- public boolean hasUser() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public String getUser() {
- java.lang.Object ref = user_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- user_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getUserBytes() {
- java.lang.Object ref = user_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- user_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private void initFields() {
- dtStart_ = 0L;
- dtEnd_ = 0L;
- value_ = "";
- user_ = "";
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasDtStart()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasDtEnd()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasValue()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeInt64(1, dtStart_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeInt64(2, dtEnd_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(3, getValueBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(4, getUserBytes());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, dtStart_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(2, dtEnd_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, getValueBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, getUserBytes());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.elec.timeseries.TimeseriesProto.Comment prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements org.elec.timeseries.TimeseriesProto.CommentOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Comment_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Comment_fieldAccessorTable;
- }
-
- // Construct using org.elec.timeseries.TimeseriesProto.Comment.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- dtStart_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- dtEnd_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000002);
- value_ = "";
- bitField0_ = (bitField0_ & ~0x00000004);
- user_ = "";
- bitField0_ = (bitField0_ & ~0x00000008);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.elec.timeseries.TimeseriesProto.Comment.getDescriptor();
- }
-
- public org.elec.timeseries.TimeseriesProto.Comment getDefaultInstanceForType() {
- return org.elec.timeseries.TimeseriesProto.Comment.getDefaultInstance();
- }
-
- public org.elec.timeseries.TimeseriesProto.Comment build() {
- org.elec.timeseries.TimeseriesProto.Comment result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private org.elec.timeseries.TimeseriesProto.Comment buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- org.elec.timeseries.TimeseriesProto.Comment result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public org.elec.timeseries.TimeseriesProto.Comment buildPartial() {
- org.elec.timeseries.TimeseriesProto.Comment result = new org.elec.timeseries.TimeseriesProto.Comment(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.dtStart_ = dtStart_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.dtEnd_ = dtEnd_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.value_ = value_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.user_ = user_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.elec.timeseries.TimeseriesProto.Comment) {
- return mergeFrom((org.elec.timeseries.TimeseriesProto.Comment)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.elec.timeseries.TimeseriesProto.Comment other) {
- if (other == org.elec.timeseries.TimeseriesProto.Comment.getDefaultInstance()) return this;
- if (other.hasDtStart()) {
- setDtStart(other.getDtStart());
- }
- if (other.hasDtEnd()) {
- setDtEnd(other.getDtEnd());
- }
- if (other.hasValue()) {
- setValue(other.getValue());
- }
- if (other.hasUser()) {
- setUser(other.getUser());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasDtStart()) {
-
- return false;
- }
- if (!hasDtEnd()) {
-
- return false;
- }
- if (!hasValue()) {
-
- return false;
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- dtStart_ = input.readInt64();
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- dtEnd_ = input.readInt64();
- break;
- }
- case 26: {
- bitField0_ |= 0x00000004;
- value_ = input.readBytes();
- break;
- }
- case 34: {
- bitField0_ |= 0x00000008;
- user_ = input.readBytes();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // required int64 dtStart = 1;
- private long dtStart_ ;
- public boolean hasDtStart() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public long getDtStart() {
- return dtStart_;
- }
- public Builder setDtStart(long value) {
- bitField0_ |= 0x00000001;
- dtStart_ = value;
- onChanged();
- return this;
- }
- public Builder clearDtStart() {
- bitField0_ = (bitField0_ & ~0x00000001);
- dtStart_ = 0L;
- onChanged();
- return this;
- }
-
- // required int64 dtEnd = 2;
- private long dtEnd_ ;
- public boolean hasDtEnd() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public long getDtEnd() {
- return dtEnd_;
- }
- public Builder setDtEnd(long value) {
- bitField0_ |= 0x00000002;
- dtEnd_ = value;
- onChanged();
- return this;
- }
- public Builder clearDtEnd() {
- bitField0_ = (bitField0_ & ~0x00000002);
- dtEnd_ = 0L;
- onChanged();
- return this;
- }
-
- // required string value = 3;
- private java.lang.Object value_ = "";
- public boolean hasValue() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public String getValue() {
- java.lang.Object ref = value_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- value_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setValue(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- value_ = value;
- onChanged();
- return this;
- }
- public Builder clearValue() {
- bitField0_ = (bitField0_ & ~0x00000004);
- value_ = getDefaultInstance().getValue();
- onChanged();
- return this;
- }
- void setValue(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000004;
- value_ = value;
- onChanged();
- }
-
- // optional string user = 4;
- private java.lang.Object user_ = "";
- public boolean hasUser() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public String getUser() {
- java.lang.Object ref = user_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- user_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setUser(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- user_ = value;
- onChanged();
- return this;
- }
- public Builder clearUser() {
- bitField0_ = (bitField0_ & ~0x00000008);
- user_ = getDefaultInstance().getUser();
- onChanged();
- return this;
- }
- void setUser(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000008;
- user_ = value;
- onChanged();
- }
-
- // @@protoc_insertion_point(builder_scope:timeseries.Comment)
- }
-
- static {
- defaultInstance = new Comment(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:timeseries.Comment)
- }
-
- public interface TimeSeriesOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // required string name = 3;
- boolean hasName();
- String getName();
-
- // optional string unit = 4;
- boolean hasUnit();
- String getUnit();
-
- // optional string frequency = 5;
- boolean hasFrequency();
- String getFrequency();
-
- // optional string source = 6;
- boolean hasSource();
- String getSource();
-
- // optional string comments = 7;
- boolean hasComments();
- String getComments();
-
- // repeated .timeseries.Observation observation = 1;
- java.util.List<org.elec.timeseries.TimeseriesProto.Observation>
- getObservationList();
- org.elec.timeseries.TimeseriesProto.Observation getObservation(int index);
- int getObservationCount();
- java.util.List<? extends org.elec.timeseries.TimeseriesProto.ObservationOrBuilder>
- getObservationOrBuilderList();
- org.elec.timeseries.TimeseriesProto.ObservationOrBuilder getObservationOrBuilder(
- int index);
-
- // repeated .timeseries.Comment comment = 2;
- java.util.List<org.elec.timeseries.TimeseriesProto.Comment>
- getCommentList();
- org.elec.timeseries.TimeseriesProto.Comment getComment(int index);
- int getCommentCount();
- java.util.List<? extends org.elec.timeseries.TimeseriesProto.CommentOrBuilder>
- getCommentOrBuilderList();
- org.elec.timeseries.TimeseriesProto.CommentOrBuilder getCommentOrBuilder(
- int index);
- }
- public static final class TimeSeries extends
- com.google.protobuf.GeneratedMessage
- implements TimeSeriesOrBuilder {
- // Use TimeSeries.newBuilder() to construct.
- private TimeSeries(Builder builder) {
- super(builder);
- }
- private TimeSeries(boolean noInit) {}
-
- private static final TimeSeries defaultInstance;
- public static TimeSeries getDefaultInstance() {
- return defaultInstance;
- }
-
- public TimeSeries getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_TimeSeries_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_TimeSeries_fieldAccessorTable;
- }
-
- public enum Frequency
- implements com.google.protobuf.ProtocolMessageEnum {
- HOUR(0, 0),
- DAY(1, 1),
- MONTH(2, 2),
- YEAR(3, 3),
- IRREGULAR(4, 6),
- ;
-
- public static final int HOUR_VALUE = 0;
- public static final int DAY_VALUE = 1;
- public static final int MONTH_VALUE = 2;
- public static final int YEAR_VALUE = 3;
- public static final int IRREGULAR_VALUE = 6;
-
-
- public final int getNumber() { return value; }
-
- public static Frequency valueOf(int value) {
- switch (value) {
- case 0: return HOUR;
- case 1: return DAY;
- case 2: return MONTH;
- case 3: return YEAR;
- case 6: return IRREGULAR;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<Frequency>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<Frequency>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<Frequency>() {
- public Frequency findValueByNumber(int number) {
- return Frequency.valueOf(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(index);
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return org.elec.timeseries.TimeseriesProto.TimeSeries.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Frequency[] VALUES = {
- HOUR, DAY, MONTH, YEAR, IRREGULAR,
- };
-
- public static Frequency valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int index;
- private final int value;
-
- private Frequency(int index, int value) {
- this.index = index;
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:timeseries.TimeSeries.Frequency)
- }
-
- private int bitField0_;
- // required string name = 3;
- public static final int NAME_FIELD_NUMBER = 3;
- private java.lang.Object name_;
- public boolean hasName() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getName() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- name_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string unit = 4;
- public static final int UNIT_FIELD_NUMBER = 4;
- private java.lang.Object unit_;
- public boolean hasUnit() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getUnit() {
- java.lang.Object ref = unit_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- unit_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getUnitBytes() {
- java.lang.Object ref = unit_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- unit_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string frequency = 5;
- public static final int FREQUENCY_FIELD_NUMBER = 5;
- private java.lang.Object frequency_;
- public boolean hasFrequency() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public String getFrequency() {
- java.lang.Object ref = frequency_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- frequency_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getFrequencyBytes() {
- java.lang.Object ref = frequency_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- frequency_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string source = 6;
- public static final int SOURCE_FIELD_NUMBER = 6;
- private java.lang.Object source_;
- public boolean hasSource() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public String getSource() {
- java.lang.Object ref = source_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- source_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getSourceBytes() {
- java.lang.Object ref = source_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- source_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string comments = 7;
- public static final int COMMENTS_FIELD_NUMBER = 7;
- private java.lang.Object comments_;
- public boolean hasComments() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- public String getComments() {
- java.lang.Object ref = comments_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- comments_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getCommentsBytes() {
- java.lang.Object ref = comments_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- comments_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // repeated .timeseries.Observation observation = 1;
- public static final int OBSERVATION_FIELD_NUMBER = 1;
- private java.util.List<org.elec.timeseries.TimeseriesProto.Observation> observation_;
- public java.util.List<org.elec.timeseries.TimeseriesProto.Observation> getObservationList() {
- return observation_;
- }
- public java.util.List<? extends org.elec.timeseries.TimeseriesProto.ObservationOrBuilder>
- getObservationOrBuilderList() {
- return observation_;
- }
- public int getObservationCount() {
- return observation_.size();
- }
- public org.elec.timeseries.TimeseriesProto.Observation getObservation(int index) {
- return observation_.get(index);
- }
- public org.elec.timeseries.TimeseriesProto.ObservationOrBuilder getObservationOrBuilder(
- int index) {
- return observation_.get(index);
- }
-
- // repeated .timeseries.Comment comment = 2;
- public static final int COMMENT_FIELD_NUMBER = 2;
- private java.util.List<org.elec.timeseries.TimeseriesProto.Comment> comment_;
- public java.util.List<org.elec.timeseries.TimeseriesProto.Comment> getCommentList() {
- return comment_;
- }
- public java.util.List<? extends org.elec.timeseries.TimeseriesProto.CommentOrBuilder>
- getCommentOrBuilderList() {
- return comment_;
- }
- public int getCommentCount() {
- return comment_.size();
- }
- public org.elec.timeseries.TimeseriesProto.Comment getComment(int index) {
- return comment_.get(index);
- }
- public org.elec.timeseries.TimeseriesProto.CommentOrBuilder getCommentOrBuilder(
- int index) {
- return comment_.get(index);
- }
-
- private void initFields() {
- name_ = "";
- unit_ = "";
- frequency_ = "";
- source_ = "";
- comments_ = "";
- observation_ = java.util.Collections.emptyList();
- comment_ = java.util.Collections.emptyList();
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasName()) {
- memoizedIsInitialized = 0;
- return false;
- }
- for (int i = 0; i < getObservationCount(); i++) {
- if (!getObservation(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- for (int i = 0; i < getCommentCount(); i++) {
- if (!getComment(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- for (int i = 0; i < observation_.size(); i++) {
- output.writeMessage(1, observation_.get(i));
- }
- for (int i = 0; i < comment_.size(); i++) {
- output.writeMessage(2, comment_.get(i));
- }
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(3, getNameBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(4, getUnitBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(5, getFrequencyBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(6, getSourceBytes());
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- output.writeBytes(7, getCommentsBytes());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < observation_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, observation_.get(i));
- }
- for (int i = 0; i < comment_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, comment_.get(i));
- }
- if (((bit…