Пример #1
0
 public StickerEventMessage(string id, string packageId, string stickerId, string[] keywords, StickerResourceType stickerResourceType) : base(EventMessageType.Sticker, id)
 {
     PackageId           = packageId;
     StickerId           = stickerId;
     Keywords            = keywords;
     StickerResourceType = stickerResourceType;
 }
Пример #2
0
 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) {
             ProductId = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.I64) {
             PackageId = iprot.ReadI64();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.I32) {
             Version = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 4:
           if (field.Type == TType.String) {
             AuthorName = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 5:
           if (field.Type == TType.Bool) {
             OnSale = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 6:
           if (field.Type == TType.I32) {
             ValidDays = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 7:
           if (field.Type == TType.I32) {
             SaleType = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 8:
           if (field.Type == TType.String) {
             Copyright = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 9:
           if (field.Type == TType.String) {
             Title = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 10:
           if (field.Type == TType.String) {
             DescriptionText = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 11:
           if (field.Type == TType.I64) {
             ShopOrderId = iprot.ReadI64();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 12:
           if (field.Type == TType.String) {
             FromMid = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 13:
           if (field.Type == TType.String) {
             ToMid = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 14:
           if (field.Type == TType.I64) {
             ValidUntil = iprot.ReadI64();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 15:
           if (field.Type == TType.I32) {
             PriceTier = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 16:
           if (field.Type == TType.String) {
             Price = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 17:
           if (field.Type == TType.String) {
             Currency = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 18:
           if (field.Type == TType.String) {
             CurrencySymbol = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 19:
           if (field.Type == TType.I32) {
             PaymentType = (PaymentType)iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 20:
           if (field.Type == TType.I64) {
             CreateDate = iprot.ReadI64();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 21:
           if (field.Type == TType.Bool) {
             OwnFlag = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 22:
           if (field.Type == TType.I32) {
             EventType = (ProductEventType)iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 23:
           if (field.Type == TType.String) {
             UrlSchema = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 24:
           if (field.Type == TType.String) {
             DownloadUrl = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 25:
           if (field.Type == TType.String) {
             BuddyMid = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 26:
           if (field.Type == TType.I64) {
             PublishSince = iprot.ReadI64();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 27:
           if (field.Type == TType.Bool) {
             NewFlag = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 28:
           if (field.Type == TType.Bool) {
             MissionFlag = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 29:
           if (field.Type == TType.List) {
             {
               Categories = new List<ProductCategory>();
               TList _list193 = iprot.ReadListBegin();
               for( int _i194 = 0; _i194 < _list193.Count; ++_i194)
               {
                 ProductCategory _elem195;
                 _elem195 = new ProductCategory();
                 _elem195.Read(iprot);
                 Categories.Add(_elem195);
               }
               iprot.ReadListEnd();
             }
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 30:
           if (field.Type == TType.String) {
             MissionButtonText = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 31:
           if (field.Type == TType.String) {
             MissionShortDescription = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 32:
           if (field.Type == TType.String) {
             AuthorId = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 41:
           if (field.Type == TType.Bool) {
             GrantedByDefault = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 42:
           if (field.Type == TType.I32) {
             DisplayOrder = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 43:
           if (field.Type == TType.Bool) {
             AvailableForPresent = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 44:
           if (field.Type == TType.Bool) {
             AvailableForMyself = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 51:
           if (field.Type == TType.Bool) {
             HasAnimation = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 52:
           if (field.Type == TType.Bool) {
             HasSound = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 53:
           if (field.Type == TType.Bool) {
             RecommendationsEnabled = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 54:
           if (field.Type == TType.I32) {
             StickerResourceType = (StickerResourceType)iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }