public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("ChannelCfgGY"); oprot.WriteStructBegin(struc); TField field = new TField(); if (TcChaneelID != null && __isset.tcChaneelID) { field.Name = "tcChaneelID"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(TcChaneelID); oprot.WriteFieldEnd(); } if (TcUID != null && __isset.tcUID) { field.Name = "tcUID"; field.Type = TType.String; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteString(TcUID); oprot.WriteFieldEnd(); } if (TcPSW != null && __isset.tcPSW) { field.Name = "tcPSW"; field.Type = TType.String; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteString(TcPSW); oprot.WriteFieldEnd(); } if (Name != null && __isset.name) { field.Name = "name"; field.Type = TType.String; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteString(Name); oprot.WriteFieldEnd(); } if (TcDescription != null && __isset.tcDescription) { field.Name = "tcDescription"; field.Type = TType.String; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteString(TcDescription); oprot.WriteFieldEnd(); } if (CaptureCfg != null && __isset.captureCfg) { field.Name = "captureCfg"; field.Type = TType.Struct; field.ID = 6; oprot.WriteFieldBegin(field); CaptureCfg.Write(oprot); oprot.WriteFieldEnd(); } if (CatchFaceCfg != null && __isset.catchFaceCfg) { field.Name = "catchFaceCfg"; field.Type = TType.Struct; field.ID = 7; oprot.WriteFieldBegin(field); CatchFaceCfg.Write(oprot); oprot.WriteFieldEnd(); } if (Addr != null && __isset.addr) { field.Name = "addr"; field.Type = TType.String; field.ID = 8; oprot.WriteFieldBegin(field); oprot.WriteString(Addr); oprot.WriteFieldEnd(); } if (__isset.port) { field.Name = "port"; field.Type = TType.I32; field.ID = 9; oprot.WriteFieldBegin(field); oprot.WriteI32(Port); oprot.WriteFieldEnd(); } if (__isset.channel_type) { field.Name = "channel_type"; field.Type = TType.I32; field.ID = 10; oprot.WriteFieldBegin(field); oprot.WriteI32(Channel_type); oprot.WriteFieldEnd(); } if (Channel_div != null && __isset.channel_div) { field.Name = "channel_div"; field.Type = TType.String; field.ID = 11; oprot.WriteFieldBegin(field); oprot.WriteString(Channel_div); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public override string ToString() { StringBuilder __sb = new StringBuilder("ChannelCfgGY("); bool __first = true; if (TcChaneelID != null && __isset.tcChaneelID) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("TcChaneelID: "); __sb.Append(TcChaneelID); } if (TcUID != null && __isset.tcUID) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("TcUID: "); __sb.Append(TcUID); } if (TcPSW != null && __isset.tcPSW) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("TcPSW: "); __sb.Append(TcPSW); } if (Name != null && __isset.name) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Name: "); __sb.Append(Name); } if (TcDescription != null && __isset.tcDescription) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("TcDescription: "); __sb.Append(TcDescription); } if (CaptureCfg != null && __isset.captureCfg) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("CaptureCfg: "); __sb.Append(CaptureCfg == null ? "<null>" : CaptureCfg.ToString()); } if (CatchFaceCfg != null && __isset.catchFaceCfg) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("CatchFaceCfg: "); __sb.Append(CatchFaceCfg == null ? "<null>" : CatchFaceCfg.ToString()); } if (Addr != null && __isset.addr) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Addr: "); __sb.Append(Addr); } if (__isset.port) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Port: "); __sb.Append(Port); } if (__isset.channel_type) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Channel_type: "); __sb.Append(Channel_type); } if (Channel_div != null && __isset.channel_div) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Channel_div: "); __sb.Append(Channel_div); } __sb.Append(")"); return(__sb.ToString()); }
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.String) { TcChaneelID = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { TcUID = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { TcPSW = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { Name = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { TcDescription = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { CaptureCfg = new CaptureCfg(); CaptureCfg.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Struct) { CatchFaceCfg = new CatchFaceCfg(); CatchFaceCfg.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { Addr = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.I32) { Port = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.I32) { Channel_type = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.String) { Channel_div = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }