// <auto-generated/>
// ReSharper disable All

namespace MyTelegram.Schema;

///<summary>
/// Shortened constructor containing info on one update not requiring auxiliary data
/// See <a href="https://corefork.telegram.org/constructor/updateShort" />
///</summary>
[TlObject(0x78d4dec1)]
public sealed class TUpdateShort : IUpdates
{
    public uint ConstructorId => 0x78d4dec1;
    ///<summary>
    /// Update
    /// See <a href="https://corefork.telegram.org/type/Update" />
    ///</summary>
    public MyTelegram.Schema.IUpdate Update { get; set; }

    ///<summary>
    /// Date of event
    ///</summary>
    public int Date { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Update);
        writer.Write(Date);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Update = buffer.Read<MyTelegram.Schema.IUpdate>();
        Date = buffer.ReadInt32();
    }
}