PageRenderTime 57ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: timeseries.proto
  3. package org.elec.timeseries;
  4. public final class TimeseriesProto {
  5. private TimeseriesProto() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public interface ObservationOrBuilder
  10. extends com.google.protobuf.MessageOrBuilder {
  11. // required int64 dtStart = 1;
  12. boolean hasDtStart();
  13. long getDtStart();
  14. // required int64 dtEnd = 2;
  15. boolean hasDtEnd();
  16. long getDtEnd();
  17. // required double value = 3;
  18. boolean hasValue();
  19. double getValue();
  20. }
  21. public static final class Observation extends
  22. com.google.protobuf.GeneratedMessage
  23. implements ObservationOrBuilder {
  24. // Use Observation.newBuilder() to construct.
  25. private Observation(Builder builder) {
  26. super(builder);
  27. }
  28. private Observation(boolean noInit) {}
  29. private static final Observation defaultInstance;
  30. public static Observation getDefaultInstance() {
  31. return defaultInstance;
  32. }
  33. public Observation getDefaultInstanceForType() {
  34. return defaultInstance;
  35. }
  36. public static final com.google.protobuf.Descriptors.Descriptor
  37. getDescriptor() {
  38. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Observation_descriptor;
  39. }
  40. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  41. internalGetFieldAccessorTable() {
  42. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Observation_fieldAccessorTable;
  43. }
  44. private int bitField0_;
  45. // required int64 dtStart = 1;
  46. public static final int DTSTART_FIELD_NUMBER = 1;
  47. private long dtStart_;
  48. public boolean hasDtStart() {
  49. return ((bitField0_ & 0x00000001) == 0x00000001);
  50. }
  51. public long getDtStart() {
  52. return dtStart_;
  53. }
  54. // required int64 dtEnd = 2;
  55. public static final int DTEND_FIELD_NUMBER = 2;
  56. private long dtEnd_;
  57. public boolean hasDtEnd() {
  58. return ((bitField0_ & 0x00000002) == 0x00000002);
  59. }
  60. public long getDtEnd() {
  61. return dtEnd_;
  62. }
  63. // required double value = 3;
  64. public static final int VALUE_FIELD_NUMBER = 3;
  65. private double value_;
  66. public boolean hasValue() {
  67. return ((bitField0_ & 0x00000004) == 0x00000004);
  68. }
  69. public double getValue() {
  70. return value_;
  71. }
  72. private void initFields() {
  73. dtStart_ = 0L;
  74. dtEnd_ = 0L;
  75. value_ = 0D;
  76. }
  77. private byte memoizedIsInitialized = -1;
  78. public final boolean isInitialized() {
  79. byte isInitialized = memoizedIsInitialized;
  80. if (isInitialized != -1) return isInitialized == 1;
  81. if (!hasDtStart()) {
  82. memoizedIsInitialized = 0;
  83. return false;
  84. }
  85. if (!hasDtEnd()) {
  86. memoizedIsInitialized = 0;
  87. return false;
  88. }
  89. if (!hasValue()) {
  90. memoizedIsInitialized = 0;
  91. return false;
  92. }
  93. memoizedIsInitialized = 1;
  94. return true;
  95. }
  96. public void writeTo(com.google.protobuf.CodedOutputStream output)
  97. throws java.io.IOException {
  98. getSerializedSize();
  99. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  100. output.writeInt64(1, dtStart_);
  101. }
  102. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  103. output.writeInt64(2, dtEnd_);
  104. }
  105. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  106. output.writeDouble(3, value_);
  107. }
  108. getUnknownFields().writeTo(output);
  109. }
  110. private int memoizedSerializedSize = -1;
  111. public int getSerializedSize() {
  112. int size = memoizedSerializedSize;
  113. if (size != -1) return size;
  114. size = 0;
  115. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  116. size += com.google.protobuf.CodedOutputStream
  117. .computeInt64Size(1, dtStart_);
  118. }
  119. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  120. size += com.google.protobuf.CodedOutputStream
  121. .computeInt64Size(2, dtEnd_);
  122. }
  123. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  124. size += com.google.protobuf.CodedOutputStream
  125. .computeDoubleSize(3, value_);
  126. }
  127. size += getUnknownFields().getSerializedSize();
  128. memoizedSerializedSize = size;
  129. return size;
  130. }
  131. private static final long serialVersionUID = 0L;
  132. @java.lang.Override
  133. protected java.lang.Object writeReplace()
  134. throws java.io.ObjectStreamException {
  135. return super.writeReplace();
  136. }
  137. public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
  138. com.google.protobuf.ByteString data)
  139. throws com.google.protobuf.InvalidProtocolBufferException {
  140. return newBuilder().mergeFrom(data).buildParsed();
  141. }
  142. public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
  143. com.google.protobuf.ByteString data,
  144. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  145. throws com.google.protobuf.InvalidProtocolBufferException {
  146. return newBuilder().mergeFrom(data, extensionRegistry)
  147. .buildParsed();
  148. }
  149. public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(byte[] data)
  150. throws com.google.protobuf.InvalidProtocolBufferException {
  151. return newBuilder().mergeFrom(data).buildParsed();
  152. }
  153. public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
  154. byte[] data,
  155. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  156. throws com.google.protobuf.InvalidProtocolBufferException {
  157. return newBuilder().mergeFrom(data, extensionRegistry)
  158. .buildParsed();
  159. }
  160. public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(java.io.InputStream input)
  161. throws java.io.IOException {
  162. return newBuilder().mergeFrom(input).buildParsed();
  163. }
  164. public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
  165. java.io.InputStream input,
  166. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  167. throws java.io.IOException {
  168. return newBuilder().mergeFrom(input, extensionRegistry)
  169. .buildParsed();
  170. }
  171. public static org.elec.timeseries.TimeseriesProto.Observation parseDelimitedFrom(java.io.InputStream input)
  172. throws java.io.IOException {
  173. Builder builder = newBuilder();
  174. if (builder.mergeDelimitedFrom(input)) {
  175. return builder.buildParsed();
  176. } else {
  177. return null;
  178. }
  179. }
  180. public static org.elec.timeseries.TimeseriesProto.Observation parseDelimitedFrom(
  181. java.io.InputStream input,
  182. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  183. throws java.io.IOException {
  184. Builder builder = newBuilder();
  185. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  186. return builder.buildParsed();
  187. } else {
  188. return null;
  189. }
  190. }
  191. public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
  192. com.google.protobuf.CodedInputStream input)
  193. throws java.io.IOException {
  194. return newBuilder().mergeFrom(input).buildParsed();
  195. }
  196. public static org.elec.timeseries.TimeseriesProto.Observation parseFrom(
  197. com.google.protobuf.CodedInputStream input,
  198. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  199. throws java.io.IOException {
  200. return newBuilder().mergeFrom(input, extensionRegistry)
  201. .buildParsed();
  202. }
  203. public static Builder newBuilder() { return Builder.create(); }
  204. public Builder newBuilderForType() { return newBuilder(); }
  205. public static Builder newBuilder(org.elec.timeseries.TimeseriesProto.Observation prototype) {
  206. return newBuilder().mergeFrom(prototype);
  207. }
  208. public Builder toBuilder() { return newBuilder(this); }
  209. @java.lang.Override
  210. protected Builder newBuilderForType(
  211. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  212. Builder builder = new Builder(parent);
  213. return builder;
  214. }
  215. public static final class Builder extends
  216. com.google.protobuf.GeneratedMessage.Builder<Builder>
  217. implements org.elec.timeseries.TimeseriesProto.ObservationOrBuilder {
  218. public static final com.google.protobuf.Descriptors.Descriptor
  219. getDescriptor() {
  220. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Observation_descriptor;
  221. }
  222. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  223. internalGetFieldAccessorTable() {
  224. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Observation_fieldAccessorTable;
  225. }
  226. // Construct using org.elec.timeseries.TimeseriesProto.Observation.newBuilder()
  227. private Builder() {
  228. maybeForceBuilderInitialization();
  229. }
  230. private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  231. super(parent);
  232. maybeForceBuilderInitialization();
  233. }
  234. private void maybeForceBuilderInitialization() {
  235. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  236. }
  237. }
  238. private static Builder create() {
  239. return new Builder();
  240. }
  241. public Builder clear() {
  242. super.clear();
  243. dtStart_ = 0L;
  244. bitField0_ = (bitField0_ & ~0x00000001);
  245. dtEnd_ = 0L;
  246. bitField0_ = (bitField0_ & ~0x00000002);
  247. value_ = 0D;
  248. bitField0_ = (bitField0_ & ~0x00000004);
  249. return this;
  250. }
  251. public Builder clone() {
  252. return create().mergeFrom(buildPartial());
  253. }
  254. public com.google.protobuf.Descriptors.Descriptor
  255. getDescriptorForType() {
  256. return org.elec.timeseries.TimeseriesProto.Observation.getDescriptor();
  257. }
  258. public org.elec.timeseries.TimeseriesProto.Observation getDefaultInstanceForType() {
  259. return org.elec.timeseries.TimeseriesProto.Observation.getDefaultInstance();
  260. }
  261. public org.elec.timeseries.TimeseriesProto.Observation build() {
  262. org.elec.timeseries.TimeseriesProto.Observation result = buildPartial();
  263. if (!result.isInitialized()) {
  264. throw newUninitializedMessageException(result);
  265. }
  266. return result;
  267. }
  268. private org.elec.timeseries.TimeseriesProto.Observation buildParsed()
  269. throws com.google.protobuf.InvalidProtocolBufferException {
  270. org.elec.timeseries.TimeseriesProto.Observation result = buildPartial();
  271. if (!result.isInitialized()) {
  272. throw newUninitializedMessageException(
  273. result).asInvalidProtocolBufferException();
  274. }
  275. return result;
  276. }
  277. public org.elec.timeseries.TimeseriesProto.Observation buildPartial() {
  278. org.elec.timeseries.TimeseriesProto.Observation result = new org.elec.timeseries.TimeseriesProto.Observation(this);
  279. int from_bitField0_ = bitField0_;
  280. int to_bitField0_ = 0;
  281. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  282. to_bitField0_ |= 0x00000001;
  283. }
  284. result.dtStart_ = dtStart_;
  285. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  286. to_bitField0_ |= 0x00000002;
  287. }
  288. result.dtEnd_ = dtEnd_;
  289. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  290. to_bitField0_ |= 0x00000004;
  291. }
  292. result.value_ = value_;
  293. result.bitField0_ = to_bitField0_;
  294. onBuilt();
  295. return result;
  296. }
  297. public Builder mergeFrom(com.google.protobuf.Message other) {
  298. if (other instanceof org.elec.timeseries.TimeseriesProto.Observation) {
  299. return mergeFrom((org.elec.timeseries.TimeseriesProto.Observation)other);
  300. } else {
  301. super.mergeFrom(other);
  302. return this;
  303. }
  304. }
  305. public Builder mergeFrom(org.elec.timeseries.TimeseriesProto.Observation other) {
  306. if (other == org.elec.timeseries.TimeseriesProto.Observation.getDefaultInstance()) return this;
  307. if (other.hasDtStart()) {
  308. setDtStart(other.getDtStart());
  309. }
  310. if (other.hasDtEnd()) {
  311. setDtEnd(other.getDtEnd());
  312. }
  313. if (other.hasValue()) {
  314. setValue(other.getValue());
  315. }
  316. this.mergeUnknownFields(other.getUnknownFields());
  317. return this;
  318. }
  319. public final boolean isInitialized() {
  320. if (!hasDtStart()) {
  321. return false;
  322. }
  323. if (!hasDtEnd()) {
  324. return false;
  325. }
  326. if (!hasValue()) {
  327. return false;
  328. }
  329. return true;
  330. }
  331. public Builder mergeFrom(
  332. com.google.protobuf.CodedInputStream input,
  333. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  334. throws java.io.IOException {
  335. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  336. com.google.protobuf.UnknownFieldSet.newBuilder(
  337. this.getUnknownFields());
  338. while (true) {
  339. int tag = input.readTag();
  340. switch (tag) {
  341. case 0:
  342. this.setUnknownFields(unknownFields.build());
  343. onChanged();
  344. return this;
  345. default: {
  346. if (!parseUnknownField(input, unknownFields,
  347. extensionRegistry, tag)) {
  348. this.setUnknownFields(unknownFields.build());
  349. onChanged();
  350. return this;
  351. }
  352. break;
  353. }
  354. case 8: {
  355. bitField0_ |= 0x00000001;
  356. dtStart_ = input.readInt64();
  357. break;
  358. }
  359. case 16: {
  360. bitField0_ |= 0x00000002;
  361. dtEnd_ = input.readInt64();
  362. break;
  363. }
  364. case 25: {
  365. bitField0_ |= 0x00000004;
  366. value_ = input.readDouble();
  367. break;
  368. }
  369. }
  370. }
  371. }
  372. private int bitField0_;
  373. // required int64 dtStart = 1;
  374. private long dtStart_ ;
  375. public boolean hasDtStart() {
  376. return ((bitField0_ & 0x00000001) == 0x00000001);
  377. }
  378. public long getDtStart() {
  379. return dtStart_;
  380. }
  381. public Builder setDtStart(long value) {
  382. bitField0_ |= 0x00000001;
  383. dtStart_ = value;
  384. onChanged();
  385. return this;
  386. }
  387. public Builder clearDtStart() {
  388. bitField0_ = (bitField0_ & ~0x00000001);
  389. dtStart_ = 0L;
  390. onChanged();
  391. return this;
  392. }
  393. // required int64 dtEnd = 2;
  394. private long dtEnd_ ;
  395. public boolean hasDtEnd() {
  396. return ((bitField0_ & 0x00000002) == 0x00000002);
  397. }
  398. public long getDtEnd() {
  399. return dtEnd_;
  400. }
  401. public Builder setDtEnd(long value) {
  402. bitField0_ |= 0x00000002;
  403. dtEnd_ = value;
  404. onChanged();
  405. return this;
  406. }
  407. public Builder clearDtEnd() {
  408. bitField0_ = (bitField0_ & ~0x00000002);
  409. dtEnd_ = 0L;
  410. onChanged();
  411. return this;
  412. }
  413. // required double value = 3;
  414. private double value_ ;
  415. public boolean hasValue() {
  416. return ((bitField0_ & 0x00000004) == 0x00000004);
  417. }
  418. public double getValue() {
  419. return value_;
  420. }
  421. public Builder setValue(double value) {
  422. bitField0_ |= 0x00000004;
  423. value_ = value;
  424. onChanged();
  425. return this;
  426. }
  427. public Builder clearValue() {
  428. bitField0_ = (bitField0_ & ~0x00000004);
  429. value_ = 0D;
  430. onChanged();
  431. return this;
  432. }
  433. // @@protoc_insertion_point(builder_scope:timeseries.Observation)
  434. }
  435. static {
  436. defaultInstance = new Observation(true);
  437. defaultInstance.initFields();
  438. }
  439. // @@protoc_insertion_point(class_scope:timeseries.Observation)
  440. }
  441. public interface CommentOrBuilder
  442. extends com.google.protobuf.MessageOrBuilder {
  443. // required int64 dtStart = 1;
  444. boolean hasDtStart();
  445. long getDtStart();
  446. // required int64 dtEnd = 2;
  447. boolean hasDtEnd();
  448. long getDtEnd();
  449. // required string value = 3;
  450. boolean hasValue();
  451. String getValue();
  452. // optional string user = 4;
  453. boolean hasUser();
  454. String getUser();
  455. }
  456. public static final class Comment extends
  457. com.google.protobuf.GeneratedMessage
  458. implements CommentOrBuilder {
  459. // Use Comment.newBuilder() to construct.
  460. private Comment(Builder builder) {
  461. super(builder);
  462. }
  463. private Comment(boolean noInit) {}
  464. private static final Comment defaultInstance;
  465. public static Comment getDefaultInstance() {
  466. return defaultInstance;
  467. }
  468. public Comment getDefaultInstanceForType() {
  469. return defaultInstance;
  470. }
  471. public static final com.google.protobuf.Descriptors.Descriptor
  472. getDescriptor() {
  473. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Comment_descriptor;
  474. }
  475. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  476. internalGetFieldAccessorTable() {
  477. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Comment_fieldAccessorTable;
  478. }
  479. private int bitField0_;
  480. // required int64 dtStart = 1;
  481. public static final int DTSTART_FIELD_NUMBER = 1;
  482. private long dtStart_;
  483. public boolean hasDtStart() {
  484. return ((bitField0_ & 0x00000001) == 0x00000001);
  485. }
  486. public long getDtStart() {
  487. return dtStart_;
  488. }
  489. // required int64 dtEnd = 2;
  490. public static final int DTEND_FIELD_NUMBER = 2;
  491. private long dtEnd_;
  492. public boolean hasDtEnd() {
  493. return ((bitField0_ & 0x00000002) == 0x00000002);
  494. }
  495. public long getDtEnd() {
  496. return dtEnd_;
  497. }
  498. // required string value = 3;
  499. public static final int VALUE_FIELD_NUMBER = 3;
  500. private java.lang.Object value_;
  501. public boolean hasValue() {
  502. return ((bitField0_ & 0x00000004) == 0x00000004);
  503. }
  504. public String getValue() {
  505. java.lang.Object ref = value_;
  506. if (ref instanceof String) {
  507. return (String) ref;
  508. } else {
  509. com.google.protobuf.ByteString bs =
  510. (com.google.protobuf.ByteString) ref;
  511. String s = bs.toStringUtf8();
  512. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  513. value_ = s;
  514. }
  515. return s;
  516. }
  517. }
  518. private com.google.protobuf.ByteString getValueBytes() {
  519. java.lang.Object ref = value_;
  520. if (ref instanceof String) {
  521. com.google.protobuf.ByteString b =
  522. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  523. value_ = b;
  524. return b;
  525. } else {
  526. return (com.google.protobuf.ByteString) ref;
  527. }
  528. }
  529. // optional string user = 4;
  530. public static final int USER_FIELD_NUMBER = 4;
  531. private java.lang.Object user_;
  532. public boolean hasUser() {
  533. return ((bitField0_ & 0x00000008) == 0x00000008);
  534. }
  535. public String getUser() {
  536. java.lang.Object ref = user_;
  537. if (ref instanceof String) {
  538. return (String) ref;
  539. } else {
  540. com.google.protobuf.ByteString bs =
  541. (com.google.protobuf.ByteString) ref;
  542. String s = bs.toStringUtf8();
  543. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  544. user_ = s;
  545. }
  546. return s;
  547. }
  548. }
  549. private com.google.protobuf.ByteString getUserBytes() {
  550. java.lang.Object ref = user_;
  551. if (ref instanceof String) {
  552. com.google.protobuf.ByteString b =
  553. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  554. user_ = b;
  555. return b;
  556. } else {
  557. return (com.google.protobuf.ByteString) ref;
  558. }
  559. }
  560. private void initFields() {
  561. dtStart_ = 0L;
  562. dtEnd_ = 0L;
  563. value_ = "";
  564. user_ = "";
  565. }
  566. private byte memoizedIsInitialized = -1;
  567. public final boolean isInitialized() {
  568. byte isInitialized = memoizedIsInitialized;
  569. if (isInitialized != -1) return isInitialized == 1;
  570. if (!hasDtStart()) {
  571. memoizedIsInitialized = 0;
  572. return false;
  573. }
  574. if (!hasDtEnd()) {
  575. memoizedIsInitialized = 0;
  576. return false;
  577. }
  578. if (!hasValue()) {
  579. memoizedIsInitialized = 0;
  580. return false;
  581. }
  582. memoizedIsInitialized = 1;
  583. return true;
  584. }
  585. public void writeTo(com.google.protobuf.CodedOutputStream output)
  586. throws java.io.IOException {
  587. getSerializedSize();
  588. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  589. output.writeInt64(1, dtStart_);
  590. }
  591. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  592. output.writeInt64(2, dtEnd_);
  593. }
  594. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  595. output.writeBytes(3, getValueBytes());
  596. }
  597. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  598. output.writeBytes(4, getUserBytes());
  599. }
  600. getUnknownFields().writeTo(output);
  601. }
  602. private int memoizedSerializedSize = -1;
  603. public int getSerializedSize() {
  604. int size = memoizedSerializedSize;
  605. if (size != -1) return size;
  606. size = 0;
  607. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  608. size += com.google.protobuf.CodedOutputStream
  609. .computeInt64Size(1, dtStart_);
  610. }
  611. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  612. size += com.google.protobuf.CodedOutputStream
  613. .computeInt64Size(2, dtEnd_);
  614. }
  615. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  616. size += com.google.protobuf.CodedOutputStream
  617. .computeBytesSize(3, getValueBytes());
  618. }
  619. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  620. size += com.google.protobuf.CodedOutputStream
  621. .computeBytesSize(4, getUserBytes());
  622. }
  623. size += getUnknownFields().getSerializedSize();
  624. memoizedSerializedSize = size;
  625. return size;
  626. }
  627. private static final long serialVersionUID = 0L;
  628. @java.lang.Override
  629. protected java.lang.Object writeReplace()
  630. throws java.io.ObjectStreamException {
  631. return super.writeReplace();
  632. }
  633. public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
  634. com.google.protobuf.ByteString data)
  635. throws com.google.protobuf.InvalidProtocolBufferException {
  636. return newBuilder().mergeFrom(data).buildParsed();
  637. }
  638. public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
  639. com.google.protobuf.ByteString data,
  640. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  641. throws com.google.protobuf.InvalidProtocolBufferException {
  642. return newBuilder().mergeFrom(data, extensionRegistry)
  643. .buildParsed();
  644. }
  645. public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(byte[] data)
  646. throws com.google.protobuf.InvalidProtocolBufferException {
  647. return newBuilder().mergeFrom(data).buildParsed();
  648. }
  649. public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
  650. byte[] data,
  651. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  652. throws com.google.protobuf.InvalidProtocolBufferException {
  653. return newBuilder().mergeFrom(data, extensionRegistry)
  654. .buildParsed();
  655. }
  656. public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(java.io.InputStream input)
  657. throws java.io.IOException {
  658. return newBuilder().mergeFrom(input).buildParsed();
  659. }
  660. public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
  661. java.io.InputStream input,
  662. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  663. throws java.io.IOException {
  664. return newBuilder().mergeFrom(input, extensionRegistry)
  665. .buildParsed();
  666. }
  667. public static org.elec.timeseries.TimeseriesProto.Comment parseDelimitedFrom(java.io.InputStream input)
  668. throws java.io.IOException {
  669. Builder builder = newBuilder();
  670. if (builder.mergeDelimitedFrom(input)) {
  671. return builder.buildParsed();
  672. } else {
  673. return null;
  674. }
  675. }
  676. public static org.elec.timeseries.TimeseriesProto.Comment parseDelimitedFrom(
  677. java.io.InputStream input,
  678. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  679. throws java.io.IOException {
  680. Builder builder = newBuilder();
  681. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  682. return builder.buildParsed();
  683. } else {
  684. return null;
  685. }
  686. }
  687. public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
  688. com.google.protobuf.CodedInputStream input)
  689. throws java.io.IOException {
  690. return newBuilder().mergeFrom(input).buildParsed();
  691. }
  692. public static org.elec.timeseries.TimeseriesProto.Comment parseFrom(
  693. com.google.protobuf.CodedInputStream input,
  694. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  695. throws java.io.IOException {
  696. return newBuilder().mergeFrom(input, extensionRegistry)
  697. .buildParsed();
  698. }
  699. public static Builder newBuilder() { return Builder.create(); }
  700. public Builder newBuilderForType() { return newBuilder(); }
  701. public static Builder newBuilder(org.elec.timeseries.TimeseriesProto.Comment prototype) {
  702. return newBuilder().mergeFrom(prototype);
  703. }
  704. public Builder toBuilder() { return newBuilder(this); }
  705. @java.lang.Override
  706. protected Builder newBuilderForType(
  707. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  708. Builder builder = new Builder(parent);
  709. return builder;
  710. }
  711. public static final class Builder extends
  712. com.google.protobuf.GeneratedMessage.Builder<Builder>
  713. implements org.elec.timeseries.TimeseriesProto.CommentOrBuilder {
  714. public static final com.google.protobuf.Descriptors.Descriptor
  715. getDescriptor() {
  716. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Comment_descriptor;
  717. }
  718. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  719. internalGetFieldAccessorTable() {
  720. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_Comment_fieldAccessorTable;
  721. }
  722. // Construct using org.elec.timeseries.TimeseriesProto.Comment.newBuilder()
  723. private Builder() {
  724. maybeForceBuilderInitialization();
  725. }
  726. private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  727. super(parent);
  728. maybeForceBuilderInitialization();
  729. }
  730. private void maybeForceBuilderInitialization() {
  731. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  732. }
  733. }
  734. private static Builder create() {
  735. return new Builder();
  736. }
  737. public Builder clear() {
  738. super.clear();
  739. dtStart_ = 0L;
  740. bitField0_ = (bitField0_ & ~0x00000001);
  741. dtEnd_ = 0L;
  742. bitField0_ = (bitField0_ & ~0x00000002);
  743. value_ = "";
  744. bitField0_ = (bitField0_ & ~0x00000004);
  745. user_ = "";
  746. bitField0_ = (bitField0_ & ~0x00000008);
  747. return this;
  748. }
  749. public Builder clone() {
  750. return create().mergeFrom(buildPartial());
  751. }
  752. public com.google.protobuf.Descriptors.Descriptor
  753. getDescriptorForType() {
  754. return org.elec.timeseries.TimeseriesProto.Comment.getDescriptor();
  755. }
  756. public org.elec.timeseries.TimeseriesProto.Comment getDefaultInstanceForType() {
  757. return org.elec.timeseries.TimeseriesProto.Comment.getDefaultInstance();
  758. }
  759. public org.elec.timeseries.TimeseriesProto.Comment build() {
  760. org.elec.timeseries.TimeseriesProto.Comment result = buildPartial();
  761. if (!result.isInitialized()) {
  762. throw newUninitializedMessageException(result);
  763. }
  764. return result;
  765. }
  766. private org.elec.timeseries.TimeseriesProto.Comment buildParsed()
  767. throws com.google.protobuf.InvalidProtocolBufferException {
  768. org.elec.timeseries.TimeseriesProto.Comment result = buildPartial();
  769. if (!result.isInitialized()) {
  770. throw newUninitializedMessageException(
  771. result).asInvalidProtocolBufferException();
  772. }
  773. return result;
  774. }
  775. public org.elec.timeseries.TimeseriesProto.Comment buildPartial() {
  776. org.elec.timeseries.TimeseriesProto.Comment result = new org.elec.timeseries.TimeseriesProto.Comment(this);
  777. int from_bitField0_ = bitField0_;
  778. int to_bitField0_ = 0;
  779. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  780. to_bitField0_ |= 0x00000001;
  781. }
  782. result.dtStart_ = dtStart_;
  783. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  784. to_bitField0_ |= 0x00000002;
  785. }
  786. result.dtEnd_ = dtEnd_;
  787. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  788. to_bitField0_ |= 0x00000004;
  789. }
  790. result.value_ = value_;
  791. if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
  792. to_bitField0_ |= 0x00000008;
  793. }
  794. result.user_ = user_;
  795. result.bitField0_ = to_bitField0_;
  796. onBuilt();
  797. return result;
  798. }
  799. public Builder mergeFrom(com.google.protobuf.Message other) {
  800. if (other instanceof org.elec.timeseries.TimeseriesProto.Comment) {
  801. return mergeFrom((org.elec.timeseries.TimeseriesProto.Comment)other);
  802. } else {
  803. super.mergeFrom(other);
  804. return this;
  805. }
  806. }
  807. public Builder mergeFrom(org.elec.timeseries.TimeseriesProto.Comment other) {
  808. if (other == org.elec.timeseries.TimeseriesProto.Comment.getDefaultInstance()) return this;
  809. if (other.hasDtStart()) {
  810. setDtStart(other.getDtStart());
  811. }
  812. if (other.hasDtEnd()) {
  813. setDtEnd(other.getDtEnd());
  814. }
  815. if (other.hasValue()) {
  816. setValue(other.getValue());
  817. }
  818. if (other.hasUser()) {
  819. setUser(other.getUser());
  820. }
  821. this.mergeUnknownFields(other.getUnknownFields());
  822. return this;
  823. }
  824. public final boolean isInitialized() {
  825. if (!hasDtStart()) {
  826. return false;
  827. }
  828. if (!hasDtEnd()) {
  829. return false;
  830. }
  831. if (!hasValue()) {
  832. return false;
  833. }
  834. return true;
  835. }
  836. public Builder mergeFrom(
  837. com.google.protobuf.CodedInputStream input,
  838. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  839. throws java.io.IOException {
  840. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  841. com.google.protobuf.UnknownFieldSet.newBuilder(
  842. this.getUnknownFields());
  843. while (true) {
  844. int tag = input.readTag();
  845. switch (tag) {
  846. case 0:
  847. this.setUnknownFields(unknownFields.build());
  848. onChanged();
  849. return this;
  850. default: {
  851. if (!parseUnknownField(input, unknownFields,
  852. extensionRegistry, tag)) {
  853. this.setUnknownFields(unknownFields.build());
  854. onChanged();
  855. return this;
  856. }
  857. break;
  858. }
  859. case 8: {
  860. bitField0_ |= 0x00000001;
  861. dtStart_ = input.readInt64();
  862. break;
  863. }
  864. case 16: {
  865. bitField0_ |= 0x00000002;
  866. dtEnd_ = input.readInt64();
  867. break;
  868. }
  869. case 26: {
  870. bitField0_ |= 0x00000004;
  871. value_ = input.readBytes();
  872. break;
  873. }
  874. case 34: {
  875. bitField0_ |= 0x00000008;
  876. user_ = input.readBytes();
  877. break;
  878. }
  879. }
  880. }
  881. }
  882. private int bitField0_;
  883. // required int64 dtStart = 1;
  884. private long dtStart_ ;
  885. public boolean hasDtStart() {
  886. return ((bitField0_ & 0x00000001) == 0x00000001);
  887. }
  888. public long getDtStart() {
  889. return dtStart_;
  890. }
  891. public Builder setDtStart(long value) {
  892. bitField0_ |= 0x00000001;
  893. dtStart_ = value;
  894. onChanged();
  895. return this;
  896. }
  897. public Builder clearDtStart() {
  898. bitField0_ = (bitField0_ & ~0x00000001);
  899. dtStart_ = 0L;
  900. onChanged();
  901. return this;
  902. }
  903. // required int64 dtEnd = 2;
  904. private long dtEnd_ ;
  905. public boolean hasDtEnd() {
  906. return ((bitField0_ & 0x00000002) == 0x00000002);
  907. }
  908. public long getDtEnd() {
  909. return dtEnd_;
  910. }
  911. public Builder setDtEnd(long value) {
  912. bitField0_ |= 0x00000002;
  913. dtEnd_ = value;
  914. onChanged();
  915. return this;
  916. }
  917. public Builder clearDtEnd() {
  918. bitField0_ = (bitField0_ & ~0x00000002);
  919. dtEnd_ = 0L;
  920. onChanged();
  921. return this;
  922. }
  923. // required string value = 3;
  924. private java.lang.Object value_ = "";
  925. public boolean hasValue() {
  926. return ((bitField0_ & 0x00000004) == 0x00000004);
  927. }
  928. public String getValue() {
  929. java.lang.Object ref = value_;
  930. if (!(ref instanceof String)) {
  931. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  932. value_ = s;
  933. return s;
  934. } else {
  935. return (String) ref;
  936. }
  937. }
  938. public Builder setValue(String value) {
  939. if (value == null) {
  940. throw new NullPointerException();
  941. }
  942. bitField0_ |= 0x00000004;
  943. value_ = value;
  944. onChanged();
  945. return this;
  946. }
  947. public Builder clearValue() {
  948. bitField0_ = (bitField0_ & ~0x00000004);
  949. value_ = getDefaultInstance().getValue();
  950. onChanged();
  951. return this;
  952. }
  953. void setValue(com.google.protobuf.ByteString value) {
  954. bitField0_ |= 0x00000004;
  955. value_ = value;
  956. onChanged();
  957. }
  958. // optional string user = 4;
  959. private java.lang.Object user_ = "";
  960. public boolean hasUser() {
  961. return ((bitField0_ & 0x00000008) == 0x00000008);
  962. }
  963. public String getUser() {
  964. java.lang.Object ref = user_;
  965. if (!(ref instanceof String)) {
  966. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  967. user_ = s;
  968. return s;
  969. } else {
  970. return (String) ref;
  971. }
  972. }
  973. public Builder setUser(String value) {
  974. if (value == null) {
  975. throw new NullPointerException();
  976. }
  977. bitField0_ |= 0x00000008;
  978. user_ = value;
  979. onChanged();
  980. return this;
  981. }
  982. public Builder clearUser() {
  983. bitField0_ = (bitField0_ & ~0x00000008);
  984. user_ = getDefaultInstance().getUser();
  985. onChanged();
  986. return this;
  987. }
  988. void setUser(com.google.protobuf.ByteString value) {
  989. bitField0_ |= 0x00000008;
  990. user_ = value;
  991. onChanged();
  992. }
  993. // @@protoc_insertion_point(builder_scope:timeseries.Comment)
  994. }
  995. static {
  996. defaultInstance = new Comment(true);
  997. defaultInstance.initFields();
  998. }
  999. // @@protoc_insertion_point(class_scope:timeseries.Comment)
  1000. }
  1001. public interface TimeSeriesOrBuilder
  1002. extends com.google.protobuf.MessageOrBuilder {
  1003. // required string name = 3;
  1004. boolean hasName();
  1005. String getName();
  1006. // optional string unit = 4;
  1007. boolean hasUnit();
  1008. String getUnit();
  1009. // optional string frequency = 5;
  1010. boolean hasFrequency();
  1011. String getFrequency();
  1012. // optional string source = 6;
  1013. boolean hasSource();
  1014. String getSource();
  1015. // optional string comments = 7;
  1016. boolean hasComments();
  1017. String getComments();
  1018. // repeated .timeseries.Observation observation = 1;
  1019. java.util.List<org.elec.timeseries.TimeseriesProto.Observation>
  1020. getObservationList();
  1021. org.elec.timeseries.TimeseriesProto.Observation getObservation(int index);
  1022. int getObservationCount();
  1023. java.util.List<? extends org.elec.timeseries.TimeseriesProto.ObservationOrBuilder>
  1024. getObservationOrBuilderList();
  1025. org.elec.timeseries.TimeseriesProto.ObservationOrBuilder getObservationOrBuilder(
  1026. int index);
  1027. // repeated .timeseries.Comment comment = 2;
  1028. java.util.List<org.elec.timeseries.TimeseriesProto.Comment>
  1029. getCommentList();
  1030. org.elec.timeseries.TimeseriesProto.Comment getComment(int index);
  1031. int getCommentCount();
  1032. java.util.List<? extends org.elec.timeseries.TimeseriesProto.CommentOrBuilder>
  1033. getCommentOrBuilderList();
  1034. org.elec.timeseries.TimeseriesProto.CommentOrBuilder getCommentOrBuilder(
  1035. int index);
  1036. }
  1037. public static final class TimeSeries extends
  1038. com.google.protobuf.GeneratedMessage
  1039. implements TimeSeriesOrBuilder {
  1040. // Use TimeSeries.newBuilder() to construct.
  1041. private TimeSeries(Builder builder) {
  1042. super(builder);
  1043. }
  1044. private TimeSeries(boolean noInit) {}
  1045. private static final TimeSeries defaultInstance;
  1046. public static TimeSeries getDefaultInstance() {
  1047. return defaultInstance;
  1048. }
  1049. public TimeSeries getDefaultInstanceForType() {
  1050. return defaultInstance;
  1051. }
  1052. public static final com.google.protobuf.Descriptors.Descriptor
  1053. getDescriptor() {
  1054. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_TimeSeries_descriptor;
  1055. }
  1056. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1057. internalGetFieldAccessorTable() {
  1058. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_TimeSeries_fieldAccessorTable;
  1059. }
  1060. public enum Frequency
  1061. implements com.google.protobuf.ProtocolMessageEnum {
  1062. HOUR(0, 0),
  1063. DAY(1, 1),
  1064. MONTH(2, 2),
  1065. YEAR(3, 3),
  1066. IRREGULAR(4, 6),
  1067. ;
  1068. public static final int HOUR_VALUE = 0;
  1069. public static final int DAY_VALUE = 1;
  1070. public static final int MONTH_VALUE = 2;
  1071. public static final int YEAR_VALUE = 3;
  1072. public static final int IRREGULAR_VALUE = 6;
  1073. public final int getNumber() { return value; }
  1074. public static Frequency valueOf(int value) {
  1075. switch (value) {
  1076. case 0: return HOUR;
  1077. case 1: return DAY;
  1078. case 2: return MONTH;
  1079. case 3: return YEAR;
  1080. case 6: return IRREGULAR;
  1081. default: return null;
  1082. }
  1083. }
  1084. public static com.google.protobuf.Internal.EnumLiteMap<Frequency>
  1085. internalGetValueMap() {
  1086. return internalValueMap;
  1087. }
  1088. private static com.google.protobuf.Internal.EnumLiteMap<Frequency>
  1089. internalValueMap =
  1090. new com.google.protobuf.Internal.EnumLiteMap<Frequency>() {
  1091. public Frequency findValueByNumber(int number) {
  1092. return Frequency.valueOf(number);
  1093. }
  1094. };
  1095. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  1096. getValueDescriptor() {
  1097. return getDescriptor().getValues().get(index);
  1098. }
  1099. public final com.google.protobuf.Descriptors.EnumDescriptor
  1100. getDescriptorForType() {
  1101. return getDescriptor();
  1102. }
  1103. public static final com.google.protobuf.Descriptors.EnumDescriptor
  1104. getDescriptor() {
  1105. return org.elec.timeseries.TimeseriesProto.TimeSeries.getDescriptor().getEnumTypes().get(0);
  1106. }
  1107. private static final Frequency[] VALUES = {
  1108. HOUR, DAY, MONTH, YEAR, IRREGULAR,
  1109. };
  1110. public static Frequency valueOf(
  1111. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  1112. if (desc.getType() != getDescriptor()) {
  1113. throw new java.lang.IllegalArgumentException(
  1114. "EnumValueDescriptor is not for this type.");
  1115. }
  1116. return VALUES[desc.getIndex()];
  1117. }
  1118. private final int index;
  1119. private final int value;
  1120. private Frequency(int index, int value) {
  1121. this.index = index;
  1122. this.value = value;
  1123. }
  1124. // @@protoc_insertion_point(enum_scope:timeseries.TimeSeries.Frequency)
  1125. }
  1126. private int bitField0_;
  1127. // required string name = 3;
  1128. public static final int NAME_FIELD_NUMBER = 3;
  1129. private java.lang.Object name_;
  1130. public boolean hasName() {
  1131. return ((bitField0_ & 0x00000001) == 0x00000001);
  1132. }
  1133. public String getName() {
  1134. java.lang.Object ref = name_;
  1135. if (ref instanceof String) {
  1136. return (String) ref;
  1137. } else {
  1138. com.google.protobuf.ByteString bs =
  1139. (com.google.protobuf.ByteString) ref;
  1140. String s = bs.toStringUtf8();
  1141. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  1142. name_ = s;
  1143. }
  1144. return s;
  1145. }
  1146. }
  1147. private com.google.protobuf.ByteString getNameBytes() {
  1148. java.lang.Object ref = name_;
  1149. if (ref instanceof String) {
  1150. com.google.protobuf.ByteString b =
  1151. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  1152. name_ = b;
  1153. return b;
  1154. } else {
  1155. return (com.google.protobuf.ByteString) ref;
  1156. }
  1157. }
  1158. // optional string unit = 4;
  1159. public static final int UNIT_FIELD_NUMBER = 4;
  1160. private java.lang.Object unit_;
  1161. public boolean hasUnit() {
  1162. return ((bitField0_ & 0x00000002) == 0x00000002);
  1163. }
  1164. public String getUnit() {
  1165. java.lang.Object ref = unit_;
  1166. if (ref instanceof String) {
  1167. return (String) ref;
  1168. } else {
  1169. com.google.protobuf.ByteString bs =
  1170. (com.google.protobuf.ByteString) ref;
  1171. String s = bs.toStringUtf8();
  1172. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  1173. unit_ = s;
  1174. }
  1175. return s;
  1176. }
  1177. }
  1178. private com.google.protobuf.ByteString getUnitBytes() {
  1179. java.lang.Object ref = unit_;
  1180. if (ref instanceof String) {
  1181. com.google.protobuf.ByteString b =
  1182. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  1183. unit_ = b;
  1184. return b;
  1185. } else {
  1186. return (com.google.protobuf.ByteString) ref;
  1187. }
  1188. }
  1189. // optional string frequency = 5;
  1190. public static final int FREQUENCY_FIELD_NUMBER = 5;
  1191. private java.lang.Object frequency_;
  1192. public boolean hasFrequency() {
  1193. return ((bitField0_ & 0x00000004) == 0x00000004);
  1194. }
  1195. public String getFrequency() {
  1196. java.lang.Object ref = frequency_;
  1197. if (ref instanceof String) {
  1198. return (String) ref;
  1199. } else {
  1200. com.google.protobuf.ByteString bs =
  1201. (com.google.protobuf.ByteString) ref;
  1202. String s = bs.toStringUtf8();
  1203. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  1204. frequency_ = s;
  1205. }
  1206. return s;
  1207. }
  1208. }
  1209. private com.google.protobuf.ByteString getFrequencyBytes() {
  1210. java.lang.Object ref = frequency_;
  1211. if (ref instanceof String) {
  1212. com.google.protobuf.ByteString b =
  1213. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  1214. frequency_ = b;
  1215. return b;
  1216. } else {
  1217. return (com.google.protobuf.ByteString) ref;
  1218. }
  1219. }
  1220. // optional string source = 6;
  1221. public static final int SOURCE_FIELD_NUMBER = 6;
  1222. private java.lang.Object source_;
  1223. public boolean hasSource() {
  1224. return ((bitField0_ & 0x00000008) == 0x00000008);
  1225. }
  1226. public String getSource() {
  1227. java.lang.Object ref = source_;
  1228. if (ref instanceof String) {
  1229. return (String) ref;
  1230. } else {
  1231. com.google.protobuf.ByteString bs =
  1232. (com.google.protobuf.ByteString) ref;
  1233. String s = bs.toStringUtf8();
  1234. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  1235. source_ = s;
  1236. }
  1237. return s;
  1238. }
  1239. }
  1240. private com.google.protobuf.ByteString getSourceBytes() {
  1241. java.lang.Object ref = source_;
  1242. if (ref instanceof String) {
  1243. com.google.protobuf.ByteString b =
  1244. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  1245. source_ = b;
  1246. return b;
  1247. } else {
  1248. return (com.google.protobuf.ByteString) ref;
  1249. }
  1250. }
  1251. // optional string comments = 7;
  1252. public static final int COMMENTS_FIELD_NUMBER = 7;
  1253. private java.lang.Object comments_;
  1254. public boolean hasComments() {
  1255. return ((bitField0_ & 0x00000010) == 0x00000010);
  1256. }
  1257. public String getComments() {
  1258. java.lang.Object ref = comments_;
  1259. if (ref instanceof String) {
  1260. return (String) ref;
  1261. } else {
  1262. com.google.protobuf.ByteString bs =
  1263. (com.google.protobuf.ByteString) ref;
  1264. String s = bs.toStringUtf8();
  1265. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  1266. comments_ = s;
  1267. }
  1268. return s;
  1269. }
  1270. }
  1271. private com.google.protobuf.ByteString getCommentsBytes() {
  1272. java.lang.Object ref = comments_;
  1273. if (ref instanceof String) {
  1274. com.google.protobuf.ByteString b =
  1275. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  1276. comments_ = b;
  1277. return b;
  1278. } else {
  1279. return (com.google.protobuf.ByteString) ref;
  1280. }
  1281. }
  1282. // repeated .timeseries.Observation observation = 1;
  1283. public static final int OBSERVATION_FIELD_NUMBER = 1;
  1284. private java.util.List<org.elec.timeseries.TimeseriesProto.Observation> observation_;
  1285. public java.util.List<org.elec.timeseries.TimeseriesProto.Observation> getObservationList() {
  1286. return observation_;
  1287. }
  1288. public java.util.List<? extends org.elec.timeseries.TimeseriesProto.ObservationOrBuilder>
  1289. getObservationOrBuilderList() {
  1290. return observation_;
  1291. }
  1292. public int getObservationCount() {
  1293. return observation_.size();
  1294. }
  1295. public org.elec.timeseries.TimeseriesProto.Observation getObservation(int index) {
  1296. return observation_.get(index);
  1297. }
  1298. public org.elec.timeseries.TimeseriesProto.ObservationOrBuilder getObservationOrBuilder(
  1299. int index) {
  1300. return observation_.get(index);
  1301. }
  1302. // repeated .timeseries.Comment comment = 2;
  1303. public static final int COMMENT_FIELD_NUMBER = 2;
  1304. private java.util.List<org.elec.timeseries.TimeseriesProto.Comment> comment_;
  1305. public java.util.List<org.elec.timeseries.TimeseriesProto.Comment> getCommentList() {
  1306. return comment_;
  1307. }
  1308. public java.util.List<? extends org.elec.timeseries.TimeseriesProto.CommentOrBuilder>
  1309. getCommentOrBuilderList() {
  1310. return comment_;
  1311. }
  1312. public int getCommentCount() {
  1313. return comment_.size();
  1314. }
  1315. public org.elec.timeseries.TimeseriesProto.Comment getComment(int index) {
  1316. return comment_.get(index);
  1317. }
  1318. public org.elec.timeseries.TimeseriesProto.CommentOrBuilder getCommentOrBuilder(
  1319. int index) {
  1320. return comment_.get(index);
  1321. }
  1322. private void initFields() {
  1323. name_ = "";
  1324. unit_ = "";
  1325. frequency_ = "";
  1326. source_ = "";
  1327. comments_ = "";
  1328. observation_ = java.util.Collections.emptyList();
  1329. comment_ = java.util.Collections.emptyList();
  1330. }
  1331. private byte memoizedIsInitialized = -1;
  1332. public final boolean isInitialized() {
  1333. byte isInitialized = memoizedIsInitialized;
  1334. if (isInitialized != -1) return isInitialized == 1;
  1335. if (!hasName()) {
  1336. memoizedIsInitialized = 0;
  1337. return false;
  1338. }
  1339. for (int i = 0; i < getObservationCount(); i++) {
  1340. if (!getObservation(i).isInitialized()) {
  1341. memoizedIsInitialized = 0;
  1342. return false;
  1343. }
  1344. }
  1345. for (int i = 0; i < getCommentCount(); i++) {
  1346. if (!getComment(i).isInitialized()) {
  1347. memoizedIsInitialized = 0;
  1348. return false;
  1349. }
  1350. }
  1351. memoizedIsInitialized = 1;
  1352. return true;
  1353. }
  1354. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1355. throws java.io.IOException {
  1356. getSerializedSize();
  1357. for (int i = 0; i < observation_.size(); i++) {
  1358. output.writeMessage(1, observation_.get(i));
  1359. }
  1360. for (int i = 0; i < comment_.size(); i++) {
  1361. output.writeMessage(2, comment_.get(i));
  1362. }
  1363. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  1364. output.writeBytes(3, getNameBytes());
  1365. }
  1366. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  1367. output.writeBytes(4, getUnitBytes());
  1368. }
  1369. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  1370. output.writeBytes(5, getFrequencyBytes());
  1371. }
  1372. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  1373. output.writeBytes(6, getSourceBytes());
  1374. }
  1375. if (((bitField0_ & 0x00000010) == 0x00000010)) {
  1376. output.writeBytes(7, getCommentsBytes());
  1377. }
  1378. getUnknownFields().writeTo(output);
  1379. }
  1380. private int memoizedSerializedSize = -1;
  1381. public int getSerializedSize() {
  1382. int size = memoizedSerializedSize;
  1383. if (size != -1) return size;
  1384. size = 0;
  1385. for (int i = 0; i < observation_.size(); i++) {
  1386. size += com.google.protobuf.CodedOutputStream
  1387. .computeMessageSize(1, observation_.get(i));
  1388. }
  1389. for (int i = 0; i < comment_.size(); i++) {
  1390. size += com.google.protobuf.CodedOutputStream
  1391. .computeMessageSize(2, comment_.get(i));
  1392. }
  1393. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  1394. size += com.google.protobuf.CodedOutputStream
  1395. .computeBytesSize(3, getNameBytes());
  1396. }
  1397. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  1398. size += com.google.protobuf.CodedOutputStream
  1399. .computeBytesSize(4, getUnitBytes());
  1400. }
  1401. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  1402. size += com.google.protobuf.CodedOutputStream
  1403. .computeBytesSize(5, getFrequencyBytes());
  1404. }
  1405. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  1406. size += com.google.protobuf.CodedOutputStream
  1407. .computeBytesSize(6, getSourceBytes());
  1408. }
  1409. if (((bitField0_ & 0x00000010) == 0x00000010)) {
  1410. size += com.google.protobuf.CodedOutputStream
  1411. .computeBytesSize(7, getCommentsBytes());
  1412. }
  1413. size += getUnknownFields().getSerializedSize();
  1414. memoizedSerializedSize = size;
  1415. return size;
  1416. }
  1417. private static final long serialVersionUID = 0L;
  1418. @java.lang.Override
  1419. protected java.lang.Object writeReplace()
  1420. throws java.io.ObjectStreamException {
  1421. return super.writeReplace();
  1422. }
  1423. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseFrom(
  1424. com.google.protobuf.ByteString data)
  1425. throws com.google.protobuf.InvalidProtocolBufferException {
  1426. return newBuilder().mergeFrom(data).buildParsed();
  1427. }
  1428. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseFrom(
  1429. com.google.protobuf.ByteString data,
  1430. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1431. throws com.google.protobuf.InvalidProtocolBufferException {
  1432. return newBuilder().mergeFrom(data, extensionRegistry)
  1433. .buildParsed();
  1434. }
  1435. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseFrom(byte[] data)
  1436. throws com.google.protobuf.InvalidProtocolBufferException {
  1437. return newBuilder().mergeFrom(data).buildParsed();
  1438. }
  1439. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseFrom(
  1440. byte[] data,
  1441. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1442. throws com.google.protobuf.InvalidProtocolBufferException {
  1443. return newBuilder().mergeFrom(data, extensionRegistry)
  1444. .buildParsed();
  1445. }
  1446. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseFrom(java.io.InputStream input)
  1447. throws java.io.IOException {
  1448. return newBuilder().mergeFrom(input).buildParsed();
  1449. }
  1450. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseFrom(
  1451. java.io.InputStream input,
  1452. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1453. throws java.io.IOException {
  1454. return newBuilder().mergeFrom(input, extensionRegistry)
  1455. .buildParsed();
  1456. }
  1457. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseDelimitedFrom(java.io.InputStream input)
  1458. throws java.io.IOException {
  1459. Builder builder = newBuilder();
  1460. if (builder.mergeDelimitedFrom(input)) {
  1461. return builder.buildParsed();
  1462. } else {
  1463. return null;
  1464. }
  1465. }
  1466. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseDelimitedFrom(
  1467. java.io.InputStream input,
  1468. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1469. throws java.io.IOException {
  1470. Builder builder = newBuilder();
  1471. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1472. return builder.buildParsed();
  1473. } else {
  1474. return null;
  1475. }
  1476. }
  1477. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseFrom(
  1478. com.google.protobuf.CodedInputStream input)
  1479. throws java.io.IOException {
  1480. return newBuilder().mergeFrom(input).buildParsed();
  1481. }
  1482. public static org.elec.timeseries.TimeseriesProto.TimeSeries parseFrom(
  1483. com.google.protobuf.CodedInputStream input,
  1484. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1485. throws java.io.IOException {
  1486. return newBuilder().mergeFrom(input, extensionRegistry)
  1487. .buildParsed();
  1488. }
  1489. public static Builder newBuilder() { return Builder.create(); }
  1490. public Builder newBuilderForType() { return newBuilder(); }
  1491. public static Builder newBuilder(org.elec.timeseries.TimeseriesProto.TimeSeries prototype) {
  1492. return newBuilder().mergeFrom(prototype);
  1493. }
  1494. public Builder toBuilder() { return newBuilder(this); }
  1495. @java.lang.Override
  1496. protected Builder newBuilderForType(
  1497. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  1498. Builder builder = new Builder(parent);
  1499. return builder;
  1500. }
  1501. public static final class Builder extends
  1502. com.google.protobuf.GeneratedMessage.Builder<Builder>
  1503. implements org.elec.timeseries.TimeseriesProto.TimeSeriesOrBuilder {
  1504. public static final com.google.protobuf.Descriptors.Descriptor
  1505. getDescriptor() {
  1506. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_TimeSeries_descriptor;
  1507. }
  1508. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1509. internalGetFieldAccessorTable() {
  1510. return org.elec.timeseries.TimeseriesProto.internal_static_timeseries_TimeSeries_fieldAccessorTable;
  1511. }
  1512. // Construct using org.elec.timeseries.TimeseriesProto.TimeSeries.newBuilder()
  1513. private Builder() {
  1514. maybeForceBuilderInitialization();
  1515. }
  1516. private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  1517. super(parent);
  1518. maybeForceBuilderInitialization();
  1519. }
  1520. private void maybeForceBuilderInitialization() {
  1521. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  1522. getObservationFieldBuilder();
  1523. getCommentFieldBuilder();
  1524. }
  1525. }
  1526. private static Builder create() {
  1527. return new Builder();
  1528. }
  1529. public Builder clear() {
  1530. super.clear();
  1531. name_ = "";
  1532. bitField0_ = (bitField0_ & ~0x00000001);
  1533. unit_ = "";
  1534. bitField0_ = (bitField0_ & ~0x00000002);
  1535. frequency_ = "";
  1536. bitField0_ = (bitField0_ & ~0x00000004);
  1537. source_ = "";
  1538. bitField0_ = (bitField0_ & ~0x00000008);
  1539. comments_ = "";
  1540. bitField0_ = (bitField0_ & ~0x00000010);
  1541. if (observationBuilder_ == null) {
  1542. observation_ = java.util.Collections.emptyList();
  1543. bitField0_ = (bitField0_ & ~0x00000020);
  1544. } else {
  1545. observationBuilder_.clear();
  1546. }
  1547. if (commentBuilder_ == null) {
  1548. comment_ = java.util.Collections.emptyList();
  1549. bitField0_ = (bitField0_ & ~0x00000040);
  1550. } else {
  1551. commentBuilder_.clear();
  1552. }
  1553. return this;
  1554. }
  1555. public Builder clone() {
  1556. return create().mergeFrom(buildPartial());
  1557. }
  1558. public com.google.protobuf.Descriptors.Descriptor
  1559. getDescriptorForType() {
  1560. return org.elec.timeseries.TimeseriesProto.TimeSeries.getDescriptor();
  1561. }
  1562. public org.elec.timeseries.TimeseriesProto.TimeSeries getDefaultInstanceForType() {
  1563. return org.elec.timeseries.TimeseriesProto.TimeSeries.getDefaultInstance();
  1564. }
  1565. public org.elec.timeseries.TimeseriesProto.TimeSeries build() {
  1566. org.elec.timeseries.TimeseriesProto.TimeSeries result = buildPartial();
  1567. if (!result.isInitialized()) {
  1568. throw newUninitializedMessageException(result);
  1569. }
  1570. return result;
  1571. }
  1572. private org.elec.timeseries.TimeseriesProto.TimeSeries buildParsed()
  1573. throws com.google.protobuf.InvalidProtocolBufferException {
  1574. org.elec.timeseries.TimeseriesProto.TimeSeries result = buildPartial();
  1575. if (!result.isInitialized()) {
  1576. throw newUninitializedMessageException(
  1577. result).asInvalidProtocolBufferException();
  1578. }
  1579. return result;
  1580. }
  1581. public org.elec.timeseries.TimeseriesProto.TimeSeries buildPartial() {
  1582. org.elec.timeseries.TimeseriesProto.TimeSeries result = new org.elec.timeseries.TimeseriesProto.TimeSeries(this);
  1583. int from_bitField0_ = bitField0_;
  1584. int to_bitField0_ = 0;
  1585. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  1586. to_bitField0_ |= 0x00000001;
  1587. }
  1588. result.name_ = name_;
  1589. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  1590. to_bitField0_ |= 0x00000002;
  1591. }
  1592. result.unit_ = unit_;
  1593. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  1594. to_bitField0_ |= 0x00000004;
  1595. }
  1596. result.frequency_ = frequency_;
  1597. if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
  1598. to_bitField0_ |= 0x00000008;
  1599. }
  1600. result.source_ = source_;
  1601. if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
  1602. to_bitField0_ |= 0x00000010;
  1603. }
  1604. result.comments_ = comments_;
  1605. if (observationBuilder_ == null) {
  1606. if (((bitField0_ & 0x00000020) == 0x00000020)) {
  1607. observation_ = java.util.Collections.unmodifiableList(observation_);
  1608. bitField0_ = (bitField0_ & ~0x00000020);
  1609. }
  1610. result.observation_ = observation_;
  1611. } else {
  1612. result.observation_ = observationBuilder_.build();
  1613. }
  1614. if (commentBuilder_ == null) {
  1615. if (((bitField0_ & 0x00000040) == 0x00000040)) {
  1616. comment_ = java.util.Collections.unmodifiableList(comment_);
  1617. bitField0_ = (bitField0_ & ~0x00000040);
  1618. }
  1619. result.comment_ = comment_;
  1620. } else {
  1621. result.comment_ = commentBuilder_.build();
  1622. }
  1623. result.bitField0_ = to_bitField0_;
  1624. onBuilt();
  1625. return result;
  1626. }
  1627. public Builder mergeFrom(com.google.protobuf.Message other) {
  1628. if (other instanceof org.elec.timeseries.TimeseriesProto.TimeSeries) {
  1629. return mergeFrom((org.elec.timeseries.TimeseriesProto.TimeSeries)other);
  1630. } else {
  1631. super.mergeFrom(other);
  1632. return this;
  1633. }
  1634. }
  1635. public Builder mergeFrom(org.elec.timeseries.TimeseriesProto.TimeSeries other) {
  1636. if (other == org.elec.timeseries.TimeseriesProto.TimeSeries.getDefaultInstance()) return this;
  1637. if (other.hasName()) {
  1638. setName(other.getName());
  1639. }
  1640. if (other.hasUnit()) {
  1641. setUnit(other.getUnit());
  1642. }
  1643. if (other.hasFrequency()) {
  1644. setFrequency(other.getFrequency());
  1645. }
  1646. if (other.hasSource()) {
  1647. setSource(other.getSource());
  1648. }
  1649. if (other.hasComments()) {
  1650. setComments(other.getComments());
  1651. }
  1652. if (observationBuilder_ == null) {
  1653. if (!other.observation_.isEmpty()) {
  1654. if (observation_.isEmpty()) {
  1655. observation_ = other.observation_;
  1656. bitField0_ = (bitField0_ & ~0x00000020);
  1657. } else {
  1658. ensureObservationIsMutable();
  1659. observation_.addAll(other.observation_);
  1660. }
  1661. onChanged();
  1662. }
  1663. } else {
  1664. if (!other.observation_.isEmpty()) {
  1665. if (observationBuilder_.isEmpty()) {
  1666. observationBuilder_.dispose();
  1667. observationBuilder_ = null;
  1668. observation_ = other.observation_;
  1669. bitField0_ = (bitField0_ & ~0x00000020);
  1670. observationBuilder_ =
  1671. com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
  1672. getObservationFieldBuilder() : null;
  1673. } else {
  1674. observationBuilder_.addAllMessages(other.observation_);
  1675. }
  1676. }
  1677. }
  1678. if (commentBuilder_ == null) {
  1679. if (!other.comment_.isEmpty()) {
  1680. if (comment_.isEmpty()) {
  1681. comment_ = other.comment_;
  1682. bitField0_ = (bitField0_ & ~0x00000040);
  1683. } else {
  1684. ensureCommentIsMutable();
  1685. comment_.addAll(other.comment_);
  1686. }
  1687. onChanged();
  1688. }
  1689. } else {
  1690. if (!other.comment_.isEmpty()) {
  1691. if (commentBuilder_.isEmpty()) {
  1692. commentBuilder_.dispose();
  1693. commentBuilder_ = null;
  1694. comment_ = other.comment_;
  1695. bitField0_ = (bitField0_ & ~0x00000040);
  1696. commentBuilder_ =
  1697. com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
  1698. getCommentFieldBuilder() : null;
  1699. } else {
  1700. commentBuilder_.addAllMessages(other.comment_);
  1701. }
  1702. }
  1703. }
  1704. this.mergeUnknownFields(other.getUnknownFields());
  1705. return this;
  1706. }
  1707. public final boolean isInitialized() {
  1708. if (!hasName()) {
  1709. return false;
  1710. }
  1711. for (int i = 0; i < getObservationCount(); i++) {
  1712. if (!getObservation(i).isInitialized()) {
  1713. return false;
  1714. }
  1715. }
  1716. for (int i = 0; i < getCommentCount(); i++) {
  1717. if (!getComment(i).isInitialized()) {
  1718. return false;
  1719. }
  1720. }
  1721. return true;
  1722. }
  1723. public Builder mergeFrom(
  1724. com.google.protobuf.CodedInputStream input,
  1725. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1726. throws java.io.IOException {
  1727. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1728. com.google.protobuf.UnknownFieldSet.newBuilder(
  1729. this.getUnknownFields());
  1730. while (true) {
  1731. int tag = input.readTag();
  1732. switch (tag) {
  1733. case 0:
  1734. this.setUnknownFields(unknownFields.build());
  1735. onChanged();
  1736. return this;
  1737. default: {
  1738. if (!parseUnknownField(input, unknownFields,
  1739. extensionRegistry, tag)) {
  1740. this.setUnknownFields(unknownFields.build());
  1741. onChanged();
  1742. return this;
  1743. }
  1744. break;
  1745. }
  1746. case 10: {
  1747. org.elec.timeseries.TimeseriesProto.Observation.Builder subBuilder = org.elec.timeseries.TimeseriesProto.Observation.newBuilder();
  1748. input.readMessage(subBuilder, extensionRegistry);
  1749. addObservation(subBuilder.buildPartial());
  1750. break;
  1751. }
  1752. case 18: {
  1753. org.elec.timeseries.TimeseriesProto.Comment.Builder subBuilder = org.elec.timeseries.TimeseriesProto.Comment.newBuilder();
  1754. input.readMessage(subBuilder, extensionRegistry);
  1755. addComment(subBuilder.buildPartial());
  1756. break;
  1757. }
  1758. case 26: {
  1759. bitField0_ |= 0x00000001;
  1760. name_ = input.readBytes();
  1761. break;
  1762. }
  1763. case 34: {
  1764. bitField0_ |= 0x00000002;
  1765. unit_ = input.readBytes();
  1766. break;
  1767. }
  1768. case 42: {
  1769. bitField0_ |= 0x00000004;
  1770. frequency_ = input.readBytes();
  1771. break;
  1772. }
  1773. case 50: {
  1774. bitField0_ |= 0x00000008;
  1775. source_ = input.readBytes();
  1776. break;
  1777. }
  1778. case 58: {
  1779. bitField0_ |= 0x00000010;
  1780. comments_ = input.readBytes();