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

namespace MyTelegram.Schema.Account;

///<summary>
/// Save a theme
/// <para>Possible errors</para>
/// Code Type Description
/// 400 THEME_INVALID Invalid theme provided.
/// See <a href="https://corefork.telegram.org/method/account.saveTheme" />
///</summary>
[TlObject(0xf257106c)]
public sealed class RequestSaveTheme : IRequest<IBool>
{
    public uint ConstructorId => 0xf257106c;
    ///<summary>
    /// Theme to save
    /// See <a href="https://corefork.telegram.org/type/InputTheme" />
    ///</summary>
    public MyTelegram.Schema.IInputTheme Theme { get; set; }

    ///<summary>
    /// Unsave
    /// See <a href="https://corefork.telegram.org/type/Bool" />
    ///</summary>
    public bool Unsave { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Theme = buffer.Read<MyTelegram.Schema.IInputTheme>();
        Unsave = buffer.Read();
    }
}
