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

namespace MyTelegram.Schema;

///<summary>
/// Sent message with <strong>random_id</strong> client identifier was assigned an identifier.
/// See <a href="https://corefork.telegram.org/constructor/updateMessageID" />
///</summary>
[TlObject(0x4e90bfd6)]
public sealed class TUpdateMessageID : IUpdate
{
    public uint ConstructorId => 0x4e90bfd6;
    ///<summary>
    /// <strong>id</strong> identifier of a respective <a href="https://corefork.telegram.org/type/Message">Message</a>
    ///</summary>
    public int Id { get; set; }

    ///<summary>
    /// Previously transferred client <strong>random_id</strong> identifier
    ///</summary>
    public long RandomId { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Id = buffer.ReadInt32();
        RandomId = buffer.ReadInt64();
    }
}