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

namespace MyTelegram.Schema;

///<summary>
/// Button to open a <a href="https://corefork.telegram.org/api/bots/webapps">bot mini app</a> using <a href="https://corefork.telegram.org/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.Can only be sent or received as part of an inline keyboard, use <a href="https://corefork.telegram.org/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> for reply keyboards.
/// See <a href="https://corefork.telegram.org/constructor/keyboardButtonWebView" />
///</summary>
[TlObject(0x13767230)]
public sealed class TKeyboardButtonWebView : IKeyboardButton
{
    public uint ConstructorId => 0x13767230;
    ///<summary>
    /// Button text
    ///</summary>
    public string Text { get; set; }

    ///<summary>
    /// <a href="https://corefork.telegram.org/api/bots/webapps">Web app url</a>
    ///</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();
    }
}