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

namespace MyTelegram.Schema;

///<summary>
/// Contact status update.
/// See <a href="https://corefork.telegram.org/constructor/updateUserStatus" />
///</summary>
[TlObject(0xe5bdf8de)]
public sealed class TUpdateUserStatus : IUpdate
{
    public uint ConstructorId => 0xe5bdf8de;
    ///<summary>
    /// User identifier
    ///</summary>
    public long UserId { get; set; }

    ///<summary>
    /// New status
    /// See <a href="https://corefork.telegram.org/type/UserStatus" />
    ///</summary>
    public MyTelegram.Schema.IUserStatus Status { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        UserId = buffer.ReadInt64();
        Status = buffer.Read<MyTelegram.Schema.IUserStatus>();
    }
}