public override string ToString() { StringBuilder __sb = new StringBuilder("SettingPerson("); bool __first = true; if (UserId != null && __isset.userId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("UserId: "); __sb.Append(UserId); } if (SettingTypePerson != null && __isset.settingTypePerson) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("SettingTypePerson: "); __sb.Append(SettingTypePerson == null ? "<null>" : SettingTypePerson.ToString()); } if (__isset.settingValue) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("SettingValue: "); __sb.Append(SettingValue); } if (ReferenceToken != null && __isset.referenceToken) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("ReferenceToken: "); __sb.Append(ReferenceToken); } if (StartPoint != null && __isset.startPoint) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("StartPoint: "); __sb.Append(StartPoint); } if (EndPoint != null && __isset.endPoint) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("EndPoint: "); __sb.Append(EndPoint); } if (Entries != null && __isset.entries) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Entries: "); __sb.Append(Entries); } if (__isset.dbSubStatusCode) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("DbSubStatusCode: "); __sb.Append(DbSubStatusCode); } if (DbStatusMsg != null && __isset.dbStatusMsg) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("DbStatusMsg: "); __sb.Append(DbStatusMsg); } if (__isset.dbStatus) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("DbStatus: "); __sb.Append(DbStatus); } if (__isset.mode) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Mode: "); __sb.Append(Mode); } __sb.Append(")"); return(__sb.ToString()); }
public void Read(TProtocol iprot) { 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) { UserId = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { SettingTypePerson = new SettingTypePerson(); SettingTypePerson.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I32) { SettingValue = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { ReferenceToken = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { StartPoint = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { EndPoint = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.List) { { Entries = new List <string>(); TList _list4 = iprot.ReadListBegin(); for (int _i5 = 0; _i5 < _list4.Count; ++_i5) { string _elem6; _elem6 = iprot.ReadString(); Entries.Add(_elem6); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.I32) { DbSubStatusCode = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.String) { DbStatusMsg = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.I32) { DbStatus = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.I32) { Mode = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("SettingPerson"); oprot.WriteStructBegin(struc); TField field = new TField(); if (UserId != null && __isset.userId) { field.Name = "userId"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(UserId); oprot.WriteFieldEnd(); } if (SettingTypePerson != null && __isset.settingTypePerson) { field.Name = "settingTypePerson"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); SettingTypePerson.Write(oprot); oprot.WriteFieldEnd(); } if (__isset.settingValue) { field.Name = "settingValue"; field.Type = TType.I32; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteI32(SettingValue); oprot.WriteFieldEnd(); } if (ReferenceToken != null && __isset.referenceToken) { field.Name = "referenceToken"; field.Type = TType.String; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteString(ReferenceToken); oprot.WriteFieldEnd(); } if (StartPoint != null && __isset.startPoint) { field.Name = "startPoint"; field.Type = TType.String; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteString(StartPoint); oprot.WriteFieldEnd(); } if (EndPoint != null && __isset.endPoint) { field.Name = "endPoint"; field.Type = TType.String; field.ID = 6; oprot.WriteFieldBegin(field); oprot.WriteString(EndPoint); oprot.WriteFieldEnd(); } if (Entries != null && __isset.entries) { field.Name = "entries"; field.Type = TType.List; field.ID = 7; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.String, Entries.Count)); foreach (string _iter7 in Entries) { oprot.WriteString(_iter7); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (__isset.dbSubStatusCode) { field.Name = "dbSubStatusCode"; field.Type = TType.I32; field.ID = 8; oprot.WriteFieldBegin(field); oprot.WriteI32(DbSubStatusCode); oprot.WriteFieldEnd(); } if (DbStatusMsg != null && __isset.dbStatusMsg) { field.Name = "dbStatusMsg"; field.Type = TType.String; field.ID = 9; oprot.WriteFieldBegin(field); oprot.WriteString(DbStatusMsg); oprot.WriteFieldEnd(); } if (__isset.dbStatus) { field.Name = "dbStatus"; field.Type = TType.I32; field.ID = 10; oprot.WriteFieldBegin(field); oprot.WriteI32(DbStatus); oprot.WriteFieldEnd(); } if (__isset.mode) { field.Name = "mode"; field.Type = TType.I32; field.ID = 11; oprot.WriteFieldBegin(field); oprot.WriteI32(Mode); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Read (TProtocol iprot) { 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) { UserId = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { SettingTypePerson = new SettingTypePerson(); SettingTypePerson.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I32) { SettingValue = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { ReferenceToken = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { StartPoint = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { EndPoint = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.List) { { Entries = new List<string>(); TList _list4 = iprot.ReadListBegin(); for( int _i5 = 0; _i5 < _list4.Count; ++_i5) { string _elem6; _elem6 = iprot.ReadString(); Entries.Add(_elem6); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.I32) { DbSubStatusCode = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.String) { DbStatusMsg = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.I32) { DbStatus = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.I32) { Mode = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }