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

namespace MyTelegram.Schema.Account;

///<summary>
/// Set account self-destruction period
/// <para>Possible errors</para>
/// Code Type Description
/// 400 TTL_DAYS_INVALID The provided TTL is invalid.
/// See <a href="https://corefork.telegram.org/method/account.setAccountTTL" />
///</summary>
[TlObject(0x2442485e)]
public sealed class RequestSetAccountTTL : IRequest<IBool>
{
    public uint ConstructorId => 0x2442485e;
    ///<summary>
    /// Time to live in days
    /// See <a href="https://corefork.telegram.org/type/AccountDaysTTL" />
    ///</summary>
    public MyTelegram.Schema.IAccountDaysTTL Ttl { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Ttl = buffer.Read<MyTelegram.Schema.IAccountDaysTTL>();
    }
}
