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

namespace MyTelegram.Schema;

///<summary>
/// The default banned rights were modified
/// See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionDefaultBannedRights" />
///</summary>
[TlObject(0x2df5fc0a)]
public sealed class TChannelAdminLogEventActionDefaultBannedRights : IChannelAdminLogEventAction
{
    public uint ConstructorId => 0x2df5fc0a;
    ///<summary>
    /// Previous global <a href="https://corefork.telegram.org/api/rights">banned rights</a>
    /// See <a href="https://corefork.telegram.org/type/ChatBannedRights" />
    ///</summary>
    public MyTelegram.Schema.IChatBannedRights PrevBannedRights { get; set; }

    ///<summary>
    /// New global <a href="https://corefork.telegram.org/api/rights">banned rights</a>.
    /// See <a href="https://corefork.telegram.org/type/ChatBannedRights" />
    ///</summary>
    public MyTelegram.Schema.IChatBannedRights NewBannedRights { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PrevBannedRights = buffer.Read<MyTelegram.Schema.IChatBannedRights>();
        NewBannedRights = buffer.Read<MyTelegram.Schema.IChatBannedRights>();
    }
}