// Generated by the protocol buffer compiler. DO NOT EDIT! // source: com/google/protobuf/lazy_fields_lite.proto package protobuf_unittest; public final class LazyFieldsLite { private LazyFieldsLite() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public interface LazyMessageLiteOrBuilder extends // @@protoc_insertion_point(interface_extends:protobuf_unittest.LazyMessageLite) com.google.protobuf.MessageLiteOrBuilder { /** * <code>optional int32 num = 1;</code> */ boolean hasNum(); /** * <code>optional int32 num = 1;</code> */ int getNum(); /** * <code>optional int32 num_with_default = 2 [default = 421];</code> */ boolean hasNumWithDefault(); /** * <code>optional int32 num_with_default = 2 [default = 421];</code> */ int getNumWithDefault(); /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ boolean hasInner(); /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getInner(); /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ java.util.List<protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite> getRepeatedInnerList(); /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getRepeatedInner(int index); /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ int getRepeatedInnerCount(); /** * <code>optional int32 oneof_num = 5;</code> */ boolean hasOneofNum(); /** * <code>optional int32 oneof_num = 5;</code> */ int getOneofNum(); /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ boolean hasOneofInner(); /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getOneofInner(); } /** * Protobuf type {@code protobuf_unittest.LazyMessageLite} */ public static final class LazyMessageLite extends com.google.protobuf.GeneratedMessageLite implements // @@protoc_insertion_point(message_implements:protobuf_unittest.LazyMessageLite) LazyMessageLiteOrBuilder { // Use LazyMessageLite.newBuilder() to construct. private LazyMessageLite(com.google.protobuf.GeneratedMessageLite.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private LazyMessageLite(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;} private static final LazyMessageLite defaultInstance; public static LazyMessageLite getDefaultInstance() { return defaultInstance; } public LazyMessageLite getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.ByteString unknownFields; private LazyMessageLite( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.ByteString.Output unknownFieldsOutput = com.google.protobuf.ByteString.newOutput(); com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput = com.google.protobuf.CodedOutputStream.newInstance( unknownFieldsOutput); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFieldsCodedOutput, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; num_ = input.readInt32(); break; } case 16: { bitField0_ |= 0x00000002; numWithDefault_ = input.readInt32(); break; } case 26: { inner_.setByteString(input.readBytes(), extensionRegistry); bitField0_ |= 0x00000004;; break; } case 34: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { repeatedInner_ = new java.util.ArrayList<com.google.protobuf.LazyFieldLite>(); mutable_bitField0_ |= 0x00000008; } repeatedInner_.add(new com.google.protobuf.LazyFieldLite( extensionRegistry, input.readBytes())); break; } case 40: { oneofFieldCase_ = 5; oneofField_ = input.readInt32(); break; } case 50: { if (!(oneofFieldCase_ == 6)) { oneofField_ = new com.google.protobuf.LazyFieldLite(); } ((com.google.protobuf.LazyFieldLite) oneofField_).setByteString( input.readBytes(), extensionRegistry); oneofFieldCase_ = 6; 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_ & 0x00000008) == 0x00000008)) { repeatedInner_ = java.util.Collections.unmodifiableList(repeatedInner_); } try { unknownFieldsCodedOutput.flush(); } catch (java.io.IOException e) { // Should not happen } finally { unknownFields = unknownFieldsOutput.toByteString(); } makeExtensionsImmutable(); } } public static com.google.protobuf.Parser<LazyMessageLite> PARSER = new com.google.protobuf.AbstractParser<LazyMessageLite>() { public LazyMessageLite parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new LazyMessageLite(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<LazyMessageLite> getParserForType() { return PARSER; } private int bitField0_; private int oneofFieldCase_ = 0; private java.lang.Object oneofField_; public enum OneofFieldCase implements com.google.protobuf.Internal.EnumLite { ONEOF_NUM(5), ONEOF_INNER(6), ONEOFFIELD_NOT_SET(0); private int value = 0; private OneofFieldCase(int value) { this.value = value; } public static OneofFieldCase valueOf(int value) { switch (value) { case 5: return ONEOF_NUM; case 6: return ONEOF_INNER; case 0: return ONEOFFIELD_NOT_SET; default: throw new java.lang.IllegalArgumentException( "Value is undefined for this oneof enum."); } } public int getNumber() { return this.value; } }; public OneofFieldCase getOneofFieldCase() { return OneofFieldCase.valueOf( oneofFieldCase_); } public static final int NUM_FIELD_NUMBER = 1; private int num_; /** * <code>optional int32 num = 1;</code> */ public boolean hasNum() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional int32 num = 1;</code> */ public int getNum() { return num_; } public static final int NUM_WITH_DEFAULT_FIELD_NUMBER = 2; private int numWithDefault_; /** * <code>optional int32 num_with_default = 2 [default = 421];</code> */ public boolean hasNumWithDefault() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional int32 num_with_default = 2 [default = 421];</code> */ public int getNumWithDefault() { return numWithDefault_; } public static final int INNER_FIELD_NUMBER = 3; private com.google.protobuf.LazyFieldLite inner_ = new com.google.protobuf.LazyFieldLite(); /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ public boolean hasInner() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getInner() { return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) inner_.getValue(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()); } public static final int REPEATED_INNER_FIELD_NUMBER = 4; private java.util.List<com.google.protobuf.LazyFieldLite> repeatedInner_; /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public java.util.List<protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite> getRepeatedInnerList() { java.util.List<protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite> list = new java.util.ArrayList<protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite>(repeatedInner_.size()); for (com.google.protobuf.LazyFieldLite lf : repeatedInner_) { list.add((protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) lf.getValue(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance())); } return list; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public java.util.List<? extends protobuf_unittest.LazyFieldsLite.LazyInnerMessageLiteOrBuilder> getRepeatedInnerOrBuilderList() { return getRepeatedInnerList(); } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public int getRepeatedInnerCount() { return repeatedInner_.size(); } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getRepeatedInner(int index) { return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) repeatedInner_.get(index).getValue(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()); } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLiteOrBuilder getRepeatedInnerOrBuilder( int index) { return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLiteOrBuilder) repeatedInner_.get(index).getValue(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()); } public static final int ONEOF_NUM_FIELD_NUMBER = 5; /** * <code>optional int32 oneof_num = 5;</code> */ public boolean hasOneofNum() { return oneofFieldCase_ == 5; } /** * <code>optional int32 oneof_num = 5;</code> */ public int getOneofNum() { if (oneofFieldCase_ == 5) { return (java.lang.Integer) oneofField_; } return 0; } public static final int ONEOF_INNER_FIELD_NUMBER = 6; /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ public boolean hasOneofInner() { return oneofFieldCase_ == 6; } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getOneofInner() { if (oneofFieldCase_ == 6) { return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) ((com.google.protobuf.LazyFieldLite) oneofField_).getValue( protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()); } return protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance(); } private void initFields() { num_ = 0; numWithDefault_ = 421; inner_.clear(); repeatedInner_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 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.writeInt32(1, num_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, numWithDefault_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, inner_.toByteString()); } for (int i = 0; i < repeatedInner_.size(); i++) { output.writeBytes(4, repeatedInner_.get(i).toByteString()); } if (oneofFieldCase_ == 5) { output.writeInt32( 5, (int)((java.lang.Integer) oneofField_)); } if (oneofFieldCase_ == 6) { output.writeBytes( 6, ((com.google.protobuf.LazyFieldLite) oneofField_).toByteString()); } output.writeRawBytes(unknownFields); } 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 .computeInt32Size(1, num_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, numWithDefault_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeLazyFieldSize(3, inner_); } for (int i = 0; i < repeatedInner_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeLazyFieldSize(4, repeatedInner_.get(i)); } if (oneofFieldCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeInt32Size( 5, (int)((java.lang.Integer) oneofField_)); } if (oneofFieldCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeLazyFieldSize(6, (com.google.protobuf.LazyFieldLite) oneofField_); } size += unknownFields.size(); 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 protobuf_unittest.LazyFieldsLite.LazyMessageLite parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyMessageLite 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(protobuf_unittest.LazyFieldsLite.LazyMessageLite prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } /** * Protobuf type {@code protobuf_unittest.LazyMessageLite} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< protobuf_unittest.LazyFieldsLite.LazyMessageLite, Builder> implements // @@protoc_insertion_point(builder_implements:protobuf_unittest.LazyMessageLite) protobuf_unittest.LazyFieldsLite.LazyMessageLiteOrBuilder { // Construct using protobuf_unittest.LazyFieldsLite.LazyMessageLite.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); num_ = 0; bitField0_ = (bitField0_ & ~0x00000001); numWithDefault_ = 421; bitField0_ = (bitField0_ & ~0x00000002); inner_.clear(); bitField0_ = (bitField0_ & ~0x00000004);; repeatedInner_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); oneofFieldCase_ = 0; oneofField_ = null; return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public protobuf_unittest.LazyFieldsLite.LazyMessageLite getDefaultInstanceForType() { return protobuf_unittest.LazyFieldsLite.LazyMessageLite.getDefaultInstance(); } public protobuf_unittest.LazyFieldsLite.LazyMessageLite build() { protobuf_unittest.LazyFieldsLite.LazyMessageLite result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public protobuf_unittest.LazyFieldsLite.LazyMessageLite buildPartial() { protobuf_unittest.LazyFieldsLite.LazyMessageLite result = new protobuf_unittest.LazyFieldsLite.LazyMessageLite(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.num_ = num_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.numWithDefault_ = numWithDefault_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.inner_.setByteString( inner_.toByteString(), inner_.getExtensionRegistry()); if (((bitField0_ & 0x00000008) == 0x00000008)) { repeatedInner_ = java.util.Collections.unmodifiableList(repeatedInner_); bitField0_ = (bitField0_ & ~0x00000008); } result.repeatedInner_ = repeatedInner_; if (oneofFieldCase_ == 5) { result.oneofField_ = oneofField_; } if (oneofFieldCase_ == 6) { result.oneofField_ = new com.google.protobuf.LazyFieldLite(); ((com.google.protobuf.LazyFieldLite) result.oneofField_).setByteString( ((com.google.protobuf.LazyFieldLite) oneofField_).toByteString(), ((com.google.protobuf.LazyFieldLite) oneofField_).getExtensionRegistry()); } result.bitField0_ = to_bitField0_; result.oneofFieldCase_ = oneofFieldCase_; return result; } public Builder mergeFrom(protobuf_unittest.LazyFieldsLite.LazyMessageLite other) { if (other == protobuf_unittest.LazyFieldsLite.LazyMessageLite.getDefaultInstance()) return this; if (other.hasNum()) { setNum(other.getNum()); } if (other.hasNumWithDefault()) { setNumWithDefault(other.getNumWithDefault()); } if (other.hasInner()) { inner_.merge(other.inner_); bitField0_ |= 0x00000004;; } if (!other.repeatedInner_.isEmpty()) { if (repeatedInner_.isEmpty()) { repeatedInner_ = other.repeatedInner_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureRepeatedInnerIsMutable(); repeatedInner_.addAll(other.repeatedInner_); } } switch (other.getOneofFieldCase()) { case ONEOF_NUM: { setOneofNum(other.getOneofNum()); break; } case ONEOF_INNER: { if (!(oneofFieldCase_ == 6)) { oneofField_ = new com.google.protobuf.LazyFieldLite(); } ((com.google.protobuf.LazyFieldLite) oneofField_).merge( (com.google.protobuf.LazyFieldLite) other.oneofField_); oneofFieldCase_ = 6; break; } case ONEOFFIELD_NOT_SET: { break; } } setUnknownFields( getUnknownFields().concat(other.unknownFields)); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { protobuf_unittest.LazyFieldsLite.LazyMessageLite parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (protobuf_unittest.LazyFieldsLite.LazyMessageLite) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int oneofFieldCase_ = 0; private java.lang.Object oneofField_; public OneofFieldCase getOneofFieldCase() { return OneofFieldCase.valueOf( oneofFieldCase_); } public Builder clearOneofField() { oneofFieldCase_ = 0; oneofField_ = null; return this; } private int bitField0_; private int num_ ; /** * <code>optional int32 num = 1;</code> */ public boolean hasNum() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional int32 num = 1;</code> */ public int getNum() { return num_; } /** * <code>optional int32 num = 1;</code> */ public Builder setNum(int value) { bitField0_ |= 0x00000001; num_ = value; return this; } /** * <code>optional int32 num = 1;</code> */ public Builder clearNum() { bitField0_ = (bitField0_ & ~0x00000001); num_ = 0; return this; } private int numWithDefault_ = 421; /** * <code>optional int32 num_with_default = 2 [default = 421];</code> */ public boolean hasNumWithDefault() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional int32 num_with_default = 2 [default = 421];</code> */ public int getNumWithDefault() { return numWithDefault_; } /** * <code>optional int32 num_with_default = 2 [default = 421];</code> */ public Builder setNumWithDefault(int value) { bitField0_ |= 0x00000002; numWithDefault_ = value; return this; } /** * <code>optional int32 num_with_default = 2 [default = 421];</code> */ public Builder clearNumWithDefault() { bitField0_ = (bitField0_ & ~0x00000002); numWithDefault_ = 421; return this; } private com.google.protobuf.LazyFieldLite inner_ = new com.google.protobuf.LazyFieldLite(); /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ public boolean hasInner() { return ((bitField0_ & 0x00000004) == 0x00000004); } public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getInner() { return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) inner_.getValue(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()); } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ public Builder setInner(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite value) { if (value == null) { throw new NullPointerException(); } inner_.setValue(value); bitField0_ |= 0x00000004;; return this; } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ public Builder setInner( protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) { inner_.setValue(builderForValue.build()); bitField0_ |= 0x00000004;; return this; } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ public Builder mergeInner(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite value) { if (((bitField0_ & 0x00000004) == 0x00000004) && !inner_.containsDefaultInstance()) { inner_.setValue( protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.newBuilder( getInner()).mergeFrom(value).buildPartial()); } else { inner_.setValue(value); } bitField0_ |= 0x00000004;; return this; } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];</code> */ public Builder clearInner() { inner_.clear(); bitField0_ = (bitField0_ & ~0x00000004);; return this; } private java.util.List<com.google.protobuf.LazyFieldLite> repeatedInner_ = java.util.Collections.emptyList(); private void ensureRepeatedInnerIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { repeatedInner_ = new java.util.ArrayList<com.google.protobuf.LazyFieldLite>( repeatedInner_); bitField0_ |= 0x00000008; } } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public java.util.List<protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite> getRepeatedInnerList() { java.util.List<protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite> list = new java.util.ArrayList<protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite>(repeatedInner_.size()); for (com.google.protobuf.LazyFieldLite lf : repeatedInner_) { list.add((protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) lf.getValue(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance())); } return java.util.Collections.unmodifiableList(list); } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public int getRepeatedInnerCount() { return repeatedInner_.size(); } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getRepeatedInner(int index) { return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) repeatedInner_.get(index).getValue( protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()); } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder setRepeatedInner( int index, protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite value) { if (value == null) { throw new NullPointerException(); } ensureRepeatedInnerIsMutable(); repeatedInner_.set(index, com.google.protobuf.LazyFieldLite.fromValue(value)); return this; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder setRepeatedInner( int index, protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) { ensureRepeatedInnerIsMutable(); repeatedInner_.set(index, com.google.protobuf.LazyFieldLite.fromValue( builderForValue.build())); return this; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder addRepeatedInner(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite value) { if (value == null) { throw new NullPointerException(); } ensureRepeatedInnerIsMutable(); repeatedInner_.add(com.google.protobuf.LazyFieldLite.fromValue(value)); return this; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder addRepeatedInner( int index, protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite value) { if (value == null) { throw new NullPointerException(); } ensureRepeatedInnerIsMutable(); repeatedInner_.add(index, com.google.protobuf.LazyFieldLite.fromValue(value)); return this; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder addRepeatedInner( protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) { ensureRepeatedInnerIsMutable(); repeatedInner_.add(com.google.protobuf.LazyFieldLite.fromValue( builderForValue.build())); return this; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder addRepeatedInner( int index, protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) { ensureRepeatedInnerIsMutable(); repeatedInner_.add(index, com.google.protobuf.LazyFieldLite.fromValue( builderForValue.build())); return this; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder addAllRepeatedInner( java.lang.Iterable<? extends protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite> values) { ensureRepeatedInnerIsMutable(); for (com.google.protobuf.MessageLite v : values) { repeatedInner_.add(com.google.protobuf.LazyFieldLite.fromValue(v)); } return this; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder clearRepeatedInner() { repeatedInner_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); return this; } /** * <code>repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];</code> */ public Builder removeRepeatedInner(int index) { ensureRepeatedInnerIsMutable(); repeatedInner_.remove(index); return this; } /** * <code>optional int32 oneof_num = 5;</code> */ public boolean hasOneofNum() { return oneofFieldCase_ == 5; } /** * <code>optional int32 oneof_num = 5;</code> */ public int getOneofNum() { if (oneofFieldCase_ == 5) { return (java.lang.Integer) oneofField_; } return 0; } /** * <code>optional int32 oneof_num = 5;</code> */ public Builder setOneofNum(int value) { oneofFieldCase_ = 5; oneofField_ = value; return this; } /** * <code>optional int32 oneof_num = 5;</code> */ public Builder clearOneofNum() { if (oneofFieldCase_ == 5) { oneofFieldCase_ = 0; oneofField_ = null; } return this; } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ public boolean hasOneofInner() { return oneofFieldCase_ == 6; } public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getOneofInner() { if (oneofFieldCase_ == 6) { return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) ((com.google.protobuf.LazyFieldLite) oneofField_).getValue( protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()); } return protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance(); } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ public Builder setOneofInner(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite value) { if (value == null) { throw new NullPointerException(); } if (!(oneofFieldCase_ == 6)) { oneofField_ = new com.google.protobuf.LazyFieldLite(); oneofFieldCase_ = 6; } ((com.google.protobuf.LazyFieldLite) oneofField_).setValue(value); return this; } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ public Builder setOneofInner( protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) { if (!(oneofFieldCase_ == 6)) { oneofField_ = new com.google.protobuf.LazyFieldLite(); oneofFieldCase_ = 6; } ((com.google.protobuf.LazyFieldLite) oneofField_).setValue(builderForValue.build()); return this; } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ public Builder mergeOneofInner(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite value) { if (oneofFieldCase_ == 6 && !((com.google.protobuf.LazyFieldLite) oneofField_).containsDefaultInstance()) { ((com.google.protobuf.LazyFieldLite) oneofField_).setValue( protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.newBuilder( getOneofInner()).mergeFrom(value).buildPartial()); } else { if (!(oneofFieldCase_ == 6)) { oneofField_ = new com.google.protobuf.LazyFieldLite(); oneofFieldCase_ = 6; } ((com.google.protobuf.LazyFieldLite) oneofField_).setValue(value); } return this; } /** * <code>optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];</code> */ public Builder clearOneofInner() { if (oneofFieldCase_ == 6) { oneofFieldCase_ = 0; oneofField_ = null; } return this; } // @@protoc_insertion_point(builder_scope:protobuf_unittest.LazyMessageLite) } static { defaultInstance = new LazyMessageLite(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:protobuf_unittest.LazyMessageLite) } public interface LazyInnerMessageLiteOrBuilder extends // @@protoc_insertion_point(interface_extends:protobuf_unittest.LazyInnerMessageLite) com.google.protobuf.MessageLiteOrBuilder { /** * <code>optional int32 num = 1;</code> */ boolean hasNum(); /** * <code>optional int32 num = 1;</code> */ int getNum(); /** * <code>optional int32 num_with_default = 2 [default = 42];</code> */ boolean hasNumWithDefault(); /** * <code>optional int32 num_with_default = 2 [default = 42];</code> */ int getNumWithDefault(); /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ boolean hasNested(); /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite getNested(); } /** * Protobuf type {@code protobuf_unittest.LazyInnerMessageLite} */ public static final class LazyInnerMessageLite extends com.google.protobuf.GeneratedMessageLite implements // @@protoc_insertion_point(message_implements:protobuf_unittest.LazyInnerMessageLite) LazyInnerMessageLiteOrBuilder { // Use LazyInnerMessageLite.newBuilder() to construct. private LazyInnerMessageLite(com.google.protobuf.GeneratedMessageLite.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private LazyInnerMessageLite(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;} private static final LazyInnerMessageLite defaultInstance; public static LazyInnerMessageLite getDefaultInstance() { return defaultInstance; } public LazyInnerMessageLite getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.ByteString unknownFields; private LazyInnerMessageLite( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.ByteString.Output unknownFieldsOutput = com.google.protobuf.ByteString.newOutput(); com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput = com.google.protobuf.CodedOutputStream.newInstance( unknownFieldsOutput); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFieldsCodedOutput, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; num_ = input.readInt32(); break; } case 16: { bitField0_ |= 0x00000002; numWithDefault_ = input.readInt32(); break; } case 26: { nested_.setByteString(input.readBytes(), extensionRegistry); bitField0_ |= 0x00000004;; 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 { try { unknownFieldsCodedOutput.flush(); } catch (java.io.IOException e) { // Should not happen } finally { unknownFields = unknownFieldsOutput.toByteString(); } makeExtensionsImmutable(); } } public static com.google.protobuf.Parser<LazyInnerMessageLite> PARSER = new com.google.protobuf.AbstractParser<LazyInnerMessageLite>() { public LazyInnerMessageLite parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new LazyInnerMessageLite(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<LazyInnerMessageLite> getParserForType() { return PARSER; } private int bitField0_; public static final int NUM_FIELD_NUMBER = 1; private int num_; /** * <code>optional int32 num = 1;</code> */ public boolean hasNum() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional int32 num = 1;</code> */ public int getNum() { return num_; } public static final int NUM_WITH_DEFAULT_FIELD_NUMBER = 2; private int numWithDefault_; /** * <code>optional int32 num_with_default = 2 [default = 42];</code> */ public boolean hasNumWithDefault() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional int32 num_with_default = 2 [default = 42];</code> */ public int getNumWithDefault() { return numWithDefault_; } public static final int NESTED_FIELD_NUMBER = 3; private com.google.protobuf.LazyFieldLite nested_ = new com.google.protobuf.LazyFieldLite(); /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ public boolean hasNested() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ public protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite getNested() { return (protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite) nested_.getValue(protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite.getDefaultInstance()); } private void initFields() { num_ = 0; numWithDefault_ = 42; nested_.clear(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 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.writeInt32(1, num_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, numWithDefault_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, nested_.toByteString()); } output.writeRawBytes(unknownFields); } 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 .computeInt32Size(1, num_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, numWithDefault_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeLazyFieldSize(3, nested_); } size += unknownFields.size(); 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 protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite 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(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } /** * Protobuf type {@code protobuf_unittest.LazyInnerMessageLite} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite, Builder> implements // @@protoc_insertion_point(builder_implements:protobuf_unittest.LazyInnerMessageLite) protobuf_unittest.LazyFieldsLite.LazyInnerMessageLiteOrBuilder { // Construct using protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); num_ = 0; bitField0_ = (bitField0_ & ~0x00000001); numWithDefault_ = 42; bitField0_ = (bitField0_ & ~0x00000002); nested_.clear(); bitField0_ = (bitField0_ & ~0x00000004);; return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getDefaultInstanceForType() { return protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance(); } public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite build() { protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite buildPartial() { protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite result = new protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.num_ = num_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.numWithDefault_ = numWithDefault_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.nested_.setByteString( nested_.toByteString(), nested_.getExtensionRegistry()); result.bitField0_ = to_bitField0_; return result; } public Builder mergeFrom(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite other) { if (other == protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()) return this; if (other.hasNum()) { setNum(other.getNum()); } if (other.hasNumWithDefault()) { setNumWithDefault(other.getNumWithDefault()); } if (other.hasNested()) { nested_.merge(other.nested_); bitField0_ |= 0x00000004;; } setUnknownFields( getUnknownFields().concat(other.unknownFields)); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int num_ ; /** * <code>optional int32 num = 1;</code> */ public boolean hasNum() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional int32 num = 1;</code> */ public int getNum() { return num_; } /** * <code>optional int32 num = 1;</code> */ public Builder setNum(int value) { bitField0_ |= 0x00000001; num_ = value; return this; } /** * <code>optional int32 num = 1;</code> */ public Builder clearNum() { bitField0_ = (bitField0_ & ~0x00000001); num_ = 0; return this; } private int numWithDefault_ = 42; /** * <code>optional int32 num_with_default = 2 [default = 42];</code> */ public boolean hasNumWithDefault() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional int32 num_with_default = 2 [default = 42];</code> */ public int getNumWithDefault() { return numWithDefault_; } /** * <code>optional int32 num_with_default = 2 [default = 42];</code> */ public Builder setNumWithDefault(int value) { bitField0_ |= 0x00000002; numWithDefault_ = value; return this; } /** * <code>optional int32 num_with_default = 2 [default = 42];</code> */ public Builder clearNumWithDefault() { bitField0_ = (bitField0_ & ~0x00000002); numWithDefault_ = 42; return this; } private com.google.protobuf.LazyFieldLite nested_ = new com.google.protobuf.LazyFieldLite(); /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ public boolean hasNested() { return ((bitField0_ & 0x00000004) == 0x00000004); } public protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite getNested() { return (protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite) nested_.getValue(protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite.getDefaultInstance()); } /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ public Builder setNested(protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite value) { if (value == null) { throw new NullPointerException(); } nested_.setValue(value); bitField0_ |= 0x00000004;; return this; } /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ public Builder setNested( protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite.Builder builderForValue) { nested_.setValue(builderForValue.build()); bitField0_ |= 0x00000004;; return this; } /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ public Builder mergeNested(protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite value) { if (((bitField0_ & 0x00000004) == 0x00000004) && !nested_.containsDefaultInstance()) { nested_.setValue( protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite.newBuilder( getNested()).mergeFrom(value).buildPartial()); } else { nested_.setValue(value); } bitField0_ |= 0x00000004;; return this; } /** * <code>optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];</code> */ public Builder clearNested() { nested_.clear(); bitField0_ = (bitField0_ & ~0x00000004);; return this; } // @@protoc_insertion_point(builder_scope:protobuf_unittest.LazyInnerMessageLite) } static { defaultInstance = new LazyInnerMessageLite(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:protobuf_unittest.LazyInnerMessageLite) } public interface LazyNestedInnerMessageLiteOrBuilder extends // @@protoc_insertion_point(interface_extends:protobuf_unittest.LazyNestedInnerMessageLite) com.google.protobuf.MessageLiteOrBuilder { /** * <code>optional int32 num = 1;</code> */ boolean hasNum(); /** * <code>optional int32 num = 1;</code> */ int getNum(); /** * <code>optional int32 num_with_default = 2 [default = 4];</code> */ boolean hasNumWithDefault(); /** * <code>optional int32 num_with_default = 2 [default = 4];</code> */ int getNumWithDefault(); } /** * Protobuf type {@code protobuf_unittest.LazyNestedInnerMessageLite} */ public static final class LazyNestedInnerMessageLite extends com.google.protobuf.GeneratedMessageLite implements // @@protoc_insertion_point(message_implements:protobuf_unittest.LazyNestedInnerMessageLite) LazyNestedInnerMessageLiteOrBuilder { // Use LazyNestedInnerMessageLite.newBuilder() to construct. private LazyNestedInnerMessageLite(com.google.protobuf.GeneratedMessageLite.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private LazyNestedInnerMessageLite(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;} private static final LazyNestedInnerMessageLite defaultInstance; public static LazyNestedInnerMessageLite getDefaultInstance() { return defaultInstance; } public LazyNestedInnerMessageLite getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.ByteString unknownFields; private LazyNestedInnerMessageLite( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.ByteString.Output unknownFieldsOutput = com.google.protobuf.ByteString.newOutput(); com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput = com.google.protobuf.CodedOutputStream.newInstance( unknownFieldsOutput); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFieldsCodedOutput, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; num_ = input.readInt32(); break; } case 16: { bitField0_ |= 0x00000002; numWithDefault_ = input.readInt32(); 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 { try { unknownFieldsCodedOutput.flush(); } catch (java.io.IOException e) { // Should not happen } finally { unknownFields = unknownFieldsOutput.toByteString(); } makeExtensionsImmutable(); } } public static com.google.protobuf.Parser<LazyNestedInnerMessageLite> PARSER = new com.google.protobuf.AbstractParser<LazyNestedInnerMessageLite>() { public LazyNestedInnerMessageLite parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new LazyNestedInnerMessageLite(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<LazyNestedInnerMessageLite> getParserForType() { return PARSER; } private int bitField0_; public static final int NUM_FIELD_NUMBER = 1; private int num_; /** * <code>optional int32 num = 1;</code> */ public boolean hasNum() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional int32 num = 1;</code> */ public int getNum() { return num_; } public static final int NUM_WITH_DEFAULT_FIELD_NUMBER = 2; private int numWithDefault_; /** * <code>optional int32 num_with_default = 2 [default = 4];</code> */ public boolean hasNumWithDefault() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional int32 num_with_default = 2 [default = 4];</code> */ public int getNumWithDefault() { return numWithDefault_; } private void initFields() { num_ = 0; numWithDefault_ = 4; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 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.writeInt32(1, num_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, numWithDefault_); } output.writeRawBytes(unknownFields); } 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 .computeInt32Size(1, num_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, numWithDefault_); } size += unknownFields.size(); 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 protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite 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(protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } /** * Protobuf type {@code protobuf_unittest.LazyNestedInnerMessageLite} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite, Builder> implements // @@protoc_insertion_point(builder_implements:protobuf_unittest.LazyNestedInnerMessageLite) protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLiteOrBuilder { // Construct using protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); num_ = 0; bitField0_ = (bitField0_ & ~0x00000001); numWithDefault_ = 4; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite getDefaultInstanceForType() { return protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite.getDefaultInstance(); } public protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite build() { protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite buildPartial() { protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite result = new protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.num_ = num_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.numWithDefault_ = numWithDefault_; result.bitField0_ = to_bitField0_; return result; } public Builder mergeFrom(protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite other) { if (other == protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite.getDefaultInstance()) return this; if (other.hasNum()) { setNum(other.getNum()); } if (other.hasNumWithDefault()) { setNumWithDefault(other.getNumWithDefault()); } setUnknownFields( getUnknownFields().concat(other.unknownFields)); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int num_ ; /** * <code>optional int32 num = 1;</code> */ public boolean hasNum() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional int32 num = 1;</code> */ public int getNum() { return num_; } /** * <code>optional int32 num = 1;</code> */ public Builder setNum(int value) { bitField0_ |= 0x00000001; num_ = value; return this; } /** * <code>optional int32 num = 1;</code> */ public Builder clearNum() { bitField0_ = (bitField0_ & ~0x00000001); num_ = 0; return this; } private int numWithDefault_ = 4; /** * <code>optional int32 num_with_default = 2 [default = 4];</code> */ public boolean hasNumWithDefault() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional int32 num_with_default = 2 [default = 4];</code> */ public int getNumWithDefault() { return numWithDefault_; } /** * <code>optional int32 num_with_default = 2 [default = 4];</code> */ public Builder setNumWithDefault(int value) { bitField0_ |= 0x00000002; numWithDefault_ = value; return this; } /** * <code>optional int32 num_with_default = 2 [default = 4];</code> */ public Builder clearNumWithDefault() { bitField0_ = (bitField0_ & ~0x00000002); numWithDefault_ = 4; return this; } // @@protoc_insertion_point(builder_scope:protobuf_unittest.LazyNestedInnerMessageLite) } static { defaultInstance = new LazyNestedInnerMessageLite(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:protobuf_unittest.LazyNestedInnerMessageLite) } static { } // @@protoc_insertion_point(outer_class_scope) }