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

namespace MyTelegram.Schema.Account;

///<summary>
/// Log out an active web <a href="https://corefork.telegram.org/widgets/login">telegram login</a> session
/// <para>Possible errors</para>
/// Code Type Description
/// 400 HASH_INVALID The provided hash is invalid.
/// See <a href="https://corefork.telegram.org/method/account.resetWebAuthorization" />
///</summary>
[TlObject(0x2d01b9ef)]
public sealed class RequestResetWebAuthorization : IRequest<IBool>
{
    public uint ConstructorId => 0x2d01b9ef;
    ///<summary>
    /// <a href="https://corefork.telegram.org/constructor/webAuthorization">Session</a> 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();
    }
}
