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

/java-test/src/testproto/TestProto.java

https://bitbucket.org/stateupdateservice/state-update-service
Java | 1558 lines | 1222 code | 82 blank | 254 comment | 184 complexity | 826bb8207bf26052c2adf344ee9368f4 MD5 | raw file
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: test_proto.proto
  3. package testproto;
  4. public final class TestProto {
  5. private TestProto() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public interface TestOrBuilder
  10. extends com.google.protobuf.MessageOrBuilder {
  11. // required string a = 1;
  12. /**
  13. * <code>required string a = 1;</code>
  14. */
  15. boolean hasA();
  16. /**
  17. * <code>required string a = 1;</code>
  18. */
  19. java.lang.String getA();
  20. /**
  21. * <code>required string a = 1;</code>
  22. */
  23. com.google.protobuf.ByteString
  24. getABytes();
  25. // repeated int32 b = 2;
  26. /**
  27. * <code>repeated int32 b = 2;</code>
  28. */
  29. java.util.List<java.lang.Integer> getBList();
  30. /**
  31. * <code>repeated int32 b = 2;</code>
  32. */
  33. int getBCount();
  34. /**
  35. * <code>repeated int32 b = 2;</code>
  36. */
  37. int getB(int index);
  38. // repeated .testproto.Test.Embed c = 3;
  39. /**
  40. * <code>repeated .testproto.Test.Embed c = 3;</code>
  41. */
  42. java.util.List<testproto.TestProto.Test.Embed>
  43. getCList();
  44. /**
  45. * <code>repeated .testproto.Test.Embed c = 3;</code>
  46. */
  47. testproto.TestProto.Test.Embed getC(int index);
  48. /**
  49. * <code>repeated .testproto.Test.Embed c = 3;</code>
  50. */
  51. int getCCount();
  52. /**
  53. * <code>repeated .testproto.Test.Embed c = 3;</code>
  54. */
  55. java.util.List<? extends testproto.TestProto.Test.EmbedOrBuilder>
  56. getCOrBuilderList();
  57. /**
  58. * <code>repeated .testproto.Test.Embed c = 3;</code>
  59. */
  60. testproto.TestProto.Test.EmbedOrBuilder getCOrBuilder(
  61. int index);
  62. }
  63. /**
  64. * Protobuf type {@code testproto.Test}
  65. */
  66. public static final class Test extends
  67. com.google.protobuf.GeneratedMessage
  68. implements TestOrBuilder {
  69. // Use Test.newBuilder() to construct.
  70. private Test(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
  71. super(builder);
  72. this.unknownFields = builder.getUnknownFields();
  73. }
  74. private Test(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
  75. private static final Test defaultInstance;
  76. public static Test getDefaultInstance() {
  77. return defaultInstance;
  78. }
  79. public Test getDefaultInstanceForType() {
  80. return defaultInstance;
  81. }
  82. private final com.google.protobuf.UnknownFieldSet unknownFields;
  83. @java.lang.Override
  84. public final com.google.protobuf.UnknownFieldSet
  85. getUnknownFields() {
  86. return this.unknownFields;
  87. }
  88. private Test(
  89. com.google.protobuf.CodedInputStream input,
  90. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  91. throws com.google.protobuf.InvalidProtocolBufferException {
  92. initFields();
  93. int mutable_bitField0_ = 0;
  94. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  95. com.google.protobuf.UnknownFieldSet.newBuilder();
  96. try {
  97. boolean done = false;
  98. while (!done) {
  99. int tag = input.readTag();
  100. switch (tag) {
  101. case 0:
  102. done = true;
  103. break;
  104. default: {
  105. if (!parseUnknownField(input, unknownFields,
  106. extensionRegistry, tag)) {
  107. done = true;
  108. }
  109. break;
  110. }
  111. case 10: {
  112. bitField0_ |= 0x00000001;
  113. a_ = input.readBytes();
  114. break;
  115. }
  116. case 16: {
  117. if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
  118. b_ = new java.util.ArrayList<java.lang.Integer>();
  119. mutable_bitField0_ |= 0x00000002;
  120. }
  121. b_.add(input.readInt32());
  122. break;
  123. }
  124. case 18: {
  125. int length = input.readRawVarint32();
  126. int limit = input.pushLimit(length);
  127. if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
  128. b_ = new java.util.ArrayList<java.lang.Integer>();
  129. mutable_bitField0_ |= 0x00000002;
  130. }
  131. while (input.getBytesUntilLimit() > 0) {
  132. b_.add(input.readInt32());
  133. }
  134. input.popLimit(limit);
  135. break;
  136. }
  137. case 26: {
  138. if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
  139. c_ = new java.util.ArrayList<testproto.TestProto.Test.Embed>();
  140. mutable_bitField0_ |= 0x00000004;
  141. }
  142. c_.add(input.readMessage(testproto.TestProto.Test.Embed.PARSER, extensionRegistry));
  143. break;
  144. }
  145. }
  146. }
  147. } catch (com.google.protobuf.InvalidProtocolBufferException e) {
  148. throw e.setUnfinishedMessage(this);
  149. } catch (java.io.IOException e) {
  150. throw new com.google.protobuf.InvalidProtocolBufferException(
  151. e.getMessage()).setUnfinishedMessage(this);
  152. } finally {
  153. if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
  154. b_ = java.util.Collections.unmodifiableList(b_);
  155. }
  156. if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
  157. c_ = java.util.Collections.unmodifiableList(c_);
  158. }
  159. this.unknownFields = unknownFields.build();
  160. makeExtensionsImmutable();
  161. }
  162. }
  163. public static final com.google.protobuf.Descriptors.Descriptor
  164. getDescriptor() {
  165. return testproto.TestProto.internal_static_testproto_Test_descriptor;
  166. }
  167. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  168. internalGetFieldAccessorTable() {
  169. return testproto.TestProto.internal_static_testproto_Test_fieldAccessorTable
  170. .ensureFieldAccessorsInitialized(
  171. testproto.TestProto.Test.class, testproto.TestProto.Test.Builder.class);
  172. }
  173. public static com.google.protobuf.Parser<Test> PARSER =
  174. new com.google.protobuf.AbstractParser<Test>() {
  175. public Test parsePartialFrom(
  176. com.google.protobuf.CodedInputStream input,
  177. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  178. throws com.google.protobuf.InvalidProtocolBufferException {
  179. return new Test(input, extensionRegistry);
  180. }
  181. };
  182. @java.lang.Override
  183. public com.google.protobuf.Parser<Test> getParserForType() {
  184. return PARSER;
  185. }
  186. public interface EmbedOrBuilder
  187. extends com.google.protobuf.MessageOrBuilder {
  188. // required int64 aa = 1;
  189. /**
  190. * <code>required int64 aa = 1;</code>
  191. */
  192. boolean hasAa();
  193. /**
  194. * <code>required int64 aa = 1;</code>
  195. */
  196. long getAa();
  197. // optional string ab = 2;
  198. /**
  199. * <code>optional string ab = 2;</code>
  200. */
  201. boolean hasAb();
  202. /**
  203. * <code>optional string ab = 2;</code>
  204. */
  205. java.lang.String getAb();
  206. /**
  207. * <code>optional string ab = 2;</code>
  208. */
  209. com.google.protobuf.ByteString
  210. getAbBytes();
  211. }
  212. /**
  213. * Protobuf type {@code testproto.Test.Embed}
  214. */
  215. public static final class Embed extends
  216. com.google.protobuf.GeneratedMessage
  217. implements EmbedOrBuilder {
  218. // Use Embed.newBuilder() to construct.
  219. private Embed(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
  220. super(builder);
  221. this.unknownFields = builder.getUnknownFields();
  222. }
  223. private Embed(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
  224. private static final Embed defaultInstance;
  225. public static Embed getDefaultInstance() {
  226. return defaultInstance;
  227. }
  228. public Embed getDefaultInstanceForType() {
  229. return defaultInstance;
  230. }
  231. private final com.google.protobuf.UnknownFieldSet unknownFields;
  232. @java.lang.Override
  233. public final com.google.protobuf.UnknownFieldSet
  234. getUnknownFields() {
  235. return this.unknownFields;
  236. }
  237. private Embed(
  238. com.google.protobuf.CodedInputStream input,
  239. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  240. throws com.google.protobuf.InvalidProtocolBufferException {
  241. initFields();
  242. int mutable_bitField0_ = 0;
  243. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  244. com.google.protobuf.UnknownFieldSet.newBuilder();
  245. try {
  246. boolean done = false;
  247. while (!done) {
  248. int tag = input.readTag();
  249. switch (tag) {
  250. case 0:
  251. done = true;
  252. break;
  253. default: {
  254. if (!parseUnknownField(input, unknownFields,
  255. extensionRegistry, tag)) {
  256. done = true;
  257. }
  258. break;
  259. }
  260. case 8: {
  261. bitField0_ |= 0x00000001;
  262. aa_ = input.readInt64();
  263. break;
  264. }
  265. case 18: {
  266. bitField0_ |= 0x00000002;
  267. ab_ = input.readBytes();
  268. break;
  269. }
  270. }
  271. }
  272. } catch (com.google.protobuf.InvalidProtocolBufferException e) {
  273. throw e.setUnfinishedMessage(this);
  274. } catch (java.io.IOException e) {
  275. throw new com.google.protobuf.InvalidProtocolBufferException(
  276. e.getMessage()).setUnfinishedMessage(this);
  277. } finally {
  278. this.unknownFields = unknownFields.build();
  279. makeExtensionsImmutable();
  280. }
  281. }
  282. public static final com.google.protobuf.Descriptors.Descriptor
  283. getDescriptor() {
  284. return testproto.TestProto.internal_static_testproto_Test_Embed_descriptor;
  285. }
  286. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  287. internalGetFieldAccessorTable() {
  288. return testproto.TestProto.internal_static_testproto_Test_Embed_fieldAccessorTable
  289. .ensureFieldAccessorsInitialized(
  290. testproto.TestProto.Test.Embed.class, testproto.TestProto.Test.Embed.Builder.class);
  291. }
  292. public static com.google.protobuf.Parser<Embed> PARSER =
  293. new com.google.protobuf.AbstractParser<Embed>() {
  294. public Embed parsePartialFrom(
  295. com.google.protobuf.CodedInputStream input,
  296. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  297. throws com.google.protobuf.InvalidProtocolBufferException {
  298. return new Embed(input, extensionRegistry);
  299. }
  300. };
  301. @java.lang.Override
  302. public com.google.protobuf.Parser<Embed> getParserForType() {
  303. return PARSER;
  304. }
  305. private int bitField0_;
  306. // required int64 aa = 1;
  307. public static final int AA_FIELD_NUMBER = 1;
  308. private long aa_;
  309. /**
  310. * <code>required int64 aa = 1;</code>
  311. */
  312. public boolean hasAa() {
  313. return ((bitField0_ & 0x00000001) == 0x00000001);
  314. }
  315. /**
  316. * <code>required int64 aa = 1;</code>
  317. */
  318. public long getAa() {
  319. return aa_;
  320. }
  321. // optional string ab = 2;
  322. public static final int AB_FIELD_NUMBER = 2;
  323. private java.lang.Object ab_;
  324. /**
  325. * <code>optional string ab = 2;</code>
  326. */
  327. public boolean hasAb() {
  328. return ((bitField0_ & 0x00000002) == 0x00000002);
  329. }
  330. /**
  331. * <code>optional string ab = 2;</code>
  332. */
  333. public java.lang.String getAb() {
  334. java.lang.Object ref = ab_;
  335. if (ref instanceof java.lang.String) {
  336. return (java.lang.String) ref;
  337. } else {
  338. com.google.protobuf.ByteString bs =
  339. (com.google.protobuf.ByteString) ref;
  340. java.lang.String s = bs.toStringUtf8();
  341. if (bs.isValidUtf8()) {
  342. ab_ = s;
  343. }
  344. return s;
  345. }
  346. }
  347. /**
  348. * <code>optional string ab = 2;</code>
  349. */
  350. public com.google.protobuf.ByteString
  351. getAbBytes() {
  352. java.lang.Object ref = ab_;
  353. if (ref instanceof java.lang.String) {
  354. com.google.protobuf.ByteString b =
  355. com.google.protobuf.ByteString.copyFromUtf8(
  356. (java.lang.String) ref);
  357. ab_ = b;
  358. return b;
  359. } else {
  360. return (com.google.protobuf.ByteString) ref;
  361. }
  362. }
  363. private void initFields() {
  364. aa_ = 0L;
  365. ab_ = "";
  366. }
  367. private byte memoizedIsInitialized = -1;
  368. public final boolean isInitialized() {
  369. byte isInitialized = memoizedIsInitialized;
  370. if (isInitialized != -1) return isInitialized == 1;
  371. if (!hasAa()) {
  372. memoizedIsInitialized = 0;
  373. return false;
  374. }
  375. memoizedIsInitialized = 1;
  376. return true;
  377. }
  378. public void writeTo(com.google.protobuf.CodedOutputStream output)
  379. throws java.io.IOException {
  380. getSerializedSize();
  381. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  382. output.writeInt64(1, aa_);
  383. }
  384. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  385. output.writeBytes(2, getAbBytes());
  386. }
  387. getUnknownFields().writeTo(output);
  388. }
  389. private int memoizedSerializedSize = -1;
  390. public int getSerializedSize() {
  391. int size = memoizedSerializedSize;
  392. if (size != -1) return size;
  393. size = 0;
  394. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  395. size += com.google.protobuf.CodedOutputStream
  396. .computeInt64Size(1, aa_);
  397. }
  398. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  399. size += com.google.protobuf.CodedOutputStream
  400. .computeBytesSize(2, getAbBytes());
  401. }
  402. size += getUnknownFields().getSerializedSize();
  403. memoizedSerializedSize = size;
  404. return size;
  405. }
  406. private static final long serialVersionUID = 0L;
  407. @java.lang.Override
  408. protected java.lang.Object writeReplace()
  409. throws java.io.ObjectStreamException {
  410. return super.writeReplace();
  411. }
  412. public static testproto.TestProto.Test.Embed parseFrom(
  413. com.google.protobuf.ByteString data)
  414. throws com.google.protobuf.InvalidProtocolBufferException {
  415. return PARSER.parseFrom(data);
  416. }
  417. public static testproto.TestProto.Test.Embed parseFrom(
  418. com.google.protobuf.ByteString data,
  419. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  420. throws com.google.protobuf.InvalidProtocolBufferException {
  421. return PARSER.parseFrom(data, extensionRegistry);
  422. }
  423. public static testproto.TestProto.Test.Embed parseFrom(byte[] data)
  424. throws com.google.protobuf.InvalidProtocolBufferException {
  425. return PARSER.parseFrom(data);
  426. }
  427. public static testproto.TestProto.Test.Embed parseFrom(
  428. byte[] data,
  429. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  430. throws com.google.protobuf.InvalidProtocolBufferException {
  431. return PARSER.parseFrom(data, extensionRegistry);
  432. }
  433. public static testproto.TestProto.Test.Embed parseFrom(java.io.InputStream input)
  434. throws java.io.IOException {
  435. return PARSER.parseFrom(input);
  436. }
  437. public static testproto.TestProto.Test.Embed parseFrom(
  438. java.io.InputStream input,
  439. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  440. throws java.io.IOException {
  441. return PARSER.parseFrom(input, extensionRegistry);
  442. }
  443. public static testproto.TestProto.Test.Embed parseDelimitedFrom(java.io.InputStream input)
  444. throws java.io.IOException {
  445. return PARSER.parseDelimitedFrom(input);
  446. }
  447. public static testproto.TestProto.Test.Embed parseDelimitedFrom(
  448. java.io.InputStream input,
  449. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  450. throws java.io.IOException {
  451. return PARSER.parseDelimitedFrom(input, extensionRegistry);
  452. }
  453. public static testproto.TestProto.Test.Embed parseFrom(
  454. com.google.protobuf.CodedInputStream input)
  455. throws java.io.IOException {
  456. return PARSER.parseFrom(input);
  457. }
  458. public static testproto.TestProto.Test.Embed parseFrom(
  459. com.google.protobuf.CodedInputStream input,
  460. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  461. throws java.io.IOException {
  462. return PARSER.parseFrom(input, extensionRegistry);
  463. }
  464. public static Builder newBuilder() { return Builder.create(); }
  465. public Builder newBuilderForType() { return newBuilder(); }
  466. public static Builder newBuilder(testproto.TestProto.Test.Embed prototype) {
  467. return newBuilder().mergeFrom(prototype);
  468. }
  469. public Builder toBuilder() { return newBuilder(this); }
  470. @java.lang.Override
  471. protected Builder newBuilderForType(
  472. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  473. Builder builder = new Builder(parent);
  474. return builder;
  475. }
  476. /**
  477. * Protobuf type {@code testproto.Test.Embed}
  478. */
  479. public static final class Builder extends
  480. com.google.protobuf.GeneratedMessage.Builder<Builder>
  481. implements testproto.TestProto.Test.EmbedOrBuilder {
  482. public static final com.google.protobuf.Descriptors.Descriptor
  483. getDescriptor() {
  484. return testproto.TestProto.internal_static_testproto_Test_Embed_descriptor;
  485. }
  486. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  487. internalGetFieldAccessorTable() {
  488. return testproto.TestProto.internal_static_testproto_Test_Embed_fieldAccessorTable
  489. .ensureFieldAccessorsInitialized(
  490. testproto.TestProto.Test.Embed.class, testproto.TestProto.Test.Embed.Builder.class);
  491. }
  492. // Construct using testproto.TestProto.Test.Embed.newBuilder()
  493. private Builder() {
  494. maybeForceBuilderInitialization();
  495. }
  496. private Builder(
  497. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  498. super(parent);
  499. maybeForceBuilderInitialization();
  500. }
  501. private void maybeForceBuilderInitialization() {
  502. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  503. }
  504. }
  505. private static Builder create() {
  506. return new Builder();
  507. }
  508. public Builder clear() {
  509. super.clear();
  510. aa_ = 0L;
  511. bitField0_ = (bitField0_ & ~0x00000001);
  512. ab_ = "";
  513. bitField0_ = (bitField0_ & ~0x00000002);
  514. return this;
  515. }
  516. public Builder clone() {
  517. return create().mergeFrom(buildPartial());
  518. }
  519. public com.google.protobuf.Descriptors.Descriptor
  520. getDescriptorForType() {
  521. return testproto.TestProto.internal_static_testproto_Test_Embed_descriptor;
  522. }
  523. public testproto.TestProto.Test.Embed getDefaultInstanceForType() {
  524. return testproto.TestProto.Test.Embed.getDefaultInstance();
  525. }
  526. public testproto.TestProto.Test.Embed build() {
  527. testproto.TestProto.Test.Embed result = buildPartial();
  528. if (!result.isInitialized()) {
  529. throw newUninitializedMessageException(result);
  530. }
  531. return result;
  532. }
  533. public testproto.TestProto.Test.Embed buildPartial() {
  534. testproto.TestProto.Test.Embed result = new testproto.TestProto.Test.Embed(this);
  535. int from_bitField0_ = bitField0_;
  536. int to_bitField0_ = 0;
  537. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  538. to_bitField0_ |= 0x00000001;
  539. }
  540. result.aa_ = aa_;
  541. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  542. to_bitField0_ |= 0x00000002;
  543. }
  544. result.ab_ = ab_;
  545. result.bitField0_ = to_bitField0_;
  546. onBuilt();
  547. return result;
  548. }
  549. public Builder mergeFrom(com.google.protobuf.Message other) {
  550. if (other instanceof testproto.TestProto.Test.Embed) {
  551. return mergeFrom((testproto.TestProto.Test.Embed)other);
  552. } else {
  553. super.mergeFrom(other);
  554. return this;
  555. }
  556. }
  557. public Builder mergeFrom(testproto.TestProto.Test.Embed other) {
  558. if (other == testproto.TestProto.Test.Embed.getDefaultInstance()) return this;
  559. if (other.hasAa()) {
  560. setAa(other.getAa());
  561. }
  562. if (other.hasAb()) {
  563. bitField0_ |= 0x00000002;
  564. ab_ = other.ab_;
  565. onChanged();
  566. }
  567. this.mergeUnknownFields(other.getUnknownFields());
  568. return this;
  569. }
  570. public final boolean isInitialized() {
  571. if (!hasAa()) {
  572. return false;
  573. }
  574. return true;
  575. }
  576. public Builder mergeFrom(
  577. com.google.protobuf.CodedInputStream input,
  578. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  579. throws java.io.IOException {
  580. testproto.TestProto.Test.Embed parsedMessage = null;
  581. try {
  582. parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
  583. } catch (com.google.protobuf.InvalidProtocolBufferException e) {
  584. parsedMessage = (testproto.TestProto.Test.Embed) e.getUnfinishedMessage();
  585. throw e;
  586. } finally {
  587. if (parsedMessage != null) {
  588. mergeFrom(parsedMessage);
  589. }
  590. }
  591. return this;
  592. }
  593. private int bitField0_;
  594. // required int64 aa = 1;
  595. private long aa_ ;
  596. /**
  597. * <code>required int64 aa = 1;</code>
  598. */
  599. public boolean hasAa() {
  600. return ((bitField0_ & 0x00000001) == 0x00000001);
  601. }
  602. /**
  603. * <code>required int64 aa = 1;</code>
  604. */
  605. public long getAa() {
  606. return aa_;
  607. }
  608. /**
  609. * <code>required int64 aa = 1;</code>
  610. */
  611. public Builder setAa(long value) {
  612. bitField0_ |= 0x00000001;
  613. aa_ = value;
  614. onChanged();
  615. return this;
  616. }
  617. /**
  618. * <code>required int64 aa = 1;</code>
  619. */
  620. public Builder clearAa() {
  621. bitField0_ = (bitField0_ & ~0x00000001);
  622. aa_ = 0L;
  623. onChanged();
  624. return this;
  625. }
  626. // optional string ab = 2;
  627. private java.lang.Object ab_ = "";
  628. /**
  629. * <code>optional string ab = 2;</code>
  630. */
  631. public boolean hasAb() {
  632. return ((bitField0_ & 0x00000002) == 0x00000002);
  633. }
  634. /**
  635. * <code>optional string ab = 2;</code>
  636. */
  637. public java.lang.String getAb() {
  638. java.lang.Object ref = ab_;
  639. if (!(ref instanceof java.lang.String)) {
  640. java.lang.String s = ((com.google.protobuf.ByteString) ref)
  641. .toStringUtf8();
  642. ab_ = s;
  643. return s;
  644. } else {
  645. return (java.lang.String) ref;
  646. }
  647. }
  648. /**
  649. * <code>optional string ab = 2;</code>
  650. */
  651. public com.google.protobuf.ByteString
  652. getAbBytes() {
  653. java.lang.Object ref = ab_;
  654. if (ref instanceof String) {
  655. com.google.protobuf.ByteString b =
  656. com.google.protobuf.ByteString.copyFromUtf8(
  657. (java.lang.String) ref);
  658. ab_ = b;
  659. return b;
  660. } else {
  661. return (com.google.protobuf.ByteString) ref;
  662. }
  663. }
  664. /**
  665. * <code>optional string ab = 2;</code>
  666. */
  667. public Builder setAb(
  668. java.lang.String value) {
  669. if (value == null) {
  670. throw new NullPointerException();
  671. }
  672. bitField0_ |= 0x00000002;
  673. ab_ = value;
  674. onChanged();
  675. return this;
  676. }
  677. /**
  678. * <code>optional string ab = 2;</code>
  679. */
  680. public Builder clearAb() {
  681. bitField0_ = (bitField0_ & ~0x00000002);
  682. ab_ = getDefaultInstance().getAb();
  683. onChanged();
  684. return this;
  685. }
  686. /**
  687. * <code>optional string ab = 2;</code>
  688. */
  689. public Builder setAbBytes(
  690. com.google.protobuf.ByteString value) {
  691. if (value == null) {
  692. throw new NullPointerException();
  693. }
  694. bitField0_ |= 0x00000002;
  695. ab_ = value;
  696. onChanged();
  697. return this;
  698. }
  699. // @@protoc_insertion_point(builder_scope:testproto.Test.Embed)
  700. }
  701. static {
  702. defaultInstance = new Embed(true);
  703. defaultInstance.initFields();
  704. }
  705. // @@protoc_insertion_point(class_scope:testproto.Test.Embed)
  706. }
  707. private int bitField0_;
  708. // required string a = 1;
  709. public static final int A_FIELD_NUMBER = 1;
  710. private java.lang.Object a_;
  711. /**
  712. * <code>required string a = 1;</code>
  713. */
  714. public boolean hasA() {
  715. return ((bitField0_ & 0x00000001) == 0x00000001);
  716. }
  717. /**
  718. * <code>required string a = 1;</code>
  719. */
  720. public java.lang.String getA() {
  721. java.lang.Object ref = a_;
  722. if (ref instanceof java.lang.String) {
  723. return (java.lang.String) ref;
  724. } else {
  725. com.google.protobuf.ByteString bs =
  726. (com.google.protobuf.ByteString) ref;
  727. java.lang.String s = bs.toStringUtf8();
  728. if (bs.isValidUtf8()) {
  729. a_ = s;
  730. }
  731. return s;
  732. }
  733. }
  734. /**
  735. * <code>required string a = 1;</code>
  736. */
  737. public com.google.protobuf.ByteString
  738. getABytes() {
  739. java.lang.Object ref = a_;
  740. if (ref instanceof java.lang.String) {
  741. com.google.protobuf.ByteString b =
  742. com.google.protobuf.ByteString.copyFromUtf8(
  743. (java.lang.String) ref);
  744. a_ = b;
  745. return b;
  746. } else {
  747. return (com.google.protobuf.ByteString) ref;
  748. }
  749. }
  750. // repeated int32 b = 2;
  751. public static final int B_FIELD_NUMBER = 2;
  752. private java.util.List<java.lang.Integer> b_;
  753. /**
  754. * <code>repeated int32 b = 2;</code>
  755. */
  756. public java.util.List<java.lang.Integer>
  757. getBList() {
  758. return b_;
  759. }
  760. /**
  761. * <code>repeated int32 b = 2;</code>
  762. */
  763. public int getBCount() {
  764. return b_.size();
  765. }
  766. /**
  767. * <code>repeated int32 b = 2;</code>
  768. */
  769. public int getB(int index) {
  770. return b_.get(index);
  771. }
  772. // repeated .testproto.Test.Embed c = 3;
  773. public static final int C_FIELD_NUMBER = 3;
  774. private java.util.List<testproto.TestProto.Test.Embed> c_;
  775. /**
  776. * <code>repeated .testproto.Test.Embed c = 3;</code>
  777. */
  778. public java.util.List<testproto.TestProto.Test.Embed> getCList() {
  779. return c_;
  780. }
  781. /**
  782. * <code>repeated .testproto.Test.Embed c = 3;</code>
  783. */
  784. public java.util.List<? extends testproto.TestProto.Test.EmbedOrBuilder>
  785. getCOrBuilderList() {
  786. return c_;
  787. }
  788. /**
  789. * <code>repeated .testproto.Test.Embed c = 3;</code>
  790. */
  791. public int getCCount() {
  792. return c_.size();
  793. }
  794. /**
  795. * <code>repeated .testproto.Test.Embed c = 3;</code>
  796. */
  797. public testproto.TestProto.Test.Embed getC(int index) {
  798. return c_.get(index);
  799. }
  800. /**
  801. * <code>repeated .testproto.Test.Embed c = 3;</code>
  802. */
  803. public testproto.TestProto.Test.EmbedOrBuilder getCOrBuilder(
  804. int index) {
  805. return c_.get(index);
  806. }
  807. private void initFields() {
  808. a_ = "";
  809. b_ = java.util.Collections.emptyList();
  810. c_ = java.util.Collections.emptyList();
  811. }
  812. private byte memoizedIsInitialized = -1;
  813. public final boolean isInitialized() {
  814. byte isInitialized = memoizedIsInitialized;
  815. if (isInitialized != -1) return isInitialized == 1;
  816. if (!hasA()) {
  817. memoizedIsInitialized = 0;
  818. return false;
  819. }
  820. for (int i = 0; i < getCCount(); i++) {
  821. if (!getC(i).isInitialized()) {
  822. memoizedIsInitialized = 0;
  823. return false;
  824. }
  825. }
  826. memoizedIsInitialized = 1;
  827. return true;
  828. }
  829. public void writeTo(com.google.protobuf.CodedOutputStream output)
  830. throws java.io.IOException {
  831. getSerializedSize();
  832. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  833. output.writeBytes(1, getABytes());
  834. }
  835. for (int i = 0; i < b_.size(); i++) {
  836. output.writeInt32(2, b_.get(i));
  837. }
  838. for (int i = 0; i < c_.size(); i++) {
  839. output.writeMessage(3, c_.get(i));
  840. }
  841. getUnknownFields().writeTo(output);
  842. }
  843. private int memoizedSerializedSize = -1;
  844. public int getSerializedSize() {
  845. int size = memoizedSerializedSize;
  846. if (size != -1) return size;
  847. size = 0;
  848. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  849. size += com.google.protobuf.CodedOutputStream
  850. .computeBytesSize(1, getABytes());
  851. }
  852. {
  853. int dataSize = 0;
  854. for (int i = 0; i < b_.size(); i++) {
  855. dataSize += com.google.protobuf.CodedOutputStream
  856. .computeInt32SizeNoTag(b_.get(i));
  857. }
  858. size += dataSize;
  859. size += 1 * getBList().size();
  860. }
  861. for (int i = 0; i < c_.size(); i++) {
  862. size += com.google.protobuf.CodedOutputStream
  863. .computeMessageSize(3, c_.get(i));
  864. }
  865. size += getUnknownFields().getSerializedSize();
  866. memoizedSerializedSize = size;
  867. return size;
  868. }
  869. private static final long serialVersionUID = 0L;
  870. @java.lang.Override
  871. protected java.lang.Object writeReplace()
  872. throws java.io.ObjectStreamException {
  873. return super.writeReplace();
  874. }
  875. public static testproto.TestProto.Test parseFrom(
  876. com.google.protobuf.ByteString data)
  877. throws com.google.protobuf.InvalidProtocolBufferException {
  878. return PARSER.parseFrom(data);
  879. }
  880. public static testproto.TestProto.Test parseFrom(
  881. com.google.protobuf.ByteString data,
  882. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  883. throws com.google.protobuf.InvalidProtocolBufferException {
  884. return PARSER.parseFrom(data, extensionRegistry);
  885. }
  886. public static testproto.TestProto.Test parseFrom(byte[] data)
  887. throws com.google.protobuf.InvalidProtocolBufferException {
  888. return PARSER.parseFrom(data);
  889. }
  890. public static testproto.TestProto.Test parseFrom(
  891. byte[] data,
  892. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  893. throws com.google.protobuf.InvalidProtocolBufferException {
  894. return PARSER.parseFrom(data, extensionRegistry);
  895. }
  896. public static testproto.TestProto.Test parseFrom(java.io.InputStream input)
  897. throws java.io.IOException {
  898. return PARSER.parseFrom(input);
  899. }
  900. public static testproto.TestProto.Test parseFrom(
  901. java.io.InputStream input,
  902. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  903. throws java.io.IOException {
  904. return PARSER.parseFrom(input, extensionRegistry);
  905. }
  906. public static testproto.TestProto.Test parseDelimitedFrom(java.io.InputStream input)
  907. throws java.io.IOException {
  908. return PARSER.parseDelimitedFrom(input);
  909. }
  910. public static testproto.TestProto.Test parseDelimitedFrom(
  911. java.io.InputStream input,
  912. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  913. throws java.io.IOException {
  914. return PARSER.parseDelimitedFrom(input, extensionRegistry);
  915. }
  916. public static testproto.TestProto.Test parseFrom(
  917. com.google.protobuf.CodedInputStream input)
  918. throws java.io.IOException {
  919. return PARSER.parseFrom(input);
  920. }
  921. public static testproto.TestProto.Test parseFrom(
  922. com.google.protobuf.CodedInputStream input,
  923. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  924. throws java.io.IOException {
  925. return PARSER.parseFrom(input, extensionRegistry);
  926. }
  927. public static Builder newBuilder() { return Builder.create(); }
  928. public Builder newBuilderForType() { return newBuilder(); }
  929. public static Builder newBuilder(testproto.TestProto.Test prototype) {
  930. return newBuilder().mergeFrom(prototype);
  931. }
  932. public Builder toBuilder() { return newBuilder(this); }
  933. @java.lang.Override
  934. protected Builder newBuilderForType(
  935. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  936. Builder builder = new Builder(parent);
  937. return builder;
  938. }
  939. /**
  940. * Protobuf type {@code testproto.Test}
  941. */
  942. public static final class Builder extends
  943. com.google.protobuf.GeneratedMessage.Builder<Builder>
  944. implements testproto.TestProto.TestOrBuilder {
  945. public static final com.google.protobuf.Descriptors.Descriptor
  946. getDescriptor() {
  947. return testproto.TestProto.internal_static_testproto_Test_descriptor;
  948. }
  949. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  950. internalGetFieldAccessorTable() {
  951. return testproto.TestProto.internal_static_testproto_Test_fieldAccessorTable
  952. .ensureFieldAccessorsInitialized(
  953. testproto.TestProto.Test.class, testproto.TestProto.Test.Builder.class);
  954. }
  955. // Construct using testproto.TestProto.Test.newBuilder()
  956. private Builder() {
  957. maybeForceBuilderInitialization();
  958. }
  959. private Builder(
  960. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  961. super(parent);
  962. maybeForceBuilderInitialization();
  963. }
  964. private void maybeForceBuilderInitialization() {
  965. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  966. getCFieldBuilder();
  967. }
  968. }
  969. private static Builder create() {
  970. return new Builder();
  971. }
  972. public Builder clear() {
  973. super.clear();
  974. a_ = "";
  975. bitField0_ = (bitField0_ & ~0x00000001);
  976. b_ = java.util.Collections.emptyList();
  977. bitField0_ = (bitField0_ & ~0x00000002);
  978. if (cBuilder_ == null) {
  979. c_ = java.util.Collections.emptyList();
  980. bitField0_ = (bitField0_ & ~0x00000004);
  981. } else {
  982. cBuilder_.clear();
  983. }
  984. return this;
  985. }
  986. public Builder clone() {
  987. return create().mergeFrom(buildPartial());
  988. }
  989. public com.google.protobuf.Descriptors.Descriptor
  990. getDescriptorForType() {
  991. return testproto.TestProto.internal_static_testproto_Test_descriptor;
  992. }
  993. public testproto.TestProto.Test getDefaultInstanceForType() {
  994. return testproto.TestProto.Test.getDefaultInstance();
  995. }
  996. public testproto.TestProto.Test build() {
  997. testproto.TestProto.Test result = buildPartial();
  998. if (!result.isInitialized()) {
  999. throw newUninitializedMessageException(result);
  1000. }
  1001. return result;
  1002. }
  1003. public testproto.TestProto.Test buildPartial() {
  1004. testproto.TestProto.Test result = new testproto.TestProto.Test(this);
  1005. int from_bitField0_ = bitField0_;
  1006. int to_bitField0_ = 0;
  1007. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  1008. to_bitField0_ |= 0x00000001;
  1009. }
  1010. result.a_ = a_;
  1011. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  1012. b_ = java.util.Collections.unmodifiableList(b_);
  1013. bitField0_ = (bitField0_ & ~0x00000002);
  1014. }
  1015. result.b_ = b_;
  1016. if (cBuilder_ == null) {
  1017. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  1018. c_ = java.util.Collections.unmodifiableList(c_);
  1019. bitField0_ = (bitField0_ & ~0x00000004);
  1020. }
  1021. result.c_ = c_;
  1022. } else {
  1023. result.c_ = cBuilder_.build();
  1024. }
  1025. result.bitField0_ = to_bitField0_;
  1026. onBuilt();
  1027. return result;
  1028. }
  1029. public Builder mergeFrom(com.google.protobuf.Message other) {
  1030. if (other instanceof testproto.TestProto.Test) {
  1031. return mergeFrom((testproto.TestProto.Test)other);
  1032. } else {
  1033. super.mergeFrom(other);
  1034. return this;
  1035. }
  1036. }
  1037. public Builder mergeFrom(testproto.TestProto.Test other) {
  1038. if (other == testproto.TestProto.Test.getDefaultInstance()) return this;
  1039. if (other.hasA()) {
  1040. bitField0_ |= 0x00000001;
  1041. a_ = other.a_;
  1042. onChanged();
  1043. }
  1044. if (!other.b_.isEmpty()) {
  1045. if (b_.isEmpty()) {
  1046. b_ = other.b_;
  1047. bitField0_ = (bitField0_ & ~0x00000002);
  1048. } else {
  1049. ensureBIsMutable();
  1050. b_.addAll(other.b_);
  1051. }
  1052. onChanged();
  1053. }
  1054. if (cBuilder_ == null) {
  1055. if (!other.c_.isEmpty()) {
  1056. if (c_.isEmpty()) {
  1057. c_ = other.c_;
  1058. bitField0_ = (bitField0_ & ~0x00000004);
  1059. } else {
  1060. ensureCIsMutable();
  1061. c_.addAll(other.c_);
  1062. }
  1063. onChanged();
  1064. }
  1065. } else {
  1066. if (!other.c_.isEmpty()) {
  1067. if (cBuilder_.isEmpty()) {
  1068. cBuilder_.dispose();
  1069. cBuilder_ = null;
  1070. c_ = other.c_;
  1071. bitField0_ = (bitField0_ & ~0x00000004);
  1072. cBuilder_ =
  1073. com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
  1074. getCFieldBuilder() : null;
  1075. } else {
  1076. cBuilder_.addAllMessages(other.c_);
  1077. }
  1078. }
  1079. }
  1080. this.mergeUnknownFields(other.getUnknownFields());
  1081. return this;
  1082. }
  1083. public final boolean isInitialized() {
  1084. if (!hasA()) {
  1085. return false;
  1086. }
  1087. for (int i = 0; i < getCCount(); i++) {
  1088. if (!getC(i).isInitialized()) {
  1089. return false;
  1090. }
  1091. }
  1092. return true;
  1093. }
  1094. public Builder mergeFrom(
  1095. com.google.protobuf.CodedInputStream input,
  1096. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1097. throws java.io.IOException {
  1098. testproto.TestProto.Test parsedMessage = null;
  1099. try {
  1100. parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
  1101. } catch (com.google.protobuf.InvalidProtocolBufferException e) {
  1102. parsedMessage = (testproto.TestProto.Test) e.getUnfinishedMessage();
  1103. throw e;
  1104. } finally {
  1105. if (parsedMessage != null) {
  1106. mergeFrom(parsedMessage);
  1107. }
  1108. }
  1109. return this;
  1110. }
  1111. private int bitField0_;
  1112. // required string a = 1;
  1113. private java.lang.Object a_ = "";
  1114. /**
  1115. * <code>required string a = 1;</code>
  1116. */
  1117. public boolean hasA() {
  1118. return ((bitField0_ & 0x00000001) == 0x00000001);
  1119. }
  1120. /**
  1121. * <code>required string a = 1;</code>
  1122. */
  1123. public java.lang.String getA() {
  1124. java.lang.Object ref = a_;
  1125. if (!(ref instanceof java.lang.String)) {
  1126. java.lang.String s = ((com.google.protobuf.ByteString) ref)
  1127. .toStringUtf8();
  1128. a_ = s;
  1129. return s;
  1130. } else {
  1131. return (java.lang.String) ref;
  1132. }
  1133. }
  1134. /**
  1135. * <code>required string a = 1;</code>
  1136. */
  1137. public com.google.protobuf.ByteString
  1138. getABytes() {
  1139. java.lang.Object ref = a_;
  1140. if (ref instanceof String) {
  1141. com.google.protobuf.ByteString b =
  1142. com.google.protobuf.ByteString.copyFromUtf8(
  1143. (java.lang.String) ref);
  1144. a_ = b;
  1145. return b;
  1146. } else {
  1147. return (com.google.protobuf.ByteString) ref;
  1148. }
  1149. }
  1150. /**
  1151. * <code>required string a = 1;</code>
  1152. */
  1153. public Builder setA(
  1154. java.lang.String value) {
  1155. if (value == null) {
  1156. throw new NullPointerException();
  1157. }
  1158. bitField0_ |= 0x00000001;
  1159. a_ = value;
  1160. onChanged();
  1161. return this;
  1162. }
  1163. /**
  1164. * <code>required string a = 1;</code>
  1165. */
  1166. public Builder clearA() {
  1167. bitField0_ = (bitField0_ & ~0x00000001);
  1168. a_ = getDefaultInstance().getA();
  1169. onChanged();
  1170. return this;
  1171. }
  1172. /**
  1173. * <code>required string a = 1;</code>
  1174. */
  1175. public Builder setABytes(
  1176. com.google.protobuf.ByteString value) {
  1177. if (value == null) {
  1178. throw new NullPointerException();
  1179. }
  1180. bitField0_ |= 0x00000001;
  1181. a_ = value;
  1182. onChanged();
  1183. return this;
  1184. }
  1185. // repeated int32 b = 2;
  1186. private java.util.List<java.lang.Integer> b_ = java.util.Collections.emptyList();
  1187. private void ensureBIsMutable() {
  1188. if (!((bitField0_ & 0x00000002) == 0x00000002)) {
  1189. b_ = new java.util.ArrayList<java.lang.Integer>(b_);
  1190. bitField0_ |= 0x00000002;
  1191. }
  1192. }
  1193. /**
  1194. * <code>repeated int32 b = 2;</code>
  1195. */
  1196. public java.util.List<java.lang.Integer>
  1197. getBList() {
  1198. return java.util.Collections.unmodifiableList(b_);
  1199. }
  1200. /**
  1201. * <code>repeated int32 b = 2;</code>
  1202. */
  1203. public int getBCount() {
  1204. return b_.size();
  1205. }
  1206. /**
  1207. * <code>repeated int32 b = 2;</code>
  1208. */
  1209. public int getB(int index) {
  1210. return b_.get(index);
  1211. }
  1212. /**
  1213. * <code>repeated int32 b = 2;</code>
  1214. */
  1215. public Builder setB(
  1216. int index, int value) {
  1217. ensureBIsMutable();
  1218. b_.set(index, value);
  1219. onChanged();
  1220. return this;
  1221. }
  1222. /**
  1223. * <code>repeated int32 b = 2;</code>
  1224. */
  1225. public Builder addB(int value) {
  1226. ensureBIsMutable();
  1227. b_.add(value);
  1228. onChanged();
  1229. return this;
  1230. }
  1231. /**
  1232. * <code>repeated int32 b = 2;</code>
  1233. */
  1234. public Builder addAllB(
  1235. java.lang.Iterable<? extends java.lang.Integer> values) {
  1236. ensureBIsMutable();
  1237. super.addAll(values, b_);
  1238. onChanged();
  1239. return this;
  1240. }
  1241. /**
  1242. * <code>repeated int32 b = 2;</code>
  1243. */
  1244. public Builder clearB() {
  1245. b_ = java.util.Collections.emptyList();
  1246. bitField0_ = (bitField0_ & ~0x00000002);
  1247. onChanged();
  1248. return this;
  1249. }
  1250. // repeated .testproto.Test.Embed c = 3;
  1251. private java.util.List<testproto.TestProto.Test.Embed> c_ =
  1252. java.util.Collections.emptyList();
  1253. private void ensureCIsMutable() {
  1254. if (!((bitField0_ & 0x00000004) == 0x00000004)) {
  1255. c_ = new java.util.ArrayList<testproto.TestProto.Test.Embed>(c_);
  1256. bitField0_ |= 0x00000004;
  1257. }
  1258. }
  1259. private com.google.protobuf.RepeatedFieldBuilder<
  1260. testproto.TestProto.Test.Embed, testproto.TestProto.Test.Embed.Builder, testproto.TestProto.Test.EmbedOrBuilder> cBuilder_;
  1261. /**
  1262. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1263. */
  1264. public java.util.List<testproto.TestProto.Test.Embed> getCList() {
  1265. if (cBuilder_ == null) {
  1266. return java.util.Collections.unmodifiableList(c_);
  1267. } else {
  1268. return cBuilder_.getMessageList();
  1269. }
  1270. }
  1271. /**
  1272. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1273. */
  1274. public int getCCount() {
  1275. if (cBuilder_ == null) {
  1276. return c_.size();
  1277. } else {
  1278. return cBuilder_.getCount();
  1279. }
  1280. }
  1281. /**
  1282. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1283. */
  1284. public testproto.TestProto.Test.Embed getC(int index) {
  1285. if (cBuilder_ == null) {
  1286. return c_.get(index);
  1287. } else {
  1288. return cBuilder_.getMessage(index);
  1289. }
  1290. }
  1291. /**
  1292. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1293. */
  1294. public Builder setC(
  1295. int index, testproto.TestProto.Test.Embed value) {
  1296. if (cBuilder_ == null) {
  1297. if (value == null) {
  1298. throw new NullPointerException();
  1299. }
  1300. ensureCIsMutable();
  1301. c_.set(index, value);
  1302. onChanged();
  1303. } else {
  1304. cBuilder_.setMessage(index, value);
  1305. }
  1306. return this;
  1307. }
  1308. /**
  1309. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1310. */
  1311. public Builder setC(
  1312. int index, testproto.TestProto.Test.Embed.Builder builderForValue) {
  1313. if (cBuilder_ == null) {
  1314. ensureCIsMutable();
  1315. c_.set(index, builderForValue.build());
  1316. onChanged();
  1317. } else {
  1318. cBuilder_.setMessage(index, builderForValue.build());
  1319. }
  1320. return this;
  1321. }
  1322. /**
  1323. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1324. */
  1325. public Builder addC(testproto.TestProto.Test.Embed value) {
  1326. if (cBuilder_ == null) {
  1327. if (value == null) {
  1328. throw new NullPointerException();
  1329. }
  1330. ensureCIsMutable();
  1331. c_.add(value);
  1332. onChanged();
  1333. } else {
  1334. cBuilder_.addMessage(value);
  1335. }
  1336. return this;
  1337. }
  1338. /**
  1339. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1340. */
  1341. public Builder addC(
  1342. int index, testproto.TestProto.Test.Embed value) {
  1343. if (cBuilder_ == null) {
  1344. if (value == null) {
  1345. throw new NullPointerException();
  1346. }
  1347. ensureCIsMutable();
  1348. c_.add(index, value);
  1349. onChanged();
  1350. } else {
  1351. cBuilder_.addMessage(index, value);
  1352. }
  1353. return this;
  1354. }
  1355. /**
  1356. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1357. */
  1358. public Builder addC(
  1359. testproto.TestProto.Test.Embed.Builder builderForValue) {
  1360. if (cBuilder_ == null) {
  1361. ensureCIsMutable();
  1362. c_.add(builderForValue.build());
  1363. onChanged();
  1364. } else {
  1365. cBuilder_.addMessage(builderForValue.build());
  1366. }
  1367. return this;
  1368. }
  1369. /**
  1370. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1371. */
  1372. public Builder addC(
  1373. int index, testproto.TestProto.Test.Embed.Builder builderForValue) {
  1374. if (cBuilder_ == null) {
  1375. ensureCIsMutable();
  1376. c_.add(index, builderForValue.build());
  1377. onChanged();
  1378. } else {
  1379. cBuilder_.addMessage(index, builderForValue.build());
  1380. }
  1381. return this;
  1382. }
  1383. /**
  1384. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1385. */
  1386. public Builder addAllC(
  1387. java.lang.Iterable<? extends testproto.TestProto.Test.Embed> values) {
  1388. if (cBuilder_ == null) {
  1389. ensureCIsMutable();
  1390. super.addAll(values, c_);
  1391. onChanged();
  1392. } else {
  1393. cBuilder_.addAllMessages(values);
  1394. }
  1395. return this;
  1396. }
  1397. /**
  1398. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1399. */
  1400. public Builder clearC() {
  1401. if (cBuilder_ == null) {
  1402. c_ = java.util.Collections.emptyList();
  1403. bitField0_ = (bitField0_ & ~0x00000004);
  1404. onChanged();
  1405. } else {
  1406. cBuilder_.clear();
  1407. }
  1408. return this;
  1409. }
  1410. /**
  1411. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1412. */
  1413. public Builder removeC(int index) {
  1414. if (cBuilder_ == null) {
  1415. ensureCIsMutable();
  1416. c_.remove(index);
  1417. onChanged();
  1418. } else {
  1419. cBuilder_.remove(index);
  1420. }
  1421. return this;
  1422. }
  1423. /**
  1424. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1425. */
  1426. public testproto.TestProto.Test.Embed.Builder getCBuilder(
  1427. int index) {
  1428. return getCFieldBuilder().getBuilder(index);
  1429. }
  1430. /**
  1431. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1432. */
  1433. public testproto.TestProto.Test.EmbedOrBuilder getCOrBuilder(
  1434. int index) {
  1435. if (cBuilder_ == null) {
  1436. return c_.get(index); } else {
  1437. return cBuilder_.getMessageOrBuilder(index);
  1438. }
  1439. }
  1440. /**
  1441. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1442. */
  1443. public java.util.List<? extends testproto.TestProto.Test.EmbedOrBuilder>
  1444. getCOrBuilderList() {
  1445. if (cBuilder_ != null) {
  1446. return cBuilder_.getMessageOrBuilderList();
  1447. } else {
  1448. return java.util.Collections.unmodifiableList(c_);
  1449. }
  1450. }
  1451. /**
  1452. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1453. */
  1454. public testproto.TestProto.Test.Embed.Builder addCBuilder() {
  1455. return getCFieldBuilder().addBuilder(
  1456. testproto.TestProto.Test.Embed.getDefaultInstance());
  1457. }
  1458. /**
  1459. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1460. */
  1461. public testproto.TestProto.Test.Embed.Builder addCBuilder(
  1462. int index) {
  1463. return getCFieldBuilder().addBuilder(
  1464. index, testproto.TestProto.Test.Embed.getDefaultInstance());
  1465. }
  1466. /**
  1467. * <code>repeated .testproto.Test.Embed c = 3;</code>
  1468. */
  1469. public java.util.List<testproto.TestProto.Test.Embed.Builder>
  1470. getCBuilderList() {
  1471. return getCFieldBuilder().getBuilderList();
  1472. }
  1473. private com.google.protobuf.RepeatedFieldBuilder<
  1474. testproto.TestProto.Test.Embed, testproto.TestProto.Test.Embed.Builder, testproto.TestProto.Test.EmbedOrBuilder>
  1475. getCFieldBuilder() {
  1476. if (cBuilder_