public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I64) { Id = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { Description = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { KeyValueMaps = new List <TDDIKeyValueMap>(); TList _list460 = iprot.ReadListBegin(); for (int _i461 = 0; _i461 < _list460.Count; ++_i461) { TDDIKeyValueMap _elem462; _elem462 = new TDDIKeyValueMap(); _elem462.Read(iprot); KeyValueMaps.Add(_elem462); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Struct) { Effect = new TDDIAbstractFailure(); Effect.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { Mode = new TDDIAbstractFailure(); Mode.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Double) { DiagnosisRate = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Struct) { DiagnosisProbDistribution = new TDDIProbDist(); DiagnosisProbDistribution.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I64) { Id = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { Description = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { KeyValueMaps = new List <TDDIKeyValueMap>(); TList _list616 = iprot.ReadListBegin(); for (int _i617 = 0; _i617 < _list616.Count; ++_i617) { TDDIKeyValueMap _elem618; _elem618 = new TDDIKeyValueMap(); _elem618.Read(iprot); KeyValueMaps.Add(_elem618); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Double) { Transition = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { TransitionProbDistribution = new TDDIProbDist(); TransitionProbDistribution.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.List) { { FromStates = new List <TDDIStateRef>(); TList _list619 = iprot.ReadListBegin(); for (int _i620 = 0; _i620 < _list619.Count; ++_i620) { TDDIStateRef _elem621; _elem621 = new TDDIStateRef(); _elem621.Read(iprot); FromStates.Add(_elem621); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.List) { { ToStates = new List <TDDIStateRef>(); TList _list622 = iprot.ReadListBegin(); for (int _i623 = 0; _i623 < _list622.Count; ++_i623) { TDDIStateRef _elem624; _elem624 = new TDDIStateRef(); _elem624.Read(iprot); ToStates.Add(_elem624); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I64) { Id = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { Description = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { KeyValueMaps = new List <TDDIKeyValueMap>(); TList _list396 = iprot.ReadListBegin(); for (int _i397 = 0; _i397 < _list396.Count; ++_i397) { TDDIKeyValueMap _elem398; _elem398 = new TDDIKeyValueMap(); _elem398.Read(iprot); KeyValueMaps.Add(_elem398); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I32) { OriginType = (TDDIFailureOriginType)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { FailureClass = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Double) { FailureRate = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Bool) { IsCCF = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.List) { { CCFFailures = new List <TDDIAbstractFailureRef>(); TList _list399 = iprot.ReadListBegin(); for (int _i400 = 0; _i400 < _list399.Count; ++_i400) { TDDIAbstractFailureRef _elem401; _elem401 = new TDDIAbstractFailureRef(); _elem401.Read(iprot); CCFFailures.Add(_elem401); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { FailureProbDistribution = new TDDIProbDist(); FailureProbDistribution.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }