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

namespace MyTelegram.Schema.Photos;

///<summary>
/// Incomplete list of photos with auxiliary data.
/// See <a href="https://corefork.telegram.org/constructor/photos.photosSlice" />
///</summary>
[TlObject(0x15051f54)]
public sealed class TPhotosSlice : IPhotos
{
    public uint ConstructorId => 0x15051f54;
    ///<summary>
    /// Total number of photos
    ///</summary>
    public int Count { get; set; }

    ///<summary>
    /// List of photos
    ///</summary>
    public TVector<MyTelegram.Schema.IPhoto> Photos { get; set; }

    ///<summary>
    /// List of mentioned users
    ///</summary>
    public TVector<MyTelegram.Schema.IUser> Users { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Count = buffer.ReadInt32();
        Photos = buffer.Read<TVector<MyTelegram.Schema.IPhoto>>();
        Users = buffer.Read<TVector<MyTelegram.Schema.IUser>>();
    }
}