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

namespace MyTelegram.Schema;

///<summary>
/// The channel/supergroup's picture was changed
/// See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionChangePhoto" />
///</summary>
[TlObject(0x434bd2af)]
public sealed class TChannelAdminLogEventActionChangePhoto : IChannelAdminLogEventAction
{
    public uint ConstructorId => 0x434bd2af;
    ///<summary>
    /// Previous picture
    /// See <a href="https://corefork.telegram.org/type/Photo" />
    ///</summary>
    public MyTelegram.Schema.IPhoto PrevPhoto { get; set; }

    ///<summary>
    /// New picture
    /// See <a href="https://corefork.telegram.org/type/Photo" />
    ///</summary>
    public MyTelegram.Schema.IPhoto NewPhoto { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PrevPhoto = buffer.Read<MyTelegram.Schema.IPhoto>();
        NewPhoto = buffer.Read<MyTelegram.Schema.IPhoto>();
    }
}