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

namespace MyTelegram.Schema.Messages;

///<summary>
/// See <a href="https://corefork.telegram.org/constructor/messages.webPagePreview" />
///</summary>
[TlObject(0xb53e8b21)]
public sealed class TWebPagePreview : IWebPagePreview
{
    public uint ConstructorId => 0xb53e8b21;
    public MyTelegram.Schema.IMessageMedia Media { get; set; }
    public TVector<MyTelegram.Schema.IUser> Users { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Media = buffer.Read<MyTelegram.Schema.IMessageMedia>();
        Users = buffer.Read<TVector<MyTelegram.Schema.IUser>>();
    }
}