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

namespace MyTelegram.Schema;

///<summary>
/// A message was edited
/// See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionEditMessage" />
///</summary>
[TlObject(0x709b2405)]
public sealed class TChannelAdminLogEventActionEditMessage : IChannelAdminLogEventAction
{
    public uint ConstructorId => 0x709b2405;
    ///<summary>
    /// Old message
    /// See <a href="https://corefork.telegram.org/type/Message" />
    ///</summary>
    public MyTelegram.Schema.IMessage PrevMessage { get; set; }

    ///<summary>
    /// New message
    /// See <a href="https://corefork.telegram.org/type/Message" />
    ///</summary>
    public MyTelegram.Schema.IMessage NewMessage { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PrevMessage = buffer.Read<MyTelegram.Schema.IMessage>();
        NewMessage = buffer.Read<MyTelegram.Schema.IMessage>();
    }
}