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

namespace MyTelegram.Schema.Account;

///<summary>
/// Send confirmation code to cancel account deletion, for more info <a href="https://corefork.telegram.org/api/account-deletion">click here »</a>
/// <para>Possible errors</para>
/// Code Type Description
/// 400 HASH_INVALID The provided hash is invalid.
/// See <a href="https://corefork.telegram.org/method/account.sendConfirmPhoneCode" />
///</summary>
[TlObject(0x1b3faa88)]
public sealed class RequestSendConfirmPhoneCode : IRequest<MyTelegram.Schema.Auth.ISentCode>
{
    public uint ConstructorId => 0x1b3faa88;
    ///<summary>
    /// The hash from the service notification, for more info <a href="https://corefork.telegram.org/api/account-deletion">click here »</a>
    ///</summary>
    public string Hash { get; set; }

    ///<summary>
    /// Phone code settings
    /// See <a href="https://corefork.telegram.org/type/CodeSettings" />
    ///</summary>
    public MyTelegram.Schema.ICodeSettings Settings { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Hash = buffer.ReadString();
        Settings = buffer.Read<MyTelegram.Schema.ICodeSettings>();
    }
}
