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) { { UserIds = new List <string>(); TList _list33 = iprot.ReadListBegin(); for (int _i34 = 0; _i34 < _list33.Count; ++_i34) { string _elem35; _elem35 = iprot.ReadString(); UserIds.Add(_elem35); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { Action = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { ActionData = new Dictionary <string, string>(); TMap _map36 = iprot.ReadMapBegin(); for (int _i37 = 0; _i37 < _map36.Count; ++_i37) { string _key38; string _val39; _key38 = iprot.ReadString(); _val39 = iprot.ReadString(); ActionData[_key38] = _val39; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { Text = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { Title = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { Image = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.String) { Video = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { TemplateName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Map) { { TemplateData = new Dictionary <string, string>(); TMap _map40 = iprot.ReadMapBegin(); for (int _i41 = 0; _i41 < _map40.Count; ++_i41) { string _key42; string _val43; _key42 = iprot.ReadString(); _val43 = iprot.ReadString(); TemplateData[_key42] = _val43; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { NewAction = new THAction(); NewAction.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.List) { { ActionButtons = new List <THActionButton>(); TList _list44 = iprot.ReadListBegin(); for (int _i45 = 0; _i45 < _list44.Count; ++_i45) { THActionButton _elem46; _elem46 = new THActionButton(); _elem46.Read(iprot); ActionButtons.Add(_elem46); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.Struct) { Media = new THNotificationTemplateMedia(); Media.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.Map) { { PlatformMedia = new Dictionary <THDeviceOs, THNotificationTemplateMedia>(); TMap _map47 = iprot.ReadMapBegin(); for (int _i48 = 0; _i48 < _map47.Count; ++_i48) { THDeviceOs _key49; THNotificationTemplateMedia _val50; _key49 = (THDeviceOs)iprot.ReadI32(); _val50 = new THNotificationTemplateMedia(); _val50.Read(iprot); PlatformMedia[_key49] = _val50; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.Struct) { Badge = new THBadge(); Badge.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 15: if (field.Type == TType.I32) { Expiration = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 16: if (field.Type == TType.Struct) { Properties = new THNotificationTemplateProperties(); Properties.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) { Id = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { Description = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { AppId = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { MessageType = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Map) { { Text = new Dictionary <string, string>(); TMap _map5 = iprot.ReadMapBegin(); for (int _i6 = 0; _i6 < _map5.Count; ++_i6) { string _key7; string _val8; _key7 = iprot.ReadString(); _val8 = iprot.ReadString(); Text[_key7] = _val8; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Map) { { Title = new Dictionary <string, string>(); TMap _map9 = iprot.ReadMapBegin(); for (int _i10 = 0; _i10 < _map9.Count; ++_i10) { string _key11; string _val12; _key11 = iprot.ReadString(); _val12 = iprot.ReadString(); Title[_key11] = _val12; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { Image = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.String) { Video = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.I32) { CreatedAt = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.String) { CreateUserId = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.I32) { CreatedUserRole = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.Struct) { Action = new THAction(); Action.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.List) { { ActionButtons = new List <THActionButtonLocalized>(); TList _list13 = iprot.ReadListBegin(); for (int _i14 = 0; _i14 < _list13.Count; ++_i14) { THActionButtonLocalized _elem15; _elem15 = new THActionButtonLocalized(); _elem15.Read(iprot); ActionButtons.Add(_elem15); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 15: if (field.Type == TType.I32) { ExpiryMin = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 17: if (field.Type == TType.Struct) { Media = new THNotificationTemplateMedia(); Media.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 18: if (field.Type == TType.Map) { { PlatformMedia = new Dictionary <THDeviceOs, THNotificationTemplateMedia>(); TMap _map16 = iprot.ReadMapBegin(); for (int _i17 = 0; _i17 < _map16.Count; ++_i17) { THDeviceOs _key18; THNotificationTemplateMedia _val19; _key18 = (THDeviceOs)iprot.ReadI32(); _val19 = new THNotificationTemplateMedia(); _val19.Read(iprot); PlatformMedia[_key18] = _val19; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 19: if (field.Type == TType.Struct) { Badge = new THBadge(); Badge.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.Struct) { Properties = new THNotificationTemplateProperties(); Properties.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) { SessionId = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { UserIds = new List <string>(); TList _list124 = iprot.ReadListBegin(); for (int _i125 = 0; _i125 < _list124.Count; ++_i125) { string _elem126; _elem126 = iprot.ReadString(); UserIds.Add(_elem126); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { Text = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { Title = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { TemplateName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Map) { { TemplateData = new Dictionary <string, string>(); TMap _map127 = iprot.ReadMapBegin(); for (int _i128 = 0; _i128 < _map127.Count; ++_i128) { string _key129; string _val130; _key129 = iprot.ReadString(); _val130 = iprot.ReadString(); TemplateData[_key129] = _val130; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Struct) { Action = new THAction(); Action.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.List) { { ActionButtons = new List <THActionButton>(); TList _list131 = iprot.ReadListBegin(); for (int _i132 = 0; _i132 < _list131.Count; ++_i132) { THActionButton _elem133; _elem133 = new THActionButton(); _elem133.Read(iprot); ActionButtons.Add(_elem133); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Struct) { Media = new THNotificationTemplateMedia(); Media.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { Badge = new THBadge(); Badge.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }