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

namespace MyTelegram.Schema.Contacts;

///<summary>
/// See <a href="https://corefork.telegram.org/constructor/contacts.sponsoredPeers" />
///</summary>
[TlObject(0xeb032884)]
public sealed class TSponsoredPeers : ISponsoredPeers
{
    public uint ConstructorId => 0xeb032884;
    public TVector<MyTelegram.Schema.ISponsoredPeer> Peers { get; set; }
    public TVector<MyTelegram.Schema.IChat> Chats { 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(Peers);
        writer.Write(Chats);
        writer.Write(Users);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peers = buffer.Read<TVector<MyTelegram.Schema.ISponsoredPeer>>();
        Chats = buffer.Read<TVector<MyTelegram.Schema.IChat>>();
        Users = buffer.Read<TVector<MyTelegram.Schema.IUser>>();
    }
}