/java-test/src/testproto/TestProto.java
Java | 1558 lines | 1222 code | 82 blank | 254 comment | 184 complexity | 826bb8207bf26052c2adf344ee9368f4 MD5 | raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: test_proto.proto
- package testproto;
- public final class TestProto {
- private TestProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public interface TestOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
- // required string a = 1;
- /**
- * <code>required string a = 1;</code>
- */
- boolean hasA();
- /**
- * <code>required string a = 1;</code>
- */
- java.lang.String getA();
- /**
- * <code>required string a = 1;</code>
- */
- com.google.protobuf.ByteString
- getABytes();
- // repeated int32 b = 2;
- /**
- * <code>repeated int32 b = 2;</code>
- */
- java.util.List<java.lang.Integer> getBList();
- /**
- * <code>repeated int32 b = 2;</code>
- */
- int getBCount();
- /**
- * <code>repeated int32 b = 2;</code>
- */
- int getB(int index);
- // repeated .testproto.Test.Embed c = 3;
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- java.util.List<testproto.TestProto.Test.Embed>
- getCList();
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- testproto.TestProto.Test.Embed getC(int index);
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- int getCCount();
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- java.util.List<? extends testproto.TestProto.Test.EmbedOrBuilder>
- getCOrBuilderList();
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- testproto.TestProto.Test.EmbedOrBuilder getCOrBuilder(
- int index);
- }
- /**
- * Protobuf type {@code testproto.Test}
- */
- public static final class Test extends
- com.google.protobuf.GeneratedMessage
- implements TestOrBuilder {
- // Use Test.newBuilder() to construct.
- private Test(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private Test(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
- private static final Test defaultInstance;
- public static Test getDefaultInstance() {
- return defaultInstance;
- }
- public Test getDefaultInstanceForType() {
- return defaultInstance;
- }
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Test(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- a_ = input.readBytes();
- break;
- }
- case 16: {
- if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
- b_ = new java.util.ArrayList<java.lang.Integer>();
- mutable_bitField0_ |= 0x00000002;
- }
- b_.add(input.readInt32());
- break;
- }
- case 18: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
- b_ = new java.util.ArrayList<java.lang.Integer>();
- mutable_bitField0_ |= 0x00000002;
- }
- while (input.getBytesUntilLimit() > 0) {
- b_.add(input.readInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 26: {
- if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
- c_ = new java.util.ArrayList<testproto.TestProto.Test.Embed>();
- mutable_bitField0_ |= 0x00000004;
- }
- c_.add(input.readMessage(testproto.TestProto.Test.Embed.PARSER, extensionRegistry));
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
- b_ = java.util.Collections.unmodifiableList(b_);
- }
- if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
- c_ = java.util.Collections.unmodifiableList(c_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return testproto.TestProto.internal_static_testproto_Test_descriptor;
- }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return testproto.TestProto.internal_static_testproto_Test_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- testproto.TestProto.Test.class, testproto.TestProto.Test.Builder.class);
- }
- public static com.google.protobuf.Parser<Test> PARSER =
- new com.google.protobuf.AbstractParser<Test>() {
- public Test parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Test(input, extensionRegistry);
- }
- };
- @java.lang.Override
- public com.google.protobuf.Parser<Test> getParserForType() {
- return PARSER;
- }
- public interface EmbedOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
- // required int64 aa = 1;
- /**
- * <code>required int64 aa = 1;</code>
- */
- boolean hasAa();
- /**
- * <code>required int64 aa = 1;</code>
- */
- long getAa();
- // optional string ab = 2;
- /**
- * <code>optional string ab = 2;</code>
- */
- boolean hasAb();
- /**
- * <code>optional string ab = 2;</code>
- */
- java.lang.String getAb();
- /**
- * <code>optional string ab = 2;</code>
- */
- com.google.protobuf.ByteString
- getAbBytes();
- }
- /**
- * Protobuf type {@code testproto.Test.Embed}
- */
- public static final class Embed extends
- com.google.protobuf.GeneratedMessage
- implements EmbedOrBuilder {
- // Use Embed.newBuilder() to construct.
- private Embed(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private Embed(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
- private static final Embed defaultInstance;
- public static Embed getDefaultInstance() {
- return defaultInstance;
- }
- public Embed getDefaultInstanceForType() {
- return defaultInstance;
- }
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Embed(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- aa_ = input.readInt64();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- ab_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return testproto.TestProto.internal_static_testproto_Test_Embed_descriptor;
- }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return testproto.TestProto.internal_static_testproto_Test_Embed_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- testproto.TestProto.Test.Embed.class, testproto.TestProto.Test.Embed.Builder.class);
- }
- public static com.google.protobuf.Parser<Embed> PARSER =
- new com.google.protobuf.AbstractParser<Embed>() {
- public Embed parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Embed(input, extensionRegistry);
- }
- };
- @java.lang.Override
- public com.google.protobuf.Parser<Embed> getParserForType() {
- return PARSER;
- }
- private int bitField0_;
- // required int64 aa = 1;
- public static final int AA_FIELD_NUMBER = 1;
- private long aa_;
- /**
- * <code>required int64 aa = 1;</code>
- */
- public boolean hasAa() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>required int64 aa = 1;</code>
- */
- public long getAa() {
- return aa_;
- }
- // optional string ab = 2;
- public static final int AB_FIELD_NUMBER = 2;
- private java.lang.Object ab_;
- /**
- * <code>optional string ab = 2;</code>
- */
- public boolean hasAb() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * <code>optional string ab = 2;</code>
- */
- public java.lang.String getAb() {
- java.lang.Object ref = ab_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- ab_ = s;
- }
- return s;
- }
- }
- /**
- * <code>optional string ab = 2;</code>
- */
- public com.google.protobuf.ByteString
- getAbBytes() {
- java.lang.Object ref = ab_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- ab_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- private void initFields() {
- aa_ = 0L;
- ab_ = "";
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
- if (!hasAa()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeInt64(1, aa_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getAbBytes());
- }
- getUnknownFields().writeTo(output);
- }
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, aa_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getAbBytes());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
- public static testproto.TestProto.Test.Embed parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static testproto.TestProto.Test.Embed parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static testproto.TestProto.Test.Embed parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static testproto.TestProto.Test.Embed parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static testproto.TestProto.Test.Embed parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static testproto.TestProto.Test.Embed parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static testproto.TestProto.Test.Embed parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static testproto.TestProto.Test.Embed parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static testproto.TestProto.Test.Embed parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static testproto.TestProto.Test.Embed parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(testproto.TestProto.Test.Embed prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code testproto.Test.Embed}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements testproto.TestProto.Test.EmbedOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return testproto.TestProto.internal_static_testproto_Test_Embed_descriptor;
- }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return testproto.TestProto.internal_static_testproto_Test_Embed_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- testproto.TestProto.Test.Embed.class, testproto.TestProto.Test.Embed.Builder.class);
- }
- // Construct using testproto.TestProto.Test.Embed.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- }
- }
- private static Builder create() {
- return new Builder();
- }
- public Builder clear() {
- super.clear();
- aa_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- ab_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return testproto.TestProto.internal_static_testproto_Test_Embed_descriptor;
- }
- public testproto.TestProto.Test.Embed getDefaultInstanceForType() {
- return testproto.TestProto.Test.Embed.getDefaultInstance();
- }
- public testproto.TestProto.Test.Embed build() {
- testproto.TestProto.Test.Embed result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
- public testproto.TestProto.Test.Embed buildPartial() {
- testproto.TestProto.Test.Embed result = new testproto.TestProto.Test.Embed(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.aa_ = aa_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.ab_ = ab_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof testproto.TestProto.Test.Embed) {
- return mergeFrom((testproto.TestProto.Test.Embed)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
- public Builder mergeFrom(testproto.TestProto.Test.Embed other) {
- if (other == testproto.TestProto.Test.Embed.getDefaultInstance()) return this;
- if (other.hasAa()) {
- setAa(other.getAa());
- }
- if (other.hasAb()) {
- bitField0_ |= 0x00000002;
- ab_ = other.ab_;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
- public final boolean isInitialized() {
- if (!hasAa()) {
-
- return false;
- }
- return true;
- }
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- testproto.TestProto.Test.Embed parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (testproto.TestProto.Test.Embed) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
- // required int64 aa = 1;
- private long aa_ ;
- /**
- * <code>required int64 aa = 1;</code>
- */
- public boolean hasAa() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>required int64 aa = 1;</code>
- */
- public long getAa() {
- return aa_;
- }
- /**
- * <code>required int64 aa = 1;</code>
- */
- public Builder setAa(long value) {
- bitField0_ |= 0x00000001;
- aa_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>required int64 aa = 1;</code>
- */
- public Builder clearAa() {
- bitField0_ = (bitField0_ & ~0x00000001);
- aa_ = 0L;
- onChanged();
- return this;
- }
- // optional string ab = 2;
- private java.lang.Object ab_ = "";
- /**
- * <code>optional string ab = 2;</code>
- */
- public boolean hasAb() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * <code>optional string ab = 2;</code>
- */
- public java.lang.String getAb() {
- java.lang.Object ref = ab_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- ab_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>optional string ab = 2;</code>
- */
- public com.google.protobuf.ByteString
- getAbBytes() {
- java.lang.Object ref = ab_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- ab_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>optional string ab = 2;</code>
- */
- public Builder setAb(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- ab_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>optional string ab = 2;</code>
- */
- public Builder clearAb() {
- bitField0_ = (bitField0_ & ~0x00000002);
- ab_ = getDefaultInstance().getAb();
- onChanged();
- return this;
- }
- /**
- * <code>optional string ab = 2;</code>
- */
- public Builder setAbBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- ab_ = value;
- onChanged();
- return this;
- }
- // @@protoc_insertion_point(builder_scope:testproto.Test.Embed)
- }
- static {
- defaultInstance = new Embed(true);
- defaultInstance.initFields();
- }
- // @@protoc_insertion_point(class_scope:testproto.Test.Embed)
- }
- private int bitField0_;
- // required string a = 1;
- public static final int A_FIELD_NUMBER = 1;
- private java.lang.Object a_;
- /**
- * <code>required string a = 1;</code>
- */
- public boolean hasA() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>required string a = 1;</code>
- */
- public java.lang.String getA() {
- java.lang.Object ref = a_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- a_ = s;
- }
- return s;
- }
- }
- /**
- * <code>required string a = 1;</code>
- */
- public com.google.protobuf.ByteString
- getABytes() {
- java.lang.Object ref = a_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- a_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- // repeated int32 b = 2;
- public static final int B_FIELD_NUMBER = 2;
- private java.util.List<java.lang.Integer> b_;
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public java.util.List<java.lang.Integer>
- getBList() {
- return b_;
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public int getBCount() {
- return b_.size();
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public int getB(int index) {
- return b_.get(index);
- }
- // repeated .testproto.Test.Embed c = 3;
- public static final int C_FIELD_NUMBER = 3;
- private java.util.List<testproto.TestProto.Test.Embed> c_;
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public java.util.List<testproto.TestProto.Test.Embed> getCList() {
- return c_;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public java.util.List<? extends testproto.TestProto.Test.EmbedOrBuilder>
- getCOrBuilderList() {
- return c_;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public int getCCount() {
- return c_.size();
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public testproto.TestProto.Test.Embed getC(int index) {
- return c_.get(index);
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public testproto.TestProto.Test.EmbedOrBuilder getCOrBuilder(
- int index) {
- return c_.get(index);
- }
- private void initFields() {
- a_ = "";
- b_ = java.util.Collections.emptyList();
- c_ = java.util.Collections.emptyList();
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
- if (!hasA()) {
- memoizedIsInitialized = 0;
- return false;
- }
- for (int i = 0; i < getCCount(); i++) {
- if (!getC(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- memoizedIsInitialized = 1;
- return true;
- }
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, getABytes());
- }
- for (int i = 0; i < b_.size(); i++) {
- output.writeInt32(2, b_.get(i));
- }
- for (int i = 0; i < c_.size(); i++) {
- output.writeMessage(3, c_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getABytes());
- }
- {
- int dataSize = 0;
- for (int i = 0; i < b_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(b_.get(i));
- }
- size += dataSize;
- size += 1 * getBList().size();
- }
- for (int i = 0; i < c_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, c_.get(i));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
- public static testproto.TestProto.Test parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static testproto.TestProto.Test parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static testproto.TestProto.Test parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static testproto.TestProto.Test parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static testproto.TestProto.Test parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static testproto.TestProto.Test parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static testproto.TestProto.Test parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static testproto.TestProto.Test parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static testproto.TestProto.Test parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static testproto.TestProto.Test parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(testproto.TestProto.Test prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code testproto.Test}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements testproto.TestProto.TestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return testproto.TestProto.internal_static_testproto_Test_descriptor;
- }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return testproto.TestProto.internal_static_testproto_Test_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- testproto.TestProto.Test.class, testproto.TestProto.Test.Builder.class);
- }
- // Construct using testproto.TestProto.Test.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- getCFieldBuilder();
- }
- }
- private static Builder create() {
- return new Builder();
- }
- public Builder clear() {
- super.clear();
- a_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- b_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- if (cBuilder_ == null) {
- c_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- cBuilder_.clear();
- }
- return this;
- }
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return testproto.TestProto.internal_static_testproto_Test_descriptor;
- }
- public testproto.TestProto.Test getDefaultInstanceForType() {
- return testproto.TestProto.Test.getDefaultInstance();
- }
- public testproto.TestProto.Test build() {
- testproto.TestProto.Test result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
- public testproto.TestProto.Test buildPartial() {
- testproto.TestProto.Test result = new testproto.TestProto.Test(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.a_ = a_;
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- b_ = java.util.Collections.unmodifiableList(b_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.b_ = b_;
- if (cBuilder_ == null) {
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- c_ = java.util.Collections.unmodifiableList(c_);
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.c_ = c_;
- } else {
- result.c_ = cBuilder_.build();
- }
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof testproto.TestProto.Test) {
- return mergeFrom((testproto.TestProto.Test)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
- public Builder mergeFrom(testproto.TestProto.Test other) {
- if (other == testproto.TestProto.Test.getDefaultInstance()) return this;
- if (other.hasA()) {
- bitField0_ |= 0x00000001;
- a_ = other.a_;
- onChanged();
- }
- if (!other.b_.isEmpty()) {
- if (b_.isEmpty()) {
- b_ = other.b_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureBIsMutable();
- b_.addAll(other.b_);
- }
- onChanged();
- }
- if (cBuilder_ == null) {
- if (!other.c_.isEmpty()) {
- if (c_.isEmpty()) {
- c_ = other.c_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureCIsMutable();
- c_.addAll(other.c_);
- }
- onChanged();
- }
- } else {
- if (!other.c_.isEmpty()) {
- if (cBuilder_.isEmpty()) {
- cBuilder_.dispose();
- cBuilder_ = null;
- c_ = other.c_;
- bitField0_ = (bitField0_ & ~0x00000004);
- cBuilder_ =
- com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
- getCFieldBuilder() : null;
- } else {
- cBuilder_.addAllMessages(other.c_);
- }
- }
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
- public final boolean isInitialized() {
- if (!hasA()) {
-
- return false;
- }
- for (int i = 0; i < getCCount(); i++) {
- if (!getC(i).isInitialized()) {
-
- return false;
- }
- }
- return true;
- }
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- testproto.TestProto.Test parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (testproto.TestProto.Test) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
- // required string a = 1;
- private java.lang.Object a_ = "";
- /**
- * <code>required string a = 1;</code>
- */
- public boolean hasA() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>required string a = 1;</code>
- */
- public java.lang.String getA() {
- java.lang.Object ref = a_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- a_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>required string a = 1;</code>
- */
- public com.google.protobuf.ByteString
- getABytes() {
- java.lang.Object ref = a_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- a_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>required string a = 1;</code>
- */
- public Builder setA(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- a_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>required string a = 1;</code>
- */
- public Builder clearA() {
- bitField0_ = (bitField0_ & ~0x00000001);
- a_ = getDefaultInstance().getA();
- onChanged();
- return this;
- }
- /**
- * <code>required string a = 1;</code>
- */
- public Builder setABytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- a_ = value;
- onChanged();
- return this;
- }
- // repeated int32 b = 2;
- private java.util.List<java.lang.Integer> b_ = java.util.Collections.emptyList();
- private void ensureBIsMutable() {
- if (!((bitField0_ & 0x00000002) == 0x00000002)) {
- b_ = new java.util.ArrayList<java.lang.Integer>(b_);
- bitField0_ |= 0x00000002;
- }
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public java.util.List<java.lang.Integer>
- getBList() {
- return java.util.Collections.unmodifiableList(b_);
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public int getBCount() {
- return b_.size();
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public int getB(int index) {
- return b_.get(index);
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public Builder setB(
- int index, int value) {
- ensureBIsMutable();
- b_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public Builder addB(int value) {
- ensureBIsMutable();
- b_.add(value);
- onChanged();
- return this;
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public Builder addAllB(
- java.lang.Iterable<? extends java.lang.Integer> values) {
- ensureBIsMutable();
- super.addAll(values, b_);
- onChanged();
- return this;
- }
- /**
- * <code>repeated int32 b = 2;</code>
- */
- public Builder clearB() {
- b_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- // repeated .testproto.Test.Embed c = 3;
- private java.util.List<testproto.TestProto.Test.Embed> c_ =
- java.util.Collections.emptyList();
- private void ensureCIsMutable() {
- if (!((bitField0_ & 0x00000004) == 0x00000004)) {
- c_ = new java.util.ArrayList<testproto.TestProto.Test.Embed>(c_);
- bitField0_ |= 0x00000004;
- }
- }
- private com.google.protobuf.RepeatedFieldBuilder<
- testproto.TestProto.Test.Embed, testproto.TestProto.Test.Embed.Builder, testproto.TestProto.Test.EmbedOrBuilder> cBuilder_;
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public java.util.List<testproto.TestProto.Test.Embed> getCList() {
- if (cBuilder_ == null) {
- return java.util.Collections.unmodifiableList(c_);
- } else {
- return cBuilder_.getMessageList();
- }
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public int getCCount() {
- if (cBuilder_ == null) {
- return c_.size();
- } else {
- return cBuilder_.getCount();
- }
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public testproto.TestProto.Test.Embed getC(int index) {
- if (cBuilder_ == null) {
- return c_.get(index);
- } else {
- return cBuilder_.getMessage(index);
- }
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder setC(
- int index, testproto.TestProto.Test.Embed value) {
- if (cBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCIsMutable();
- c_.set(index, value);
- onChanged();
- } else {
- cBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder setC(
- int index, testproto.TestProto.Test.Embed.Builder builderForValue) {
- if (cBuilder_ == null) {
- ensureCIsMutable();
- c_.set(index, builderForValue.build());
- onChanged();
- } else {
- cBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder addC(testproto.TestProto.Test.Embed value) {
- if (cBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCIsMutable();
- c_.add(value);
- onChanged();
- } else {
- cBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder addC(
- int index, testproto.TestProto.Test.Embed value) {
- if (cBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCIsMutable();
- c_.add(index, value);
- onChanged();
- } else {
- cBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder addC(
- testproto.TestProto.Test.Embed.Builder builderForValue) {
- if (cBuilder_ == null) {
- ensureCIsMutable();
- c_.add(builderForValue.build());
- onChanged();
- } else {
- cBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder addC(
- int index, testproto.TestProto.Test.Embed.Builder builderForValue) {
- if (cBuilder_ == null) {
- ensureCIsMutable();
- c_.add(index, builderForValue.build());
- onChanged();
- } else {
- cBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder addAllC(
- java.lang.Iterable<? extends testproto.TestProto.Test.Embed> values) {
- if (cBuilder_ == null) {
- ensureCIsMutable();
- super.addAll(values, c_);
- onChanged();
- } else {
- cBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder clearC() {
- if (cBuilder_ == null) {
- c_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- } else {
- cBuilder_.clear();
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public Builder removeC(int index) {
- if (cBuilder_ == null) {
- ensureCIsMutable();
- c_.remove(index);
- onChanged();
- } else {
- cBuilder_.remove(index);
- }
- return this;
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public testproto.TestProto.Test.Embed.Builder getCBuilder(
- int index) {
- return getCFieldBuilder().getBuilder(index);
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public testproto.TestProto.Test.EmbedOrBuilder getCOrBuilder(
- int index) {
- if (cBuilder_ == null) {
- return c_.get(index); } else {
- return cBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public java.util.List<? extends testproto.TestProto.Test.EmbedOrBuilder>
- getCOrBuilderList() {
- if (cBuilder_ != null) {
- return cBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(c_);
- }
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public testproto.TestProto.Test.Embed.Builder addCBuilder() {
- return getCFieldBuilder().addBuilder(
- testproto.TestProto.Test.Embed.getDefaultInstance());
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public testproto.TestProto.Test.Embed.Builder addCBuilder(
- int index) {
- return getCFieldBuilder().addBuilder(
- index, testproto.TestProto.Test.Embed.getDefaultInstance());
- }
- /**
- * <code>repeated .testproto.Test.Embed c = 3;</code>
- */
- public java.util.List<testproto.TestProto.Test.Embed.Builder>
- getCBuilderList() {
- return getCFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilder<
- testproto.TestProto.Test.Embed, testproto.TestProto.Test.Embed.Builder, testproto.TestProto.Test.EmbedOrBuilder>
- getCFieldBuilder() {
- if (cBuilder_