TLSharp/TeleSharp.TL/TL/TLBotInlineMediaResult.cs
Andrzej Gołaszewski ca3a71e39a update to layer 71
code formatting
2017-12-20 12:06:31 +01:00

82 lines
2.2 KiB
C#

using System.IO;
namespace TeleSharp.TL
{
[TLObject(400266251)]
public class TLBotInlineMediaResult : TLAbsBotInlineResult
{
public override int Constructor
{
get
{
return 400266251;
}
}
public string Description { get; set; }
public TLAbsDocument Document { get; set; }
public int Flags { get; set; }
public string Id { get; set; }
public TLAbsPhoto Photo { get; set; }
public TLAbsBotInlineMessage SendMessage { get; set; }
public string Title { get; set; }
public string Type { get; set; }
public void ComputeFlags()
{
}
public override void DeserializeBody(BinaryReader br)
{
Flags = br.ReadInt32();
Id = StringUtil.Deserialize(br);
Type = StringUtil.Deserialize(br);
if ((Flags & 1) != 0)
Photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
else
Photo = null;
if ((Flags & 2) != 0)
Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br);
else
Document = null;
if ((Flags & 4) != 0)
Title = StringUtil.Deserialize(br);
else
Title = null;
if ((Flags & 8) != 0)
Description = StringUtil.Deserialize(br);
else
Description = null;
SendMessage = (TLAbsBotInlineMessage)ObjectUtils.DeserializeObject(br);
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
bw.Write(Flags);
StringUtil.Serialize(Id, bw);
StringUtil.Serialize(Type, bw);
if ((Flags & 1) != 0)
ObjectUtils.SerializeObject(Photo, bw);
if ((Flags & 2) != 0)
ObjectUtils.SerializeObject(Document, bw);
if ((Flags & 4) != 0)
StringUtil.Serialize(Title, bw);
if ((Flags & 8) != 0)
StringUtil.Serialize(Description, bw);
ObjectUtils.SerializeObject(SendMessage, bw);
}
}
}