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

namespace MyTelegram.Schema;

///<summary>
/// Contains the current <a href="https://corefork.telegram.org/api/reactions#paid-reactions">default paid reaction privacy, see here »</a> for more info.Clients should invoke <a href="https://corefork.telegram.org/method/messages.getPaidReactionPrivacy">messages.getPaidReactionPrivacy</a> on startup to fetch the current default reaction privacy because this update is only sent to currently online sessions and cannot be fetched using getDifference on client startup.
/// See <a href="https://corefork.telegram.org/constructor/updatePaidReactionPrivacy" />
///</summary>
[TlObject(0x8b725fce)]
public sealed class TUpdatePaidReactionPrivacy : IUpdate
{
    public uint ConstructorId => 0x8b725fce;
    ///<summary>
    /// Whether paid reaction privacy is enabled or disabled.
    /// See <a href="https://corefork.telegram.org/type/PaidReactionPrivacy" />
    ///</summary>
    public MyTelegram.Schema.IPaidReactionPrivacy Private { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Private = buffer.Read<MyTelegram.Schema.IPaidReactionPrivacy>();
    }
}