public void Read (TProtocol iprot) { bool isset_supervisors = false; bool isset_nimbus_uptime_secs = false; bool isset_topologies = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Supervisors = new List<SupervisorSummary>(); TList _list37 = iprot.ReadListBegin(); for( int _i38 = 0; _i38 < _list37.Count; ++_i38) { SupervisorSummary _elem39; _elem39 = new SupervisorSummary(); _elem39.Read(iprot); Supervisors.Add(_elem39); } iprot.ReadListEnd(); } isset_supervisors = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { Nimbus_uptime_secs = iprot.ReadI32(); isset_nimbus_uptime_secs = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { Topologies = new List<TopologySummary>(); TList _list40 = iprot.ReadListBegin(); for( int _i41 = 0; _i41 < _list40.Count; ++_i41) { TopologySummary _elem42; _elem42 = new TopologySummary(); _elem42.Read(iprot); Topologies.Add(_elem42); } iprot.ReadListEnd(); } isset_topologies = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_supervisors) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_nimbus_uptime_secs) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_topologies) throw new TProtocolException(TProtocolException.INVALID_DATA); }
public void Read(TProtocol iprot) { bool isset_supervisors = false; bool isset_nimbus_uptime_secs = false; bool isset_topologies = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Supervisors = new List <SupervisorSummary>(); TList _list37 = iprot.ReadListBegin(); for (int _i38 = 0; _i38 < _list37.Count; ++_i38) { SupervisorSummary _elem39; _elem39 = new SupervisorSummary(); _elem39.Read(iprot); Supervisors.Add(_elem39); } iprot.ReadListEnd(); } isset_supervisors = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { Nimbus_uptime_secs = iprot.ReadI32(); isset_nimbus_uptime_secs = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { Topologies = new List <TopologySummary>(); TList _list40 = iprot.ReadListBegin(); for (int _i41 = 0; _i41 < _list40.Count; ++_i41) { TopologySummary _elem42; _elem42 = new TopologySummary(); _elem42.Read(iprot); Topologies.Add(_elem42); } iprot.ReadListEnd(); } isset_topologies = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_supervisors) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_nimbus_uptime_secs) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_topologies) { throw new TProtocolException(TProtocolException.INVALID_DATA); } }