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

namespace MyTelegram.Schema;

///<summary>
/// Peer-specific media autosave settings
/// See <a href="https://corefork.telegram.org/constructor/autoSaveException" />
///</summary>
[TlObject(0x81602d47)]
public sealed class TAutoSaveException : IAutoSaveException
{
    public uint ConstructorId => 0x81602d47;
    ///<summary>
    /// The peer
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer Peer { get; set; }

    ///<summary>
    /// Media autosave settings
    /// See <a href="https://corefork.telegram.org/type/AutoSaveSettings" />
    ///</summary>
    public MyTelegram.Schema.IAutoSaveSettings Settings { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.IPeer>();
        Settings = buffer.Read<MyTelegram.Schema.IAutoSaveSettings>();
    }
}