PageRenderTime 54ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

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

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

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