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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Returns chat basic info on their IDs.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 CHAT_ID_INVALID The provided chat id is invalid.
/// 400 PEER_ID_INVALID The provided peer id is invalid.
/// See <a href="https://corefork.telegram.org/method/messages.getChats" />
///</summary>
[TlObject(0x49e9528f)]
public sealed class RequestGetChats : IRequest<MyTelegram.Schema.Messages.IChats>
{
    public uint ConstructorId => 0x49e9528f;
    ///<summary>
    /// List of chat IDs
    ///</summary>
    public TVector<long> Id { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Id = buffer.Read<TVector<long>>();
    }
}
