2016-09-24 15:38:26 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using TeleSharp.TL;
|
|
|
|
|
namespace TeleSharp.TL
|
|
|
|
|
{
|
2016-10-13 19:33:16 +02:00
|
|
|
[TLObject(-415938591)]
|
2016-09-24 15:38:26 +02:00
|
|
|
public class TLUpdateBotCallbackQuery : TLAbsUpdate
|
|
|
|
|
{
|
|
|
|
|
public override int Constructor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2016-10-13 19:33:16 +02:00
|
|
|
return -415938591;
|
2016-09-24 15:38:26 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-13 19:33:16 +02:00
|
|
|
public int flags {get;set;}
|
|
|
|
|
public long query_id {get;set;}
|
2016-09-24 15:38:26 +02:00
|
|
|
public int user_id {get;set;}
|
|
|
|
|
public TLAbsPeer peer {get;set;}
|
|
|
|
|
public int msg_id {get;set;}
|
2016-10-13 19:33:16 +02:00
|
|
|
public long chat_instance {get;set;}
|
2016-09-24 15:38:26 +02:00
|
|
|
public byte[] data {get;set;}
|
2016-10-13 19:33:16 +02:00
|
|
|
public string game_short_name {get;set;}
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
public void ComputeFlags()
|
|
|
|
|
{
|
2016-10-13 19:33:16 +02:00
|
|
|
flags = 0;
|
|
|
|
|
flags = data != null ? (flags | 1) : (flags & ~1);
|
|
|
|
|
flags = game_short_name != null ? (flags | 2) : (flags & ~2);
|
|
|
|
|
|
2016-09-24 15:38:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void DeserializeBody(BinaryReader br)
|
|
|
|
|
{
|
2016-10-13 19:33:16 +02:00
|
|
|
flags = br.ReadInt32();
|
|
|
|
|
query_id = br.ReadInt64();
|
2016-09-24 15:38:26 +02:00
|
|
|
user_id = br.ReadInt32();
|
|
|
|
|
peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br);
|
|
|
|
|
msg_id = br.ReadInt32();
|
2016-10-13 19:33:16 +02:00
|
|
|
chat_instance = br.ReadInt64();
|
|
|
|
|
if ((flags & 1) != 0)
|
2016-09-24 15:38:26 +02:00
|
|
|
data = BytesUtil.Deserialize(br);
|
2016-10-13 19:33:16 +02:00
|
|
|
else
|
|
|
|
|
data = null;
|
|
|
|
|
|
|
|
|
|
if ((flags & 2) != 0)
|
|
|
|
|
game_short_name = StringUtil.Deserialize(br);
|
|
|
|
|
else
|
|
|
|
|
game_short_name = null;
|
|
|
|
|
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SerializeBody(BinaryWriter bw)
|
|
|
|
|
{
|
|
|
|
|
bw.Write(Constructor);
|
2016-10-13 19:33:16 +02:00
|
|
|
ComputeFlags();
|
|
|
|
|
bw.Write(flags);
|
|
|
|
|
bw.Write(query_id);
|
2016-09-24 15:38:26 +02:00
|
|
|
bw.Write(user_id);
|
|
|
|
|
ObjectUtils.SerializeObject(peer,bw);
|
|
|
|
|
bw.Write(msg_id);
|
2016-10-13 19:33:16 +02:00
|
|
|
bw.Write(chat_instance);
|
|
|
|
|
if ((flags & 1) != 0)
|
2016-09-24 15:38:26 +02:00
|
|
|
BytesUtil.Serialize(data,bw);
|
2016-10-13 19:33:16 +02:00
|
|
|
if ((flags & 2) != 0)
|
|
|
|
|
StringUtil.Serialize(game_short_name,bw);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|