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

namespace MyTelegram.Schema;

///<summary>
/// Used to pay for a <a href="https://corefork.telegram.org/api/stars#star-subscriptions">Telegram Star subscription »</a>.
/// See <a href="https://corefork.telegram.org/constructor/inputInvoiceChatInviteSubscription" />
///</summary>
[TlObject(0x34e793f1)]
public sealed class TInputInvoiceChatInviteSubscription : IInputInvoice
{
    public uint ConstructorId => 0x34e793f1;
    ///<summary>
    /// The <a href="https://corefork.telegram.org/api/stars#star-subscriptions">invitation link of the Telegram Star subscription »</a>
    ///</summary>
    public string Hash { get; set; }

    public void ComputeFlag()
    {

    }

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

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