PageRenderTime 66ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/protostuff-codegen/src/test/java/com/dyuproject/protostuff/codegen/V22Speed.java

http://protostuff.googlecode.com/
Java | 2221 lines | 2010 code | 152 blank | 59 comment | 219 complexity | 80abc0ce2548e369bb5d83b89695ee36 MD5 | raw file
Possible License(s): Apache-2.0
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: src/test/resources/TestModel.proto
  3. package com.dyuproject.protostuff.codegen;
  4. public final class V22Speed {
  5. private V22Speed() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public static final class Foo extends
  10. com.google.protobuf.GeneratedMessage {
  11. // Use Foo.newBuilder() to construct.
  12. private Foo() {
  13. initFields();
  14. }
  15. private Foo(boolean noInit) {}
  16. private static final Foo defaultInstance;
  17. public static Foo getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. public Foo getDefaultInstanceForType() {
  21. return defaultInstance;
  22. }
  23. public static final com.google.protobuf.Descriptors.Descriptor
  24. getDescriptor() {
  25. return com.dyuproject.protostuff.codegen.V22Speed.internal_static_codegen_Foo_descriptor;
  26. }
  27. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  28. internalGetFieldAccessorTable() {
  29. return com.dyuproject.protostuff.codegen.V22Speed.internal_static_codegen_Foo_fieldAccessorTable;
  30. }
  31. public enum EnumSample
  32. implements com.google.protobuf.ProtocolMessageEnum {
  33. TYPE0(0, 0),
  34. TYPE1(1, 1),
  35. TYPE2(2, 2),
  36. TYPE3(3, 3),
  37. TYPE4(4, 4),
  38. ;
  39. public final int getNumber() { return value; }
  40. public static EnumSample valueOf(int value) {
  41. switch (value) {
  42. case 0: return TYPE0;
  43. case 1: return TYPE1;
  44. case 2: return TYPE2;
  45. case 3: return TYPE3;
  46. case 4: return TYPE4;
  47. default: return null;
  48. }
  49. }
  50. public static com.google.protobuf.Internal.EnumLiteMap<EnumSample>
  51. internalGetValueMap() {
  52. return internalValueMap;
  53. }
  54. private static com.google.protobuf.Internal.EnumLiteMap<EnumSample>
  55. internalValueMap =
  56. new com.google.protobuf.Internal.EnumLiteMap<EnumSample>() {
  57. public EnumSample findValueByNumber(int number) {
  58. return EnumSample.valueOf(number)
  59. ; }
  60. };
  61. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  62. getValueDescriptor() {
  63. return getDescriptor().getValues().get(index);
  64. }
  65. public final com.google.protobuf.Descriptors.EnumDescriptor
  66. getDescriptorForType() {
  67. return getDescriptor();
  68. }
  69. public static final com.google.protobuf.Descriptors.EnumDescriptor
  70. getDescriptor() {
  71. return com.dyuproject.protostuff.codegen.V22Speed.Foo.getDescriptor().getEnumTypes().get(0);
  72. }
  73. private static final EnumSample[] VALUES = {
  74. TYPE0, TYPE1, TYPE2, TYPE3, TYPE4,
  75. };
  76. public static EnumSample valueOf(
  77. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  78. if (desc.getType() != getDescriptor()) {
  79. throw new java.lang.IllegalArgumentException(
  80. "EnumValueDescriptor is not for this type.");
  81. }
  82. return VALUES[desc.getIndex()];
  83. }
  84. private final int index;
  85. private final int value;
  86. private EnumSample(int index, int value) {
  87. this.index = index;
  88. this.value = value;
  89. }
  90. static {
  91. com.dyuproject.protostuff.codegen.V22Speed.getDescriptor();
  92. }
  93. // @@protoc_insertion_point(enum_scope:codegen.Foo.EnumSample)
  94. }
  95. // repeated int32 some_int = 1;
  96. public static final int SOME_INT_FIELD_NUMBER = 1;
  97. private java.util.List<java.lang.Integer> someInt_ =
  98. java.util.Collections.emptyList();
  99. public java.util.List<java.lang.Integer> getSomeIntList() {
  100. return someInt_;
  101. }
  102. public int getSomeIntCount() { return someInt_.size(); }
  103. public int getSomeInt(int index) {
  104. return someInt_.get(index);
  105. }
  106. // repeated string some_string = 2;
  107. public static final int SOME_STRING_FIELD_NUMBER = 2;
  108. private java.util.List<java.lang.String> someString_ =
  109. java.util.Collections.emptyList();
  110. public java.util.List<java.lang.String> getSomeStringList() {
  111. return someString_;
  112. }
  113. public int getSomeStringCount() { return someString_.size(); }
  114. public java.lang.String getSomeString(int index) {
  115. return someString_.get(index);
  116. }
  117. // repeated .codegen.Bar bar = 3;
  118. public static final int BAR_FIELD_NUMBER = 3;
  119. private java.util.List<com.dyuproject.protostuff.codegen.V22Speed.Bar> bar_ =
  120. java.util.Collections.emptyList();
  121. public java.util.List<com.dyuproject.protostuff.codegen.V22Speed.Bar> getBarList() {
  122. return bar_;
  123. }
  124. public int getBarCount() { return bar_.size(); }
  125. public com.dyuproject.protostuff.codegen.V22Speed.Bar getBar(int index) {
  126. return bar_.get(index);
  127. }
  128. // repeated .codegen.Foo.EnumSample some_enum = 4;
  129. public static final int SOME_ENUM_FIELD_NUMBER = 4;
  130. private java.util.List<com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample> someEnum_ =
  131. java.util.Collections.emptyList();
  132. public java.util.List<com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample> getSomeEnumList() {
  133. return someEnum_;
  134. }
  135. public int getSomeEnumCount() { return someEnum_.size(); }
  136. public com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample getSomeEnum(int index) {
  137. return someEnum_.get(index);
  138. }
  139. // repeated bytes some_bytes = 5;
  140. public static final int SOME_BYTES_FIELD_NUMBER = 5;
  141. private java.util.List<com.google.protobuf.ByteString> someBytes_ =
  142. java.util.Collections.emptyList();
  143. public java.util.List<com.google.protobuf.ByteString> getSomeBytesList() {
  144. return someBytes_;
  145. }
  146. public int getSomeBytesCount() { return someBytes_.size(); }
  147. public com.google.protobuf.ByteString getSomeBytes(int index) {
  148. return someBytes_.get(index);
  149. }
  150. // repeated bool some_boolean = 6;
  151. public static final int SOME_BOOLEAN_FIELD_NUMBER = 6;
  152. private java.util.List<java.lang.Boolean> someBoolean_ =
  153. java.util.Collections.emptyList();
  154. public java.util.List<java.lang.Boolean> getSomeBooleanList() {
  155. return someBoolean_;
  156. }
  157. public int getSomeBooleanCount() { return someBoolean_.size(); }
  158. public boolean getSomeBoolean(int index) {
  159. return someBoolean_.get(index);
  160. }
  161. // repeated float some_float = 7;
  162. public static final int SOME_FLOAT_FIELD_NUMBER = 7;
  163. private java.util.List<java.lang.Float> someFloat_ =
  164. java.util.Collections.emptyList();
  165. public java.util.List<java.lang.Float> getSomeFloatList() {
  166. return someFloat_;
  167. }
  168. public int getSomeFloatCount() { return someFloat_.size(); }
  169. public float getSomeFloat(int index) {
  170. return someFloat_.get(index);
  171. }
  172. // repeated double some_double = 8;
  173. public static final int SOME_DOUBLE_FIELD_NUMBER = 8;
  174. private java.util.List<java.lang.Double> someDouble_ =
  175. java.util.Collections.emptyList();
  176. public java.util.List<java.lang.Double> getSomeDoubleList() {
  177. return someDouble_;
  178. }
  179. public int getSomeDoubleCount() { return someDouble_.size(); }
  180. public double getSomeDouble(int index) {
  181. return someDouble_.get(index);
  182. }
  183. // repeated int64 some_long = 9;
  184. public static final int SOME_LONG_FIELD_NUMBER = 9;
  185. private java.util.List<java.lang.Long> someLong_ =
  186. java.util.Collections.emptyList();
  187. public java.util.List<java.lang.Long> getSomeLongList() {
  188. return someLong_;
  189. }
  190. public int getSomeLongCount() { return someLong_.size(); }
  191. public long getSomeLong(int index) {
  192. return someLong_.get(index);
  193. }
  194. private void initFields() {
  195. }
  196. public final boolean isInitialized() {
  197. return true;
  198. }
  199. public void writeTo(com.google.protobuf.CodedOutputStream output)
  200. throws java.io.IOException {
  201. getSerializedSize();
  202. for (int element : getSomeIntList()) {
  203. output.writeInt32(1, element);
  204. }
  205. for (java.lang.String element : getSomeStringList()) {
  206. output.writeString(2, element);
  207. }
  208. for (com.dyuproject.protostuff.codegen.V22Speed.Bar element : getBarList()) {
  209. output.writeMessage(3, element);
  210. }
  211. for (com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample element : getSomeEnumList()) {
  212. output.writeEnum(4, element.getNumber());
  213. }
  214. for (com.google.protobuf.ByteString element : getSomeBytesList()) {
  215. output.writeBytes(5, element);
  216. }
  217. for (boolean element : getSomeBooleanList()) {
  218. output.writeBool(6, element);
  219. }
  220. for (float element : getSomeFloatList()) {
  221. output.writeFloat(7, element);
  222. }
  223. for (double element : getSomeDoubleList()) {
  224. output.writeDouble(8, element);
  225. }
  226. for (long element : getSomeLongList()) {
  227. output.writeInt64(9, element);
  228. }
  229. getUnknownFields().writeTo(output);
  230. }
  231. private int memoizedSerializedSize = -1;
  232. public int getSerializedSize() {
  233. int size = memoizedSerializedSize;
  234. if (size != -1) return size;
  235. size = 0;
  236. {
  237. int dataSize = 0;
  238. for (int element : getSomeIntList()) {
  239. dataSize += com.google.protobuf.CodedOutputStream
  240. .computeInt32SizeNoTag(element);
  241. }
  242. size += dataSize;
  243. size += 1 * getSomeIntList().size();
  244. }
  245. {
  246. int dataSize = 0;
  247. for (java.lang.String element : getSomeStringList()) {
  248. dataSize += com.google.protobuf.CodedOutputStream
  249. .computeStringSizeNoTag(element);
  250. }
  251. size += dataSize;
  252. size += 1 * getSomeStringList().size();
  253. }
  254. for (com.dyuproject.protostuff.codegen.V22Speed.Bar element : getBarList()) {
  255. size += com.google.protobuf.CodedOutputStream
  256. .computeMessageSize(3, element);
  257. }
  258. {
  259. int dataSize = 0;
  260. for (com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample element : getSomeEnumList()) {
  261. dataSize += com.google.protobuf.CodedOutputStream
  262. .computeEnumSizeNoTag(element.getNumber());
  263. }
  264. size += dataSize;
  265. size += 1 * getSomeEnumList().size();
  266. }
  267. {
  268. int dataSize = 0;
  269. for (com.google.protobuf.ByteString element : getSomeBytesList()) {
  270. dataSize += com.google.protobuf.CodedOutputStream
  271. .computeBytesSizeNoTag(element);
  272. }
  273. size += dataSize;
  274. size += 1 * getSomeBytesList().size();
  275. }
  276. {
  277. int dataSize = 0;
  278. dataSize = 1 * getSomeBooleanList().size();
  279. size += dataSize;
  280. size += 1 * getSomeBooleanList().size();
  281. }
  282. {
  283. int dataSize = 0;
  284. dataSize = 4 * getSomeFloatList().size();
  285. size += dataSize;
  286. size += 1 * getSomeFloatList().size();
  287. }
  288. {
  289. int dataSize = 0;
  290. dataSize = 8 * getSomeDoubleList().size();
  291. size += dataSize;
  292. size += 1 * getSomeDoubleList().size();
  293. }
  294. {
  295. int dataSize = 0;
  296. for (long element : getSomeLongList()) {
  297. dataSize += com.google.protobuf.CodedOutputStream
  298. .computeInt64SizeNoTag(element);
  299. }
  300. size += dataSize;
  301. size += 1 * getSomeLongList().size();
  302. }
  303. size += getUnknownFields().getSerializedSize();
  304. memoizedSerializedSize = size;
  305. return size;
  306. }
  307. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseFrom(
  308. com.google.protobuf.ByteString data)
  309. throws com.google.protobuf.InvalidProtocolBufferException {
  310. return newBuilder().mergeFrom(data).buildParsed();
  311. }
  312. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseFrom(
  313. com.google.protobuf.ByteString data,
  314. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  315. throws com.google.protobuf.InvalidProtocolBufferException {
  316. return newBuilder().mergeFrom(data, extensionRegistry)
  317. .buildParsed();
  318. }
  319. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseFrom(byte[] data)
  320. throws com.google.protobuf.InvalidProtocolBufferException {
  321. return newBuilder().mergeFrom(data).buildParsed();
  322. }
  323. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseFrom(
  324. byte[] data,
  325. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  326. throws com.google.protobuf.InvalidProtocolBufferException {
  327. return newBuilder().mergeFrom(data, extensionRegistry)
  328. .buildParsed();
  329. }
  330. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseFrom(java.io.InputStream input)
  331. throws java.io.IOException {
  332. return newBuilder().mergeFrom(input).buildParsed();
  333. }
  334. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseFrom(
  335. java.io.InputStream input,
  336. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  337. throws java.io.IOException {
  338. return newBuilder().mergeFrom(input, extensionRegistry)
  339. .buildParsed();
  340. }
  341. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseDelimitedFrom(java.io.InputStream input)
  342. throws java.io.IOException {
  343. Builder builder = newBuilder();
  344. if (builder.mergeDelimitedFrom(input)) {
  345. return builder.buildParsed();
  346. } else {
  347. return null;
  348. }
  349. }
  350. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseDelimitedFrom(
  351. java.io.InputStream input,
  352. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  353. throws java.io.IOException {
  354. Builder builder = newBuilder();
  355. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  356. return builder.buildParsed();
  357. } else {
  358. return null;
  359. }
  360. }
  361. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseFrom(
  362. com.google.protobuf.CodedInputStream input)
  363. throws java.io.IOException {
  364. return newBuilder().mergeFrom(input).buildParsed();
  365. }
  366. public static com.dyuproject.protostuff.codegen.V22Speed.Foo parseFrom(
  367. com.google.protobuf.CodedInputStream input,
  368. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  369. throws java.io.IOException {
  370. return newBuilder().mergeFrom(input, extensionRegistry)
  371. .buildParsed();
  372. }
  373. public static Builder newBuilder() { return Builder.create(); }
  374. public Builder newBuilderForType() { return newBuilder(); }
  375. public static Builder newBuilder(com.dyuproject.protostuff.codegen.V22Speed.Foo prototype) {
  376. return newBuilder().mergeFrom(prototype);
  377. }
  378. public Builder toBuilder() { return newBuilder(this); }
  379. public static final class Builder extends
  380. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  381. private com.dyuproject.protostuff.codegen.V22Speed.Foo result;
  382. // Construct using com.dyuproject.protostuff.codegen.V22Speed.Foo.newBuilder()
  383. private Builder() {}
  384. private static Builder create() {
  385. Builder builder = new Builder();
  386. builder.result = new com.dyuproject.protostuff.codegen.V22Speed.Foo();
  387. return builder;
  388. }
  389. protected com.dyuproject.protostuff.codegen.V22Speed.Foo internalGetResult() {
  390. return result;
  391. }
  392. public Builder clear() {
  393. if (result == null) {
  394. throw new IllegalStateException(
  395. "Cannot call clear() after build().");
  396. }
  397. result = new com.dyuproject.protostuff.codegen.V22Speed.Foo();
  398. return this;
  399. }
  400. public Builder clone() {
  401. return create().mergeFrom(result);
  402. }
  403. public com.google.protobuf.Descriptors.Descriptor
  404. getDescriptorForType() {
  405. return com.dyuproject.protostuff.codegen.V22Speed.Foo.getDescriptor();
  406. }
  407. public com.dyuproject.protostuff.codegen.V22Speed.Foo getDefaultInstanceForType() {
  408. return com.dyuproject.protostuff.codegen.V22Speed.Foo.getDefaultInstance();
  409. }
  410. public boolean isInitialized() {
  411. return result.isInitialized();
  412. }
  413. public com.dyuproject.protostuff.codegen.V22Speed.Foo build() {
  414. if (result != null && !isInitialized()) {
  415. throw newUninitializedMessageException(result);
  416. }
  417. return buildPartial();
  418. }
  419. private com.dyuproject.protostuff.codegen.V22Speed.Foo buildParsed()
  420. throws com.google.protobuf.InvalidProtocolBufferException {
  421. if (!isInitialized()) {
  422. throw newUninitializedMessageException(
  423. result).asInvalidProtocolBufferException();
  424. }
  425. return buildPartial();
  426. }
  427. public com.dyuproject.protostuff.codegen.V22Speed.Foo buildPartial() {
  428. if (result == null) {
  429. throw new IllegalStateException(
  430. "build() has already been called on this Builder.");
  431. }
  432. if (result.someInt_ != java.util.Collections.EMPTY_LIST) {
  433. result.someInt_ =
  434. java.util.Collections.unmodifiableList(result.someInt_);
  435. }
  436. if (result.someString_ != java.util.Collections.EMPTY_LIST) {
  437. result.someString_ =
  438. java.util.Collections.unmodifiableList(result.someString_);
  439. }
  440. if (result.bar_ != java.util.Collections.EMPTY_LIST) {
  441. result.bar_ =
  442. java.util.Collections.unmodifiableList(result.bar_);
  443. }
  444. if (result.someEnum_ != java.util.Collections.EMPTY_LIST) {
  445. result.someEnum_ =
  446. java.util.Collections.unmodifiableList(result.someEnum_);
  447. }
  448. if (result.someBytes_ != java.util.Collections.EMPTY_LIST) {
  449. result.someBytes_ =
  450. java.util.Collections.unmodifiableList(result.someBytes_);
  451. }
  452. if (result.someBoolean_ != java.util.Collections.EMPTY_LIST) {
  453. result.someBoolean_ =
  454. java.util.Collections.unmodifiableList(result.someBoolean_);
  455. }
  456. if (result.someFloat_ != java.util.Collections.EMPTY_LIST) {
  457. result.someFloat_ =
  458. java.util.Collections.unmodifiableList(result.someFloat_);
  459. }
  460. if (result.someDouble_ != java.util.Collections.EMPTY_LIST) {
  461. result.someDouble_ =
  462. java.util.Collections.unmodifiableList(result.someDouble_);
  463. }
  464. if (result.someLong_ != java.util.Collections.EMPTY_LIST) {
  465. result.someLong_ =
  466. java.util.Collections.unmodifiableList(result.someLong_);
  467. }
  468. com.dyuproject.protostuff.codegen.V22Speed.Foo returnMe = result;
  469. result = null;
  470. return returnMe;
  471. }
  472. public Builder mergeFrom(com.google.protobuf.Message other) {
  473. if (other instanceof com.dyuproject.protostuff.codegen.V22Speed.Foo) {
  474. return mergeFrom((com.dyuproject.protostuff.codegen.V22Speed.Foo)other);
  475. } else {
  476. super.mergeFrom(other);
  477. return this;
  478. }
  479. }
  480. public Builder mergeFrom(com.dyuproject.protostuff.codegen.V22Speed.Foo other) {
  481. if (other == com.dyuproject.protostuff.codegen.V22Speed.Foo.getDefaultInstance()) return this;
  482. if (!other.someInt_.isEmpty()) {
  483. if (result.someInt_.isEmpty()) {
  484. result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
  485. }
  486. result.someInt_.addAll(other.someInt_);
  487. }
  488. if (!other.someString_.isEmpty()) {
  489. if (result.someString_.isEmpty()) {
  490. result.someString_ = new java.util.ArrayList<java.lang.String>();
  491. }
  492. result.someString_.addAll(other.someString_);
  493. }
  494. if (!other.bar_.isEmpty()) {
  495. if (result.bar_.isEmpty()) {
  496. result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Speed.Bar>();
  497. }
  498. result.bar_.addAll(other.bar_);
  499. }
  500. if (!other.someEnum_.isEmpty()) {
  501. if (result.someEnum_.isEmpty()) {
  502. result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample>();
  503. }
  504. result.someEnum_.addAll(other.someEnum_);
  505. }
  506. if (!other.someBytes_.isEmpty()) {
  507. if (result.someBytes_.isEmpty()) {
  508. result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  509. }
  510. result.someBytes_.addAll(other.someBytes_);
  511. }
  512. if (!other.someBoolean_.isEmpty()) {
  513. if (result.someBoolean_.isEmpty()) {
  514. result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
  515. }
  516. result.someBoolean_.addAll(other.someBoolean_);
  517. }
  518. if (!other.someFloat_.isEmpty()) {
  519. if (result.someFloat_.isEmpty()) {
  520. result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
  521. }
  522. result.someFloat_.addAll(other.someFloat_);
  523. }
  524. if (!other.someDouble_.isEmpty()) {
  525. if (result.someDouble_.isEmpty()) {
  526. result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
  527. }
  528. result.someDouble_.addAll(other.someDouble_);
  529. }
  530. if (!other.someLong_.isEmpty()) {
  531. if (result.someLong_.isEmpty()) {
  532. result.someLong_ = new java.util.ArrayList<java.lang.Long>();
  533. }
  534. result.someLong_.addAll(other.someLong_);
  535. }
  536. this.mergeUnknownFields(other.getUnknownFields());
  537. return this;
  538. }
  539. public Builder mergeFrom(
  540. com.google.protobuf.CodedInputStream input,
  541. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  542. throws java.io.IOException {
  543. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  544. com.google.protobuf.UnknownFieldSet.newBuilder(
  545. this.getUnknownFields());
  546. while (true) {
  547. int tag = input.readTag();
  548. switch (tag) {
  549. case 0:
  550. this.setUnknownFields(unknownFields.build());
  551. return this;
  552. default: {
  553. if (!parseUnknownField(input, unknownFields,
  554. extensionRegistry, tag)) {
  555. this.setUnknownFields(unknownFields.build());
  556. return this;
  557. }
  558. break;
  559. }
  560. case 8: {
  561. addSomeInt(input.readInt32());
  562. break;
  563. }
  564. case 10: {
  565. int length = input.readRawVarint32();
  566. int limit = input.pushLimit(length);
  567. while (input.getBytesUntilLimit() > 0) {
  568. addSomeInt(input.readInt32());
  569. }
  570. input.popLimit(limit);
  571. break;
  572. }
  573. case 18: {
  574. addSomeString(input.readString());
  575. break;
  576. }
  577. case 26: {
  578. com.dyuproject.protostuff.codegen.V22Speed.Bar.Builder subBuilder = com.dyuproject.protostuff.codegen.V22Speed.Bar.newBuilder();
  579. input.readMessage(subBuilder, extensionRegistry);
  580. addBar(subBuilder.buildPartial());
  581. break;
  582. }
  583. case 32: {
  584. int rawValue = input.readEnum();
  585. com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample value = com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample.valueOf(rawValue);
  586. if (value == null) {
  587. unknownFields.mergeVarintField(4, rawValue);
  588. } else {
  589. addSomeEnum(value);
  590. }
  591. break;
  592. }
  593. case 34: {
  594. int length = input.readRawVarint32();
  595. int oldLimit = input.pushLimit(length);
  596. while(input.getBytesUntilLimit() > 0) {
  597. int rawValue = input.readEnum();
  598. com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample value = com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample.valueOf(rawValue);
  599. if (value == null) {
  600. unknownFields.mergeVarintField(4, rawValue);
  601. } else {
  602. addSomeEnum(value);
  603. }
  604. }
  605. input.popLimit(oldLimit);
  606. break;
  607. }
  608. case 42: {
  609. addSomeBytes(input.readBytes());
  610. break;
  611. }
  612. case 48: {
  613. addSomeBoolean(input.readBool());
  614. break;
  615. }
  616. case 50: {
  617. int length = input.readRawVarint32();
  618. int limit = input.pushLimit(length);
  619. while (input.getBytesUntilLimit() > 0) {
  620. addSomeBoolean(input.readBool());
  621. }
  622. input.popLimit(limit);
  623. break;
  624. }
  625. case 61: {
  626. addSomeFloat(input.readFloat());
  627. break;
  628. }
  629. case 58: {
  630. int length = input.readRawVarint32();
  631. int limit = input.pushLimit(length);
  632. while (input.getBytesUntilLimit() > 0) {
  633. addSomeFloat(input.readFloat());
  634. }
  635. input.popLimit(limit);
  636. break;
  637. }
  638. case 65: {
  639. addSomeDouble(input.readDouble());
  640. break;
  641. }
  642. case 66: {
  643. int length = input.readRawVarint32();
  644. int limit = input.pushLimit(length);
  645. while (input.getBytesUntilLimit() > 0) {
  646. addSomeDouble(input.readDouble());
  647. }
  648. input.popLimit(limit);
  649. break;
  650. }
  651. case 72: {
  652. addSomeLong(input.readInt64());
  653. break;
  654. }
  655. case 74: {
  656. int length = input.readRawVarint32();
  657. int limit = input.pushLimit(length);
  658. while (input.getBytesUntilLimit() > 0) {
  659. addSomeLong(input.readInt64());
  660. }
  661. input.popLimit(limit);
  662. break;
  663. }
  664. }
  665. }
  666. }
  667. // repeated int32 some_int = 1;
  668. public java.util.List<java.lang.Integer> getSomeIntList() {
  669. return java.util.Collections.unmodifiableList(result.someInt_);
  670. }
  671. public int getSomeIntCount() {
  672. return result.getSomeIntCount();
  673. }
  674. public int getSomeInt(int index) {
  675. return result.getSomeInt(index);
  676. }
  677. public Builder setSomeInt(int index, int value) {
  678. result.someInt_.set(index, value);
  679. return this;
  680. }
  681. public Builder addSomeInt(int value) {
  682. if (result.someInt_.isEmpty()) {
  683. result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
  684. }
  685. result.someInt_.add(value);
  686. return this;
  687. }
  688. public Builder addAllSomeInt(
  689. java.lang.Iterable<? extends java.lang.Integer> values) {
  690. if (result.someInt_.isEmpty()) {
  691. result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
  692. }
  693. super.addAll(values, result.someInt_);
  694. return this;
  695. }
  696. public Builder clearSomeInt() {
  697. result.someInt_ = java.util.Collections.emptyList();
  698. return this;
  699. }
  700. // repeated string some_string = 2;
  701. public java.util.List<java.lang.String> getSomeStringList() {
  702. return java.util.Collections.unmodifiableList(result.someString_);
  703. }
  704. public int getSomeStringCount() {
  705. return result.getSomeStringCount();
  706. }
  707. public java.lang.String getSomeString(int index) {
  708. return result.getSomeString(index);
  709. }
  710. public Builder setSomeString(int index, java.lang.String value) {
  711. if (value == null) {
  712. throw new NullPointerException();
  713. }
  714. result.someString_.set(index, value);
  715. return this;
  716. }
  717. public Builder addSomeString(java.lang.String value) {
  718. if (value == null) {
  719. throw new NullPointerException();
  720. }
  721. if (result.someString_.isEmpty()) {
  722. result.someString_ = new java.util.ArrayList<java.lang.String>();
  723. }
  724. result.someString_.add(value);
  725. return this;
  726. }
  727. public Builder addAllSomeString(
  728. java.lang.Iterable<? extends java.lang.String> values) {
  729. if (result.someString_.isEmpty()) {
  730. result.someString_ = new java.util.ArrayList<java.lang.String>();
  731. }
  732. super.addAll(values, result.someString_);
  733. return this;
  734. }
  735. public Builder clearSomeString() {
  736. result.someString_ = java.util.Collections.emptyList();
  737. return this;
  738. }
  739. // repeated .codegen.Bar bar = 3;
  740. public java.util.List<com.dyuproject.protostuff.codegen.V22Speed.Bar> getBarList() {
  741. return java.util.Collections.unmodifiableList(result.bar_);
  742. }
  743. public int getBarCount() {
  744. return result.getBarCount();
  745. }
  746. public com.dyuproject.protostuff.codegen.V22Speed.Bar getBar(int index) {
  747. return result.getBar(index);
  748. }
  749. public Builder setBar(int index, com.dyuproject.protostuff.codegen.V22Speed.Bar value) {
  750. if (value == null) {
  751. throw new NullPointerException();
  752. }
  753. result.bar_.set(index, value);
  754. return this;
  755. }
  756. public Builder setBar(int index, com.dyuproject.protostuff.codegen.V22Speed.Bar.Builder builderForValue) {
  757. result.bar_.set(index, builderForValue.build());
  758. return this;
  759. }
  760. public Builder addBar(com.dyuproject.protostuff.codegen.V22Speed.Bar value) {
  761. if (value == null) {
  762. throw new NullPointerException();
  763. }
  764. if (result.bar_.isEmpty()) {
  765. result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Speed.Bar>();
  766. }
  767. result.bar_.add(value);
  768. return this;
  769. }
  770. public Builder addBar(com.dyuproject.protostuff.codegen.V22Speed.Bar.Builder builderForValue) {
  771. if (result.bar_.isEmpty()) {
  772. result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Speed.Bar>();
  773. }
  774. result.bar_.add(builderForValue.build());
  775. return this;
  776. }
  777. public Builder addAllBar(
  778. java.lang.Iterable<? extends com.dyuproject.protostuff.codegen.V22Speed.Bar> values) {
  779. if (result.bar_.isEmpty()) {
  780. result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Speed.Bar>();
  781. }
  782. super.addAll(values, result.bar_);
  783. return this;
  784. }
  785. public Builder clearBar() {
  786. result.bar_ = java.util.Collections.emptyList();
  787. return this;
  788. }
  789. // repeated .codegen.Foo.EnumSample some_enum = 4;
  790. public java.util.List<com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample> getSomeEnumList() {
  791. return java.util.Collections.unmodifiableList(result.someEnum_);
  792. }
  793. public int getSomeEnumCount() {
  794. return result.getSomeEnumCount();
  795. }
  796. public com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample getSomeEnum(int index) {
  797. return result.getSomeEnum(index);
  798. }
  799. public Builder setSomeEnum(int index, com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample value) {
  800. if (value == null) {
  801. throw new NullPointerException();
  802. }
  803. result.someEnum_.set(index, value);
  804. return this;
  805. }
  806. public Builder addSomeEnum(com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample value) {
  807. if (value == null) {
  808. throw new NullPointerException();
  809. }
  810. if (result.someEnum_.isEmpty()) {
  811. result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample>();
  812. }
  813. result.someEnum_.add(value);
  814. return this;
  815. }
  816. public Builder addAllSomeEnum(
  817. java.lang.Iterable<? extends com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample> values) {
  818. if (result.someEnum_.isEmpty()) {
  819. result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Speed.Foo.EnumSample>();
  820. }
  821. super.addAll(values, result.someEnum_);
  822. return this;
  823. }
  824. public Builder clearSomeEnum() {
  825. result.someEnum_ = java.util.Collections.emptyList();
  826. return this;
  827. }
  828. // repeated bytes some_bytes = 5;
  829. public java.util.List<com.google.protobuf.ByteString> getSomeBytesList() {
  830. return java.util.Collections.unmodifiableList(result.someBytes_);
  831. }
  832. public int getSomeBytesCount() {
  833. return result.getSomeBytesCount();
  834. }
  835. public com.google.protobuf.ByteString getSomeBytes(int index) {
  836. return result.getSomeBytes(index);
  837. }
  838. public Builder setSomeBytes(int index, com.google.protobuf.ByteString value) {
  839. if (value == null) {
  840. throw new NullPointerException();
  841. }
  842. result.someBytes_.set(index, value);
  843. return this;
  844. }
  845. public Builder addSomeBytes(com.google.protobuf.ByteString value) {
  846. if (value == null) {
  847. throw new NullPointerException();
  848. }
  849. if (result.someBytes_.isEmpty()) {
  850. result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  851. }
  852. result.someBytes_.add(value);
  853. return this;
  854. }
  855. public Builder addAllSomeBytes(
  856. java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
  857. if (result.someBytes_.isEmpty()) {
  858. result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  859. }
  860. super.addAll(values, result.someBytes_);
  861. return this;
  862. }
  863. public Builder clearSomeBytes() {
  864. result.someBytes_ = java.util.Collections.emptyList();
  865. return this;
  866. }
  867. // repeated bool some_boolean = 6;
  868. public java.util.List<java.lang.Boolean> getSomeBooleanList() {
  869. return java.util.Collections.unmodifiableList(result.someBoolean_);
  870. }
  871. public int getSomeBooleanCount() {
  872. return result.getSomeBooleanCount();
  873. }
  874. public boolean getSomeBoolean(int index) {
  875. return result.getSomeBoolean(index);
  876. }
  877. public Builder setSomeBoolean(int index, boolean value) {
  878. result.someBoolean_.set(index, value);
  879. return this;
  880. }
  881. public Builder addSomeBoolean(boolean value) {
  882. if (result.someBoolean_.isEmpty()) {
  883. result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
  884. }
  885. result.someBoolean_.add(value);
  886. return this;
  887. }
  888. public Builder addAllSomeBoolean(
  889. java.lang.Iterable<? extends java.lang.Boolean> values) {
  890. if (result.someBoolean_.isEmpty()) {
  891. result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
  892. }
  893. super.addAll(values, result.someBoolean_);
  894. return this;
  895. }
  896. public Builder clearSomeBoolean() {
  897. result.someBoolean_ = java.util.Collections.emptyList();
  898. return this;
  899. }
  900. // repeated float some_float = 7;
  901. public java.util.List<java.lang.Float> getSomeFloatList() {
  902. return java.util.Collections.unmodifiableList(result.someFloat_);
  903. }
  904. public int getSomeFloatCount() {
  905. return result.getSomeFloatCount();
  906. }
  907. public float getSomeFloat(int index) {
  908. return result.getSomeFloat(index);
  909. }
  910. public Builder setSomeFloat(int index, float value) {
  911. result.someFloat_.set(index, value);
  912. return this;
  913. }
  914. public Builder addSomeFloat(float value) {
  915. if (result.someFloat_.isEmpty()) {
  916. result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
  917. }
  918. result.someFloat_.add(value);
  919. return this;
  920. }
  921. public Builder addAllSomeFloat(
  922. java.lang.Iterable<? extends java.lang.Float> values) {
  923. if (result.someFloat_.isEmpty()) {
  924. result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
  925. }
  926. super.addAll(values, result.someFloat_);
  927. return this;
  928. }
  929. public Builder clearSomeFloat() {
  930. result.someFloat_ = java.util.Collections.emptyList();
  931. return this;
  932. }
  933. // repeated double some_double = 8;
  934. public java.util.List<java.lang.Double> getSomeDoubleList() {
  935. return java.util.Collections.unmodifiableList(result.someDouble_);
  936. }
  937. public int getSomeDoubleCount() {
  938. return result.getSomeDoubleCount();
  939. }
  940. public double getSomeDouble(int index) {
  941. return result.getSomeDouble(index);
  942. }
  943. public Builder setSomeDouble(int index, double value) {
  944. result.someDouble_.set(index, value);
  945. return this;
  946. }
  947. public Builder addSomeDouble(double value) {
  948. if (result.someDouble_.isEmpty()) {
  949. result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
  950. }
  951. result.someDouble_.add(value);
  952. return this;
  953. }
  954. public Builder addAllSomeDouble(
  955. java.lang.Iterable<? extends java.lang.Double> values) {
  956. if (result.someDouble_.isEmpty()) {
  957. result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
  958. }
  959. super.addAll(values, result.someDouble_);
  960. return this;
  961. }
  962. public Builder clearSomeDouble() {
  963. result.someDouble_ = java.util.Collections.emptyList();
  964. return this;
  965. }
  966. // repeated int64 some_long = 9;
  967. public java.util.List<java.lang.Long> getSomeLongList() {
  968. return java.util.Collections.unmodifiableList(result.someLong_);
  969. }
  970. public int getSomeLongCount() {
  971. return result.getSomeLongCount();
  972. }
  973. public long getSomeLong(int index) {
  974. return result.getSomeLong(index);
  975. }
  976. public Builder setSomeLong(int index, long value) {
  977. result.someLong_.set(index, value);
  978. return this;
  979. }
  980. public Builder addSomeLong(long value) {
  981. if (result.someLong_.isEmpty()) {
  982. result.someLong_ = new java.util.ArrayList<java.lang.Long>();
  983. }
  984. result.someLong_.add(value);
  985. return this;
  986. }
  987. public Builder addAllSomeLong(
  988. java.lang.Iterable<? extends java.lang.Long> values) {
  989. if (result.someLong_.isEmpty()) {
  990. result.someLong_ = new java.util.ArrayList<java.lang.Long>();
  991. }
  992. super.addAll(values, result.someLong_);
  993. return this;
  994. }
  995. public Builder clearSomeLong() {
  996. result.someLong_ = java.util.Collections.emptyList();
  997. return this;
  998. }
  999. // @@protoc_insertion_point(builder_scope:codegen.Foo)
  1000. }
  1001. static {
  1002. defaultInstance = new Foo(true);
  1003. com.dyuproject.protostuff.codegen.V22Speed.internalForceInit();
  1004. defaultInstance.initFields();
  1005. }
  1006. // @@protoc_insertion_point(class_scope:codegen.Foo)
  1007. }
  1008. public static final class Bar extends
  1009. com.google.protobuf.GeneratedMessage {
  1010. // Use Bar.newBuilder() to construct.
  1011. private Bar() {
  1012. initFields();
  1013. }
  1014. private Bar(boolean noInit) {}
  1015. private static final Bar defaultInstance;
  1016. public static Bar getDefaultInstance() {
  1017. return defaultInstance;
  1018. }
  1019. public Bar getDefaultInstanceForType() {
  1020. return defaultInstance;
  1021. }
  1022. public static final com.google.protobuf.Descriptors.Descriptor
  1023. getDescriptor() {
  1024. return com.dyuproject.protostuff.codegen.V22Speed.internal_static_codegen_Bar_descriptor;
  1025. }
  1026. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1027. internalGetFieldAccessorTable() {
  1028. return com.dyuproject.protostuff.codegen.V22Speed.internal_static_codegen_Bar_fieldAccessorTable;
  1029. }
  1030. public enum Status
  1031. implements com.google.protobuf.ProtocolMessageEnum {
  1032. PENDING(0, 0),
  1033. STARTED(1, 1),
  1034. COMPLETED(2, 2),
  1035. ;
  1036. public final int getNumber() { return value; }
  1037. public static Status valueOf(int value) {
  1038. switch (value) {
  1039. case 0: return PENDING;
  1040. case 1: return STARTED;
  1041. case 2: return COMPLETED;
  1042. default: return null;
  1043. }
  1044. }
  1045. public static com.google.protobuf.Internal.EnumLiteMap<Status>
  1046. internalGetValueMap() {
  1047. return internalValueMap;
  1048. }
  1049. private static com.google.protobuf.Internal.EnumLiteMap<Status>
  1050. internalValueMap =
  1051. new com.google.protobuf.Internal.EnumLiteMap<Status>() {
  1052. public Status findValueByNumber(int number) {
  1053. return Status.valueOf(number)
  1054. ; }
  1055. };
  1056. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  1057. getValueDescriptor() {
  1058. return getDescriptor().getValues().get(index);
  1059. }
  1060. public final com.google.protobuf.Descriptors.EnumDescriptor
  1061. getDescriptorForType() {
  1062. return getDescriptor();
  1063. }
  1064. public static final com.google.protobuf.Descriptors.EnumDescriptor
  1065. getDescriptor() {
  1066. return com.dyuproject.protostuff.codegen.V22Speed.Bar.getDescriptor().getEnumTypes().get(0);
  1067. }
  1068. private static final Status[] VALUES = {
  1069. PENDING, STARTED, COMPLETED,
  1070. };
  1071. public static Status valueOf(
  1072. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  1073. if (desc.getType() != getDescriptor()) {
  1074. throw new java.lang.IllegalArgumentException(
  1075. "EnumValueDescriptor is not for this type.");
  1076. }
  1077. return VALUES[desc.getIndex()];
  1078. }
  1079. private final int index;
  1080. private final int value;
  1081. private Status(int index, int value) {
  1082. this.index = index;
  1083. this.value = value;
  1084. }
  1085. static {
  1086. com.dyuproject.protostuff.codegen.V22Speed.getDescriptor();
  1087. }
  1088. // @@protoc_insertion_point(enum_scope:codegen.Bar.Status)
  1089. }
  1090. // optional int32 some_int = 1;
  1091. public static final int SOME_INT_FIELD_NUMBER = 1;
  1092. private boolean hasSomeInt;
  1093. private int someInt_ = 0;
  1094. public boolean hasSomeInt() { return hasSomeInt; }
  1095. public int getSomeInt() { return someInt_; }
  1096. // optional string some_string = 2;
  1097. public static final int SOME_STRING_FIELD_NUMBER = 2;
  1098. private boolean hasSomeString;
  1099. private java.lang.String someString_ = "";
  1100. public boolean hasSomeString() { return hasSomeString; }
  1101. public java.lang.String getSomeString() { return someString_; }
  1102. // optional .codegen.Baz baz = 3;
  1103. public static final int BAZ_FIELD_NUMBER = 3;
  1104. private boolean hasBaz;
  1105. private com.dyuproject.protostuff.codegen.V22Speed.Baz baz_;
  1106. public boolean hasBaz() { return hasBaz; }
  1107. public com.dyuproject.protostuff.codegen.V22Speed.Baz getBaz() { return baz_; }
  1108. // optional .codegen.Bar.Status some_enum = 4;
  1109. public static final int SOME_ENUM_FIELD_NUMBER = 4;
  1110. private boolean hasSomeEnum;
  1111. private com.dyuproject.protostuff.codegen.V22Speed.Bar.Status someEnum_;
  1112. public boolean hasSomeEnum() { return hasSomeEnum; }
  1113. public com.dyuproject.protostuff.codegen.V22Speed.Bar.Status getSomeEnum() { return someEnum_; }
  1114. // optional bytes some_bytes = 5;
  1115. public static final int SOME_BYTES_FIELD_NUMBER = 5;
  1116. private boolean hasSomeBytes;
  1117. private com.google.protobuf.ByteString someBytes_ = com.google.protobuf.ByteString.EMPTY;
  1118. public boolean hasSomeBytes() { return hasSomeBytes; }
  1119. public com.google.protobuf.ByteString getSomeBytes() { return someBytes_; }
  1120. // optional bool some_boolean = 6;
  1121. public static final int SOME_BOOLEAN_FIELD_NUMBER = 6;
  1122. private boolean hasSomeBoolean;
  1123. private boolean someBoolean_ = false;
  1124. public boolean hasSomeBoolean() { return hasSomeBoolean; }
  1125. public boolean getSomeBoolean() { return someBoolean_; }
  1126. // optional float some_float = 7;
  1127. public static final int SOME_FLOAT_FIELD_NUMBER = 7;
  1128. private boolean hasSomeFloat;
  1129. private float someFloat_ = 0F;
  1130. public boolean hasSomeFloat() { return hasSomeFloat; }
  1131. public float getSomeFloat() { return someFloat_; }
  1132. // optional double some_double = 8;
  1133. public static final int SOME_DOUBLE_FIELD_NUMBER = 8;
  1134. private boolean hasSomeDouble;
  1135. private double someDouble_ = 0D;
  1136. public boolean hasSomeDouble() { return hasSomeDouble; }
  1137. public double getSomeDouble() { return someDouble_; }
  1138. // optional int64 some_long = 9;
  1139. public static final int SOME_LONG_FIELD_NUMBER = 9;
  1140. private boolean hasSomeLong;
  1141. private long someLong_ = 0L;
  1142. public boolean hasSomeLong() { return hasSomeLong; }
  1143. public long getSomeLong() { return someLong_; }
  1144. private void initFields() {
  1145. baz_ = com.dyuproject.protostuff.codegen.V22Speed.Baz.getDefaultInstance();
  1146. someEnum_ = com.dyuproject.protostuff.codegen.V22Speed.Bar.Status.PENDING;
  1147. }
  1148. public final boolean isInitialized() {
  1149. return true;
  1150. }
  1151. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1152. throws java.io.IOException {
  1153. getSerializedSize();
  1154. if (hasSomeInt()) {
  1155. output.writeInt32(1, getSomeInt());
  1156. }
  1157. if (hasSomeString()) {
  1158. output.writeString(2, getSomeString());
  1159. }
  1160. if (hasBaz()) {
  1161. output.writeMessage(3, getBaz());
  1162. }
  1163. if (hasSomeEnum()) {
  1164. output.writeEnum(4, getSomeEnum().getNumber());
  1165. }
  1166. if (hasSomeBytes()) {
  1167. output.writeBytes(5, getSomeBytes());
  1168. }
  1169. if (hasSomeBoolean()) {
  1170. output.writeBool(6, getSomeBoolean());
  1171. }
  1172. if (hasSomeFloat()) {
  1173. output.writeFloat(7, getSomeFloat());
  1174. }
  1175. if (hasSomeDouble()) {
  1176. output.writeDouble(8, getSomeDouble());
  1177. }
  1178. if (hasSomeLong()) {
  1179. output.writeInt64(9, getSomeLong());
  1180. }
  1181. getUnknownFields().writeTo(output);
  1182. }
  1183. private int memoizedSerializedSize = -1;
  1184. public int getSerializedSize() {
  1185. int size = memoizedSerializedSize;
  1186. if (size != -1) return size;
  1187. size = 0;
  1188. if (hasSomeInt()) {
  1189. size += com.google.protobuf.CodedOutputStream
  1190. .computeInt32Size(1, getSomeInt());
  1191. }
  1192. if (hasSomeString()) {
  1193. size += com.google.protobuf.CodedOutputStream
  1194. .computeStringSize(2, getSomeString());
  1195. }
  1196. if (hasBaz()) {
  1197. size += com.google.protobuf.CodedOutputStream
  1198. .computeMessageSize(3, getBaz());
  1199. }
  1200. if (hasSomeEnum()) {
  1201. size += com.google.protobuf.CodedOutputStream
  1202. .computeEnumSize(4, getSomeEnum().getNumber());
  1203. }
  1204. if (hasSomeBytes()) {
  1205. size += com.google.protobuf.CodedOutputStream
  1206. .computeBytesSize(5, getSomeBytes());
  1207. }
  1208. if (hasSomeBoolean()) {
  1209. size += com.google.protobuf.CodedOutputStream
  1210. .computeBoolSize(6, getSomeBoolean());
  1211. }
  1212. if (hasSomeFloat()) {
  1213. size += com.google.protobuf.CodedOutputStream
  1214. .computeFloatSize(7, getSomeFloat());
  1215. }
  1216. if (hasSomeDouble()) {
  1217. size += com.google.protobuf.CodedOutputStream
  1218. .computeDoubleSize(8, getSomeDouble());
  1219. }
  1220. if (hasSomeLong()) {
  1221. size += com.google.protobuf.CodedOutputStream
  1222. .computeInt64Size(9, getSomeLong());
  1223. }
  1224. size += getUnknownFields().getSerializedSize();
  1225. memoizedSerializedSize = size;
  1226. return size;
  1227. }
  1228. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseFrom(
  1229. com.google.protobuf.ByteString data)
  1230. throws com.google.protobuf.InvalidProtocolBufferException {
  1231. return newBuilder().mergeFrom(data).buildParsed();
  1232. }
  1233. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseFrom(
  1234. com.google.protobuf.ByteString data,
  1235. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1236. throws com.google.protobuf.InvalidProtocolBufferException {
  1237. return newBuilder().mergeFrom(data, extensionRegistry)
  1238. .buildParsed();
  1239. }
  1240. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseFrom(byte[] data)
  1241. throws com.google.protobuf.InvalidProtocolBufferException {
  1242. return newBuilder().mergeFrom(data).buildParsed();
  1243. }
  1244. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseFrom(
  1245. byte[] data,
  1246. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1247. throws com.google.protobuf.InvalidProtocolBufferException {
  1248. return newBuilder().mergeFrom(data, extensionRegistry)
  1249. .buildParsed();
  1250. }
  1251. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseFrom(java.io.InputStream input)
  1252. throws java.io.IOException {
  1253. return newBuilder().mergeFrom(input).buildParsed();
  1254. }
  1255. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseFrom(
  1256. java.io.InputStream input,
  1257. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1258. throws java.io.IOException {
  1259. return newBuilder().mergeFrom(input, extensionRegistry)
  1260. .buildParsed();
  1261. }
  1262. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseDelimitedFrom(java.io.InputStream input)
  1263. throws java.io.IOException {
  1264. Builder builder = newBuilder();
  1265. if (builder.mergeDelimitedFrom(input)) {
  1266. return builder.buildParsed();
  1267. } else {
  1268. return null;
  1269. }
  1270. }
  1271. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseDelimitedFrom(
  1272. java.io.InputStream input,
  1273. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1274. throws java.io.IOException {
  1275. Builder builder = newBuilder();
  1276. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1277. return builder.buildParsed();
  1278. } else {
  1279. return null;
  1280. }
  1281. }
  1282. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseFrom(
  1283. com.google.protobuf.CodedInputStream input)
  1284. throws java.io.IOException {
  1285. return newBuilder().mergeFrom(input).buildParsed();
  1286. }
  1287. public static com.dyuproject.protostuff.codegen.V22Speed.Bar parseFrom(
  1288. com.google.protobuf.CodedInputStream input,
  1289. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1290. throws java.io.IOException {
  1291. return newBuilder().mergeFrom(input, extensionRegistry)
  1292. .buildParsed();
  1293. }
  1294. public static Builder newBuilder() { return Builder.create(); }
  1295. public Builder newBuilderForType() { return newBuilder(); }
  1296. public static Builder newBuilder(com.dyuproject.protostuff.codegen.V22Speed.Bar prototype) {
  1297. return newBuilder().mergeFrom(prototype);
  1298. }
  1299. public Builder toBuilder() { return newBuilder(this); }
  1300. public static final class Builder extends
  1301. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  1302. private com.dyuproject.protostuff.codegen.V22Speed.Bar result;
  1303. // Construct using com.dyuproject.protostuff.codegen.V22Speed.Bar.newBuilder()
  1304. private Builder() {}
  1305. private static Builder create() {
  1306. Builder builder = new Builder();
  1307. builder.result = new com.dyuproject.protostuff.codegen.V22Speed.Bar();
  1308. return builder;
  1309. }
  1310. protected com.dyuproject.protostuff.codegen.V22Speed.Bar internalGetResult() {
  1311. return result;
  1312. }
  1313. public Builder clear() {
  1314. if (result == null) {
  1315. throw new IllegalStateException(
  1316. "Cannot call clear() after build().");
  1317. }
  1318. result = new com.dyuproject.protostuff.codegen.V22Speed.Bar();
  1319. return this;
  1320. }
  1321. public Builder clone() {
  1322. return create().mergeFrom(result);
  1323. }
  1324. public com.google.protobuf.Descriptors.Descriptor
  1325. getDescriptorForType() {
  1326. return com.dyuproject.protostuff.codegen.V22Speed.Bar.getDescriptor();
  1327. }
  1328. public com.dyuproject.protostuff.codegen.V22Speed.Bar getDefaultInstanceForType() {
  1329. return com.dyuproject.protostuff.codegen.V22Speed.Bar.getDefaultInstance();
  1330. }
  1331. public boolean isInitialized() {
  1332. return result.isInitialized();
  1333. }
  1334. public com.dyuproject.protostuff.codegen.V22Speed.Bar build() {
  1335. if (result != null && !isInitialized()) {
  1336. throw newUninitializedMessageException(result);
  1337. }
  1338. return buildPartial();
  1339. }
  1340. private com.dyuproject.protostuff.codegen.V22Speed.Bar buildParsed()
  1341. throws com.google.protobuf.InvalidProtocolBufferException {
  1342. if (!isInitialized()) {
  1343. throw newUninitializedMessageException(
  1344. result).asInvalidProtocolBufferException();
  1345. }
  1346. return buildPartial();
  1347. }
  1348. public com.dyuproject.protostuff.codegen.V22Speed.Bar buildPartial() {
  1349. if (result == null) {
  1350. throw new IllegalStateException(
  1351. "build() has already been called on this Builder.");
  1352. }
  1353. com.dyuproject.protostuff.codegen.V22Speed.Bar returnMe = result;
  1354. result = null;
  1355. return returnMe;
  1356. }
  1357. public Builder mergeFrom(com.google.protobuf.Message other) {
  1358. if (other instanceof com.dyuproject.protostuff.codegen.V22Speed.Bar) {
  1359. return mergeFrom((com.dyuproject.protostuff.codegen.V22Speed.Bar)other);
  1360. } else {
  1361. super.mergeFrom(other);
  1362. return this;
  1363. }
  1364. }
  1365. public Builder mergeFrom(com.dyuproject.protostuff.codegen.V22Speed.Bar other) {
  1366. if (other == com.dyuproject.protostuff.codegen.V22Speed.Bar.getDefaultInstance()) return this;
  1367. if (other.hasSomeInt()) {
  1368. setSomeInt(other.getSomeInt());
  1369. }
  1370. if (other.hasSomeString()) {
  1371. setSomeString(other.getSomeString());
  1372. }
  1373. if (other.hasBaz()) {
  1374. mergeBaz(other.getBaz());
  1375. }
  1376. if (other.hasSomeEnum()) {
  1377. setSomeEnum(other.getSomeEnum());
  1378. }
  1379. if (other.hasSomeBytes()) {
  1380. setSomeBytes(other.getSomeBytes());
  1381. }
  1382. if (other.hasSomeBoolean()) {
  1383. setSomeBoolean(other.getSomeBoolean());
  1384. }
  1385. if (other.hasSomeFloat()) {
  1386. setSomeFloat(other.getSomeFloat());
  1387. }
  1388. if (other.hasSomeDouble()) {
  1389. setSomeDouble(other.getSomeDouble());
  1390. }
  1391. if (other.hasSomeLong()) {
  1392. setSomeLong(other.getSomeLong());
  1393. }
  1394. this.mergeUnknownFields(other.getUnknownFields());
  1395. return this;
  1396. }
  1397. public Builder mergeFrom(
  1398. com.google.protobuf.CodedInputStream input,
  1399. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1400. throws java.io.IOException {
  1401. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1402. com.google.protobuf.UnknownFieldSet.newBuilder(
  1403. this.getUnknownFields());
  1404. while (true) {
  1405. int tag = input.readTag();
  1406. switch (tag) {
  1407. case 0:
  1408. this.setUnknownFields(unknownFields.build());
  1409. return this;
  1410. default: {
  1411. if (!parseUnknownField(input, unknownFields,
  1412. extensionRegistry, tag)) {
  1413. this.setUnknownFields(unknownFields.build());
  1414. return this;
  1415. }
  1416. break;
  1417. }
  1418. case 8: {
  1419. setSomeInt(input.readInt32());
  1420. break;
  1421. }
  1422. case 18: {
  1423. setSomeString(input.readString());
  1424. break;
  1425. }
  1426. case 26: {
  1427. com.dyuproject.protostuff.codegen.V22Speed.Baz.Builder subBuilder = com.dyuproject.protostuff.codegen.V22Speed.Baz.newBuilder();
  1428. if (hasBaz()) {
  1429. subBuilder.mergeFrom(getBaz());
  1430. }
  1431. input.readMessage(subBuilder, extensionRegistry);
  1432. setBaz(subBuilder.buildPartial());
  1433. break;
  1434. }
  1435. case 32: {
  1436. int rawValue = input.readEnum();
  1437. com.dyuproject.protostuff.codegen.V22Speed.Bar.Status value = com.dyuproject.protostuff.codegen.V22Speed.Bar.Status.valueOf(rawValue);
  1438. if (value == null) {
  1439. unknownFields.mergeVarintField(4, rawValue);
  1440. } else {
  1441. setSomeEnum(value);
  1442. }
  1443. break;
  1444. }
  1445. case 42: {
  1446. setSomeBytes(input.readBytes());
  1447. break;
  1448. }
  1449. case 48: {
  1450. setSomeBoolean(input.readBool());
  1451. break;
  1452. }
  1453. case 61: {
  1454. setSomeFloat(input.readFloat());
  1455. break;
  1456. }
  1457. case 65: {
  1458. setSomeDouble(input.readDouble());
  1459. break;
  1460. }
  1461. case 72: {
  1462. setSomeLong(input.readInt64());
  1463. break;
  1464. }
  1465. }
  1466. }
  1467. }
  1468. // optional int32 some_int = 1;
  1469. public boolean hasSomeInt() {
  1470. return result.hasSomeInt();
  1471. }
  1472. public int getSomeInt() {
  1473. return result.getSomeInt();
  1474. }
  1475. public Builder setSomeInt(int value) {
  1476. result.hasSomeInt = true;
  1477. result.someInt_ = value;
  1478. return this;
  1479. }
  1480. public Builder clearSomeInt() {
  1481. result.hasSomeInt = false;
  1482. result.someInt_ = 0;
  1483. return this;
  1484. }
  1485. // optional string some_string = 2;
  1486. public boolean hasSomeString() {
  1487. return result.hasSomeString();
  1488. }
  1489. public java.lang.String getSomeString() {
  1490. return result.getSomeString();
  1491. }
  1492. public Builder setSomeString(java.lang.String value) {
  1493. if (value == null) {
  1494. throw new NullPointerException();
  1495. }
  1496. result.hasSomeString = true;
  1497. result.someString_ = value;
  1498. return this;
  1499. }
  1500. public Builder clearSomeString() {
  1501. result.hasSomeString = false;
  1502. result.someString_ = getDefaultInstance().getSomeString();
  1503. return this;
  1504. }
  1505. // optional .codegen.Baz baz = 3;
  1506. public boolean hasBaz() {
  1507. return result.hasBaz();
  1508. }
  1509. public com.dyuproject.protostuff.codegen.V22Speed.Baz getBaz() {
  1510. return result.getBaz();
  1511. }
  1512. public Builder setBaz(com.dyuproject.protostuff.codegen.V22Speed.Baz value) {
  1513. if (value == null) {
  1514. throw new NullPointerException();
  1515. }
  1516. result.hasBaz = true;
  1517. result.baz_ = value;
  1518. return this;
  1519. }
  1520. public Builder setBaz(com.dyuproject.protostuff.codegen.V22Speed.Baz.Builder builderForValue) {
  1521. result.hasBaz = true;
  1522. result.baz_ = builderForValue.build();
  1523. return this;
  1524. }
  1525. public Builder mergeBaz(com.dyuproject.protostuff.codegen.V22Speed.Baz value) {
  1526. if (result.hasBaz() &&
  1527. result.baz_ != com.dyuproject.protostuff.codegen.V22Speed.Baz.getDefaultInstance()) {
  1528. result.baz_ =
  1529. com.dyuproject.protostuff.codegen.V22Speed.Baz.newBuilder(result.baz_).mergeFrom(value).buildPartial();
  1530. } else {
  1531. result.baz_ = value;
  1532. }
  1533. result.hasBaz = true;
  1534. return this;
  1535. }
  1536. public Builder clearBaz() {
  1537. result.hasBaz = false;
  1538. result.baz_ = com.dyuproject.protostuff.codegen.V22Speed.Baz.getDefaultInstance();
  1539. return this;
  1540. }
  1541. // optional .codegen.Bar.Status some_enum = 4;
  1542. public boolean hasSomeEnum() {
  1543. return result.hasSomeEnum();
  1544. }
  1545. public com.dyuproject.protostuff.codegen.V22Speed.Bar.Status getSomeEnum() {
  1546. return result.getSomeEnum();
  1547. }
  1548. public Builder setSomeEnum(com.dyuproject.protostuff.codegen.V22Speed.Bar.Status value) {
  1549. if (value == null) {
  1550. throw new NullPointerException();
  1551. }
  1552. result.hasSomeEnum = true;
  1553. result.someEnum_ = value;
  1554. return this;
  1555. }
  1556. public Builder clearSomeEnum() {
  1557. result.hasSomeEnum = false;
  1558. result.someEnum_ = com.dyuproject.protostuff.codegen.V22Speed.Bar.Status.PENDING;
  1559. return this;
  1560. }
  1561. // optional bytes some_bytes = 5;
  1562. public boolean hasSomeBytes() {
  1563. return result.hasSomeBytes();
  1564. }
  1565. public com.google.protobuf.ByteString getSomeBytes() {
  1566. return result.getSomeBytes();
  1567. }
  1568. public Builder setSomeBytes(com.google.protobuf.ByteString value) {
  1569. if (value == null) {
  1570. throw new NullPointerException();
  1571. }
  1572. result.hasSomeBytes = true;
  1573. result.someBytes_ = value;
  1574. return this;
  1575. }
  1576. public Builder clearSomeBytes() {
  1577. result.hasSomeBytes = false;
  1578. result.someBytes_ = getDefaultInstance().getSomeBytes();
  1579. return this;
  1580. }
  1581. // optional bool some_boolean = 6;
  1582. public boolean hasSomeBoolean() {
  1583. return result.hasSomeBoolean();
  1584. }
  1585. public boolean getSomeBoolean() {
  1586. return result.getSomeBoolean();
  1587. }
  1588. public Builder setSomeBoolean(boolean value) {
  1589. result.hasSomeBoolean = true;
  1590. result.someBoolean_ = value;
  1591. return this;
  1592. }
  1593. public Builder clearSomeBoolean() {
  1594. result.hasSomeBoolean = false;
  1595. result.someBoolean_ = false;
  1596. return this;
  1597. }
  1598. // optional float some_float = 7;
  1599. public boolean hasSomeFloat() {
  1600. return result.hasSomeFloat();
  1601. }
  1602. public float getSomeFloat() {
  1603. return result.getSomeFloat();
  1604. }
  1605. public Builder setSomeFloat(float value) {
  1606. result.hasSomeFloat = true;
  1607. result.someFloat_ = value;
  1608. return this;
  1609. }
  1610. public Builder clearSomeFloat() {
  1611. result.hasSomeFloat = false;
  1612. result.someFloat_ = 0F;
  1613. return this;
  1614. }
  1615. // optional double some_double = 8;
  1616. public boolean hasSomeDouble() {
  1617. return result.hasSomeDouble();
  1618. }
  1619. public double getSomeDouble() {
  1620. return result.getSomeDouble();
  1621. }
  1622. public Builder setSomeDouble(double value) {
  1623. result.hasSomeDouble = true;
  1624. result.someDouble_ = value;
  1625. return this;
  1626. }
  1627. public Builder clearSomeDouble() {
  1628. result.hasSomeDouble = false;
  1629. result.someDouble_ = 0D;
  1630. return this;
  1631. }
  1632. // optional int64 some_long = 9;
  1633. public boolean hasSomeLong() {
  1634. return result.hasSomeLong();
  1635. }
  1636. public long getSomeLong() {
  1637. return result.getSomeLong();
  1638. }
  1639. public Builder setSomeLong(long value) {
  1640. result.hasSomeLong = true;
  1641. result.someLong_ = value;
  1642. return this;
  1643. }
  1644. public Builder clearSomeLong() {
  1645. result.hasSomeLong = false;
  1646. result.someLong_ = 0L;
  1647. return this;
  1648. }
  1649. // @@protoc_insertion_point(builder_scope:codegen.Bar)
  1650. }
  1651. static {
  1652. defaultInstance = new Bar(true);
  1653. com.dyuproject.protostuff.codegen.V22Speed.internalForceInit();
  1654. defaultInstance.initFields();
  1655. }
  1656. // @@protoc_insertion_point(class_scope:codegen.Bar)
  1657. }
  1658. public static final class Baz extends
  1659. com.google.protobuf.GeneratedMessage {
  1660. // Use Baz.newBuilder() to construct.
  1661. private Baz() {
  1662. initFields();
  1663. }
  1664. private Baz(boolean noInit) {}
  1665. private static final Baz defaultInstance;
  1666. public static Baz getDefaultInstance() {
  1667. return defaultInstance;
  1668. }
  1669. public Baz getDefaultInstanceForType() {
  1670. return defaultInstance;
  1671. }
  1672. public static final com.google.protobuf.Descriptors.Descriptor
  1673. getDescriptor() {
  1674. return com.dyuproject.protostuff.codegen.V22Speed.internal_static_codegen_Baz_descriptor;
  1675. }
  1676. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1677. internalGetFieldAccessorTable() {
  1678. return com.dyuproject.protostuff.codegen.V22Speed.internal_static_codegen_Baz_fieldAccessorTable;
  1679. }
  1680. // optional int64 id = 1;
  1681. public static final int ID_FIELD_NUMBER = 1;
  1682. private boolean hasId;
  1683. private long id_ = 0L;
  1684. public boolean hasId() { return hasId; }
  1685. public long getId() { return id_; }
  1686. // optional string name = 2;
  1687. public static final int NAME_FIELD_NUMBER = 2;
  1688. private boolean hasName;
  1689. private java.lang.String name_ = "";
  1690. public boolean hasName() { return hasName; }
  1691. public java.lang.String getName() { return name_; }
  1692. // optional int64 timestamp = 3;
  1693. public static final int TIMESTAMP_FIELD_NUMBER = 3;
  1694. private boolean hasTimestamp;
  1695. private long timestamp_ = 0L;
  1696. public boolean hasTimestamp() { return hasTimestamp; }
  1697. public long getTimestamp() { return timestamp_; }
  1698. private void initFields() {
  1699. }
  1700. public final boolean isInitialized() {
  1701. return true;
  1702. }
  1703. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1704. throws java.io.IOException {
  1705. getSerializedSize();
  1706. if (hasId()) {
  1707. output.writeInt64(1, getId());
  1708. }
  1709. if (hasName()) {
  1710. output.writeString(2, getName());
  1711. }
  1712. if (hasTimestamp()) {
  1713. output.writeInt64(3, getTimestamp());
  1714. }
  1715. getUnknownFields().writeTo(output);
  1716. }
  1717. private int memoizedSerializedSize = -1;
  1718. public int getSerializedSize() {
  1719. int size = memoizedSerializedSize;
  1720. if (size != -1) return size;
  1721. size = 0;
  1722. if (hasId()) {
  1723. size += com.google.protobuf.CodedOutputStream
  1724. .computeInt64Size(1, getId());
  1725. }
  1726. if (hasName()) {
  1727. size += com.google.protobuf.CodedOutputStream
  1728. .computeStringSize(2, getName());
  1729. }
  1730. if (hasTimestamp()) {
  1731. size += com.google.protobuf.CodedOutputStream
  1732. .computeInt64Size(3, getTimestamp());
  1733. }
  1734. size += getUnknownFields().getSerializedSize();
  1735. memoizedSerializedSize = size;
  1736. return size;
  1737. }
  1738. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseFrom(
  1739. com.google.protobuf.ByteString data)
  1740. throws com.google.protobuf.InvalidProtocolBufferException {
  1741. return newBuilder().mergeFrom(data).buildParsed();
  1742. }
  1743. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseFrom(
  1744. com.google.protobuf.ByteString data,
  1745. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1746. throws com.google.protobuf.InvalidProtocolBufferException {
  1747. return newBuilder().mergeFrom(data, extensionRegistry)
  1748. .buildParsed();
  1749. }
  1750. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseFrom(byte[] data)
  1751. throws com.google.protobuf.InvalidProtocolBufferException {
  1752. return newBuilder().mergeFrom(data).buildParsed();
  1753. }
  1754. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseFrom(
  1755. byte[] data,
  1756. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1757. throws com.google.protobuf.InvalidProtocolBufferException {
  1758. return newBuilder().mergeFrom(data, extensionRegistry)
  1759. .buildParsed();
  1760. }
  1761. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseFrom(java.io.InputStream input)
  1762. throws java.io.IOException {
  1763. return newBuilder().mergeFrom(input).buildParsed();
  1764. }
  1765. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseFrom(
  1766. java.io.InputStream input,
  1767. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1768. throws java.io.IOException {
  1769. return newBuilder().mergeFrom(input, extensionRegistry)
  1770. .buildParsed();
  1771. }
  1772. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseDelimitedFrom(java.io.InputStream input)
  1773. throws java.io.IOException {
  1774. Builder builder = newBuilder();
  1775. if (builder.mergeDelimitedFrom(input)) {
  1776. return builder.buildParsed();
  1777. } else {
  1778. return null;
  1779. }
  1780. }
  1781. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseDelimitedFrom(
  1782. java.io.InputStream input,
  1783. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1784. throws java.io.IOException {
  1785. Builder builder = newBuilder();
  1786. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1787. return builder.buildParsed();
  1788. } else {
  1789. return null;
  1790. }
  1791. }
  1792. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseFrom(
  1793. com.google.protobuf.CodedInputStream input)
  1794. throws java.io.IOException {
  1795. return newBuilder().mergeFrom(input).buildParsed();
  1796. }
  1797. public static com.dyuproject.protostuff.codegen.V22Speed.Baz parseFrom(
  1798. com.google.protobuf.CodedInputStream input,
  1799. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1800. throws java.io.IOException {
  1801. return newBuilder().mergeFrom(input, extensionRegistry)
  1802. .buildParsed();
  1803. }
  1804. public static Builder newBuilder() { return Builder.create(); }
  1805. public Builder newBuilderForType() { return newBuilder(); }
  1806. public static Builder newBuilder(com.dyuproject.protostuff.codegen.V22Speed.Baz prototype) {
  1807. return newBuilder().mergeFrom(prototype);
  1808. }
  1809. public Builder toBuilder() { return newBuilder(this); }
  1810. public static final class Builder extends
  1811. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  1812. private com.dyuproject.protostuff.codegen.V22Speed.Baz result;
  1813. // Construct using com.dyuproject.protostuff.codegen.V22Speed.Baz.newBuilder()
  1814. private Builder() {}
  1815. private static Builder create() {
  1816. Builder builder = new Builder();
  1817. builder.result = new com.dyuproject.protostuff.codegen.V22Speed.Baz();
  1818. return builder;
  1819. }
  1820. protected com.dyuproject.protostuff.codegen.V22Speed.Baz internalGetResult() {
  1821. return result;
  1822. }
  1823. public Builder clear() {
  1824. if (result == null) {
  1825. throw new IllegalStateException(
  1826. "Cannot call clear() after build().");
  1827. }
  1828. result = new com.dyuproject.protostuff.codegen.V22Speed.Baz();
  1829. return this;
  1830. }
  1831. public Builder clone() {
  1832. return create().mergeFrom(result);
  1833. }
  1834. public com.google.protobuf.Descriptors.Descriptor
  1835. getDescriptorForType() {
  1836. return com.dyuproject.protostuff.codegen.V22Speed.Baz.getDescriptor();
  1837. }
  1838. public com.dyuproject.protostuff.codegen.V22Speed.Baz getDefaultInstanceForType() {
  1839. return com.dyuproject.protostuff.codegen.V22Speed.Baz.getDefaultInstance();
  1840. }
  1841. public boolean isInitialized() {
  1842. return result.isInitialized();
  1843. }
  1844. public com.dyuproject.protostuff.codegen.V22Speed.Baz build() {
  1845. if (result != null && !isInitialized()) {
  1846. throw newUninitializedMessageException(result);
  1847. }
  1848. return buildPartial();
  1849. }
  1850. private com.dyuproject.protostuff.codegen.V22Speed.Baz buildParsed()
  1851. throws com.google.protobuf.InvalidProtocolBufferException {
  1852. if (!isInitialized()) {
  1853. throw newUninitializedMessageException(
  1854. result).asInvalidProtocolBufferException();
  1855. }
  1856. return buildPartial();
  1857. }
  1858. public com.dyuproject.protostuff.codegen.V22Speed.Baz buildPartial() {
  1859. if (result == null) {
  1860. throw new IllegalStateException(
  1861. "build() has already been called on this Builder.");
  1862. }
  1863. com.dyuproject.protostuff.codegen.V22Speed.Baz returnMe = result;
  1864. result = null;
  1865. return returnMe;
  1866. }
  1867. public Builder mergeFrom(com.google.protobuf.Message other) {
  1868. if (other instanceof com.dyuproject.protostuff.codegen.V22Speed.Baz) {
  1869. return mergeFrom((com.dyuproject.protostuff.codegen.V22Speed.Baz)other);
  1870. } else {
  1871. super.mergeFrom(other);
  1872. return this;
  1873. }
  1874. }
  1875. public Builder mergeFrom(com.dyuproject.protostuff.codegen.V22Speed.Baz other) {
  1876. if (other == com.dyuproject.protostuff.codegen.V22Speed.Baz.getDefaultInstance()) return this;
  1877. if (other.hasId()) {
  1878. setId(other.getId());
  1879. }
  1880. if (other.hasName()) {
  1881. setName(other.getName());
  1882. }
  1883. if (other.hasTimestamp()) {
  1884. setTimestamp(other.getTimestamp());
  1885. }
  1886. this.mergeUnknownFields(other.getUnknownFields());
  1887. return this;
  1888. }
  1889. public Builder mergeFrom(
  1890. com.google.protobuf.CodedInputStream input,
  1891. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1892. throws java.io.IOException {
  1893. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1894. com.google.protobuf.UnknownFieldSet.newBuilder(
  1895. this.getUnknownFields());
  1896. while (true) {
  1897. int tag = input.readTag();
  1898. switch (tag) {
  1899. case 0:
  1900. this.setUnknownFields(unknownFields.build());
  1901. return this;
  1902. default: {
  1903. if (!parseUnknownField(input, unknownFields,
  1904. extensionRegistry, tag)) {
  1905. this.setUnknownFields(unknownFields.build());
  1906. return this;
  1907. }
  1908. break;
  1909. }
  1910. case 8: {
  1911. setId(input.readInt64());
  1912. break;
  1913. }
  1914. case 18: {
  1915. setName(input.readString());
  1916. break;
  1917. }
  1918. case 24: {
  1919. setTimestamp(input.readInt64());
  1920. break;
  1921. }
  1922. }
  1923. }
  1924. }
  1925. // optional int64 id = 1;
  1926. public boolean hasId() {
  1927. return result.hasId();
  1928. }
  1929. public long getId() {
  1930. return result.getId();
  1931. }
  1932. public Builder setId(long value) {
  1933. result.hasId = true;
  1934. result.id_ = value;
  1935. return this;
  1936. }
  1937. public Builder clearId() {
  1938. result.hasId = false;
  1939. result.id_ = 0L;
  1940. return this;
  1941. }
  1942. // optional string name = 2;
  1943. public boolean hasName() {
  1944. return result.hasName();
  1945. }
  1946. public java.lang.String getName() {
  1947. return result.getName();
  1948. }
  1949. public Builder setName(java.lang.String value) {
  1950. if (value == null) {
  1951. throw new NullPointerException();
  1952. }
  1953. result.hasName = true;
  1954. result.name_ = value;
  1955. return this;
  1956. }
  1957. public Builder clearName() {
  1958. result.hasName = false;
  1959. result.name_ = getDefaultInstance().getName();
  1960. return this;
  1961. }
  1962. // optional int64 timestamp = 3;
  1963. public boolean hasTimestamp() {
  1964. return result.hasTimestamp();
  1965. }
  1966. public long getTimestamp() {
  1967. return result.getTimestamp();
  1968. }
  1969. public Builder setTimestamp(long value) {
  1970. result.hasTimestamp = true;
  1971. result.timestamp_ = value;
  1972. return this;
  1973. }
  1974. public Builder clearTimestamp() {
  1975. result.hasTimestamp = false;
  1976. result.timestamp_ = 0L;
  1977. return this;
  1978. }
  1979. // @@protoc_insertion_point(builder_scope:codegen.Baz)
  1980. }
  1981. static {
  1982. defaultInstance = new Baz(true);
  1983. com.dyuproject.protostuff.codegen.V22Speed.internalForceInit();
  1984. defaultInstance.initFields();
  1985. }
  1986. // @@protoc_insertion_point(class_scope:codegen.Baz)
  1987. }
  1988. private static com.google.protobuf.Descriptors.Descriptor
  1989. internal_static_codegen_Foo_descriptor;
  1990. private static
  1991. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1992. internal_static_codegen_Foo_fieldAccessorTable;
  1993. private static com.google.protobuf.Descriptors.Descriptor
  1994. internal_static_codegen_Bar_descriptor;
  1995. private static
  1996. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1997. internal_static_codegen_Bar_fieldAccessorTable;
  1998. private static com.google.protobuf.Descriptors.Descriptor
  1999. internal_static_codegen_Baz_descriptor;
  2000. private static
  2001. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2002. internal_static_codegen_Baz_fieldAccessorTable;
  2003. public static com.google.protobuf.Descriptors.FileDescriptor
  2004. getDescriptor() {
  2005. return descriptor;
  2006. }
  2007. private static com.google.protobuf.Descriptors.FileDescriptor
  2008. descriptor;
  2009. static {
  2010. java.lang.String[] descriptorData = {
  2011. "\n\"src/test/resources/TestModel.proto\022\007co" +
  2012. "degen\"\236\002\n\003Foo\022\020\n\010some_int\030\001 \003(\005\022\023\n\013some_" +
  2013. "string\030\002 \003(\t\022\031\n\003bar\030\003 \003(\0132\014.codegen.Bar\022" +
  2014. "*\n\tsome_enum\030\004 \003(\0162\027.codegen.Foo.EnumSam" +
  2015. "ple\022\022\n\nsome_bytes\030\005 \003(\014\022\024\n\014some_boolean\030" +
  2016. "\006 \003(\010\022\022\n\nsome_float\030\007 \003(\002\022\023\n\013some_double" +
  2017. "\030\010 \003(\001\022\021\n\tsome_long\030\t \003(\003\"C\n\nEnumSample\022" +
  2018. "\t\n\005TYPE0\020\000\022\t\n\005TYPE1\020\001\022\t\n\005TYPE2\020\002\022\t\n\005TYPE" +
  2019. "3\020\003\022\t\n\005TYPE4\020\004\"\210\002\n\003Bar\022\020\n\010some_int\030\001 \001(\005" +
  2020. "\022\023\n\013some_string\030\002 \001(\t\022\031\n\003baz\030\003 \001(\0132\014.cod",
  2021. "egen.Baz\022&\n\tsome_enum\030\004 \001(\0162\023.codegen.Ba" +
  2022. "r.Status\022\022\n\nsome_bytes\030\005 \001(\014\022\024\n\014some_boo" +
  2023. "lean\030\006 \001(\010\022\022\n\nsome_float\030\007 \001(\002\022\023\n\013some_d" +
  2024. "ouble\030\010 \001(\001\022\021\n\tsome_long\030\t \001(\003\"1\n\006Status" +
  2025. "\022\013\n\007PENDING\020\000\022\013\n\007STARTED\020\001\022\r\n\tCOMPLETED\020" +
  2026. "\002\"2\n\003Baz\022\n\n\002id\030\001 \001(\003\022\014\n\004name\030\002 \001(\t\022\021\n\tti" +
  2027. "mestamp\030\003 \001(\003B/\n!com.dyuproject.protostu" +
  2028. "ff.codegenB\010V22SpeedH\001"
  2029. };
  2030. com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
  2031. new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
  2032. public com.google.protobuf.ExtensionRegistry assignDescriptors(
  2033. com.google.protobuf.Descriptors.FileDescriptor root) {
  2034. descriptor = root;
  2035. internal_static_codegen_Foo_descriptor =
  2036. getDescriptor().getMessageTypes().get(0);
  2037. internal_static_codegen_Foo_fieldAccessorTable = new
  2038. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2039. internal_static_codegen_Foo_descriptor,
  2040. new java.lang.String[] { "SomeInt", "SomeString", "Bar", "SomeEnum", "SomeBytes", "SomeBoolean", "SomeFloat", "SomeDouble", "SomeLong", },
  2041. com.dyuproject.protostuff.codegen.V22Speed.Foo.class,
  2042. com.dyuproject.protostuff.codegen.V22Speed.Foo.Builder.class);
  2043. internal_static_codegen_Bar_descriptor =
  2044. getDescriptor().getMessageTypes().get(1);
  2045. internal_static_codegen_Bar_fieldAccessorTable = new
  2046. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2047. internal_static_codegen_Bar_descriptor,
  2048. new java.lang.String[] { "SomeInt", "SomeString", "Baz", "SomeEnum", "SomeBytes", "SomeBoolean", "SomeFloat", "SomeDouble", "SomeLong", },
  2049. com.dyuproject.protostuff.codegen.V22Speed.Bar.class,
  2050. com.dyuproject.protostuff.codegen.V22Speed.Bar.Builder.class);
  2051. internal_static_codegen_Baz_descriptor =
  2052. getDescriptor().getMessageTypes().get(2);
  2053. internal_static_codegen_Baz_fieldAccessorTable = new
  2054. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2055. internal_static_codegen_Baz_descriptor,
  2056. new java.lang.String[] { "Id", "Name", "Timestamp", },
  2057. com.dyuproject.protostuff.codegen.V22Speed.Baz.class,
  2058. com.dyuproject.protostuff.codegen.V22Speed.Baz.Builder.class);
  2059. return null;
  2060. }
  2061. };
  2062. com.google.protobuf.Descriptors.FileDescriptor
  2063. .internalBuildGeneratedFileFrom(descriptorData,
  2064. new com.google.protobuf.Descriptors.FileDescriptor[] {
  2065. }, assigner);
  2066. }
  2067. public static void internalForceInit() {}
  2068. // @@protoc_insertion_point(outer_class_scope)
  2069. }