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.Struct) { UserInfo = new UserInfo(); UserInfo.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { User = new User(); User.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { AddedOn = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Struct) { RelationshipType = new RelationShipType(); RelationshipType.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Bool) { IsClose = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { UserInfoPerson = new UserInfoPerson(); UserInfoPerson.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Struct) { StatusType = new StatusType(); StatusType.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Struct) { SettingPerson = new SettingPerson(); SettingPerson.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Struct) { Country = new Country(); Country.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { Industry = new Industry(); Industry.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.Bool) { CanMessage = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.I32) { DbStatusCode = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.String) { CTag = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.I32) { FriendshipStatus = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 15: if (field.Type == TType.Bool) { FromPhoneBook = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 16: if (field.Type == TType.Bool) { ReceiveConnectionRequest = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 17: if (field.Type == TType.Bool) { AllowAddingChatGroup = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 18: if (field.Type == TType.Bool) { AllowMsgForword = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 19: if (field.Type == TType.I32) { DbSubStatusCode = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.String) { DbStatusMsg = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 21: if (field.Type == TType.I32) { RequestId = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 22: if (field.Type == TType.I32) { RequestTypeId = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 23: if (field.Type == TType.String) { LastUpdated = iprot.ReadString(); } 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("Friend"); oprot.WriteStructBegin(struc); TField field = new TField(); if (UserInfo != null && __isset.userInfo) { field.Name = "userInfo"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); UserInfo.Write(oprot); oprot.WriteFieldEnd(); } if (User != null && __isset.user) { field.Name = "user"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); User.Write(oprot); oprot.WriteFieldEnd(); } if (AddedOn != null && __isset.addedOn) { field.Name = "addedOn"; field.Type = TType.String; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteString(AddedOn); oprot.WriteFieldEnd(); } if (RelationshipType != null && __isset.relationshipType) { field.Name = "relationshipType"; field.Type = TType.Struct; field.ID = 4; oprot.WriteFieldBegin(field); RelationshipType.Write(oprot); oprot.WriteFieldEnd(); } if (__isset.isClose) { field.Name = "isClose"; field.Type = TType.Bool; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteBool(IsClose); oprot.WriteFieldEnd(); } if (UserInfoPerson != null && __isset.userInfoPerson) { field.Name = "userInfoPerson"; field.Type = TType.Struct; field.ID = 6; oprot.WriteFieldBegin(field); UserInfoPerson.Write(oprot); oprot.WriteFieldEnd(); } if (StatusType != null && __isset.statusType) { field.Name = "statusType"; field.Type = TType.Struct; field.ID = 7; oprot.WriteFieldBegin(field); StatusType.Write(oprot); oprot.WriteFieldEnd(); } if (SettingPerson != null && __isset.settingPerson) { field.Name = "settingPerson"; field.Type = TType.Struct; field.ID = 8; oprot.WriteFieldBegin(field); SettingPerson.Write(oprot); oprot.WriteFieldEnd(); } if (Country != null && __isset.country) { field.Name = "country"; field.Type = TType.Struct; field.ID = 9; oprot.WriteFieldBegin(field); Country.Write(oprot); oprot.WriteFieldEnd(); } if (Industry != null && __isset.industry) { field.Name = "industry"; field.Type = TType.Struct; field.ID = 10; oprot.WriteFieldBegin(field); Industry.Write(oprot); oprot.WriteFieldEnd(); } if (__isset.canMessage) { field.Name = "canMessage"; field.Type = TType.Bool; field.ID = 11; oprot.WriteFieldBegin(field); oprot.WriteBool(CanMessage); oprot.WriteFieldEnd(); } if (__isset.dbStatusCode) { field.Name = "dbStatusCode"; field.Type = TType.I32; field.ID = 12; oprot.WriteFieldBegin(field); oprot.WriteI32(DbStatusCode); oprot.WriteFieldEnd(); } if (CTag != null && __isset.cTag) { field.Name = "cTag"; field.Type = TType.String; field.ID = 13; oprot.WriteFieldBegin(field); oprot.WriteString(CTag); oprot.WriteFieldEnd(); } if (__isset.friendshipStatus) { field.Name = "friendshipStatus"; field.Type = TType.I32; field.ID = 14; oprot.WriteFieldBegin(field); oprot.WriteI32(FriendshipStatus); oprot.WriteFieldEnd(); } if (__isset.fromPhoneBook) { field.Name = "fromPhoneBook"; field.Type = TType.Bool; field.ID = 15; oprot.WriteFieldBegin(field); oprot.WriteBool(FromPhoneBook); oprot.WriteFieldEnd(); } if (__isset.receiveConnectionRequest) { field.Name = "receiveConnectionRequest"; field.Type = TType.Bool; field.ID = 16; oprot.WriteFieldBegin(field); oprot.WriteBool(ReceiveConnectionRequest); oprot.WriteFieldEnd(); } if (__isset.allowAddingChatGroup) { field.Name = "allowAddingChatGroup"; field.Type = TType.Bool; field.ID = 17; oprot.WriteFieldBegin(field); oprot.WriteBool(AllowAddingChatGroup); oprot.WriteFieldEnd(); } if (__isset.allowMsgForword) { field.Name = "allowMsgForword"; field.Type = TType.Bool; field.ID = 18; oprot.WriteFieldBegin(field); oprot.WriteBool(AllowMsgForword); oprot.WriteFieldEnd(); } if (__isset.dbSubStatusCode) { field.Name = "dbSubStatusCode"; field.Type = TType.I32; field.ID = 19; oprot.WriteFieldBegin(field); oprot.WriteI32(DbSubStatusCode); oprot.WriteFieldEnd(); } if (DbStatusMsg != null && __isset.dbStatusMsg) { field.Name = "dbStatusMsg"; field.Type = TType.String; field.ID = 20; oprot.WriteFieldBegin(field); oprot.WriteString(DbStatusMsg); oprot.WriteFieldEnd(); } if (__isset.requestId) { field.Name = "requestId"; field.Type = TType.I32; field.ID = 21; oprot.WriteFieldBegin(field); oprot.WriteI32(RequestId); oprot.WriteFieldEnd(); } if (__isset.requestTypeId) { field.Name = "requestTypeId"; field.Type = TType.I32; field.ID = 22; oprot.WriteFieldBegin(field); oprot.WriteI32(RequestTypeId); oprot.WriteFieldEnd(); } if (LastUpdated != null && __isset.lastUpdated) { field.Name = "lastUpdated"; field.Type = TType.String; field.ID = 23; oprot.WriteFieldBegin(field); oprot.WriteString(LastUpdated); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public override string ToString() { StringBuilder __sb = new StringBuilder("Friend("); bool __first = true; if (UserInfo != null && __isset.userInfo) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("UserInfo: "); __sb.Append(UserInfo == null ? "<null>" : UserInfo.ToString()); } if (User != null && __isset.user) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("User: "******"<null>" : User.ToString()); } if (AddedOn != null && __isset.addedOn) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("AddedOn: "); __sb.Append(AddedOn); } if (RelationshipType != null && __isset.relationshipType) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("RelationshipType: "); __sb.Append(RelationshipType == null ? "<null>" : RelationshipType.ToString()); } if (__isset.isClose) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("IsClose: "); __sb.Append(IsClose); } if (UserInfoPerson != null && __isset.userInfoPerson) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("UserInfoPerson: "); __sb.Append(UserInfoPerson == null ? "<null>" : UserInfoPerson.ToString()); } if (StatusType != null && __isset.statusType) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("StatusType: "); __sb.Append(StatusType == null ? "<null>" : StatusType.ToString()); } if (SettingPerson != null && __isset.settingPerson) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("SettingPerson: "); __sb.Append(SettingPerson == null ? "<null>" : SettingPerson.ToString()); } if (Country != null && __isset.country) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Country: "); __sb.Append(Country == null ? "<null>" : Country.ToString()); } if (Industry != null && __isset.industry) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Industry: "); __sb.Append(Industry == null ? "<null>" : Industry.ToString()); } if (__isset.canMessage) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("CanMessage: "); __sb.Append(CanMessage); } if (__isset.dbStatusCode) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("DbStatusCode: "); __sb.Append(DbStatusCode); } if (CTag != null && __isset.cTag) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("CTag: "); __sb.Append(CTag); } if (__isset.friendshipStatus) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("FriendshipStatus: "); __sb.Append(FriendshipStatus); } if (__isset.fromPhoneBook) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("FromPhoneBook: "); __sb.Append(FromPhoneBook); } if (__isset.receiveConnectionRequest) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("ReceiveConnectionRequest: "); __sb.Append(ReceiveConnectionRequest); } if (__isset.allowAddingChatGroup) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("AllowAddingChatGroup: "); __sb.Append(AllowAddingChatGroup); } if (__isset.allowMsgForword) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("AllowMsgForword: "); __sb.Append(AllowMsgForword); } 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.requestId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("RequestId: "); __sb.Append(RequestId); } if (__isset.requestTypeId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("RequestTypeId: "); __sb.Append(RequestTypeId); } if (LastUpdated != null && __isset.lastUpdated) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("LastUpdated: "); __sb.Append(LastUpdated); } __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.Struct) { UserInfo = new UserInfo(); UserInfo.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { User = new User(); User.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { AddedOn = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Struct) { RelationshipType = new RelationShipType(); RelationshipType.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Bool) { IsClose = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { UserInfoPerson = new UserInfoPerson(); UserInfoPerson.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Struct) { StatusType = new StatusType(); StatusType.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Struct) { SettingPerson = new SettingPerson(); SettingPerson.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Struct) { Country = new Country(); Country.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { Industry = new Industry(); Industry.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.Bool) { CanMessage = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.I32) { DbStatusCode = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.String) { CTag = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.I32) { FriendshipStatus = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 15: if (field.Type == TType.Bool) { FromPhoneBook = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 16: if (field.Type == TType.Bool) { ReceiveConnectionRequest = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 17: if (field.Type == TType.Bool) { AllowAddingChatGroup = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 18: if (field.Type == TType.Bool) { AllowMsgForword = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 19: if (field.Type == TType.I32) { DbSubStatusCode = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.String) { DbStatusMsg = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 21: if (field.Type == TType.I32) { RequestId = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 22: if (field.Type == TType.I32) { RequestTypeId = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 23: if (field.Type == TType.String) { LastUpdated = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }