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

namespace MyTelegram.Schema;

///<summary>
/// User (<a href="https://corefork.telegram.org/constructor/user">user</a> and/or <a href="https://corefork.telegram.org/constructor/userFull">userFull</a>) information was updated.This update can only be received through getDifference or in <a href="https://corefork.telegram.org/constructor/updates">updates</a>/<a href="https://corefork.telegram.org/constructor/updatesCombined">updatesCombined</a> constructors, so it will <strong>always</strong> come bundled with the updated <a href="https://corefork.telegram.org/constructor/user">user</a>, that should be applied <a href="https://corefork.telegram.org/api/peers">as usual »</a>, <strong>without</strong> re-fetching the info manually.However, full peer information will not come bundled in updates, so the full peer cache (<a href="https://corefork.telegram.org/constructor/userFull">userFull</a>) must be invalidated for <code>user_id</code> when receiving this update.
/// See <a href="https://corefork.telegram.org/constructor/updateUser" />
///</summary>
[TlObject(0x20529438)]
public sealed class TUpdateUser : IUpdate
{
    public uint ConstructorId => 0x20529438;
    ///<summary>
    /// User ID
    ///</summary>
    public long UserId { get; set; }

    public void ComputeFlag()
    {

    }

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

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