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

namespace MyTelegram.Schema.Account;

///<summary>
/// The email was verified correctly, and a login code was just sent to it.
/// See <a href="https://corefork.telegram.org/constructor/account.emailVerifiedLogin" />
///</summary>
[TlObject(0xe1bb0d61)]
public sealed class TEmailVerifiedLogin : IEmailVerified
{
    public uint ConstructorId => 0xe1bb0d61;
    ///<summary>
    /// The verified email address.
    ///</summary>
    public string Email { get; set; }

    ///<summary>
    /// Info about the sent <a href="https://corefork.telegram.org/api/auth">login code</a>
    /// See <a href="https://corefork.telegram.org/type/auth.SentCode" />
    ///</summary>
    public MyTelegram.Schema.Auth.ISentCode SentCode { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Email = buffer.ReadString();
        SentCode = buffer.Read<MyTelegram.Schema.Auth.ISentCode>();
    }
}