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.Messages
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
[TLObject(1364105629)]
|
2016-09-24 15:38:26 +02:00
|
|
|
public class TLRequestGetInlineBotResults : TLMethod
|
|
|
|
|
{
|
|
|
|
|
public override int Constructor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return 1364105629;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-09 11:35:15 +01:00
|
|
|
public int Flags { get; set; }
|
|
|
|
|
public TLAbsInputUser Bot { get; set; }
|
|
|
|
|
public TLAbsInputPeer Peer { get; set; }
|
|
|
|
|
public TLAbsInputGeoPoint GeoPoint { get; set; }
|
|
|
|
|
public string Query { get; set; }
|
|
|
|
|
public string Offset { get; set; }
|
2017-07-20 04:07:24 +02:00
|
|
|
public Messages.TLBotResults Response { get; set; }
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
public void ComputeFlags()
|
|
|
|
|
{
|
2017-11-09 11:35:15 +01:00
|
|
|
Flags = 0;
|
|
|
|
|
Flags = GeoPoint != null ? (Flags | 1) : (Flags & ~1);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
}
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
public override void DeserializeBody(BinaryReader br)
|
|
|
|
|
{
|
2017-11-09 11:35:15 +01:00
|
|
|
Flags = br.ReadInt32();
|
|
|
|
|
Bot = (TLAbsInputUser)ObjectUtils.DeserializeObject(br);
|
|
|
|
|
Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br);
|
|
|
|
|
if ((Flags & 1) != 0)
|
|
|
|
|
GeoPoint = (TLAbsInputGeoPoint)ObjectUtils.DeserializeObject(br);
|
2017-07-20 04:07:24 +02:00
|
|
|
else
|
2017-11-09 11:35:15 +01:00
|
|
|
GeoPoint = null;
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-11-09 11:35:15 +01:00
|
|
|
Query = StringUtil.Deserialize(br);
|
|
|
|
|
Offset = StringUtil.Deserialize(br);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SerializeBody(BinaryWriter bw)
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
bw.Write(Constructor);
|
2016-09-24 15:38:26 +02:00
|
|
|
ComputeFlags();
|
2017-11-09 11:35:15 +01:00
|
|
|
bw.Write(Flags);
|
|
|
|
|
ObjectUtils.SerializeObject(Bot, bw);
|
|
|
|
|
ObjectUtils.SerializeObject(Peer, bw);
|
|
|
|
|
if ((Flags & 1) != 0)
|
|
|
|
|
ObjectUtils.SerializeObject(GeoPoint, bw);
|
|
|
|
|
StringUtil.Serialize(Query, bw);
|
|
|
|
|
StringUtil.Serialize(Offset, bw);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
}
|
2017-11-09 11:35:15 +01:00
|
|
|
public override void DeserializeResponse(BinaryReader br)
|
2017-07-20 04:07:24 +02:00
|
|
|
{
|
|
|
|
|
Response = (Messages.TLBotResults)ObjectUtils.DeserializeObject(br);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
}
|
2016-09-24 15:38:26 +02:00
|
|
|
}
|
|
|
|
|
}
|