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

namespace MyTelegram.Schema.Account;

///<summary>
/// Install <a href="https://corefork.telegram.org/api/wallpapers">wallpaper</a>
/// <para>Possible errors</para>
/// Code Type Description
/// 400 WALLPAPER_INVALID The specified wallpaper is invalid.
/// See <a href="https://corefork.telegram.org/method/account.installWallPaper" />
///</summary>
[TlObject(0xfeed5769)]
public sealed class RequestInstallWallPaper : IRequest<IBool>
{
    public uint ConstructorId => 0xfeed5769;
    ///<summary>
    /// <a href="https://corefork.telegram.org/api/wallpapers">Wallpaper</a> to install
    /// See <a href="https://corefork.telegram.org/type/InputWallPaper" />
    ///</summary>
    public MyTelegram.Schema.IInputWallPaper Wallpaper { get; set; }

    ///<summary>
    /// <a href="https://corefork.telegram.org/api/wallpapers">Wallpaper</a> settings
    /// See <a href="https://corefork.telegram.org/type/WallPaperSettings" />
    ///</summary>
    public MyTelegram.Schema.IWallPaperSettings Settings { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Wallpaper = buffer.Read<MyTelegram.Schema.IInputWallPaper>();
        Settings = buffer.Read<MyTelegram.Schema.IWallPaperSettings>();
    }
}
