mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
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
|
|
{
|
|
[TLObject(691006739)]
|
|
public class TLInputBotInlineMessageMediaAuto : TLAbsInputBotInlineMessage
|
|
{
|
|
public override int Constructor
|
|
{
|
|
get
|
|
{
|
|
return 691006739;
|
|
}
|
|
}
|
|
|
|
public int Flags { get; set; }
|
|
public string Caption { get; set; }
|
|
public TLAbsReplyMarkup ReplyMarkup { get; set; }
|
|
|
|
|
|
public void ComputeFlags()
|
|
{
|
|
Flags = 0;
|
|
Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4);
|
|
|
|
}
|
|
|
|
public override void DeserializeBody(BinaryReader br)
|
|
{
|
|
Flags = br.ReadInt32();
|
|
Caption = StringUtil.Deserialize(br);
|
|
if ((Flags & 4) != 0)
|
|
ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br);
|
|
else
|
|
ReplyMarkup = null;
|
|
|
|
|
|
}
|
|
|
|
public override void SerializeBody(BinaryWriter bw)
|
|
{
|
|
bw.Write(Constructor);
|
|
ComputeFlags();
|
|
bw.Write(Flags);
|
|
StringUtil.Serialize(Caption, bw);
|
|
if ((Flags & 4) != 0)
|
|
ObjectUtils.SerializeObject(ReplyMarkup, bw);
|
|
|
|
}
|
|
}
|
|
}
|