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

namespace MyTelegram.Schema;


[TlObject(0x83c95aec)]
public sealed class TPQInnerData : IPQInnerData
{
    public uint ConstructorId => 0x83c95aec;
    public byte[] Pq { get; set; }
    public byte[] P { get; set; }
    public byte[] Q { get; set; }
    public byte[] Nonce { get; set; }
    public byte[] ServerNonce { get; set; }
    public byte[] NewNonce { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Pq);
        writer.Write(P);
        writer.Write(Q);
        writer.WriteRawBytes(Nonce);
        writer.WriteRawBytes(ServerNonce);
        writer.WriteRawBytes(NewNonce);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Pq = buffer.ReadBytes();
        P = buffer.ReadBytes();
        Q = buffer.ReadBytes();
        Nonce = buffer.ReadInt128();
        ServerNonce = buffer.ReadInt128();
        NewNonce = buffer.ReadInt256();
    }
}