protobuf_unittest.LazyFieldsLite Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobufel-protobuf-test-protos Show documentation
Show all versions of protobufel-protobuf-test-protos Show documentation
Shared Test Resources - test .proto files
The newest version!
// 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 {
/**
* optional int32 num = 1;
*/
boolean hasNum();
/**
* optional int32 num = 1;
*/
int getNum();
/**
* optional int32 num_with_default = 2 [default = 421];
*/
boolean hasNumWithDefault();
/**
* optional int32 num_with_default = 2 [default = 421];
*/
int getNumWithDefault();
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
boolean hasInner();
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getInner();
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
java.util.List
getRepeatedInnerList();
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getRepeatedInner(int index);
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
int getRepeatedInnerCount();
/**
* optional int32 oneof_num = 5;
*/
boolean hasOneofNum();
/**
* optional int32 oneof_num = 5;
*/
int getOneofNum();
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
boolean hasOneofInner();
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
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();
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 PARSER =
new com.google.protobuf.AbstractParser() {
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 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_;
/**
* optional int32 num = 1;
*/
public boolean hasNum() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 num = 1;
*/
public int getNum() {
return num_;
}
public static final int NUM_WITH_DEFAULT_FIELD_NUMBER = 2;
private int numWithDefault_;
/**
* optional int32 num_with_default = 2 [default = 421];
*/
public boolean hasNumWithDefault() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 num_with_default = 2 [default = 421];
*/
public int getNumWithDefault() {
return numWithDefault_;
}
public static final int INNER_FIELD_NUMBER = 3;
private com.google.protobuf.LazyFieldLite inner_ =
new com.google.protobuf.LazyFieldLite();
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
public boolean hasInner() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
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 repeatedInner_;
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public java.util.List
getRepeatedInnerList() {
java.util.List list =
new java.util.ArrayList(repeatedInner_.size());
for (com.google.protobuf.LazyFieldLite lf : repeatedInner_) {
list.add((protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) lf.getValue(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance()));
}
return list;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public java.util.List extends protobuf_unittest.LazyFieldsLite.LazyInnerMessageLiteOrBuilder>
getRepeatedInnerOrBuilderList() {
return getRepeatedInnerList();
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public int getRepeatedInnerCount() {
return repeatedInner_.size();
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getRepeatedInner(int index) {
return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite)
repeatedInner_.get(index).getValue(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance());
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
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;
/**
* optional int32 oneof_num = 5;
*/
public boolean hasOneofNum() {
return oneofFieldCase_ == 5;
}
/**
* optional int32 oneof_num = 5;
*/
public int getOneofNum() {
if (oneofFieldCase_ == 5) {
return (java.lang.Integer) oneofField_;
}
return 0;
}
public static final int ONEOF_INNER_FIELD_NUMBER = 6;
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
public boolean hasOneofInner() {
return oneofFieldCase_ == 6;
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
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_ ;
/**
* optional int32 num = 1;
*/
public boolean hasNum() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 num = 1;
*/
public int getNum() {
return num_;
}
/**
* optional int32 num = 1;
*/
public Builder setNum(int value) {
bitField0_ |= 0x00000001;
num_ = value;
return this;
}
/**
* optional int32 num = 1;
*/
public Builder clearNum() {
bitField0_ = (bitField0_ & ~0x00000001);
num_ = 0;
return this;
}
private int numWithDefault_ = 421;
/**
* optional int32 num_with_default = 2 [default = 421];
*/
public boolean hasNumWithDefault() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 num_with_default = 2 [default = 421];
*/
public int getNumWithDefault() {
return numWithDefault_;
}
/**
* optional int32 num_with_default = 2 [default = 421];
*/
public Builder setNumWithDefault(int value) {
bitField0_ |= 0x00000002;
numWithDefault_ = value;
return this;
}
/**
* optional int32 num_with_default = 2 [default = 421];
*/
public Builder clearNumWithDefault() {
bitField0_ = (bitField0_ & ~0x00000002);
numWithDefault_ = 421;
return this;
}
private com.google.protobuf.LazyFieldLite inner_ =
new com.google.protobuf.LazyFieldLite();
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
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());
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
public Builder setInner(protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite value) {
if (value == null) {
throw new NullPointerException();
}
inner_.setValue(value);
bitField0_ |= 0x00000004;;
return this;
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
public Builder setInner(
protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) {
inner_.setValue(builderForValue.build());
bitField0_ |= 0x00000004;;
return this;
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
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;
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite inner = 3 [lazy = true];
*/
public Builder clearInner() {
inner_.clear();
bitField0_ = (bitField0_ & ~0x00000004);;
return this;
}
private java.util.List repeatedInner_ =
java.util.Collections.emptyList();
private void ensureRepeatedInnerIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
repeatedInner_ =
new java.util.ArrayList(
repeatedInner_);
bitField0_ |= 0x00000008;
}
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public java.util.List getRepeatedInnerList() {
java.util.List list =
new java.util.ArrayList(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);
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public int getRepeatedInnerCount() {
return repeatedInner_.size();
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite getRepeatedInner(int index) {
return (protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite) repeatedInner_.get(index).getValue(
protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.getDefaultInstance());
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
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;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public Builder setRepeatedInner(
int index, protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) {
ensureRepeatedInnerIsMutable();
repeatedInner_.set(index, com.google.protobuf.LazyFieldLite.fromValue(
builderForValue.build()));
return this;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
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;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
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;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public Builder addRepeatedInner(
protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) {
ensureRepeatedInnerIsMutable();
repeatedInner_.add(com.google.protobuf.LazyFieldLite.fromValue(
builderForValue.build()));
return this;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public Builder addRepeatedInner(
int index, protobuf_unittest.LazyFieldsLite.LazyInnerMessageLite.Builder builderForValue) {
ensureRepeatedInnerIsMutable();
repeatedInner_.add(index, com.google.protobuf.LazyFieldLite.fromValue(
builderForValue.build()));
return this;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
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;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public Builder clearRepeatedInner() {
repeatedInner_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* repeated .protobuf_unittest.LazyInnerMessageLite repeated_inner = 4 [lazy = true];
*/
public Builder removeRepeatedInner(int index) {
ensureRepeatedInnerIsMutable();
repeatedInner_.remove(index);
return this;
}
/**
* optional int32 oneof_num = 5;
*/
public boolean hasOneofNum() {
return oneofFieldCase_ == 5;
}
/**
* optional int32 oneof_num = 5;
*/
public int getOneofNum() {
if (oneofFieldCase_ == 5) {
return (java.lang.Integer) oneofField_;
}
return 0;
}
/**
* optional int32 oneof_num = 5;
*/
public Builder setOneofNum(int value) {
oneofFieldCase_ = 5;
oneofField_ = value;
return this;
}
/**
* optional int32 oneof_num = 5;
*/
public Builder clearOneofNum() {
if (oneofFieldCase_ == 5) {
oneofFieldCase_ = 0;
oneofField_ = null;
}
return this;
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
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();
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
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;
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
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;
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
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;
}
/**
* optional .protobuf_unittest.LazyInnerMessageLite oneof_inner = 6 [lazy = true];
*/
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 {
/**
* optional int32 num = 1;
*/
boolean hasNum();
/**
* optional int32 num = 1;
*/
int getNum();
/**
* optional int32 num_with_default = 2 [default = 42];
*/
boolean hasNumWithDefault();
/**
* optional int32 num_with_default = 2 [default = 42];
*/
int getNumWithDefault();
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
boolean hasNested();
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
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 PARSER =
new com.google.protobuf.AbstractParser() {
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 getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int NUM_FIELD_NUMBER = 1;
private int num_;
/**
* optional int32 num = 1;
*/
public boolean hasNum() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 num = 1;
*/
public int getNum() {
return num_;
}
public static final int NUM_WITH_DEFAULT_FIELD_NUMBER = 2;
private int numWithDefault_;
/**
* optional int32 num_with_default = 2 [default = 42];
*/
public boolean hasNumWithDefault() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 num_with_default = 2 [default = 42];
*/
public int getNumWithDefault() {
return numWithDefault_;
}
public static final int NESTED_FIELD_NUMBER = 3;
private com.google.protobuf.LazyFieldLite nested_ =
new com.google.protobuf.LazyFieldLite();
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
public boolean hasNested() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
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_ ;
/**
* optional int32 num = 1;
*/
public boolean hasNum() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 num = 1;
*/
public int getNum() {
return num_;
}
/**
* optional int32 num = 1;
*/
public Builder setNum(int value) {
bitField0_ |= 0x00000001;
num_ = value;
return this;
}
/**
* optional int32 num = 1;
*/
public Builder clearNum() {
bitField0_ = (bitField0_ & ~0x00000001);
num_ = 0;
return this;
}
private int numWithDefault_ = 42;
/**
* optional int32 num_with_default = 2 [default = 42];
*/
public boolean hasNumWithDefault() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 num_with_default = 2 [default = 42];
*/
public int getNumWithDefault() {
return numWithDefault_;
}
/**
* optional int32 num_with_default = 2 [default = 42];
*/
public Builder setNumWithDefault(int value) {
bitField0_ |= 0x00000002;
numWithDefault_ = value;
return this;
}
/**
* optional int32 num_with_default = 2 [default = 42];
*/
public Builder clearNumWithDefault() {
bitField0_ = (bitField0_ & ~0x00000002);
numWithDefault_ = 42;
return this;
}
private com.google.protobuf.LazyFieldLite nested_ =
new com.google.protobuf.LazyFieldLite();
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
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());
}
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
public Builder setNested(protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite value) {
if (value == null) {
throw new NullPointerException();
}
nested_.setValue(value);
bitField0_ |= 0x00000004;;
return this;
}
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
public Builder setNested(
protobuf_unittest.LazyFieldsLite.LazyNestedInnerMessageLite.Builder builderForValue) {
nested_.setValue(builderForValue.build());
bitField0_ |= 0x00000004;;
return this;
}
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
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;
}
/**
* optional .protobuf_unittest.LazyNestedInnerMessageLite nested = 3 [lazy = true];
*/
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 {
/**
* optional int32 num = 1;
*/
boolean hasNum();
/**
* optional int32 num = 1;
*/
int getNum();
/**
* optional int32 num_with_default = 2 [default = 4];
*/
boolean hasNumWithDefault();
/**
* optional int32 num_with_default = 2 [default = 4];
*/
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 PARSER =
new com.google.protobuf.AbstractParser() {
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 getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int NUM_FIELD_NUMBER = 1;
private int num_;
/**
* optional int32 num = 1;
*/
public boolean hasNum() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 num = 1;
*/
public int getNum() {
return num_;
}
public static final int NUM_WITH_DEFAULT_FIELD_NUMBER = 2;
private int numWithDefault_;
/**
* optional int32 num_with_default = 2 [default = 4];
*/
public boolean hasNumWithDefault() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 num_with_default = 2 [default = 4];
*/
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_ ;
/**
* optional int32 num = 1;
*/
public boolean hasNum() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 num = 1;
*/
public int getNum() {
return num_;
}
/**
* optional int32 num = 1;
*/
public Builder setNum(int value) {
bitField0_ |= 0x00000001;
num_ = value;
return this;
}
/**
* optional int32 num = 1;
*/
public Builder clearNum() {
bitField0_ = (bitField0_ & ~0x00000001);
num_ = 0;
return this;
}
private int numWithDefault_ = 4;
/**
* optional int32 num_with_default = 2 [default = 4];
*/
public boolean hasNumWithDefault() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 num_with_default = 2 [default = 4];
*/
public int getNumWithDefault() {
return numWithDefault_;
}
/**
* optional int32 num_with_default = 2 [default = 4];
*/
public Builder setNumWithDefault(int value) {
bitField0_ |= 0x00000002;
numWithDefault_ = value;
return this;
}
/**
* optional int32 num_with_default = 2 [default = 4];
*/
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)
}