// Generated by the protocol buffer compiler. DO NOT EDIT!
package com.google.android.diskusage.proto;
@SuppressWarnings("hiding")
public final class BooleanValueProto extends
com.google.protobuf.nano.MessageNano {
private static volatile BooleanValueProto[] _emptyArray;
public static BooleanValueProto[] emptyArray() {
// Lazily initializes the empty array
if (_emptyArray == null) {
synchronized (
com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new BooleanValueProto[0];
}
}
}
return _emptyArray;
}
// optional bool value = 1;
public boolean value;
// optional .PortableExceptionProto exception = 2;
public com.google.android.diskusage.proto.PortableExceptionProto exception;
public BooleanValueProto() {
clear();
}
public BooleanValueProto clear() {
value = false;
exception = null;
cachedSize = -1;
return this;
}
@Override
public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output)
throws java.io.IOException {
if (this.value != false) {
output.writeBool(1, this.value);
}
if (this.exception != null) {
output.writeMessage(2, this.exception);
}
super.writeTo(output);
}
@Override
protected int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.value != false) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeBoolSize(1, this.value);
}
if (this.exception != null) {
size += com.google.protobuf.nano.CodedOutputByteBufferNano
.computeMessageSize(2, this.exception);
}
return size;
}
@Override
public BooleanValueProto mergeFrom(
com.google.protobuf.nano.CodedInputByteBufferNano input)
throws java.io.IOException {
while (true) {
int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!com.google.protobuf.nano.WireFormatNano.parseUnknownField(input, tag)) {
return this;
}
break;
}
case 8: {
this.value = input.readBool();
break;
}
case 18: {
if (this.exception == null) {
this.exception = new com.google.android.diskusage.proto.PortableExceptionProto();
}
input.readMessage(this.exception);
break;
}
}
}
}
public static BooleanValueProto parseFrom(byte[] data)
throws com.google.protobuf.nano.InvalidProtocolBufferNanoException {
return com.google.protobuf.nano.MessageNano.mergeFrom(new BooleanValueProto(), data);
}
public static BooleanValueProto parseFrom(
com.google.protobuf.nano.CodedInputByteBufferNano input)
throws java.io.IOException {
return new BooleanValueProto().mergeFrom(input);
}
}