TLSharp/TeleSharp.TL/TL/Payments/TLRequestValidateRequestedInfo.cs

61 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.Payments
{
2017-07-20 00:36:50 +02:00
[TLObject(1997180532)]
2017-07-10 15:52:00 +02:00
public class TLRequestValidateRequestedInfo : TLMethod
{
public override int Constructor
{
get
{
return 1997180532;
}
}
2017-07-20 00:36:50 +02:00
public int flags { get; set; }
public bool save { get; set; }
public int msg_id { get; set; }
public TLPaymentRequestedInfo info { get; set; }
public Payments.TLValidatedRequestedInfo Response { get; set; }
2017-07-10 15:52:00 +02:00
2017-07-20 00:36:50 +02:00
public void ComputeFlags()
{
flags = 0;
flags = save ? (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
save = (flags & 1) != 0;
msg_id = br.ReadInt32();
info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
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);
2017-07-10 15:52:00 +02:00
2017-07-20 00:36:50 +02:00
bw.Write(msg_id);
ObjectUtils.SerializeObject(info, bw);
2017-07-10 15:52:00 +02:00
}
2017-07-20 00:36:50 +02:00
public override void deserializeResponse(BinaryReader br)
{
Response = (Payments.TLValidatedRequestedInfo)ObjectUtils.DeserializeObject(br);
2017-07-10 15:52:00 +02:00
2017-07-20 00:36:50 +02:00
}
2017-07-10 15:52:00 +02:00
}
}