TLSharp/TeleSharp.TL/TL/TLInputBotInlineResultDocument.cs

68 lines
1.8 KiB
C#
Raw Normal View History

2016-09-24 15:38:26 +02:00
using System.IO;
2017-12-20 12:06:31 +01:00
2016-09-24 15:38:26 +02:00
namespace TeleSharp.TL
{
[TLObject(-459324)]
2016-09-24 15:38:26 +02:00
public class TLInputBotInlineResultDocument : TLAbsInputBotInlineResult
{
public override int Constructor
{
get
{
return -459324;
}
}
public string Description { get; set; }
2017-12-20 12:06:31 +01:00
public TLAbsInputDocument Document { get; set; }
2017-12-20 12:06:31 +01:00
public int Flags { get; set; }
public string Id { get; set; }
public TLAbsInputBotInlineMessage SendMessage { get; set; }
2016-09-24 15:38:26 +02:00
2017-12-20 12:06:31 +01:00
public string Title { get; set; }
public string Type { get; set; }
2016-09-24 15:38:26 +02:00
public void ComputeFlags()
{
}
2016-09-24 15:38:26 +02:00
public override void DeserializeBody(BinaryReader br)
{
Flags = br.ReadInt32();
Id = StringUtil.Deserialize(br);
Type = StringUtil.Deserialize(br);
if ((Flags & 2) != 0)
Title = StringUtil.Deserialize(br);
else
Title = null;
2016-09-24 15:38:26 +02:00
if ((Flags & 4) != 0)
Description = StringUtil.Deserialize(br);
else
Description = null;
2016-09-24 15:38:26 +02:00
Document = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br);
SendMessage = (TLAbsInputBotInlineMessage)ObjectUtils.DeserializeObject(br);
2016-09-24 15:38:26 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
bw.Write(Flags);
StringUtil.Serialize(Id, bw);
StringUtil.Serialize(Type, bw);
if ((Flags & 2) != 0)
StringUtil.Serialize(Title, bw);
if ((Flags & 4) != 0)
StringUtil.Serialize(Description, bw);
ObjectUtils.SerializeObject(Document, bw);
ObjectUtils.SerializeObject(SendMessage, bw);
2016-09-24 15:38:26 +02:00
}
}
}