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

namespace MyTelegram.Schema;

///<summary>
/// Chat partner
/// See <a href="https://corefork.telegram.org/constructor/peerUser" />
///</summary>
[TlObject(0x59511722)]
public sealed class TPeerUser : IPeer
{
    public uint ConstructorId => 0x59511722;
    ///<summary>
    /// User identifier
    ///</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();
    }
}