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

namespace MyTelegram.Schema;

///<summary>
/// <a href="https://corefork.telegram.org/api/bots/menu">Bot menu button</a> that opens a <a href="https://corefork.telegram.org/api/bots/webapps">web app</a> when clicked.
/// See <a href="https://corefork.telegram.org/constructor/botMenuButton" />
///</summary>
[TlObject(0xc7b57ce6)]
public sealed class TBotMenuButton : IBotMenuButton
{
    public uint ConstructorId => 0xc7b57ce6;
    ///<summary>
    /// Title to be displayed on the menu button instead of 'Menu'
    ///</summary>
    public string Text { get; set; }

    ///<summary>
    /// URL of a <a href="https://corefork.telegram.org/api/bots/webapps">web app</a> to open when the user clicks on the button
    ///</summary>
    public string Url { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Text = buffer.ReadString();
        Url = buffer.ReadString();
    }
}