TLSharp/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs

59 lines
1.5 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
{
2017-12-20 12:06:31 +01:00
[TLObject(792191537)]
2016-09-24 15:38:26 +02:00
public class TLInputMediaUploadedPhoto : TLAbsInputMedia
{
2017-12-20 12:06:31 +01:00
public string Caption { get; set; }
2016-09-24 15:38:26 +02:00
public override int Constructor
{
get
{
2017-12-20 12:06:31 +01:00
return 792191537;
2016-09-24 15:38:26 +02:00
}
}
public TLAbsInputFile File { get; set; }
2017-12-20 12:06:31 +01:00
public int Flags { get; set; }
public TLVector<TLAbsInputDocument> Stickers { get; set; }
2016-09-24 15:38:26 +02:00
2017-12-20 12:06:31 +01:00
public int? TtlSeconds { 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();
File = (TLAbsInputFile)ObjectUtils.DeserializeObject(br);
Caption = StringUtil.Deserialize(br);
if ((Flags & 1) != 0)
Stickers = (TLVector<TLAbsInputDocument>)ObjectUtils.DeserializeVector<TLAbsInputDocument>(br);
else
Stickers = null;
2016-10-13 19:33:16 +02:00
2017-12-20 12:06:31 +01:00
if ((Flags & 2) != 0)
TtlSeconds = br.ReadInt32();
else
TtlSeconds = null;
2016-09-24 15:38:26 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
bw.Write(Flags);
ObjectUtils.SerializeObject(File, bw);
StringUtil.Serialize(Caption, bw);
if ((Flags & 1) != 0)
ObjectUtils.SerializeObject(Stickers, bw);
2017-12-20 12:06:31 +01:00
if ((Flags & 2) != 0)
bw.Write(TtlSeconds.Value);
2016-09-24 15:38:26 +02:00
}
}
}