TLSharp/TeleSharp.TL/TL/TLUpdateShortSentMessage.cs

71 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(301019932)]
2016-09-24 15:38:26 +02:00
public class TLUpdateShortSentMessage : TLAbsUpdates
{
public override int Constructor
{
get
{
return 301019932;
}
}
2017-12-20 12:06:31 +01:00
public int Date { get; set; }
public TLVector<TLAbsMessageEntity> Entities { get; set; }
public int Flags { get; set; }
2017-12-20 12:06:31 +01:00
public int Id { get; set; }
2017-12-20 12:06:31 +01:00
public TLAbsMessageMedia Media { get; set; }
2016-09-24 15:38:26 +02:00
2017-12-20 12:06:31 +01:00
public bool Out { get; set; }
public int Pts { get; set; }
public int PtsCount { 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();
Out = (Flags & 2) != 0;
Id = br.ReadInt32();
Pts = br.ReadInt32();
PtsCount = br.ReadInt32();
Date = br.ReadInt32();
if ((Flags & 512) != 0)
Media = (TLAbsMessageMedia)ObjectUtils.DeserializeObject(br);
else
Media = null;
2016-09-24 15:38:26 +02:00
if ((Flags & 128) != 0)
Entities = (TLVector<TLAbsMessageEntity>)ObjectUtils.DeserializeVector<TLAbsMessageEntity>(br);
else
Entities = null;
2016-09-24 15:38:26 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
bw.Write(Flags);
2016-09-24 15:38:26 +02:00
bw.Write(Id);
bw.Write(Pts);
bw.Write(PtsCount);
bw.Write(Date);
if ((Flags & 512) != 0)
ObjectUtils.SerializeObject(Media, bw);
if ((Flags & 128) != 0)
ObjectUtils.SerializeObject(Entities, bw);
2016-09-24 15:38:26 +02:00
}
}
}