// <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/keyboardButtonUserProfile" />
///</summary>
[TlObject(0x308660c1)]
public sealed class TKeyboardButtonUserProfile : IKeyboardButton
{
    public uint ConstructorId => 0x308660c1;
    ///<summary>
    /// Button text
    ///</summary>
    public string Text { get; set; }

    ///<summary>
    /// User ID
    ///</summary>
    public long 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.ReadInt64();
    }
}