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

namespace MyTelegram.Schema.Phone;

///<summary>
/// Terminate a group call
/// <para>Possible errors</para>
/// Code Type Description
/// 400 GROUPCALL_ALREADY_DISCARDED The group call was already discarded.
/// 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.discardGroupCall" />
///</summary>
[TlObject(0x7a777135)]
public sealed class RequestDiscardGroupCall : IRequest<MyTelegram.Schema.IUpdates>
{
    public uint ConstructorId => 0x7a777135;
    ///<summary>
    /// The group call to terminate
    /// See <a href="https://corefork.telegram.org/type/InputGroupCall" />
    ///</summary>
    public MyTelegram.Schema.IInputGroupCall Call { get; set; }

    public void ComputeFlag()
    {

    }

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

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