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

namespace MyTelegram.Schema;

///<summary>
/// Clipboard button: when clicked, the attached text must be copied to the clipboard.
/// See <a href="https://corefork.telegram.org/constructor/keyboardButtonCopy" />
///</summary>
[TlObject(0x75d2698e)]
public sealed class TKeyboardButtonCopy : IKeyboardButton
{
    public uint ConstructorId => 0x75d2698e;
    ///<summary>
    /// Title of the button
    ///</summary>
    public string Text { get; set; }

    ///<summary>
    /// The text that will be copied to the clipboard
    ///</summary>
    public string CopyText { get; set; }

    public void ComputeFlag()
    {

    }

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

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