PageRenderTime 30ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/protostuff-model/src/test/java/com/dyuproject/protostuff/model/V2Speed.java

http://protostuff.googlecode.com/
Java | 1618 lines | 1458 code | 110 blank | 50 comment | 168 complexity | fdb29f00364e57618179e73e93ceef79 MD5 | raw file
Possible License(s): Apache-2.0

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: src/test/resources/TestModel.proto
  3. package com.dyuproject.protostuff.model;
  4. public final class V2Speed {
  5. private V2Speed() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public static final class Person extends
  10. com.google.protobuf.GeneratedMessage {
  11. // Use Person.newBuilder() to construct.
  12. private Person() {
  13. initFields();
  14. }
  15. private Person(boolean noInit) {}
  16. private static final Person defaultInstance;
  17. public static Person getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. public Person getDefaultInstanceForType() {
  21. return defaultInstance;
  22. }
  23. public static final com.google.protobuf.Descriptors.Descriptor
  24. getDescriptor() {
  25. return com.dyuproject.protostuff.model.V2Speed.internal_static_testmodel_Person_descriptor;
  26. }
  27. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  28. internalGetFieldAccessorTable() {
  29. return com.dyuproject.protostuff.model.V2Speed.internal_static_testmodel_Person_fieldAccessorTable;
  30. }
  31. // required int32 id = 1;
  32. public static final int ID_FIELD_NUMBER = 1;
  33. private boolean hasId;
  34. private int id_ = 0;
  35. public boolean hasId() { return hasId; }
  36. public int getId() { return id_; }
  37. // optional string email = 2;
  38. public static final int EMAIL_FIELD_NUMBER = 2;
  39. private boolean hasEmail;
  40. private java.lang.String email_ = "";
  41. public boolean hasEmail() { return hasEmail; }
  42. public java.lang.String getEmail() { return email_; }
  43. // optional string first_name = 3;
  44. public static final int FIRST_NAME_FIELD_NUMBER = 3;
  45. private boolean hasFirstName;
  46. private java.lang.String firstName_ = "";
  47. public boolean hasFirstName() { return hasFirstName; }
  48. public java.lang.String getFirstName() { return firstName_; }
  49. // optional string lastName = 4;
  50. public static final int LASTNAME_FIELD_NUMBER = 4;
  51. private boolean hasLastName;
  52. private java.lang.String lastName_ = "";
  53. public boolean hasLastName() { return hasLastName; }
  54. public java.lang.String getLastName() { return lastName_; }
  55. // repeated .testmodel.Task _delegated_task_ = 5;
  56. public static final int _DELEGATED_TASK__FIELD_NUMBER = 5;
  57. private java.util.List<com.dyuproject.protostuff.model.V2Speed.Task> DelegatedTask_ =
  58. java.util.Collections.emptyList();
  59. public java.util.List<com.dyuproject.protostuff.model.V2Speed.Task> getDelegatedTaskList() {
  60. return DelegatedTask_;
  61. }
  62. public int getDelegatedTaskCount() { return DelegatedTask_.size(); }
  63. public com.dyuproject.protostuff.model.V2Speed.Task getDelegatedTask(int index) {
  64. return DelegatedTask_.get(index);
  65. }
  66. // repeated .testmodel.Task _priorityTask_ = 6;
  67. public static final int _PRIORITYTASK__FIELD_NUMBER = 6;
  68. private java.util.List<com.dyuproject.protostuff.model.V2Speed.Task> PriorityTask_ =
  69. java.util.Collections.emptyList();
  70. public java.util.List<com.dyuproject.protostuff.model.V2Speed.Task> getPriorityTaskList() {
  71. return PriorityTask_;
  72. }
  73. public int getPriorityTaskCount() { return PriorityTask_.size(); }
  74. public com.dyuproject.protostuff.model.V2Speed.Task getPriorityTask(int index) {
  75. return PriorityTask_.get(index);
  76. }
  77. // optional int32 _aGe_ = 7;
  78. public static final int _AGE__FIELD_NUMBER = 7;
  79. private boolean hasAGe;
  80. private int AGe_ = 0;
  81. public boolean hasAGe() { return hasAGe; }
  82. public int getAGe() { return AGe_; }
  83. // optional .testmodel.Task currentTask = 8;
  84. public static final int CURRENTTASK_FIELD_NUMBER = 8;
  85. private boolean hasCurrentTask;
  86. private com.dyuproject.protostuff.model.V2Speed.Task currentTask_;
  87. public boolean hasCurrentTask() { return hasCurrentTask; }
  88. public com.dyuproject.protostuff.model.V2Speed.Task getCurrentTask() { return currentTask_; }
  89. // repeated int64 repeatedLong = 9;
  90. public static final int REPEATEDLONG_FIELD_NUMBER = 9;
  91. private java.util.List<java.lang.Long> repeatedLong_ =
  92. java.util.Collections.emptyList();
  93. public java.util.List<java.lang.Long> getRepeatedLongList() {
  94. return repeatedLong_;
  95. }
  96. public int getRepeatedLongCount() { return repeatedLong_.size(); }
  97. public long getRepeatedLong(int index) {
  98. return repeatedLong_.get(index);
  99. }
  100. // repeated bytes image = 10;
  101. public static final int IMAGE_FIELD_NUMBER = 10;
  102. private java.util.List<com.google.protobuf.ByteString> image_ =
  103. java.util.Collections.emptyList();
  104. public java.util.List<com.google.protobuf.ByteString> getImageList() {
  105. return image_;
  106. }
  107. public int getImageCount() { return image_.size(); }
  108. public com.google.protobuf.ByteString getImage(int index) {
  109. return image_.get(index);
  110. }
  111. private void initFields() {
  112. currentTask_ = com.dyuproject.protostuff.model.V2Speed.Task.getDefaultInstance();
  113. }
  114. public final boolean isInitialized() {
  115. if (!hasId) return false;
  116. for (com.dyuproject.protostuff.model.V2Speed.Task element : getDelegatedTaskList()) {
  117. if (!element.isInitialized()) return false;
  118. }
  119. for (com.dyuproject.protostuff.model.V2Speed.Task element : getPriorityTaskList()) {
  120. if (!element.isInitialized()) return false;
  121. }
  122. if (hasCurrentTask()) {
  123. if (!getCurrentTask().isInitialized()) return false;
  124. }
  125. return true;
  126. }
  127. public void writeTo(com.google.protobuf.CodedOutputStream output)
  128. throws java.io.IOException {
  129. getSerializedSize();
  130. if (hasId()) {
  131. output.writeInt32(1, getId());
  132. }
  133. if (hasEmail()) {
  134. output.writeString(2, getEmail());
  135. }
  136. if (hasFirstName()) {
  137. output.writeString(3, getFirstName());
  138. }
  139. if (hasLastName()) {
  140. output.writeString(4, getLastName());
  141. }
  142. for (com.dyuproject.protostuff.model.V2Speed.Task element : getDelegatedTaskList()) {
  143. output.writeMessage(5, element);
  144. }
  145. for (com.dyuproject.protostuff.model.V2Speed.Task element : getPriorityTaskList()) {
  146. output.writeMessage(6, element);
  147. }
  148. if (hasAGe()) {
  149. output.writeInt32(7, getAGe());
  150. }
  151. if (hasCurrentTask()) {
  152. output.writeMessage(8, getCurrentTask());
  153. }
  154. for (long element : getRepeatedLongList()) {
  155. output.writeInt64(9, element);
  156. }
  157. for (com.google.protobuf.ByteString element : getImageList()) {
  158. output.writeBytes(10, element);
  159. }
  160. getUnknownFields().writeTo(output);
  161. }
  162. private int memoizedSerializedSize = -1;
  163. public int getSerializedSize() {
  164. int size = memoizedSerializedSize;
  165. if (size != -1) return size;
  166. size = 0;
  167. if (hasId()) {
  168. size += com.google.protobuf.CodedOutputStream
  169. .computeInt32Size(1, getId());
  170. }
  171. if (hasEmail()) {
  172. size += com.google.protobuf.CodedOutputStream
  173. .computeStringSize(2, getEmail());
  174. }
  175. if (hasFirstName()) {
  176. size += com.google.protobuf.CodedOutputStream
  177. .computeStringSize(3, getFirstName());
  178. }
  179. if (hasLastName()) {
  180. size += com.google.protobuf.CodedOutputStream
  181. .computeStringSize(4, getLastName());
  182. }
  183. for (com.dyuproject.protostuff.model.V2Speed.Task element : getDelegatedTaskList()) {
  184. size += com.google.protobuf.CodedOutputStream
  185. .computeMessageSize(5, element);
  186. }
  187. for (com.dyuproject.protostuff.model.V2Speed.Task element : getPriorityTaskList()) {
  188. size += com.google.protobuf.CodedOutputStream
  189. .computeMessageSize(6, element);
  190. }
  191. if (hasAGe()) {
  192. size += com.google.protobuf.CodedOutputStream
  193. .computeInt32Size(7, getAGe());
  194. }
  195. if (hasCurrentTask()) {
  196. size += com.google.protobuf.CodedOutputStream
  197. .computeMessageSize(8, getCurrentTask());
  198. }
  199. {
  200. int dataSize = 0;
  201. for (long element : getRepeatedLongList()) {
  202. dataSize += com.google.protobuf.CodedOutputStream
  203. .computeInt64SizeNoTag(element);
  204. }
  205. size += dataSize;
  206. size += 1 * getRepeatedLongList().size();
  207. }
  208. {
  209. int dataSize = 0;
  210. for (com.google.protobuf.ByteString element : getImageList()) {
  211. dataSize += com.google.protobuf.CodedOutputStream
  212. .computeBytesSizeNoTag(element);
  213. }
  214. size += dataSize;
  215. size += 1 * getImageList().size();
  216. }
  217. size += getUnknownFields().getSerializedSize();
  218. memoizedSerializedSize = size;
  219. return size;
  220. }
  221. public static com.dyuproject.protostuff.model.V2Speed.Person parseFrom(
  222. com.google.protobuf.ByteString data)
  223. throws com.google.protobuf.InvalidProtocolBufferException {
  224. return newBuilder().mergeFrom(data).buildParsed();
  225. }
  226. public static com.dyuproject.protostuff.model.V2Speed.Person parseFrom(
  227. com.google.protobuf.ByteString data,
  228. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  229. throws com.google.protobuf.InvalidProtocolBufferException {
  230. return newBuilder().mergeFrom(data, extensionRegistry)
  231. .buildParsed();
  232. }
  233. public static com.dyuproject.protostuff.model.V2Speed.Person parseFrom(byte[] data)
  234. throws com.google.protobuf.InvalidProtocolBufferException {
  235. return newBuilder().mergeFrom(data).buildParsed();
  236. }
  237. public static com.dyuproject.protostuff.model.V2Speed.Person parseFrom(
  238. byte[] data,
  239. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  240. throws com.google.protobuf.InvalidProtocolBufferException {
  241. return newBuilder().mergeFrom(data, extensionRegistry)
  242. .buildParsed();
  243. }
  244. public static com.dyuproject.protostuff.model.V2Speed.Person parseFrom(java.io.InputStream input)
  245. throws java.io.IOException {
  246. return newBuilder().mergeFrom(input).buildParsed();
  247. }
  248. public static com.dyuproject.protostuff.model.V2Speed.Person parseFrom(
  249. java.io.InputStream input,
  250. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  251. throws java.io.IOException {
  252. return newBuilder().mergeFrom(input, extensionRegistry)
  253. .buildParsed();
  254. }
  255. public static com.dyuproject.protostuff.model.V2Speed.Person parseDelimitedFrom(java.io.InputStream input)
  256. throws java.io.IOException {
  257. Builder builder = newBuilder();
  258. if (builder.mergeDelimitedFrom(input)) {
  259. return builder.buildParsed();
  260. } else {
  261. return null;
  262. }
  263. }
  264. public static com.dyuproject.protostuff.model.V2Speed.Person parseDelimitedFrom(
  265. java.io.InputStream input,
  266. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  267. throws java.io.IOException {
  268. Builder builder = newBuilder();
  269. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  270. return builder.buildParsed();
  271. } else {
  272. return null;
  273. }
  274. }
  275. public static com.dyuproject.protostuff.model.V2Speed.Person parseFrom(
  276. com.google.protobuf.CodedInputStream input)
  277. throws java.io.IOException {
  278. return newBuilder().mergeFrom(input).buildParsed();
  279. }
  280. public static com.dyuproject.protostuff.model.V2Speed.Person parseFrom(
  281. com.google.protobuf.CodedInputStream input,
  282. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  283. throws java.io.IOException {
  284. return newBuilder().mergeFrom(input, extensionRegistry)
  285. .buildParsed();
  286. }
  287. public static Builder newBuilder() { return Builder.create(); }
  288. public Builder newBuilderForType() { return newBuilder(); }
  289. public static Builder newBuilder(com.dyuproject.protostuff.model.V2Speed.Person prototype) {
  290. return newBuilder().mergeFrom(prototype);
  291. }
  292. public Builder toBuilder() { return newBuilder(this); }
  293. public static final class Builder extends
  294. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  295. private com.dyuproject.protostuff.model.V2Speed.Person result;
  296. // Construct using com.dyuproject.protostuff.model.V2Speed.Person.newBuilder()
  297. private Builder() {}
  298. private static Builder create() {
  299. Builder builder = new Builder();
  300. builder.result = new com.dyuproject.protostuff.model.V2Speed.Person();
  301. return builder;
  302. }
  303. protected com.dyuproject.protostuff.model.V2Speed.Person internalGetResult() {
  304. return result;
  305. }
  306. public Builder clear() {
  307. if (result == null) {
  308. throw new IllegalStateException(
  309. "Cannot call clear() after build().");
  310. }
  311. result = new com.dyuproject.protostuff.model.V2Speed.Person();
  312. return this;
  313. }
  314. public Builder clone() {
  315. return create().mergeFrom(result);
  316. }
  317. public com.google.protobuf.Descriptors.Descriptor
  318. getDescriptorForType() {
  319. return com.dyuproject.protostuff.model.V2Speed.Person.getDescriptor();
  320. }
  321. public com.dyuproject.protostuff.model.V2Speed.Person getDefaultInstanceForType() {
  322. return com.dyuproject.protostuff.model.V2Speed.Person.getDefaultInstance();
  323. }
  324. public boolean isInitialized() {
  325. return result.isInitialized();
  326. }
  327. public com.dyuproject.protostuff.model.V2Speed.Person build() {
  328. if (result != null && !isInitialized()) {
  329. throw newUninitializedMessageException(result);
  330. }
  331. return buildPartial();
  332. }
  333. private com.dyuproject.protostuff.model.V2Speed.Person buildParsed()
  334. throws com.google.protobuf.InvalidProtocolBufferException {
  335. if (!isInitialized()) {
  336. throw newUninitializedMessageException(
  337. result).asInvalidProtocolBufferException();
  338. }
  339. return buildPartial();
  340. }
  341. public com.dyuproject.protostuff.model.V2Speed.Person buildPartial() {
  342. if (result == null) {
  343. throw new IllegalStateException(
  344. "build() has already been called on this Builder.");
  345. }
  346. if (result.DelegatedTask_ != java.util.Collections.EMPTY_LIST) {
  347. result.DelegatedTask_ =
  348. java.util.Collections.unmodifiableList(result.DelegatedTask_);
  349. }
  350. if (result.PriorityTask_ != java.util.Collections.EMPTY_LIST) {
  351. result.PriorityTask_ =
  352. java.util.Collections.unmodifiableList(result.PriorityTask_);
  353. }
  354. if (result.repeatedLong_ != java.util.Collections.EMPTY_LIST) {
  355. result.repeatedLong_ =
  356. java.util.Collections.unmodifiableList(result.repeatedLong_);
  357. }
  358. if (result.image_ != java.util.Collections.EMPTY_LIST) {
  359. result.image_ =
  360. java.util.Collections.unmodifiableList(result.image_);
  361. }
  362. com.dyuproject.protostuff.model.V2Speed.Person returnMe = result;
  363. result = null;
  364. return returnMe;
  365. }
  366. public Builder mergeFrom(com.google.protobuf.Message other) {
  367. if (other instanceof com.dyuproject.protostuff.model.V2Speed.Person) {
  368. return mergeFrom((com.dyuproject.protostuff.model.V2Speed.Person)other);
  369. } else {
  370. super.mergeFrom(other);
  371. return this;
  372. }
  373. }
  374. public Builder mergeFrom(com.dyuproject.protostuff.model.V2Speed.Person other) {
  375. if (other == com.dyuproject.protostuff.model.V2Speed.Person.getDefaultInstance()) return this;
  376. if (other.hasId()) {
  377. setId(other.getId());
  378. }
  379. if (other.hasEmail()) {
  380. setEmail(other.getEmail());
  381. }
  382. if (other.hasFirstName()) {
  383. setFirstName(other.getFirstName());
  384. }
  385. if (other.hasLastName()) {
  386. setLastName(other.getLastName());
  387. }
  388. if (!other.DelegatedTask_.isEmpty()) {
  389. if (result.DelegatedTask_.isEmpty()) {
  390. result.DelegatedTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2Speed.Task>();
  391. }
  392. result.DelegatedTask_.addAll(other.DelegatedTask_);
  393. }
  394. if (!other.PriorityTask_.isEmpty()) {
  395. if (result.PriorityTask_.isEmpty()) {
  396. result.PriorityTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2Speed.Task>();
  397. }
  398. result.PriorityTask_.addAll(other.PriorityTask_);
  399. }
  400. if (other.hasAGe()) {
  401. setAGe(other.getAGe());
  402. }
  403. if (other.hasCurrentTask()) {
  404. mergeCurrentTask(other.getCurrentTask());
  405. }
  406. if (!other.repeatedLong_.isEmpty()) {
  407. if (result.repeatedLong_.isEmpty()) {
  408. result.repeatedLong_ = new java.util.ArrayList<java.lang.Long>();
  409. }
  410. result.repeatedLong_.addAll(other.repeatedLong_);
  411. }
  412. if (!other.image_.isEmpty()) {
  413. if (result.image_.isEmpty()) {
  414. result.image_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  415. }
  416. result.image_.addAll(other.image_);
  417. }
  418. this.mergeUnknownFields(other.getUnknownFields());
  419. return this;
  420. }
  421. public Builder mergeFrom(
  422. com.google.protobuf.CodedInputStream input,
  423. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  424. throws java.io.IOException {
  425. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  426. com.google.protobuf.UnknownFieldSet.newBuilder(
  427. this.getUnknownFields());
  428. while (true) {
  429. int tag = input.readTag();
  430. switch (tag) {
  431. case 0:
  432. this.setUnknownFields(unknownFields.build());
  433. return this;
  434. default: {
  435. if (!parseUnknownField(input, unknownFields,
  436. extensionRegistry, tag)) {
  437. this.setUnknownFields(unknownFields.build());
  438. return this;
  439. }
  440. break;
  441. }
  442. case 8: {
  443. setId(input.readInt32());
  444. break;
  445. }
  446. case 18: {
  447. setEmail(input.readString());
  448. break;
  449. }
  450. case 26: {
  451. setFirstName(input.readString());
  452. break;
  453. }
  454. case 34: {
  455. setLastName(input.readString());
  456. break;
  457. }
  458. case 42: {
  459. com.dyuproject.protostuff.model.V2Speed.Task.Builder subBuilder = com.dyuproject.protostuff.model.V2Speed.Task.newBuilder();
  460. input.readMessage(subBuilder, extensionRegistry);
  461. addDelegatedTask(subBuilder.buildPartial());
  462. break;
  463. }
  464. case 50: {
  465. com.dyuproject.protostuff.model.V2Speed.Task.Builder subBuilder = com.dyuproject.protostuff.model.V2Speed.Task.newBuilder();
  466. input.readMessage(subBuilder, extensionRegistry);
  467. addPriorityTask(subBuilder.buildPartial());
  468. break;
  469. }
  470. case 56: {
  471. setAGe(input.readInt32());
  472. break;
  473. }
  474. case 66: {
  475. com.dyuproject.protostuff.model.V2Speed.Task.Builder subBuilder = com.dyuproject.protostuff.model.V2Speed.Task.newBuilder();
  476. if (hasCurrentTask()) {
  477. subBuilder.mergeFrom(getCurrentTask());
  478. }
  479. input.readMessage(subBuilder, extensionRegistry);
  480. setCurrentTask(subBuilder.buildPartial());
  481. break;
  482. }
  483. case 72: {
  484. addRepeatedLong(input.readInt64());
  485. break;
  486. }
  487. case 74: {
  488. int length = input.readRawVarint32();
  489. int limit = input.pushLimit(length);
  490. while (input.getBytesUntilLimit() > 0) {
  491. addRepeatedLong(input.readInt64());
  492. }
  493. input.popLimit(limit);
  494. break;
  495. }
  496. case 82: {
  497. addImage(input.readBytes());
  498. break;
  499. }
  500. }
  501. }
  502. }
  503. // required int32 id = 1;
  504. public boolean hasId() {
  505. return result.hasId();
  506. }
  507. public int getId() {
  508. return result.getId();
  509. }
  510. public Builder setId(int value) {
  511. result.hasId = true;
  512. result.id_ = value;
  513. return this;
  514. }
  515. public Builder clearId() {
  516. result.hasId = false;
  517. result.id_ = 0;
  518. return this;
  519. }
  520. // optional string email = 2;
  521. public boolean hasEmail() {
  522. return result.hasEmail();
  523. }
  524. public java.lang.String getEmail() {
  525. return result.getEmail();
  526. }
  527. public Builder setEmail(java.lang.String value) {
  528. if (value == null) {
  529. throw new NullPointerException();
  530. }
  531. result.hasEmail = true;
  532. result.email_ = value;
  533. return this;
  534. }
  535. public Builder clearEmail() {
  536. result.hasEmail = false;
  537. result.email_ = getDefaultInstance().getEmail();
  538. return this;
  539. }
  540. // optional string first_name = 3;
  541. public boolean hasFirstName() {
  542. return result.hasFirstName();
  543. }
  544. public java.lang.String getFirstName() {
  545. return result.getFirstName();
  546. }
  547. public Builder setFirstName(java.lang.String value) {
  548. if (value == null) {
  549. throw new NullPointerException();
  550. }
  551. result.hasFirstName = true;
  552. result.firstName_ = value;
  553. return this;
  554. }
  555. public Builder clearFirstName() {
  556. result.hasFirstName = false;
  557. result.firstName_ = getDefaultInstance().getFirstName();
  558. return this;
  559. }
  560. // optional string lastName = 4;
  561. public boolean hasLastName() {
  562. return result.hasLastName();
  563. }
  564. public java.lang.String getLastName() {
  565. return result.getLastName();
  566. }
  567. public Builder setLastName(java.lang.String value) {
  568. if (value == null) {
  569. throw new NullPointerException();
  570. }
  571. result.hasLastName = true;
  572. result.lastName_ = value;
  573. return this;
  574. }
  575. public Builder clearLastName() {
  576. result.hasLastName = false;
  577. result.lastName_ = getDefaultInstance().getLastName();
  578. return this;
  579. }
  580. // repeated .testmodel.Task _delegated_task_ = 5;
  581. public java.util.List<com.dyuproject.protostuff.model.V2Speed.Task> getDelegatedTaskList() {
  582. return java.util.Collections.unmodifiableList(result.DelegatedTask_);
  583. }
  584. public int getDelegatedTaskCount() {
  585. return result.getDelegatedTaskCount();
  586. }
  587. public com.dyuproject.protostuff.model.V2Speed.Task getDelegatedTask(int index) {
  588. return result.getDelegatedTask(index);
  589. }
  590. public Builder setDelegatedTask(int index, com.dyuproject.protostuff.model.V2Speed.Task value) {
  591. if (value == null) {
  592. throw new NullPointerException();
  593. }
  594. result.DelegatedTask_.set(index, value);
  595. return this;
  596. }
  597. public Builder setDelegatedTask(int index, com.dyuproject.protostuff.model.V2Speed.Task.Builder builderForValue) {
  598. result.DelegatedTask_.set(index, builderForValue.build());
  599. return this;
  600. }
  601. public Builder addDelegatedTask(com.dyuproject.protostuff.model.V2Speed.Task value) {
  602. if (value == null) {
  603. throw new NullPointerException();
  604. }
  605. if (result.DelegatedTask_.isEmpty()) {
  606. result.DelegatedTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2Speed.Task>();
  607. }
  608. result.DelegatedTask_.add(value);
  609. return this;
  610. }
  611. public Builder addDelegatedTask(com.dyuproject.protostuff.model.V2Speed.Task.Builder builderForValue) {
  612. if (result.DelegatedTask_.isEmpty()) {
  613. result.DelegatedTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2Speed.Task>();
  614. }
  615. result.DelegatedTask_.add(builderForValue.build());
  616. return this;
  617. }
  618. public Builder addAllDelegatedTask(
  619. java.lang.Iterable<? extends com.dyuproject.protostuff.model.V2Speed.Task> values) {
  620. if (result.DelegatedTask_.isEmpty()) {
  621. result.DelegatedTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2Speed.Task>();
  622. }
  623. super.addAll(values, result.DelegatedTask_);
  624. return this;
  625. }
  626. public Builder clearDelegatedTask() {
  627. result.DelegatedTask_ = java.util.Collections.emptyList();
  628. return this;
  629. }
  630. // repeated .testmodel.Task _priorityTask_ = 6;
  631. public java.util.List<com.dyuproject.protostuff.model.V2Speed.Task> getPriorityTaskList() {
  632. return java.util.Collections.unmodifiableList(result.PriorityTask_);
  633. }
  634. public int getPriorityTaskCount() {
  635. return result.getPriorityTaskCount();
  636. }
  637. public com.dyuproject.protostuff.model.V2Speed.Task getPriorityTask(int index) {
  638. return result.getPriorityTask(index);
  639. }
  640. public Builder setPriorityTask(int index, com.dyuproject.protostuff.model.V2Speed.Task value) {
  641. if (value == null) {
  642. throw new NullPointerException();
  643. }
  644. result.PriorityTask_.set(index, value);
  645. return this;
  646. }
  647. public Builder setPriorityTask(int index, com.dyuproject.protostuff.model.V2Speed.Task.Builder builderForValue) {
  648. result.PriorityTask_.set(index, builderForValue.build());
  649. return this;
  650. }
  651. public Builder addPriorityTask(com.dyuproject.protostuff.model.V2Speed.Task value) {
  652. if (value == null) {
  653. throw new NullPointerException();
  654. }
  655. if (result.PriorityTask_.isEmpty()) {
  656. result.PriorityTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2Speed.Task>();
  657. }
  658. result.PriorityTask_.add(value);
  659. return this;
  660. }
  661. public Builder addPriorityTask(com.dyuproject.protostuff.model.V2Speed.Task.Builder builderForValue) {
  662. if (result.PriorityTask_.isEmpty()) {
  663. result.PriorityTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2Speed.Task>();
  664. }
  665. result.PriorityTask_.add(builderForValue.build());
  666. return this;
  667. }
  668. public Builder addAllPriorityTask(
  669. java.lang.Iterable<? extends com.dyuproject.protostuff.model.V2Speed.Task> values) {
  670. if (result.PriorityTask_.isEmpty()) {
  671. result.PriorityTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2Speed.Task>();
  672. }
  673. super.addAll(values, result.PriorityTask_);
  674. return this;
  675. }
  676. public Builder clearPriorityTask() {
  677. result.PriorityTask_ = java.util.Collections.emptyList();
  678. return this;
  679. }
  680. // optional int32 _aGe_ = 7;
  681. public boolean hasAGe() {
  682. return result.hasAGe();
  683. }
  684. public int getAGe() {
  685. return result.getAGe();
  686. }
  687. public Builder setAGe(int value) {
  688. result.hasAGe = true;
  689. result.AGe_ = value;
  690. return this;
  691. }
  692. public Builder clearAGe() {
  693. result.hasAGe = false;
  694. result.AGe_ = 0;
  695. return this;
  696. }
  697. // optional .testmodel.Task currentTask = 8;
  698. public boolean hasCurrentTask() {
  699. return result.hasCurrentTask();
  700. }
  701. public com.dyuproject.protostuff.model.V2Speed.Task getCurrentTask() {
  702. return result.getCurrentTask();
  703. }
  704. public Builder setCurrentTask(com.dyuproject.protostuff.model.V2Speed.Task value) {
  705. if (value == null) {
  706. throw new NullPointerException();
  707. }
  708. result.hasCurrentTask = true;
  709. result.currentTask_ = value;
  710. return this;
  711. }
  712. public Builder setCurrentTask(com.dyuproject.protostuff.model.V2Speed.Task.Builder builderForValue) {
  713. result.hasCurrentTask = true;
  714. result.currentTask_ = builderForValue.build();
  715. return this;
  716. }
  717. public Builder mergeCurrentTask(com.dyuproject.protostuff.model.V2Speed.Task value) {
  718. if (result.hasCurrentTask() &&
  719. result.currentTask_ != com.dyuproject.protostuff.model.V2Speed.Task.getDefaultInstance()) {
  720. result.currentTask_ =
  721. com.dyuproject.protostuff.model.V2Speed.Task.newBuilder(result.currentTask_).mergeFrom(value).buildPartial();
  722. } else {
  723. result.currentTask_ = value;
  724. }
  725. result.hasCurrentTask = true;
  726. return this;
  727. }
  728. public Builder clearCurrentTask() {
  729. result.hasCurrentTask = false;
  730. result.currentTask_ = com.dyuproject.protostuff.model.V2Speed.Task.getDefaultInstance();
  731. return this;
  732. }
  733. // repeated int64 repeatedLong = 9;
  734. public java.util.List<java.lang.Long> getRepeatedLongList() {
  735. return java.util.Collections.unmodifiableList(result.repeatedLong_);
  736. }
  737. public int getRepeatedLongCount() {
  738. return result.getRepeatedLongCount();
  739. }
  740. public long getRepeatedLong(int index) {
  741. return result.getRepeatedLong(index);
  742. }
  743. public Builder setRepeatedLong(int index, long value) {
  744. result.repeatedLong_.set(index, value);
  745. return this;
  746. }
  747. public Builder addRepeatedLong(long value) {
  748. if (result.repeatedLong_.isEmpty()) {
  749. result.repeatedLong_ = new java.util.ArrayList<java.lang.Long>();
  750. }
  751. result.repeatedLong_.add(value);
  752. return this;
  753. }
  754. public Builder addAllRepeatedLong(
  755. java.lang.Iterable<? extends java.lang.Long> values) {
  756. if (result.repeatedLong_.isEmpty()) {
  757. result.repeatedLong_ = new java.util.ArrayList<java.lang.Long>();
  758. }
  759. super.addAll(values, result.repeatedLong_);
  760. return this;
  761. }
  762. public Builder clearRepeatedLong() {
  763. result.repeatedLong_ = java.util.Collections.emptyList();
  764. return this;
  765. }
  766. // repeated bytes image = 10;
  767. public java.util.List<com.google.protobuf.ByteString> getImageList() {
  768. return java.util.Collections.unmodifiableList(result.image_);
  769. }
  770. public int getImageCount() {
  771. return result.getImageCount();
  772. }
  773. public com.google.protobuf.ByteString getImage(int index) {
  774. return result.getImage(index);
  775. }
  776. public Builder setImage(int index, com.google.protobuf.ByteString value) {
  777. if (value == null) {
  778. throw new NullPointerException();
  779. }
  780. result.image_.set(index, value);
  781. return this;
  782. }
  783. public Builder addImage(com.google.protobuf.ByteString value) {
  784. if (value == null) {
  785. throw new NullPointerException();
  786. }
  787. if (result.image_.isEmpty()) {
  788. result.image_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  789. }
  790. result.image_.add(value);
  791. return this;
  792. }
  793. public Builder addAllImage(
  794. java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
  795. if (result.image_.isEmpty()) {
  796. result.image_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  797. }
  798. super.addAll(values, result.image_);
  799. return this;
  800. }
  801. public Builder clearImage() {
  802. result.image_ = java.util.Collections.emptyList();
  803. return this;
  804. }
  805. // @@protoc_insertion_point(builder_scope:testmodel.Person)
  806. }
  807. static {
  808. defaultInstance = new Person(true);
  809. com.dyuproject.protostuff.model.V2Speed.internalForceInit();
  810. defaultInstance.initFields();
  811. }
  812. // @@protoc_insertion_point(class_scope:testmodel.Person)
  813. }
  814. public static final class Task extends
  815. com.google.protobuf.GeneratedMessage {
  816. // Use Task.newBuilder() to construct.
  817. private Task() {
  818. initFields();
  819. }
  820. private Task(boolean noInit) {}
  821. private static final Task defaultInstance;
  822. public static Task getDefaultInstance() {
  823. return defaultInstance;
  824. }
  825. public Task getDefaultInstanceForType() {
  826. return defaultInstance;
  827. }
  828. public static final com.google.protobuf.Descriptors.Descriptor
  829. getDescriptor() {
  830. return com.dyuproject.protostuff.model.V2Speed.internal_static_testmodel_Task_descriptor;
  831. }
  832. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  833. internalGetFieldAccessorTable() {
  834. return com.dyuproject.protostuff.model.V2Speed.internal_static_testmodel_Task_fieldAccessorTable;
  835. }
  836. public enum Status
  837. implements com.google.protobuf.ProtocolMessageEnum {
  838. PENDING(0, 0),
  839. STARTED(1, 1),
  840. COMPLETED(2, 2),
  841. ;
  842. public final int getNumber() { return value; }
  843. public static Status valueOf(int value) {
  844. switch (value) {
  845. case 0: return PENDING;
  846. case 1: return STARTED;
  847. case 2: return COMPLETED;
  848. default: return null;
  849. }
  850. }
  851. public static com.google.protobuf.Internal.EnumLiteMap<Status>
  852. internalGetValueMap() {
  853. return internalValueMap;
  854. }
  855. private static com.google.protobuf.Internal.EnumLiteMap<Status>
  856. internalValueMap =
  857. new com.google.protobuf.Internal.EnumLiteMap<Status>() {
  858. public Status findValueByNumber(int number) {
  859. return Status.valueOf(number)
  860. ; }
  861. };
  862. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  863. getValueDescriptor() {
  864. return getDescriptor().getValues().get(index);
  865. }
  866. public final com.google.protobuf.Descriptors.EnumDescriptor
  867. getDescriptorForType() {
  868. return getDescriptor();
  869. }
  870. public static final com.google.protobuf.Descriptors.EnumDescriptor
  871. getDescriptor() {
  872. return com.dyuproject.protostuff.model.V2Speed.Task.getDescriptor().getEnumTypes().get(0);
  873. }
  874. private static final Status[] VALUES = {
  875. PENDING, STARTED, COMPLETED,
  876. };
  877. public static Status valueOf(
  878. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  879. if (desc.getType() != getDescriptor()) {
  880. throw new java.lang.IllegalArgumentException(
  881. "EnumValueDescriptor is not for this type.");
  882. }
  883. return VALUES[desc.getIndex()];
  884. }
  885. private final int index;
  886. private final int value;
  887. private Status(int index, int value) {
  888. this.index = index;
  889. this.value = value;
  890. }
  891. static {
  892. com.dyuproject.protostuff.model.V2Speed.getDescriptor();
  893. }
  894. // @@protoc_insertion_point(enum_scope:testmodel.Task.Status)
  895. }
  896. // required int32 _id = 1;
  897. public static final int _ID_FIELD_NUMBER = 1;
  898. private boolean hasId;
  899. private int Id_ = 0;
  900. public boolean hasId() { return hasId; }
  901. public int getId() { return Id_; }
  902. // optional string name_ = 2;
  903. public static final int NAME__FIELD_NUMBER = 2;
  904. private boolean hasName;
  905. private java.lang.String name_ = "";
  906. public boolean hasName() { return hasName; }
  907. public java.lang.String getName() { return name_; }
  908. // optional string _description_ = 3;
  909. public static final int _DESCRIPTION__FIELD_NUMBER = 3;
  910. private boolean hasDescription;
  911. private java.lang.String Description_ = "";
  912. public boolean hasDescription() { return hasDescription; }
  913. public java.lang.String getDescription() { return Description_; }
  914. // optional .testmodel.Task.Status status = 4;
  915. public static final int STATUS_FIELD_NUMBER = 4;
  916. private boolean hasStatus;
  917. private com.dyuproject.protostuff.model.V2Speed.Task.Status status_;
  918. public boolean hasStatus() { return hasStatus; }
  919. public com.dyuproject.protostuff.model.V2Speed.Task.Status getStatus() { return status_; }
  920. // optional bytes attachment = 5;
  921. public static final int ATTACHMENT_FIELD_NUMBER = 5;
  922. private boolean hasAttachment;
  923. private com.google.protobuf.ByteString attachment_ = com.google.protobuf.ByteString.EMPTY;
  924. public boolean hasAttachment() { return hasAttachment; }
  925. public com.google.protobuf.ByteString getAttachment() { return attachment_; }
  926. // optional bool aboolean = 6;
  927. public static final int ABOOLEAN_FIELD_NUMBER = 6;
  928. private boolean hasAboolean;
  929. private boolean aboolean_ = false;
  930. public boolean hasAboolean() { return hasAboolean; }
  931. public boolean getAboolean() { return aboolean_; }
  932. // optional float afloat = 7;
  933. public static final int AFLOAT_FIELD_NUMBER = 7;
  934. private boolean hasAfloat;
  935. private float afloat_ = 0F;
  936. public boolean hasAfloat() { return hasAfloat; }
  937. public float getAfloat() { return afloat_; }
  938. // optional double adouble = 8;
  939. public static final int ADOUBLE_FIELD_NUMBER = 8;
  940. private boolean hasAdouble;
  941. private double adouble_ = 0D;
  942. public boolean hasAdouble() { return hasAdouble; }
  943. public double getAdouble() { return adouble_; }
  944. // optional int64 along = 9;
  945. public static final int ALONG_FIELD_NUMBER = 9;
  946. private boolean hasAlong;
  947. private long along_ = 0L;
  948. public boolean hasAlong() { return hasAlong; }
  949. public long getAlong() { return along_; }
  950. private void initFields() {
  951. status_ = com.dyuproject.protostuff.model.V2Speed.Task.Status.PENDING;
  952. }
  953. public final boolean isInitialized() {
  954. if (!hasId) return false;
  955. return true;
  956. }
  957. public void writeTo(com.google.protobuf.CodedOutputStream output)
  958. throws java.io.IOException {
  959. getSerializedSize();
  960. if (hasId()) {
  961. output.writeInt32(1, getId());
  962. }
  963. if (hasName()) {
  964. output.writeString(2, getName());
  965. }
  966. if (hasDescription()) {
  967. output.writeString(3, getDescription());
  968. }
  969. if (hasStatus()) {
  970. output.writeEnum(4, getStatus().getNumber());
  971. }
  972. if (hasAttachment()) {
  973. output.writeBytes(5, getAttachment());
  974. }
  975. if (hasAboolean()) {
  976. output.writeBool(6, getAboolean());
  977. }
  978. if (hasAfloat()) {
  979. output.writeFloat(7, getAfloat());
  980. }
  981. if (hasAdouble()) {
  982. output.writeDouble(8, getAdouble());
  983. }
  984. if (hasAlong()) {
  985. output.writeInt64(9, getAlong());
  986. }
  987. getUnknownFields().writeTo(output);
  988. }
  989. private int memoizedSerializedSize = -1;
  990. public int getSerializedSize() {
  991. int size = memoizedSerializedSize;
  992. if (size != -1) return size;
  993. size = 0;
  994. if (hasId()) {
  995. size += com.google.protobuf.CodedOutputStream
  996. .computeInt32Size(1, getId());
  997. }
  998. if (hasName()) {
  999. size += com.google.protobuf.CodedOutputStream
  1000. .computeStringSize(2, getName());
  1001. }
  1002. if (hasDescription()) {
  1003. size += com.google.protobuf.CodedOutputStream
  1004. .computeStringSize(3, getDescription());
  1005. }
  1006. if (hasStatus()) {
  1007. size += com.google.protobuf.CodedOutputStream
  1008. .computeEnumSize(4, getStatus().getNumber());
  1009. }
  1010. if (hasAttachment()) {
  1011. size += com.google.protobuf.CodedOutputStream
  1012. .computeBytesSize(5, getAttachment());
  1013. }
  1014. if (hasAboolean()) {
  1015. size += com.google.protobuf.CodedOutputStream
  1016. .computeBoolSize(6, getAboolean());
  1017. }
  1018. if (hasAfloat()) {
  1019. size += com.google.protobuf.CodedOutputStream
  1020. .computeFloatSize(7, getAfloat());
  1021. }
  1022. if (hasAdouble()) {
  1023. size += com.google.protobuf.CodedOutputStream
  1024. .computeDoubleSize(8, getAdouble());
  1025. }
  1026. if (hasAlong()) {
  1027. size += com.google.protobuf.CodedOutputStream
  1028. .computeInt64Size(9, getAlong());
  1029. }
  1030. size += getUnknownFields().getSerializedSize();
  1031. memoizedSerializedSize = size;
  1032. return size;
  1033. }
  1034. public static com.dyuproject.protostuff.model.V2Speed.Task parseFrom(
  1035. com.google.protobuf.ByteString data)
  1036. throws com.google.protobuf.InvalidProtocolBufferException {
  1037. return newBuilder().mergeFrom(data).buildParsed();
  1038. }
  1039. public static com.dyuproject.protostuff.model.V2Speed.Task parseFrom(
  1040. com.google.protobuf.ByteString data,
  1041. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1042. throws com.google.protobuf.InvalidProtocolBufferException {
  1043. return newBuilder().mergeFrom(data, extensionRegistry)
  1044. .buildParsed();
  1045. }
  1046. public static com.dyuproject.protostuff.model.V2Speed.Task parseFrom(byte[] data)
  1047. throws com.google.protobuf.InvalidProtocolBufferException {
  1048. return newBuilder().mergeFrom(data).buildParsed();
  1049. }
  1050. public static com.dyuproject.protostuff.model.V2Speed.Task parseFrom(
  1051. byte[] data,
  1052. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1053. throws com.google.protobuf.InvalidProtocolBufferException {
  1054. return newBuilder().mergeFrom(data, extensionRegistry)
  1055. .buildParsed();
  1056. }
  1057. public static com.dyuproject.protostuff.model.V2Speed.Task parseFrom(java.io.InputStream input)
  1058. throws java.io.IOException {
  1059. return newBuilder().mergeFrom(input).buildParsed();
  1060. }
  1061. public static com.dyuproject.protostuff.model.V2Speed.Task parseFrom(
  1062. java.io.InputStream input,
  1063. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1064. throws java.io.IOException {
  1065. return newBuilder().mergeFrom(input, extensionRegistry)
  1066. .buildParsed();
  1067. }
  1068. public static com.dyuproject.protostuff.model.V2Speed.Task parseDelimitedFrom(java.io.InputStream input)
  1069. throws java.io.IOException {
  1070. Builder builder = newBuilder();
  1071. if (builder.mergeDelimitedFrom(input)) {
  1072. return builder.buildParsed();
  1073. } else {
  1074. return null;
  1075. }
  1076. }
  1077. public static com.dyuproject.protostuff.model.V2Speed.Task parseDelimitedFrom(
  1078. java.io.InputStream input,
  1079. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1080. throws java.io.IOException {
  1081. Builder builder = newBuilder();
  1082. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1083. return builder.buildParsed();
  1084. } else {
  1085. return null;
  1086. }
  1087. }
  1088. public static com.dyuproject.protostuff.model.V2Speed.Task parseFrom(
  1089. com.google.protobuf.CodedInputStream input)
  1090. throws java.io.IOException {
  1091. return newBuilder().mergeFrom(input).buildParsed();
  1092. }
  1093. public static com.dyuproject.protostuff.model.V2Speed.Task parseFrom(
  1094. com.google.protobuf.CodedInputStream input,
  1095. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1096. throws java.io.IOException {
  1097. return newBuilder().mergeFrom(input, extensionRegistry)
  1098. .buildParsed();
  1099. }
  1100. public static Builder newBuilder() { return Builder.create(); }
  1101. public Builder newBuilderForType() { return newBuilder(); }
  1102. public static Builder newBuilder(com.dyuproject.protostuff.model.V2Speed.Task prototype) {
  1103. return newBuilder().mergeFrom(prototype);
  1104. }
  1105. public Builder toBuilder() { return newBuilder(this); }
  1106. public static final class Builder extends
  1107. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  1108. private com.dyuproject.protostuff.model.V2Speed.Task result;
  1109. // Construct using com.dyuproject.protostuff.model.V2Speed.Task.newBuilder()
  1110. private Builder() {}
  1111. private static Builder create() {
  1112. Builder builder = new Builder();
  1113. builder.result = new com.dyuproject.protostuff.model.V2Speed.Task();
  1114. return builder;
  1115. }
  1116. protected com.dyuproject.protostuff.model.V2Speed.Task internalGetResult() {
  1117. return result;
  1118. }
  1119. public Builder clear() {
  1120. if (result == null) {
  1121. throw new IllegalStateException(
  1122. "Cannot call clear() after build().");
  1123. }
  1124. result = new com.dyuproject.protostuff.model.V2Speed.Task();
  1125. return this;
  1126. }
  1127. public Builder clone() {
  1128. return create().mergeFrom(result);
  1129. }
  1130. public com.google.protobuf.Descriptors.Descriptor
  1131. getDescriptorForType() {
  1132. return com.dyuproject.protostuff.model.V2Speed.Task.getDescriptor();
  1133. }
  1134. public com.dyuproject.protostuff.model.V2Speed.Task getDefaultInstanceForType() {
  1135. return com.dyuproject.protostuff.model.V2Speed.Task.getDefaultInstance();
  1136. }
  1137. public boolean isInitialized() {
  1138. return result.isInitialized();
  1139. }
  1140. public com.dyuproject.protostuff.model.V2Speed.Task build() {
  1141. if (result != null && !isInitialized()) {
  1142. throw newUninitializedMessageException(result);
  1143. }
  1144. return buildPartial();
  1145. }
  1146. private com.dyuproject.protostuff.model.V2Speed.Task buildParsed()
  1147. throws com.google.protobuf.InvalidProtocolBufferException {
  1148. if (!isInitialized()) {
  1149. throw newUninitializedMessageException(
  1150. result).asInvalidProtocolBufferException();
  1151. }
  1152. return buildPartial();
  1153. }
  1154. public com.dyuproject.protostuff.model.V2Speed.Task buildPartial() {
  1155. if (result == null) {
  1156. throw new IllegalStateException(
  1157. "build() has already been called on this Builder.");
  1158. }
  1159. com.dyuproject.protostuff.model.V2Speed.Task returnMe = result;
  1160. result = null;
  1161. return returnMe;
  1162. }
  1163. public Builder mergeFrom(com.google.protobuf.Message other) {
  1164. if (other instanceof com.dyuproject.protostuff.model.V2Speed.Task) {
  1165. return mergeFrom((com.dyuproject.protostuff.model.V2Speed.Task)other);
  1166. } else {
  1167. super.mergeFrom(other);
  1168. return this;
  1169. }
  1170. }
  1171. public Builder mergeFrom(com.dyuproject.protostuff.model.V2Speed.Task other) {
  1172. if (other == com.dyuproject.protostuff.model.V2Speed.Task.getDefaultInstance()) return this;
  1173. if (other.hasId()) {
  1174. setId(other.getId());
  1175. }
  1176. if (other.hasName()) {
  1177. setName(other.getName());
  1178. }
  1179. if (other.hasDescription()) {
  1180. setDescription(other.getDescription());
  1181. }
  1182. if (other.hasStatus()) {
  1183. setStatus(other.getStatus());
  1184. }
  1185. if (other.hasAttachment()) {
  1186. setAttachment(other.getAttachment());
  1187. }
  1188. if (other.hasAboolean()) {
  1189. setAboolean(other.getAboolean());
  1190. }
  1191. if (other.hasAfloat()) {
  1192. setAfloat(other.getAfloat());
  1193. }
  1194. if (other.hasAdouble()) {
  1195. setAdouble(other.getAdouble());
  1196. }
  1197. if (other.hasAlong()) {
  1198. setAlong(other.getAlong());
  1199. }
  1200. this.mergeUnknownFields(other.getUnknownFields());
  1201. return this;
  1202. }
  1203. public Builder mergeFrom(
  1204. com.google.protobuf.CodedInputStream input,
  1205. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1206. throws java.io.IOException {
  1207. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1208. com.google.protobuf.UnknownFieldSet.newBuilder(
  1209. this.getUnknownFields());
  1210. while (true) {
  1211. int tag = input.readTag();
  1212. switch (tag) {
  1213. case 0:
  1214. this.setUnknownFields(unknownFields.build());
  1215. return this;
  1216. default: {
  1217. if (!parseUnknownField(input, unknownFields,
  1218. extensionRegistry, tag)) {
  1219. this.setUnknownFields(unknownFields.build());
  1220. return this;
  1221. }
  1222. break;
  1223. }
  1224. case 8: {
  1225. setId(input.readInt32());
  1226. break;
  1227. }
  1228. case 18: {
  1229. setName(input.readString());
  1230. break;
  1231. }
  1232. case 26: {
  1233. setDescription(input.readString());
  1234. break;
  1235. }
  1236. case 32: {
  1237. int rawValue = input.readEnum();
  1238. com.dyuproject.protostuff.model.V2Speed.Task.Status value = com.dyuproject.protostuff.model.V2Speed.Task.Status.valueOf(rawValue);
  1239. if (value == null) {
  1240. unknownFields.mergeVarintField(4, rawValue);
  1241. } else {
  1242. setStatus(value);
  1243. }
  1244. break;
  1245. }
  1246. case 42: {
  1247. setAttachment(input.readBytes());
  1248. break;
  1249. }
  1250. case 48: {
  1251. setAboolean(input.readBool());
  1252. break;
  1253. }
  1254. case 61: {
  1255. setAfloat(input.readFloat());
  1256. break;
  1257. }
  1258. case 65: {
  1259. setAdouble(input.readDouble());
  1260. break;
  1261. }
  1262. case 72: {
  1263. setAlong(input.readInt64());
  1264. break;
  1265. }
  1266. }
  1267. }
  1268. }
  1269. // required int32 _id = 1;
  1270. public boolean hasId() {
  1271. return result.hasId();
  1272. }
  1273. public int getId() {
  1274. return result.getId();
  1275. }
  1276. public Builder setId(int value) {
  1277. result.hasId = true;
  1278. result.Id_ = value;
  1279. return this;
  1280. }
  1281. public Builder clearId() {
  1282. result.hasId = false;
  1283. result.Id_ = 0;
  1284. return this;
  1285. }

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