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

namespace MyTelegram.Schema;

///<summary>
/// Reference to a telegram channel
/// See <a href="https://corefork.telegram.org/constructor/pageBlockChannel" />
///</summary>
[TlObject(0xef1751b5)]
public sealed class TPageBlockChannel : IPageBlock
{
    public uint ConstructorId => 0xef1751b5;
    ///<summary>
    /// The channel/supergroup/chat
    /// See <a href="https://corefork.telegram.org/type/Chat" />
    ///</summary>
    public MyTelegram.Schema.IChat Channel { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Channel = buffer.Read<MyTelegram.Schema.IChat>();
    }
}