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

namespace MyTelegram.Schema;

///<summary>
/// Button that links directly to a user profile
/// See <a href="https://corefork.telegram.org/constructor/inputKeyboardButtonUserProfile" />
///</summary>
[TlObject(0xe988037b)]
public sealed class TInputKeyboardButtonUserProfile : IKeyboardButton
{
    public uint ConstructorId => 0xe988037b;
    ///<summary>
    /// Button text
    ///</summary>
    public string Text { get; set; }

    ///<summary>
    /// User ID
    /// See <a href="https://corefork.telegram.org/type/InputUser" />
    ///</summary>
    public MyTelegram.Schema.IInputUser UserId { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Text = buffer.ReadString();
        UserId = buffer.Read<MyTelegram.Schema.IInputUser>();
    }
}