2016-09-24 15:38:26 +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.Account
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
[TLObject(2018596725)]
|
2016-09-24 15:38:26 +02:00
|
|
|
public class TLRequestUpdateProfile : TLMethod
|
|
|
|
|
{
|
|
|
|
|
public override int Constructor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return 2018596725;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
public int flags { get; set; }
|
|
|
|
|
public string first_name { get; set; }
|
|
|
|
|
public string last_name { get; set; }
|
|
|
|
|
public string about { get; set; }
|
|
|
|
|
public TLAbsUser Response { get; set; }
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
public void ComputeFlags()
|
|
|
|
|
{
|
|
|
|
|
flags = 0;
|
|
|
|
|
flags = first_name != null ? (flags | 1) : (flags & ~1);
|
|
|
|
|
flags = last_name != null ? (flags | 2) : (flags & ~2);
|
|
|
|
|
flags = about != null ? (flags | 4) : (flags & ~4);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
}
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
public override void DeserializeBody(BinaryReader br)
|
|
|
|
|
{
|
|
|
|
|
flags = br.ReadInt32();
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 1) != 0)
|
|
|
|
|
first_name = StringUtil.Deserialize(br);
|
|
|
|
|
else
|
|
|
|
|
first_name = null;
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 2) != 0)
|
|
|
|
|
last_name = StringUtil.Deserialize(br);
|
|
|
|
|
else
|
|
|
|
|
last_name = null;
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 4) != 0)
|
|
|
|
|
about = StringUtil.Deserialize(br);
|
|
|
|
|
else
|
|
|
|
|
about = null;
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SerializeBody(BinaryWriter bw)
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
bw.Write(Constructor);
|
2016-09-24 15:38:26 +02:00
|
|
|
ComputeFlags();
|
2017-07-20 04:07:24 +02:00
|
|
|
bw.Write(flags);
|
|
|
|
|
if ((flags & 1) != 0)
|
|
|
|
|
StringUtil.Serialize(first_name, bw);
|
|
|
|
|
if ((flags & 2) != 0)
|
|
|
|
|
StringUtil.Serialize(last_name, bw);
|
|
|
|
|
if ((flags & 4) != 0)
|
|
|
|
|
StringUtil.Serialize(about, bw);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
}
|
2017-07-20 04:07:24 +02:00
|
|
|
public override void deserializeResponse(BinaryReader br)
|
|
|
|
|
{
|
|
|
|
|
Response = (TLAbsUser)ObjectUtils.DeserializeObject(br);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
}
|
2016-09-24 15:38:26 +02:00
|
|
|
}
|
|
|
|
|
}
|