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

namespace MyTelegram.Schema.Channels;

///<summary>
/// Get forum topics by their ID
/// <para>Possible errors</para>
/// Code Type Description
/// 400 CHANNEL_FORUM_MISSING This supergroup is not a forum.
/// 400 CHANNEL_INVALID The provided channel is invalid.
/// 400 TOPICS_EMPTY You specified no topic IDs.
/// See <a href="https://corefork.telegram.org/method/channels.getForumTopicsByID" />
///</summary>
[TlObject(0xb0831eb9)]
public sealed class RequestGetForumTopicsByID : IRequest<MyTelegram.Schema.Messages.IForumTopics>
{
    public uint ConstructorId => 0xb0831eb9;
    ///<summary>
    /// Forum
    /// See <a href="https://corefork.telegram.org/type/InputChannel" />
    ///</summary>
    public MyTelegram.Schema.IInputChannel Channel { get; set; }

    ///<summary>
    /// Topic IDs
    ///</summary>
    public TVector<int> Topics { get; set; }

    public void ComputeFlag()
    {

    }

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

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