2017-07-20 04:07:24 +02:00
|
|
|
using System.IO;
|
2017-09-24 10:19:06 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
namespace TeleSharp.TL.Messages
|
|
|
|
|
{
|
|
|
|
|
[TLObject(847887978)]
|
|
|
|
|
public class TLRequestToggleDialogPin : TLMethod
|
|
|
|
|
{
|
|
|
|
|
public override int Constructor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return 847887978;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int flags { get; set; }
|
|
|
|
|
public bool pinned { get; set; }
|
|
|
|
|
public TLAbsInputPeer peer { get; set; }
|
|
|
|
|
public bool Response { get; set; }
|
|
|
|
|
|
|
|
|
|
public void ComputeFlags()
|
|
|
|
|
{
|
|
|
|
|
flags = 0;
|
|
|
|
|
flags = pinned ? (flags | 1) : (flags & ~1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void DeserializeBody(BinaryReader br)
|
|
|
|
|
{
|
|
|
|
|
flags = br.ReadInt32();
|
|
|
|
|
pinned = (flags & 1) != 0;
|
|
|
|
|
peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SerializeBody(BinaryWriter bw)
|
|
|
|
|
{
|
|
|
|
|
bw.Write(Constructor);
|
|
|
|
|
ComputeFlags();
|
|
|
|
|
bw.Write(flags);
|
|
|
|
|
|
|
|
|
|
ObjectUtils.SerializeObject(peer, bw);
|
|
|
|
|
}
|
2017-09-24 10:19:06 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
public override void deserializeResponse(BinaryReader br)
|
|
|
|
|
{
|
|
|
|
|
Response = BoolUtil.Deserialize(br);
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-09-24 10:19:06 +02:00
|
|
|
}
|