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

namespace MyTelegram.Schema;

///<summary>
/// Email verification purpose: setup login email
/// See <a href="https://corefork.telegram.org/constructor/emailVerifyPurposeLoginSetup" />
///</summary>
[TlObject(0x4345be73)]
public sealed class TEmailVerifyPurposeLoginSetup : IEmailVerifyPurpose
{
    public uint ConstructorId => 0x4345be73;
    ///<summary>
    /// Phone number
    ///</summary>
    public string PhoneNumber { get; set; }

    ///<summary>
    /// Phone code hash as specified by the <a href="https://corefork.telegram.org/api/auth#email-verification">documentation</a>
    ///</summary>
    public string PhoneCodeHash { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PhoneNumber = buffer.ReadString();
        PhoneCodeHash = buffer.ReadString();
    }
}