// <auto-generated/>

namespace MyTelegram.Schema;


[TlObject(0x56fddf88)]
public sealed class TPQInnerDataTempDc : IPQInnerData
{
    public uint ConstructorId => 0x56fddf88;
    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 int Dc { get; set; }
    public int ExpiresIn { 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);
        writer.Write(Dc);
        writer.Write(ExpiresIn);
    }

    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();
        Dc = buffer.ReadInt32();
        ExpiresIn = buffer.ReadInt32();
    }
}