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

namespace MyTelegram.Schema.Account;

///<summary>
/// Log out an active <a href="https://corefork.telegram.org/api/auth">authorized session</a> by its hash
/// <para>Possible errors</para>
/// Code Type Description
/// 406 FRESH_RESET_AUTHORISATION_FORBIDDEN You can't logout other sessions if less than 24 hours have passed since you logged on the current session.
/// 400 HASH_INVALID The provided hash is invalid.
/// See <a href="https://corefork.telegram.org/method/account.resetAuthorization" />
///</summary>
[TlObject(0xdf77f3bc)]
public sealed class RequestResetAuthorization : IRequest<IBool>
{
    public uint ConstructorId => 0xdf77f3bc;
    ///<summary>
    /// Session hash
    ///</summary>
    public long Hash { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Hash = buffer.ReadInt64();
    }
}
