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

namespace MyTelegram.Schema.Auth;

///<summary>
/// The user successfully authorized using <a href="https://corefork.telegram.org/api/auth#future-auth-tokens">future auth tokens</a>
/// See <a href="https://corefork.telegram.org/constructor/auth.sentCodeSuccess" />
///</summary>
[TlObject(0x2390fe44)]
public sealed class TSentCodeSuccess : ISentCode
{
    public uint ConstructorId => 0x2390fe44;
    ///<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>();
    }
}