PageRenderTime 59ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 1ms

/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 files are truncated, but you can click here to view the full 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 (((bit

Large files files are truncated, but you can click here to view the full file