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

namespace MyTelegram.Schema;

///<summary>
/// An ended group call
/// See <a href="https://corefork.telegram.org/constructor/groupCallDiscarded" />
///</summary>
[TlObject(0x7780bcb4)]
public sealed class TGroupCallDiscarded : IGroupCall
{
    public uint ConstructorId => 0x7780bcb4;
    ///<summary>
    /// Group call ID
    ///</summary>
    public long Id { get; set; }

    ///<summary>
    /// Group call access hash
    ///</summary>
    public long AccessHash { get; set; }

    ///<summary>
    /// Group call duration
    ///</summary>
    public int Duration { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Id = buffer.ReadInt64();
        AccessHash = buffer.ReadInt64();
        Duration = buffer.ReadInt32();
    }
}