TLSharp/TeleSharp.TL/TL/TLInputStickerSetItem.cs

60 lines
1.5 KiB
C#
Raw Normal View History

2017-07-10 15:52:00 +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
{
2017-07-20 00:36:50 +02:00
[TLObject(-6249322)]
2017-07-10 15:52:00 +02:00
public class TLInputStickerSetItem : TLObject
{
public override int Constructor
{
get
{
return -6249322;
}
}
2017-07-20 00:36:50 +02:00
public int flags { get; set; }
public TLAbsInputDocument document { get; set; }
public string emoji { get; set; }
public TLMaskCoords mask_coords { get; set; }
2017-07-10 15:52:00 +02:00
2017-07-20 00:36:50 +02:00
public void ComputeFlags()
{
flags = 0;
flags = mask_coords != null ? (flags | 1) : (flags & ~1);
2017-07-10 15:52:00 +02:00
2017-07-20 00:36:50 +02:00
}
2017-07-10 15:52:00 +02:00
public override void DeserializeBody(BinaryReader br)
{
flags = br.ReadInt32();
2017-07-20 00:36:50 +02:00
document = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br);
emoji = StringUtil.Deserialize(br);
if ((flags & 1) != 0)
mask_coords = (TLMaskCoords)ObjectUtils.DeserializeObject(br);
else
mask_coords = null;
2017-07-10 15:52:00 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
2017-07-20 00:36:50 +02:00
bw.Write(Constructor);
2017-07-10 15:52:00 +02:00
ComputeFlags();
2017-07-20 00:36:50 +02:00
bw.Write(flags);
ObjectUtils.SerializeObject(document, bw);
StringUtil.Serialize(emoji, bw);
if ((flags & 1) != 0)
ObjectUtils.SerializeObject(mask_coords, bw);
2017-07-10 15:52:00 +02:00
}
}
}