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

namespace MyTelegram.Schema.Auth;

///<summary>
/// Reset the <a href="https://core.telegram.org/api/auth#email-verification">login email »</a>.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 PHONE_NUMBER_INVALID The phone number is invalid.
/// 400 TASK_ALREADY_EXISTS An email reset was already requested.
/// See <a href="https://corefork.telegram.org/method/auth.resetLoginEmail" />
///</summary>
[TlObject(0x7e960193)]
public sealed class RequestResetLoginEmail : IRequest<MyTelegram.Schema.Auth.ISentCode>
{
    public uint ConstructorId => 0x7e960193;
    ///<summary>
    /// Phone number of the account
    ///</summary>
    public string PhoneNumber { get; set; }

    ///<summary>
    /// Phone code hash, obtained as described in the <a href="https://corefork.telegram.org/api/auth">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();
    }
}
