in sdk/sdk/src/main/java/com/google/atap/jacquard/protocol/JacquardProtocol.java [36950:37116]
protected final Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.google.atap.jacquard.protocol.JacquardProtocol.DataCollectionMetadata();
}
case IS_INITIALIZED: {
return DEFAULT_INSTANCE;
}
case MAKE_IMMUTABLE: {
sensorIds_.makeImmutable();
return null;
}
case NEW_BUILDER: {
return new Builder();
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
com.google.atap.jacquard.protocol.JacquardProtocol.DataCollectionMetadata other = (com.google.atap.jacquard.protocol.JacquardProtocol.DataCollectionMetadata) arg1;
campaignId_ = visitor.visitString(
hasCampaignId(), campaignId_,
other.hasCampaignId(), other.campaignId_);
sessionId_ = visitor.visitString(
hasSessionId(), sessionId_,
other.hasSessionId(), other.sessionId_);
trialId_ = visitor.visitString(
hasTrialId(), trialId_,
other.hasTrialId(), other.trialId_);
subjectId_ = visitor.visitString(
hasSubjectId(), subjectId_,
other.hasSubjectId(), other.subjectId_);
mode_ = visitor.visitInt(hasMode(), mode_,
other.hasMode(), other.mode_);
actionId_ = visitor.visitInt(
hasActionId(), actionId_,
other.hasActionId(), other.actionId_);
sensorIds_= visitor.visitIntList(sensorIds_, other.sensorIds_);
customData_ = visitor.visitByteString(
hasCustomData(), customData_,
other.hasCustomData(), other.customData_);
productId_ = visitor.visitString(
hasProductId(), productId_,
other.hasProductId(), other.productId_);
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
.INSTANCE) {
bitField0_ |= other.bitField0_;
}
return this;
}
case MERGE_FROM_STREAM: {
com.google.protobuf.CodedInputStream input =
(com.google.protobuf.CodedInputStream) arg0;
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
(com.google.protobuf.ExtensionRegistryLite) arg1;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(tag, input)) {
done = true;
}
break;
}
case 10: {
String s = input.readString();
bitField0_ |= 0x00000001;
campaignId_ = s;
break;
}
case 18: {
String s = input.readString();
bitField0_ |= 0x00000002;
sessionId_ = s;
break;
}
case 26: {
String s = input.readString();
bitField0_ |= 0x00000004;
trialId_ = s;
break;
}
case 34: {
String s = input.readString();
bitField0_ |= 0x00000008;
subjectId_ = s;
break;
}
case 40: {
int rawValue = input.readEnum();
com.google.atap.jacquard.protocol.JacquardProtocol.DataCollectionMode value = com.google.atap.jacquard.protocol.JacquardProtocol.DataCollectionMode.forNumber(rawValue);
if (value == null) {
super.mergeVarintField(5, rawValue);
} else {
bitField0_ |= 0x00000010;
mode_ = rawValue;
}
break;
}
case 48: {
bitField0_ |= 0x00000020;
actionId_ = input.readUInt32();
break;
}
case 56: {
if (!sensorIds_.isModifiable()) {
sensorIds_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(sensorIds_);
}
sensorIds_.addInt(input.readUInt32());
break;
}
case 58: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!sensorIds_.isModifiable() && input.getBytesUntilLimit() > 0) {
sensorIds_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(sensorIds_);
}
while (input.getBytesUntilLimit() > 0) {
sensorIds_.addInt(input.readUInt32());
}
input.popLimit(limit);
break;
}
case 66: {
bitField0_ |= 0x00000040;
customData_ = input.readBytes();
break;
}
case 74: {
String s = input.readString();
bitField0_ |= 0x00000080;
productId_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
throw new RuntimeException(
new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this));
} finally {
}
}
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
if (PARSER == null) { synchronized (com.google.atap.jacquard.protocol.JacquardProtocol.DataCollectionMetadata.class) {
if (PARSER == null) {
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
}
}
}
return PARSER;
}
}
throw new UnsupportedOperationException();
}