in ozhera-tspandata/src/main/java/org/apache/ozhera/tspandata/TSpanData.java [1477:1670]
public void read(TProtocol var1) throws TException {
var1.readStructBegin();
while(true) {
TField var2 = var1.readFieldBegin();
if (var2.type == 0) {
var1.readStructEnd();
this.validate();
return;
}
TList var3;
int var4;
switch(var2.id) {
case 1:
if (var2.type == 11) {
this.traceId = var1.readString();
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 2:
if (var2.type == 11) {
this.spanId = var1.readString();
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 3:
if (var2.type == 2) {
this.sampled = var1.readBool();
this.setSampledIsSet(true);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 4:
if (var2.type == 12) {
this.traceState = new TTraceState();
this.traceState.read(var1);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 5:
if (var2.type == 12) {
this.parentSpanContext = new TSpanContext();
this.parentSpanContext.read(var1);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 6:
if (var2.type == 12) {
this.resouce = new TResource();
this.resouce.read(var1);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 7:
if (var2.type == 12) {
this.instrumentationLibraryInfo = new TInstrumentationLibraryInfo();
this.instrumentationLibraryInfo.read(var1);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 8:
if (var2.type == 11) {
this.name = var1.readString();
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 9:
if (var2.type == 8) {
this.kind = TKind.findByValue(var1.readI32());
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 10:
if (var2.type == 10) {
this.startEpochNanos = var1.readI64();
this.setStartEpochNanosIsSet(true);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 11:
if (var2.type == 12) {
this.attributes = new TAttributes();
this.attributes.read(var1);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 12:
if (var2.type != 15) {
TProtocolUtil.skip(var1, var2.type);
break;
}
var3 = var1.readListBegin();
this.events = new ArrayList(var3.size);
for(var4 = 0; var4 < var3.size; ++var4) {
TEvent var6 = new TEvent();
var6.read(var1);
this.events.add(var6);
}
var1.readListEnd();
break;
case 13:
if (var2.type != 15) {
TProtocolUtil.skip(var1, var2.type);
break;
}
var3 = var1.readListBegin();
this.links = new ArrayList(var3.size);
for(var4 = 0; var4 < var3.size; ++var4) {
TLink var5 = new TLink();
var5.read(var1);
this.links.add(var5);
}
var1.readListEnd();
break;
case 14:
if (var2.type == 8) {
this.status = TStatus.findByValue(var1.readI32());
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 15:
if (var2.type == 10) {
this.endEpochNanos = var1.readI64();
this.setEndEpochNanosIsSet(true);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 16:
if (var2.type == 2) {
this.ended = var1.readBool();
this.setEndedIsSet(true);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 17:
if (var2.type == 8) {
this.totalRecordedEvents = var1.readI32();
this.setTotalRecordedEventsIsSet(true);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 18:
if (var2.type == 8) {
this.totalRecordedLinks = var1.readI32();
this.setTotalRecordedLinksIsSet(true);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 19:
if (var2.type == 8) {
this.totalAttributeCount = var1.readI32();
this.setTotalAttributeCountIsSet(true);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
case 20:
if (var2.type == 12) {
this.extra = new TExtra();
this.extra.read(var1);
} else {
TProtocolUtil.skip(var1, var2.type);
}
break;
default:
TProtocolUtil.skip(var1, var2.type);
}
var1.readFieldEnd();
}
}