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

namespace MyTelegram.Schema.Auth;

///<summary>
/// Login via token (QR code) succeeded!
/// See <a href="https://corefork.telegram.org/constructor/auth.loginTokenSuccess" />
///</summary>
[TlObject(0x390d5c5e)]
public sealed class TLoginTokenSuccess : ILoginToken
{
    public uint ConstructorId => 0x390d5c5e;
    ///<summary>
    /// Authorization info
    /// See <a href="https://corefork.telegram.org/type/auth.Authorization" />
    ///</summary>
    public MyTelegram.Schema.Auth.IAuthorization Authorization { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Authorization = buffer.Read<MyTelegram.Schema.Auth.IAuthorization>();
    }
}