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

namespace MyTelegram.Schema;

///<summary>
/// Changes in notification settings.
/// See <a href="https://corefork.telegram.org/constructor/updateNotifySettings" />
///</summary>
[TlObject(0xbec268ef)]
public sealed class TUpdateNotifySettings : IUpdate
{
    public uint ConstructorId => 0xbec268ef;
    ///<summary>
    /// Notification source
    /// See <a href="https://corefork.telegram.org/type/NotifyPeer" />
    ///</summary>
    public MyTelegram.Schema.INotifyPeer Peer { get; set; }

    ///<summary>
    /// New notification settings
    /// See <a href="https://corefork.telegram.org/type/PeerNotifySettings" />
    ///</summary>
    public MyTelegram.Schema.IPeerNotifySettings NotifySettings { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.INotifyPeer>();
        NotifySettings = buffer.Read<MyTelegram.Schema.IPeerNotifySettings>();
    }
}