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

namespace MyTelegram.Schema;

///<summary>
/// The <a href="https://corefork.telegram.org/api/wallpapers">wallpaper</a> was changed
/// See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionChangeWallpaper" />
///</summary>
[TlObject(0x31bb5d52)]
public sealed class TChannelAdminLogEventActionChangeWallpaper : IChannelAdminLogEventAction
{
    public uint ConstructorId => 0x31bb5d52;
    ///<summary>
    /// Previous wallpaper
    /// See <a href="https://corefork.telegram.org/type/WallPaper" />
    ///</summary>
    public MyTelegram.Schema.IWallPaper PrevValue { get; set; }

    ///<summary>
    /// New wallpaper
    /// See <a href="https://corefork.telegram.org/type/WallPaper" />
    ///</summary>
    public MyTelegram.Schema.IWallPaper 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.Read<MyTelegram.Schema.IWallPaper>();
        NewValue = buffer.Read<MyTelegram.Schema.IWallPaper>();
    }
}