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

namespace MyTelegram.Schema;

///<summary>
/// Information about a blocked peer
/// See <a href="https://corefork.telegram.org/constructor/peerBlocked" />
///</summary>
[TlObject(0xe8fd8014)]
public sealed class TPeerBlocked : IPeerBlocked
{
    public uint ConstructorId => 0xe8fd8014;
    ///<summary>
    /// Peer ID
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer PeerId { get; set; }

    ///<summary>
    /// When was the peer blocked
    ///</summary>
    public int Date { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PeerId = buffer.Read<MyTelegram.Schema.IPeer>();
        Date = buffer.ReadInt32();
    }
}