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

namespace MyTelegram.Schema;

///<summary>
/// Incoming phone call signaling payload
/// See <a href="https://corefork.telegram.org/constructor/updatePhoneCallSignalingData" />
///</summary>
[TlObject(0x2661bf09)]
public sealed class TUpdatePhoneCallSignalingData : IUpdate
{
    public uint ConstructorId => 0x2661bf09;
    ///<summary>
    /// Phone call ID
    ///</summary>
    public long PhoneCallId { get; set; }

    ///<summary>
    /// Signaling payload
    ///</summary>
    public ReadOnlyMemory<byte> Data { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PhoneCallId = buffer.ReadInt64();
        Data = buffer.ReadBytes();
    }
}