// <auto-generated/>

namespace MyTelegram.Schema;

[TlObject(0xd712e4be)]
public sealed class RequestReqDHParams : IRequest<MyTelegram.Schema.IServerDHParams>
{
    public uint ConstructorId => 0xd712e4be;
    public byte[] Nonce { get; set; }
    public byte[] ServerNonce { get; set; }
    public byte[] P { get; set; }
    public byte[] Q { get; set; }
    public long PublicKeyFingerprint { get; set; }
    public byte[] EncryptedData { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Nonce = buffer.ReadInt128();
        ServerNonce = buffer.ReadInt128();
        P = buffer.ReadBytes();
        Q = buffer.ReadBytes();
        PublicKeyFingerprint = buffer.ReadInt64();
        EncryptedData = buffer.ReadBytes();
    }
}
