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

namespace MyTelegram.Schema.Phone;

///<summary>
/// Get info about a group call
/// <para>Possible errors</para>
/// Code Type Description
/// 403 GROUPCALL_FORBIDDEN The group call has already ended.
/// 400 GROUPCALL_INVALID The specified group call is invalid.
/// See <a href="https://corefork.telegram.org/method/phone.getGroupCall" />
///</summary>
[TlObject(0x41845db)]
public sealed class RequestGetGroupCall : IRequest<MyTelegram.Schema.Phone.IGroupCall>
{
    public uint ConstructorId => 0x41845db;
    ///<summary>
    /// The group call
    /// See <a href="https://corefork.telegram.org/type/InputGroupCall" />
    ///</summary>
    public MyTelegram.Schema.IInputGroupCall Call { get; set; }

    ///<summary>
    /// Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a>
    ///</summary>
    public int Limit { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Call = buffer.Read<MyTelegram.Schema.IInputGroupCall>();
        Limit = buffer.ReadInt32();
    }
}
