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

namespace MyTelegram.Schema;

///<summary>
/// Constructor for checking the validity of a 2FA SRP password (see <a href="https://corefork.telegram.org/api/srp">SRP</a>)
/// See <a href="https://corefork.telegram.org/constructor/inputCheckPasswordSRP" />
///</summary>
[TlObject(0xd27ff082)]
public sealed class TInputCheckPasswordSRP : IInputCheckPasswordSRP
{
    public uint ConstructorId => 0xd27ff082;
    ///<summary>
    /// <a href="https://corefork.telegram.org/api/srp">SRP ID</a>
    ///</summary>
    public long SrpId { get; set; }

    ///<summary>
    /// <code>A</code> parameter (see <a href="https://corefork.telegram.org/api/srp">SRP</a>)
    ///</summary>
    public ReadOnlyMemory<byte> A { get; set; }

    ///<summary>
    /// <code>M1</code> parameter (see <a href="https://corefork.telegram.org/api/srp">SRP</a>)
    ///</summary>
    public ReadOnlyMemory<byte> M1 { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(SrpId);
        writer.Write(A);
        writer.Write(M1);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        SrpId = buffer.ReadInt64();
        A = buffer.ReadBytes();
        M1 = buffer.ReadBytes();
    }
}