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

namespace MyTelegram.Schema;

///<summary>
/// <a href="https://corefork.telegram.org/method/channels.toggleSlowMode">Slow mode setting for supergroups was changed</a>
/// See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionToggleSlowMode" />
///</summary>
[TlObject(0x53909779)]
public sealed class TChannelAdminLogEventActionToggleSlowMode : IChannelAdminLogEventAction
{
    public uint ConstructorId => 0x53909779;
    ///<summary>
    /// Previous slow mode value
    ///</summary>
    public int PrevValue { get; set; }

    ///<summary>
    /// New slow mode value
    ///</summary>
    public int NewValue { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PrevValue = buffer.ReadInt32();
        NewValue = buffer.ReadInt32();
    }
}