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.List) { { Invitations = new List <NoteInvitationShareRelationship>(); TList _list162 = iprot.ReadListBegin(); for (int _i163 = 0; _i163 < _list162.Count; ++_i163) { NoteInvitationShareRelationship _elem164; _elem164 = new NoteInvitationShareRelationship(); _elem164.Read(iprot); Invitations.Add(_elem164); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Memberships = new List <NoteMemberShareRelationship>(); TList _list165 = iprot.ReadListBegin(); for (int _i166 = 0; _i166 < _list165.Count; ++_i166) { NoteMemberShareRelationship _elem167; _elem167 = new NoteMemberShareRelationship(); _elem167.Read(iprot); Memberships.Add(_elem167); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { InvitationRestrictions = new NoteShareRelationshipRestrictions(); InvitationRestrictions.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.String) { NoteGuid = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { MembershipsToUpdate = new List <NoteMemberShareRelationship>(); TList _list170 = iprot.ReadListBegin(); for (int _i171 = 0; _i171 < _list170.Count; ++_i171) { NoteMemberShareRelationship _elem172; _elem172 = new NoteMemberShareRelationship(); _elem172.Read(iprot); MembershipsToUpdate.Add(_elem172); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { InvitationsToUpdate = new List <NoteInvitationShareRelationship>(); TList _list173 = iprot.ReadListBegin(); for (int _i174 = 0; _i174 < _list173.Count; ++_i174) { NoteInvitationShareRelationship _elem175; _elem175 = new NoteInvitationShareRelationship(); _elem175.Read(iprot); InvitationsToUpdate.Add(_elem175); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { MembershipsToUnshare = new List <int>(); TList _list176 = iprot.ReadListBegin(); for (int _i177 = 0; _i177 < _list176.Count; ++_i177) { int _elem178; _elem178 = iprot.ReadI32(); MembershipsToUnshare.Add(_elem178); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.List) { { InvitationsToUnshare = new List <long>(); TList _list179 = iprot.ReadListBegin(); for (int _i180 = 0; _i180 < _list179.Count; ++_i180) { long _elem181; _elem181 = iprot.ReadI64(); InvitationsToUnshare.Add(_elem181); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }