/* install-job.c generated by valac 0.56.19, the Vala compiler
 * generated from install-job.vala, do not modify */

#include "protonplus_core.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <float.h>
#include <math.h>
#include <glib-object.h>
#include <gee.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PROTON_PLUS_SERVICES_INSTALL_JOB_0_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_RELEASE_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_TOOL_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_ASSET_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_NAME_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_ID_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_LOCATION_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_REPLACEMENT_BACKUP_PATH_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_TINKER_LAUNCH_CONTEXT_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_CANCELED_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_SPEED_KBPS_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_SECONDS_REMAINING_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_IS_PERCENT_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_IS_FINISHED_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_SUCCESS_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_ERROR_MESSAGE_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_HAS_STEAM_RESTART_RECORD_RESULT_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_RECORD_RESULT_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_WARNING_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_TITLE_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_DISPLAYED_TITLE_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_USAGE_NAME_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_OPERATION_ID_PROPERTY,
	PROTON_PLUS_SERVICES_INSTALL_JOB_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _ProtonPlusServicesInstallJobInstallData ProtonPlusServicesInstallJobInstallData;
typedef struct _ProtonPlusServicesInstallJobInstallReplacementData ProtonPlusServicesInstallJobInstallReplacementData;
typedef struct _ProtonPlusServicesInstallJobUpdateData ProtonPlusServicesInstallJobUpdateData;
typedef struct _ProtonPlusServicesInstallJobRemoveData ProtonPlusServicesInstallJobRemoveData;
typedef struct _ProtonPlusServicesInstallJobDownloadArchiveData ProtonPlusServicesInstallJobDownloadArchiveData;
typedef struct _ProtonPlusServicesInstallJobPromoteStagedInstallationData ProtonPlusServicesInstallJobPromoteStagedInstallationData;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
enum  {
	PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_UPDATED_SIGNAL,
	PROTON_PLUS_SERVICES_INSTALL_JOB_NUM_SIGNALS
};
static guint proton_plus_services_install_job_signals[PROTON_PLUS_SERVICES_INSTALL_JOB_NUM_SIGNALS] = {0};

struct _ProtonPlusServicesInstallJobPrivate {
	ProtonPlusModelsRelease* _release;
	ProtonPlusModelsTool* _tool;
	ProtonPlusServicesInstallJobMode _mode;
	ProtonPlusModelsAssetsAsset* _selected_asset;
	ProtonPlusModelsProvidersArchiveInstallRequirement _archive_install_requirement;
	gchar* _selected_variant_name;
	gchar* _selected_variant_id;
	gchar* _install_location;
	gchar* installation_location_override;
	gchar* _replacement_backup_path;
	ProtonPlusServicesSteamTinkerLaunchContext* _steam_tinker_launch_context;
	GCancellable* operation_cancellable;
	gboolean _canceled;
	gchar* _progress;
	gdouble _speed_kbps;
	gdouble _seconds_remaining;
	gboolean _is_percent;
	gboolean _is_finished;
	gboolean _install_success;
	gchar* _error_message;
	gboolean _has_steam_restart_record_result;
	ProtonPlusServicesSteamRestartRecordResult _steam_restart_record_result;
	gchar* _steam_restart_warning;
	ProtonPlusModelsSteamChangeKind* recorded_steam_change_kind;
	ProtonPlusServicesInstallJobState _state;
	ProtonPlusServicesInstallJobStep _step;
};

struct _ProtonPlusServicesInstallJobInstallData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesInstallJob* self;
	ProtonPlusReturnCode result;
	ProtonPlusServicesInstallationService* _tmp0_;
	ProtonPlusServicesInstallationService* _tmp1_;
};

struct _ProtonPlusServicesInstallJobInstallReplacementData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesInstallJob* self;
	ProtonPlusReturnCode result;
	ProtonPlusServicesInstallationService* _tmp0_;
	ProtonPlusServicesInstallationService* _tmp1_;
};

struct _ProtonPlusServicesInstallJobUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesInstallJob* self;
	ProtonPlusReturnCode result;
	ProtonPlusServicesInstallationService* _tmp0_;
	ProtonPlusServicesInstallationService* _tmp1_;
};

struct _ProtonPlusServicesInstallJobRemoveData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesInstallJob* self;
	gboolean notify_removal;
	ProtonPlusReturnCode result;
	ProtonPlusServicesInstallationService* _tmp0_;
	ProtonPlusServicesInstallationService* _tmp1_;
};

struct _ProtonPlusServicesInstallJobDownloadArchiveData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesInstallJob* self;
	gchar* url;
	gchar* path;
	gchar* error_message;
	gboolean result;
	GCancellable* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
};

struct _ProtonPlusServicesInstallJobPromoteStagedInstallationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesInstallJob* self;
	gchar* staged_install_path;
	gboolean result;
	const gchar* _tmp0_;
};

static gint ProtonPlusServicesInstallJob_private_offset;
static gpointer proton_plus_services_install_job_parent_class = NULL;

static void proton_plus_services_install_job_set_release (ProtonPlusServicesInstallJob* self,
                                                   ProtonPlusModelsRelease* value);
static void proton_plus_services_install_job_set_tool (ProtonPlusServicesInstallJob* self,
                                                ProtonPlusModelsTool* value);
static void proton_plus_services_install_job_set_selected_asset (ProtonPlusServicesInstallJob* self,
                                                          ProtonPlusModelsAssetsAsset* value);
static void proton_plus_services_install_job_set_archive_install_requirement (ProtonPlusServicesInstallJob* self,
                                                                       ProtonPlusModelsProvidersArchiveInstallRequirement value);
static void proton_plus_services_install_job_set_mode (ProtonPlusServicesInstallJob* self,
                                                ProtonPlusServicesInstallJobMode value);
VALA_EXTERN ProtonPlusServicesSteamTinkerLaunchContext* proton_plus_services_steam_tinker_launch_context_new (ProtonPlusModelsTool* tool,
                                                                                                  const gchar* home_override);
VALA_EXTERN ProtonPlusServicesSteamTinkerLaunchContext* proton_plus_services_steam_tinker_launch_context_construct (GType object_type,
                                                                                                        ProtonPlusModelsTool* tool,
                                                                                                        const gchar* home_override);
static void proton_plus_services_install_job_set_steam_tinker_launch_context (ProtonPlusServicesInstallJob* self,
                                                                       ProtonPlusServicesSteamTinkerLaunchContext* value);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_base_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
static void proton_plus_services_install_job_set_install_location (ProtonPlusServicesInstallJob* self,
                                                            const gchar* value);
static void proton_plus_services_install_job_update_install_location (ProtonPlusServicesInstallJob* self,
                                                               const gchar* override_location);
static gchar* proton_plus_services_install_job_mode_id (ProtonPlusServicesInstallJob* self);
static gchar* proton_plus_services_install_job_effective_directory_name (ProtonPlusServicesInstallJob* self,
                                                                  ProtonPlusModelsToolsProviderTool* provider_tool);
static void proton_plus_services_install_job_set_selected_variant_name (ProtonPlusServicesInstallJob* self,
                                                                 const gchar* value);
static void proton_plus_services_install_job_set_selected_variant_id (ProtonPlusServicesInstallJob* self,
                                                               const gchar* value);
static ProtonPlusModelsVariant* proton_plus_services_install_job_selected_variant (ProtonPlusServicesInstallJob* self);
VALA_EXTERN void proton_plus_services_install_job_apply_selected_release_variant (ProtonPlusServicesInstallJob* self,
                                                                      ProtonPlusModelsVariant* variant);
static void proton_plus_services_install_job_install_data_free (gpointer _data);
static gboolean proton_plus_services_install_job_install_co (ProtonPlusServicesInstallJobInstallData* _data_);
static void proton_plus_services_install_job_install_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
static void proton_plus_services_install_job_install_replacement_data_free (gpointer _data);
static gboolean proton_plus_services_install_job_install_replacement_co (ProtonPlusServicesInstallJobInstallReplacementData* _data_);
static void proton_plus_services_install_job_install_replacement_ready (GObject* source_object,
                                                                 GAsyncResult* _res_,
                                                                 gpointer _user_data_);
static void proton_plus_services_install_job_update_data_free (gpointer _data);
static gboolean proton_plus_services_install_job_update_co (ProtonPlusServicesInstallJobUpdateData* _data_);
static void proton_plus_services_install_job_update_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
static void proton_plus_services_install_job_remove_data_free (gpointer _data);
static gboolean proton_plus_services_install_job_remove_co (ProtonPlusServicesInstallJobRemoveData* _data_);
static void proton_plus_services_install_job_remove_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
static void proton_plus_services_install_job_real_download_archive_data_free (gpointer _data);
static void proton_plus_services_install_job_real_download_archive (ProtonPlusServicesInstallJob* self,
                                                             const gchar* url,
                                                             const gchar* path,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_);
static gboolean proton_plus_services_install_job_real_download_archive_co (ProtonPlusServicesInstallJobDownloadArchiveData* _data_);
VALA_EXTERN void proton_plus_services_install_job_report_progress (ProtonPlusServicesInstallJob* self,
                                                       gboolean is_percent,
                                                       gint64 progress,
                                                       gdouble speed_kbps,
                                                       gdouble* remaining_seconds);
static void _proton_plus_services_install_job_report_progress_protonplusutilswebprogress_callback (gboolean is_percent,
                                                                                            gint64 progress_percentage,
                                                                                            gdouble speed_kbps,
                                                                                            gdouble* remaining_seconds,
                                                                                            gpointer self);
static void proton_plus_services_install_job_download_archive_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_);
static void proton_plus_services_install_job_real_promote_staged_installation_data_free (gpointer _data);
static void proton_plus_services_install_job_real_promote_staged_installation (ProtonPlusServicesInstallJob* self,
                                                                        const gchar* staged_install_path,
                                                                        GAsyncReadyCallback _callback_,
                                                                        gpointer _user_data_);
static gboolean proton_plus_services_install_job_real_promote_staged_installation_co (ProtonPlusServicesInstallJobPromoteStagedInstallationData* _data_);
static void proton_plus_services_install_job_promote_staged_installation_ready (GObject* source_object,
                                                                         GAsyncResult* _res_,
                                                                         gpointer _user_data_);
VALA_EXTERN GCancellable* proton_plus_services_install_job_get_cancellable (ProtonPlusServicesInstallJob* self);
VALA_EXTERN void proton_plus_services_install_job_begin_operation (ProtonPlusServicesInstallJob* self);
VALA_EXTERN void proton_plus_services_install_job_set_replacement_backup_path (ProtonPlusServicesInstallJob* self,
                                                                   const gchar* value);
VALA_EXTERN void proton_plus_services_install_job_set_is_finished (ProtonPlusServicesInstallJob* self,
                                                       gboolean value);
VALA_EXTERN void proton_plus_services_install_job_set_install_success (ProtonPlusServicesInstallJob* self,
                                                           gboolean value);
VALA_EXTERN void proton_plus_services_install_job_set_error_message (ProtonPlusServicesInstallJob* self,
                                                         const gchar* value);
VALA_EXTERN void proton_plus_services_install_job_set_progress (ProtonPlusServicesInstallJob* self,
                                                    const gchar* value);
VALA_EXTERN void proton_plus_services_install_job_set_speed_kbps (ProtonPlusServicesInstallJob* self,
                                                      gdouble value);
VALA_EXTERN void proton_plus_services_install_job_set_seconds_remaining (ProtonPlusServicesInstallJob* self,
                                                             gdouble value);
VALA_EXTERN void proton_plus_services_install_job_set_is_percent (ProtonPlusServicesInstallJob* self,
                                                      gboolean value);
VALA_EXTERN gboolean proton_plus_services_install_job_mark_steam_change_recorded (ProtonPlusServicesInstallJob* self,
                                                                      ProtonPlusModelsSteamChangeKind kind);
static gboolean _proton_plus_models_steam_change_kind_equal (const ProtonPlusModelsSteamChangeKind * s1,
                                                      const ProtonPlusModelsSteamChangeKind * s2);
static ProtonPlusModelsSteamChangeKind* _proton_plus_models_steam_change_kind_dup (ProtonPlusModelsSteamChangeKind* self);
VALA_EXTERN void proton_plus_services_install_job_finish_operation (ProtonPlusServicesInstallJob* self);
VALA_EXTERN void proton_plus_services_install_job_set_state (ProtonPlusServicesInstallJob* self,
                                                 ProtonPlusServicesInstallJobState value);
static gdouble* _double_dup (gdouble* self);
VALA_EXTERN void proton_plus_services_installation_service_refresh_job_state (ProtonPlusServicesInstallationService* self,
                                                                  ProtonPlusServicesInstallJob* job);
VALA_EXTERN gchar* proton_plus_services_install_job_selected_variant_identity (ProtonPlusServicesInstallJob* self);
VALA_EXTERN gchar* proton_plus_services_install_job_effective_directory_name_for_state (ProtonPlusServicesInstallJob* self);
VALA_EXTERN const gchar* proton_plus_services_install_job_get_replacement_backup_path (ProtonPlusServicesInstallJob* self);
VALA_EXTERN void proton_plus_services_install_job_set_has_steam_restart_record_result (ProtonPlusServicesInstallJob* self,
                                                                           gboolean value);
VALA_EXTERN void proton_plus_services_install_job_set_steam_restart_record_result (ProtonPlusServicesInstallJob* self,
                                                                       ProtonPlusServicesSteamRestartRecordResult value);
VALA_EXTERN void proton_plus_services_install_job_set_steam_restart_warning (ProtonPlusServicesInstallJob* self,
                                                                 const gchar* value);
VALA_EXTERN void proton_plus_services_install_job_set_step (ProtonPlusServicesInstallJob* self,
                                                ProtonPlusServicesInstallJobStep value);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_local_date (ProtonPlusServicesSteamTinkerLaunchContext* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_latest_date (ProtonPlusServicesSteamTinkerLaunchContext* self);
static void proton_plus_services_install_job_finalize (GObject * obj);
static GType proton_plus_services_install_job_get_type_once (void);
static void _vala_proton_plus_services_install_job_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);
static void _vala_proton_plus_services_install_job_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_services_install_job_get_instance_private (ProtonPlusServicesInstallJob* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesInstallJob_private_offset);
}

static GType
proton_plus_services_install_job_step_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_NOTHING, "PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_NOTHING", "nothing"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_DOWNLOADING, "PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_DOWNLOADING", "downloading"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_EXTRACTING, "PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_EXTRACTING", "extracting"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_MOVING, "PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_MOVING", "moving"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_REMOVING, "PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_REMOVING", "removing"}, {0, NULL, NULL}};
	GType proton_plus_services_install_job_step_type_id;
	proton_plus_services_install_job_step_type_id = g_enum_register_static ("ProtonPlusServicesInstallJobStep", values);
	return proton_plus_services_install_job_step_type_id;
}

GType
proton_plus_services_install_job_step_get_type (void)
{
	static volatile gsize proton_plus_services_install_job_step_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_install_job_step_type_id__once)) {
		GType proton_plus_services_install_job_step_type_id;
		proton_plus_services_install_job_step_type_id = proton_plus_services_install_job_step_get_type_once ();
		g_once_init_leave (&proton_plus_services_install_job_step_type_id__once, proton_plus_services_install_job_step_type_id);
	}
	return proton_plus_services_install_job_step_type_id__once;
}

static GType
proton_plus_services_install_job_state_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_NOT_INSTALLED, "PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_NOT_INSTALLED", "not-installed"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UPDATE_AVAILABLE, "PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UPDATE_AVAILABLE", "update-available"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UP_TO_DATE, "PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UP_TO_DATE", "up-to-date"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING, "PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING", "busy-installing"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING, "PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING", "busy-removing"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING, "PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING", "busy-updating"}, {0, NULL, NULL}};
	GType proton_plus_services_install_job_state_type_id;
	proton_plus_services_install_job_state_type_id = g_enum_register_static ("ProtonPlusServicesInstallJobState", values);
	return proton_plus_services_install_job_state_type_id;
}

GType
proton_plus_services_install_job_state_get_type (void)
{
	static volatile gsize proton_plus_services_install_job_state_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_install_job_state_type_id__once)) {
		GType proton_plus_services_install_job_state_type_id;
		proton_plus_services_install_job_state_type_id = proton_plus_services_install_job_state_get_type_once ();
		g_once_init_leave (&proton_plus_services_install_job_state_type_id__once, proton_plus_services_install_job_state_type_id);
	}
	return proton_plus_services_install_job_state_type_id__once;
}

static GType
proton_plus_services_install_job_mode_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED, "PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED", "versioned"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST, "PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST", "latest"}, {PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_STEAM_TINKER_LAUNCH, "PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_STEAM_TINKER_LAUNCH", "steam-tinker-launch"}, {0, NULL, NULL}};
	GType proton_plus_services_install_job_mode_type_id;
	proton_plus_services_install_job_mode_type_id = g_enum_register_static ("ProtonPlusServicesInstallJobMode", values);
	return proton_plus_services_install_job_mode_type_id;
}

GType
proton_plus_services_install_job_mode_get_type (void)
{
	static volatile gsize proton_plus_services_install_job_mode_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_install_job_mode_type_id__once)) {
		GType proton_plus_services_install_job_mode_type_id;
		proton_plus_services_install_job_mode_type_id = proton_plus_services_install_job_mode_get_type_once ();
		g_once_init_leave (&proton_plus_services_install_job_mode_type_id__once, proton_plus_services_install_job_mode_type_id);
	}
	return proton_plus_services_install_job_mode_type_id__once;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

ProtonPlusServicesInstallJob*
proton_plus_services_install_job_construct (GType object_type,
                                            ProtonPlusModelsRelease* release,
                                            ProtonPlusModelsTool* tool,
                                            ProtonPlusServicesInstallJobMode mode,
                                            const gchar* installation_location_override,
                                            const gchar* steam_tinker_launch_home_override)
{
	ProtonPlusServicesInstallJob * self = NULL;
	gchar* _tmp0_;
	ProtonPlusModelsAssetsAsset* _tmp1_;
	ProtonPlusModelsAssetsAsset* _tmp2_;
	ProtonPlusModelsToolsProviderTool* provider_tool = NULL;
	ProtonPlusModelsToolsProviderTool* _tmp3_;
	ProtonPlusModelsToolsProviderTool* _tmp4_;
	gboolean _tmp8_ = FALSE;
	gboolean is_steam_tinker_launch = FALSE;
	ProtonPlusServicesInstallJobMode _tmp11_ = 0;
	g_return_val_if_fail (release != NULL, NULL);
	g_return_val_if_fail (tool != NULL, NULL);
	self = (ProtonPlusServicesInstallJob*) g_object_new (object_type, NULL);
	proton_plus_services_install_job_set_release (self, release);
	proton_plus_services_install_job_set_tool (self, tool);
	_tmp0_ = g_strdup (installation_location_override);
	_g_free0 (self->priv->installation_location_override);
	self->priv->installation_location_override = _tmp0_;
	_tmp1_ = proton_plus_models_release_get_asset (release);
	_tmp2_ = _tmp1_;
	proton_plus_services_install_job_set_selected_asset (self, _tmp2_);
	_tmp3_ = _g_object_ref0 (PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (tool) ? ((ProtonPlusModelsToolsProviderTool*) tool) : NULL);
	provider_tool = _tmp3_;
	_tmp4_ = provider_tool;
	if (_tmp4_ != NULL) {
		ProtonPlusModelsToolsProviderTool* _tmp5_;
		ProtonPlusModelsProvidersArchiveInstallRequirement _tmp6_;
		ProtonPlusModelsProvidersArchiveInstallRequirement _tmp7_;
		_tmp5_ = provider_tool;
		_tmp6_ = proton_plus_models_tools_provider_tool_get_archive_install_requirement (_tmp5_);
		_tmp7_ = _tmp6_;
		proton_plus_services_install_job_set_archive_install_requirement (self, _tmp7_);
	}
	if (mode == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_STEAM_TINKER_LAUNCH) {
		_tmp8_ = TRUE;
	} else {
		ProtonPlusModelsReleaseKind _tmp9_;
		ProtonPlusModelsReleaseKind _tmp10_;
		_tmp9_ = proton_plus_models_release_get_kind (release);
		_tmp10_ = _tmp9_;
		_tmp8_ = _tmp10_ == PROTON_PLUS_MODELS_RELEASE_KIND_STEAM_TINKER_LAUNCH;
	}
	is_steam_tinker_launch = _tmp8_;
	if (is_steam_tinker_launch) {
		_tmp11_ = PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_STEAM_TINKER_LAUNCH;
	} else {
		_tmp11_ = mode;
	}
	proton_plus_services_install_job_set_mode (self, _tmp11_);
	if (is_steam_tinker_launch) {
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp12_;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp13_;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		_tmp12_ = proton_plus_services_steam_tinker_launch_context_new (tool, steam_tinker_launch_home_override);
		_tmp13_ = _tmp12_;
		proton_plus_services_install_job_set_steam_tinker_launch_context (self, _tmp13_);
		_g_object_unref0 (_tmp13_);
		_tmp14_ = self->priv->_steam_tinker_launch_context;
		_tmp15_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_tmp14_);
		_tmp16_ = _tmp15_;
		proton_plus_services_install_job_set_install_location (self, _tmp16_);
	} else {
		proton_plus_services_install_job_update_install_location (self, installation_location_override);
	}
	proton_plus_services_install_job_refresh_state (self);
	_g_object_unref0 (provider_tool);
	return self;
}

ProtonPlusServicesInstallJob*
proton_plus_services_install_job_new (ProtonPlusModelsRelease* release,
                                      ProtonPlusModelsTool* tool,
                                      ProtonPlusServicesInstallJobMode mode,
                                      const gchar* installation_location_override,
                                      const gchar* steam_tinker_launch_home_override)
{
	return proton_plus_services_install_job_construct (PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, release, tool, mode, installation_location_override, steam_tinker_launch_home_override);
}

static gchar*
proton_plus_services_install_job_mode_id (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusServicesInstallJobMode _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_mode;
	switch (_tmp0_) {
		case PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("latest");
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_STEAM_TINKER_LAUNCH:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("steam-tinker-launch");
			result = _tmp2_;
			return result;
		}
		default:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("versioned");
			result = _tmp3_;
			return result;
		}
	}
}

gchar*
proton_plus_services_install_job_get_usage_identifier (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	gchar* installed_identifier = NULL;
	ProtonPlusModelsTool* _tmp3_;
	ProtonPlusModelsGroup* _tmp4_;
	ProtonPlusModelsGroup* _tmp5_;
	ProtonPlusModelsInstalledToolInventory* _tmp6_;
	ProtonPlusModelsInstalledToolInventory* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gboolean _tmp10_ = FALSE;
	const gchar* _tmp11_;
	ProtonPlusModelsToolsProviderTool* provider_tool = NULL;
	ProtonPlusModelsTool* _tmp15_;
	ProtonPlusModelsToolsProviderTool* _tmp16_;
	ProtonPlusModelsToolsProviderTool* _tmp17_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_steam_tinker_launch_context;
	if (_tmp0_ != NULL) {
		gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = proton_plus_services_install_job_get_usage_name (self);
		_tmp2_ = _tmp1_;
		result = _tmp2_;
		return result;
	}
	_tmp3_ = self->priv->_tool;
	_tmp4_ = proton_plus_models_tool_get_group (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_models_group_get_installed_tool_inventory (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->_install_location;
	_tmp9_ = proton_plus_models_installed_tool_inventory_get_usage_identifier_for_path (_tmp7_, _tmp8_);
	installed_identifier = _tmp9_;
	_tmp11_ = installed_identifier;
	if (_tmp11_ != NULL) {
		const gchar* _tmp12_;
		_tmp12_ = installed_identifier;
		_tmp10_ = g_strcmp0 (_tmp12_, "") != 0;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		const gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp13_ = installed_identifier;
		_tmp14_ = g_strdup ((const gchar*) _tmp13_);
		result = _tmp14_;
		_g_free0 (installed_identifier);
		return result;
	}
	_tmp15_ = self->priv->_tool;
	_tmp16_ = _g_object_ref0 (PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (_tmp15_) ? ((ProtonPlusModelsToolsProviderTool*) _tmp15_) : NULL);
	provider_tool = _tmp16_;
	_tmp17_ = provider_tool;
	if (_tmp17_ != NULL) {
		gchar* directory_name = NULL;
		ProtonPlusModelsToolsProviderTool* _tmp18_;
		gchar* _tmp19_;
		const gchar* _tmp20_;
		_tmp18_ = provider_tool;
		_tmp19_ = proton_plus_services_install_job_effective_directory_name (self, _tmp18_);
		directory_name = _tmp19_;
		_tmp20_ = directory_name;
		if (g_strcmp0 (_tmp20_, "") != 0) {
			result = directory_name;
			_g_object_unref0 (provider_tool);
			_g_free0 (installed_identifier);
			return result;
		}
		_g_free0 (directory_name);
	}
	_tmp21_ = proton_plus_services_install_job_get_usage_name (self);
	_tmp22_ = _tmp21_;
	result = _tmp22_;
	_g_object_unref0 (provider_tool);
	_g_free0 (installed_identifier);
	return result;
}

void
proton_plus_services_install_job_set_selected_variant (ProtonPlusServicesInstallJob* self,
                                                       const gchar* variant_name,
                                                       ProtonPlusModelsAssetsAsset* asset,
                                                       const gchar* variant_id)
{
	g_return_if_fail (self != NULL);
	proton_plus_services_install_job_set_selected_variant_name (self, variant_name);
	proton_plus_services_install_job_set_selected_variant_id (self, variant_id);
	if (asset != NULL) {
		proton_plus_services_install_job_set_selected_asset (self, asset);
	}
	proton_plus_services_install_job_update_install_location (self, NULL);
	proton_plus_services_install_job_refresh_state (self);
}

void
proton_plus_services_install_job_set_release_for_update (ProtonPlusServicesInstallJob* self,
                                                         ProtonPlusModelsRelease* release)
{
	gchar* previous_variant_id = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* previous_variant_name = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	ProtonPlusModelsAssetsAsset* _tmp4_;
	ProtonPlusModelsAssetsAsset* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	ProtonPlusModelsVariant* selected = NULL;
	ProtonPlusModelsVariant* _tmp8_;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	ProtonPlusModelsVariant* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (release != NULL);
	_tmp0_ = self->priv->_selected_variant_id;
	_tmp1_ = g_strdup (_tmp0_);
	previous_variant_id = _tmp1_;
	_tmp2_ = self->priv->_selected_variant_name;
	_tmp3_ = g_strdup (_tmp2_);
	previous_variant_name = _tmp3_;
	proton_plus_services_install_job_set_release (self, release);
	_tmp4_ = proton_plus_models_release_get_asset (release);
	_tmp5_ = _tmp4_;
	proton_plus_services_install_job_set_selected_asset (self, _tmp5_);
	_tmp6_ = previous_variant_id;
	proton_plus_services_install_job_set_selected_variant_id (self, _tmp6_);
	_tmp7_ = previous_variant_name;
	proton_plus_services_install_job_set_selected_variant_name (self, _tmp7_);
	_tmp8_ = proton_plus_services_install_job_selected_variant (self);
	selected = _tmp8_;
	_tmp11_ = selected;
	if (_tmp11_ != NULL) {
		ProtonPlusModelsVariant* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		_tmp12_ = selected;
		_tmp13_ = proton_plus_models_variant_get_download_url (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp10_ = _tmp14_ != NULL;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		ProtonPlusModelsVariant* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		_tmp15_ = selected;
		_tmp16_ = proton_plus_models_variant_get_download_url (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp9_ = g_strcmp0 (_tmp17_, "") != 0;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		ProtonPlusModelsVariant* _tmp18_;
		_tmp18_ = selected;
		proton_plus_services_install_job_apply_selected_release_variant (self, _tmp18_);
	}
	proton_plus_services_install_job_update_install_location (self, NULL);
	g_object_notify ((GObject*) self, "release");
	g_object_notify ((GObject*) self, "selected-asset");
	g_object_notify ((GObject*) self, "selected-variant-name");
	g_object_notify ((GObject*) self, "selected-variant-id");
	_g_object_unref0 (selected);
	_g_free0 (previous_variant_name);
	_g_free0 (previous_variant_id);
}

static void
proton_plus_services_install_job_install_data_free (gpointer _data)
{
	ProtonPlusServicesInstallJobInstallData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesInstallJobInstallData, _data_);
}

void
proton_plus_services_install_job_install (ProtonPlusServicesInstallJob* self,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	ProtonPlusServicesInstallJobInstallData* _data_;
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesInstallJobInstallData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_install_job_install_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_services_install_job_install_co (_data_);
}

ProtonPlusReturnCode
proton_plus_services_install_job_install_finish (ProtonPlusServicesInstallJob* self,
                                                 GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusServicesInstallJobInstallData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_install_job_install_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	ProtonPlusServicesInstallJobInstallData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_install_job_install_co (_data_);
}

static gboolean
proton_plus_services_install_job_install_co (ProtonPlusServicesInstallJobInstallData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_services_installation_service_get_instance ();
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_state_ = 1;
	proton_plus_services_installation_service_install (_data_->_tmp1_, _data_->self, FALSE, proton_plus_services_install_job_install_ready, _data_);
	return FALSE;
	_state_1:
	_data_->result = proton_plus_services_installation_service_install_finish (_data_->_tmp1_, _data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_services_install_job_install_replacement_data_free (gpointer _data)
{
	ProtonPlusServicesInstallJobInstallReplacementData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesInstallJobInstallReplacementData, _data_);
}

void
proton_plus_services_install_job_install_replacement (ProtonPlusServicesInstallJob* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_)
{
	ProtonPlusServicesInstallJobInstallReplacementData* _data_;
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesInstallJobInstallReplacementData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_install_job_install_replacement_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_services_install_job_install_replacement_co (_data_);
}

ProtonPlusReturnCode
proton_plus_services_install_job_install_replacement_finish (ProtonPlusServicesInstallJob* self,
                                                             GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusServicesInstallJobInstallReplacementData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_install_job_install_replacement_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_)
{
	ProtonPlusServicesInstallJobInstallReplacementData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_install_job_install_replacement_co (_data_);
}

static gboolean
proton_plus_services_install_job_install_replacement_co (ProtonPlusServicesInstallJobInstallReplacementData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_services_installation_service_get_instance ();
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_state_ = 1;
	proton_plus_services_installation_service_install (_data_->_tmp1_, _data_->self, TRUE, proton_plus_services_install_job_install_replacement_ready, _data_);
	return FALSE;
	_state_1:
	_data_->result = proton_plus_services_installation_service_install_finish (_data_->_tmp1_, _data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_services_install_job_update_data_free (gpointer _data)
{
	ProtonPlusServicesInstallJobUpdateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesInstallJobUpdateData, _data_);
}

void
proton_plus_services_install_job_update (ProtonPlusServicesInstallJob* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	ProtonPlusServicesInstallJobUpdateData* _data_;
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesInstallJobUpdateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_install_job_update_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_services_install_job_update_co (_data_);
}

ProtonPlusReturnCode
proton_plus_services_install_job_update_finish (ProtonPlusServicesInstallJob* self,
                                                GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusServicesInstallJobUpdateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_install_job_update_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	ProtonPlusServicesInstallJobUpdateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_install_job_update_co (_data_);
}

static gboolean
proton_plus_services_install_job_update_co (ProtonPlusServicesInstallJobUpdateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_services_installation_service_get_instance ();
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_state_ = 1;
	proton_plus_services_installation_service_update (_data_->_tmp1_, _data_->self, proton_plus_services_install_job_update_ready, _data_);
	return FALSE;
	_state_1:
	_data_->result = proton_plus_services_installation_service_update_finish (_data_->_tmp1_, _data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_services_install_job_remove_data_free (gpointer _data)
{
	ProtonPlusServicesInstallJobRemoveData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesInstallJobRemoveData, _data_);
}

void
proton_plus_services_install_job_remove (ProtonPlusServicesInstallJob* self,
                                         gboolean notify_removal,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	ProtonPlusServicesInstallJobRemoveData* _data_;
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesInstallJobRemoveData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_install_job_remove_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->notify_removal = notify_removal;
	proton_plus_services_install_job_remove_co (_data_);
}

ProtonPlusReturnCode
proton_plus_services_install_job_remove_finish (ProtonPlusServicesInstallJob* self,
                                                GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusServicesInstallJobRemoveData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_install_job_remove_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	ProtonPlusServicesInstallJobRemoveData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_install_job_remove_co (_data_);
}

static gboolean
proton_plus_services_install_job_remove_co (ProtonPlusServicesInstallJobRemoveData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_services_installation_service_get_instance ();
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_state_ = 1;
	proton_plus_services_installation_service_remove (_data_->_tmp1_, _data_->self, _data_->notify_removal, proton_plus_services_install_job_remove_ready, _data_);
	return FALSE;
	_state_1:
	_data_->result = proton_plus_services_installation_service_remove_finish (_data_->_tmp1_, _data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_services_install_job_real_download_archive_data_free (gpointer _data)
{
	ProtonPlusServicesInstallJobDownloadArchiveData* _data_;
	_data_ = _data;
	_g_free0 (_data_->url);
	_g_free0 (_data_->path);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesInstallJobDownloadArchiveData, _data_);
}

static void
proton_plus_services_install_job_real_download_archive (ProtonPlusServicesInstallJob* self,
                                                        const gchar* url,
                                                        const gchar* path,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_)
{
	ProtonPlusServicesInstallJobDownloadArchiveData* _data_;
	ProtonPlusServicesInstallJob* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (url != NULL);
	g_return_if_fail (path != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesInstallJobDownloadArchiveData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_install_job_real_download_archive_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (url);
	_g_free0 (_data_->url);
	_data_->url = _tmp1_;
	_tmp2_ = g_strdup (path);
	_g_free0 (_data_->path);
	_data_->path = _tmp2_;
	proton_plus_services_install_job_real_download_archive_co (_data_);
}

static gboolean
proton_plus_services_install_job_real_download_archive_finish (ProtonPlusServicesInstallJob* self,
                                                               GAsyncResult* _res_,
                                                               gchar** error_message)
{
	gboolean result;
	ProtonPlusServicesInstallJobDownloadArchiveData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (error_message) {
		*error_message = _data_->error_message;
	} else {
		_g_free0 (_data_->error_message);
	}
	_data_->error_message = NULL;
	result = _data_->result;
	return result;
}

static void
_proton_plus_services_install_job_report_progress_protonplusutilswebprogress_callback (gboolean is_percent,
                                                                                       gint64 progress_percentage,
                                                                                       gdouble speed_kbps,
                                                                                       gdouble* remaining_seconds,
                                                                                       gpointer self)
{
	proton_plus_services_install_job_report_progress ((ProtonPlusServicesInstallJob*) self, is_percent, progress_percentage, speed_kbps, remaining_seconds);
}

static void
proton_plus_services_install_job_download_archive_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_)
{
	ProtonPlusServicesInstallJobDownloadArchiveData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_install_job_real_download_archive_co (_data_);
}

static gboolean
proton_plus_services_install_job_real_download_archive_co (ProtonPlusServicesInstallJobDownloadArchiveData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->operation_cancellable;
	_data_->_tmp1_ = NULL;
	_data_->_state_ = 1;
	proton_plus_utils_web_download (_data_->url, _data_->path, _data_->_tmp0_, _proton_plus_services_install_job_report_progress_protonplusutilswebprogress_callback, _data_->self, proton_plus_services_install_job_download_archive_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = proton_plus_utils_web_download_finish (_data_->_res_, &_data_->_tmp1_);
	_g_free0 (_data_->error_message);
	_data_->error_message = _data_->_tmp1_;
	_data_->result = _data_->_tmp2_;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
proton_plus_services_install_job_download_archive (ProtonPlusServicesInstallJob* self,
                                                   const gchar* url,
                                                   const gchar* path,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	ProtonPlusServicesInstallJobClass* _klass_;
	_klass_ = PROTON_PLUS_SERVICES_INSTALL_JOB_GET_CLASS (self);
	if (_klass_->download_archive) {
		_klass_->download_archive (self, url, path, _callback_, _user_data_);
	}
}

gboolean
proton_plus_services_install_job_download_archive_finish (ProtonPlusServicesInstallJob* self,
                                                          GAsyncResult* _res_,
                                                          gchar** error_message)
{
	ProtonPlusServicesInstallJobClass* _klass_;
	_klass_ = PROTON_PLUS_SERVICES_INSTALL_JOB_GET_CLASS (self);
	if (_klass_->download_archive_finish) {
		return _klass_->download_archive_finish (self, _res_, error_message);
	}
	return FALSE;
}

static void
proton_plus_services_install_job_real_promote_staged_installation_data_free (gpointer _data)
{
	ProtonPlusServicesInstallJobPromoteStagedInstallationData* _data_;
	_data_ = _data;
	_g_free0 (_data_->staged_install_path);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesInstallJobPromoteStagedInstallationData, _data_);
}

static void
proton_plus_services_install_job_real_promote_staged_installation (ProtonPlusServicesInstallJob* self,
                                                                   const gchar* staged_install_path,
                                                                   GAsyncReadyCallback _callback_,
                                                                   gpointer _user_data_)
{
	ProtonPlusServicesInstallJobPromoteStagedInstallationData* _data_;
	ProtonPlusServicesInstallJob* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (staged_install_path != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesInstallJobPromoteStagedInstallationData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_install_job_real_promote_staged_installation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (staged_install_path);
	_g_free0 (_data_->staged_install_path);
	_data_->staged_install_path = _tmp1_;
	proton_plus_services_install_job_real_promote_staged_installation_co (_data_);
}

static gboolean
proton_plus_services_install_job_real_promote_staged_installation_finish (ProtonPlusServicesInstallJob* self,
                                                                          GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusServicesInstallJobPromoteStagedInstallationData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_install_job_promote_staged_installation_ready (GObject* source_object,
                                                                    GAsyncResult* _res_,
                                                                    gpointer _user_data_)
{
	ProtonPlusServicesInstallJobPromoteStagedInstallationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_install_job_real_promote_staged_installation_co (_data_);
}

static gboolean
proton_plus_services_install_job_real_promote_staged_installation_co (ProtonPlusServicesInstallJobPromoteStagedInstallationData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_install_location;
	_data_->_state_ = 1;
	proton_plus_utils_filesystem_move_directory_atomic (_data_->staged_install_path, _data_->_tmp0_, proton_plus_services_install_job_promote_staged_installation_ready, _data_);
	return FALSE;
	_state_1:
	_data_->result = proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
proton_plus_services_install_job_promote_staged_installation (ProtonPlusServicesInstallJob* self,
                                                              const gchar* staged_install_path,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_)
{
	ProtonPlusServicesInstallJobClass* _klass_;
	_klass_ = PROTON_PLUS_SERVICES_INSTALL_JOB_GET_CLASS (self);
	if (_klass_->promote_staged_installation) {
		_klass_->promote_staged_installation (self, staged_install_path, _callback_, _user_data_);
	}
}

gboolean
proton_plus_services_install_job_promote_staged_installation_finish (ProtonPlusServicesInstallJob* self,
                                                                     GAsyncResult* _res_)
{
	ProtonPlusServicesInstallJobClass* _klass_;
	_klass_ = PROTON_PLUS_SERVICES_INSTALL_JOB_GET_CLASS (self);
	if (_klass_->promote_staged_installation_finish) {
		return _klass_->promote_staged_installation_finish (self, _res_);
	}
	return FALSE;
}

GCancellable*
proton_plus_services_install_job_get_cancellable (ProtonPlusServicesInstallJob* self)
{
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->operation_cancellable;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

void
proton_plus_services_install_job_begin_operation (ProtonPlusServicesInstallJob* self)
{
	GCancellable* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_canceled = FALSE;
	_tmp0_ = g_cancellable_new ();
	_g_object_unref0 (self->priv->operation_cancellable);
	self->priv->operation_cancellable = _tmp0_;
	proton_plus_services_install_job_set_replacement_backup_path (self, NULL);
	_g_free0 (self->priv->recorded_steam_change_kind);
	self->priv->recorded_steam_change_kind = NULL;
	proton_plus_services_install_job_set_is_finished (self, FALSE);
	proton_plus_services_install_job_set_install_success (self, FALSE);
	proton_plus_services_install_job_set_error_message (self, NULL);
	proton_plus_services_install_job_set_progress (self, NULL);
	proton_plus_services_install_job_set_speed_kbps (self, 0.0);
	proton_plus_services_install_job_set_seconds_remaining (self, -1.0);
	proton_plus_services_install_job_set_is_percent (self, FALSE);
	g_object_notify ((GObject*) self, "canceled");
}

static gboolean
_proton_plus_models_steam_change_kind_equal (const ProtonPlusModelsSteamChangeKind * s1,
                                             const ProtonPlusModelsSteamChangeKind * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	return (*s1) == (*s2);
}

static ProtonPlusModelsSteamChangeKind*
_proton_plus_models_steam_change_kind_dup (ProtonPlusModelsSteamChangeKind* self)
{
	ProtonPlusModelsSteamChangeKind* dup;
	dup = g_new0 (ProtonPlusModelsSteamChangeKind, 1);
	memcpy (dup, self, sizeof (ProtonPlusModelsSteamChangeKind));
	return dup;
}

static gpointer
__proton_plus_models_steam_change_kind_dup0 (gpointer self)
{
	return self ? _proton_plus_models_steam_change_kind_dup (self) : NULL;
}

gboolean
proton_plus_services_install_job_mark_steam_change_recorded (ProtonPlusServicesInstallJob* self,
                                                             ProtonPlusModelsSteamChangeKind kind)
{
	ProtonPlusModelsSteamChangeKind* _tmp0_;
	ProtonPlusModelsSteamChangeKind* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->recorded_steam_change_kind;
	if (_proton_plus_models_steam_change_kind_equal (_tmp0_, &kind) == TRUE) {
		result = FALSE;
		return result;
	}
	_tmp1_ = __proton_plus_models_steam_change_kind_dup0 (&kind);
	_g_free0 (self->priv->recorded_steam_change_kind);
	self->priv->recorded_steam_change_kind = _tmp1_;
	result = TRUE;
	return result;
}

void
proton_plus_services_install_job_finish_operation (ProtonPlusServicesInstallJob* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	ProtonPlusServicesInstallJobState _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp2_ = self->priv->_state;
	if (_tmp2_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusServicesInstallJobState _tmp3_;
		_tmp3_ = self->priv->_state;
		_tmp1_ = _tmp3_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusServicesInstallJobState _tmp4_;
		_tmp4_ = self->priv->_state;
		_tmp0_ = _tmp4_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING;
	}
	if (_tmp0_) {
		proton_plus_services_install_job_set_state (self, PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_NOT_INSTALLED);
	}
	proton_plus_services_install_job_refresh_state (self);
}

static gdouble*
_double_dup (gdouble* self)
{
	gdouble* dup;
	dup = g_new0 (gdouble, 1);
	memcpy (dup, self, sizeof (gdouble));
	return dup;
}

static gpointer
__double_dup0 (gpointer self)
{
	return self ? _double_dup (self) : NULL;
}

void
proton_plus_services_install_job_report_progress (ProtonPlusServicesInstallJob* self,
                                                  gboolean is_percent,
                                                  gint64 progress,
                                                  gdouble speed_kbps,
                                                  gdouble* remaining_seconds)
{
	gchar* _tmp0_ = NULL;
	gdouble* _tmp5_ = NULL;
	gdouble* _tmp6_;
	ProtonPlusUtilsDownloadManager* _tmp9_;
	ProtonPlusUtilsDownloadManager* _tmp10_;
	g_return_if_fail (self != NULL);
	proton_plus_services_install_job_set_is_percent (self, is_percent);
	if (is_percent) {
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, progress);
		_tmp2_ = _tmp1_;
		_tmp3_ = g_strdup_printf ("%s%%", _tmp2_);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp3_;
		_g_free0 (_tmp2_);
	} else {
		gchar* _tmp4_;
		_tmp4_ = proton_plus_utils_filesystem_convert_bytes_to_string (progress);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp4_;
	}
	proton_plus_services_install_job_set_progress (self, _tmp0_);
	proton_plus_services_install_job_set_speed_kbps (self, speed_kbps);
	_tmp6_ = __double_dup0 (remaining_seconds);
	_tmp5_ = _tmp6_;
	if (_tmp5_ == NULL) {
		gdouble _tmp7_;
		gdouble* _tmp8_;
		_tmp7_ = -1.0;
		_tmp8_ = __double_dup0 (&_tmp7_);
		_g_free0 (_tmp5_);
		_tmp5_ = _tmp8_;
	}
	proton_plus_services_install_job_set_seconds_remaining (self, *_tmp5_);
	g_signal_emit (self, proton_plus_services_install_job_signals[PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_UPDATED_SIGNAL], 0);
	_tmp9_ = proton_plus_utils_download_manager_get_instance ();
	_tmp10_ = _tmp9_;
	g_signal_emit_by_name (_tmp10_, "progress-updated", self);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp0_);
}

void
proton_plus_services_install_job_refresh_state (ProtonPlusServicesInstallJob* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	ProtonPlusServicesInstallJobState _tmp2_;
	ProtonPlusServicesInstallationService* _tmp5_;
	ProtonPlusServicesInstallationService* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp2_ = self->priv->_state;
	if (_tmp2_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusServicesInstallJobState _tmp3_;
		_tmp3_ = self->priv->_state;
		_tmp1_ = _tmp3_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusServicesInstallJobState _tmp4_;
		_tmp4_ = self->priv->_state;
		_tmp0_ = _tmp4_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING;
	}
	if (_tmp0_) {
		return;
	}
	_tmp5_ = proton_plus_services_installation_service_get_instance ();
	_tmp6_ = _tmp5_;
	proton_plus_services_installation_service_refresh_job_state (_tmp6_, self);
}

void
proton_plus_services_install_job_apply_selected_release_variant (ProtonPlusServicesInstallJob* self,
                                                                 ProtonPlusModelsVariant* variant)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	ProtonPlusModelsAssetsAsset* asset = NULL;
	ProtonPlusModelsAssetsAsset* _tmp4_;
	ProtonPlusModelsAssetsAsset* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (variant != NULL);
	_tmp0_ = proton_plus_models_variant_get_id (variant);
	_tmp1_ = _tmp0_;
	proton_plus_services_install_job_set_selected_variant_id (self, _tmp1_);
	_tmp2_ = proton_plus_models_variant_get_name (variant);
	_tmp3_ = _tmp2_;
	proton_plus_services_install_job_set_selected_variant_name (self, _tmp3_);
	_tmp4_ = proton_plus_models_variant_resolved_asset (variant);
	asset = _tmp4_;
	_tmp5_ = asset;
	if (_tmp5_ != NULL) {
		ProtonPlusModelsAssetsAsset* _tmp6_;
		_tmp6_ = asset;
		proton_plus_services_install_job_set_selected_asset (self, _tmp6_);
	}
	proton_plus_services_install_job_update_install_location (self, NULL);
	g_object_notify ((GObject*) self, "selected-asset");
	g_object_notify ((GObject*) self, "selected-variant-name");
	g_object_notify ((GObject*) self, "selected-variant-id");
	_g_object_unref0 (asset);
}

gchar*
proton_plus_services_install_job_selected_variant_identity (ProtonPlusServicesInstallJob* self)
{
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	ProtonPlusModelsVariant* selected = NULL;
	ProtonPlusModelsVariant* _tmp5_;
	ProtonPlusModelsVariant* _tmp6_;
	gchar* _tmp28_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_selected_variant_id;
	if (_tmp1_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = self->priv->_selected_variant_id;
		_tmp0_ = g_strcmp0 (_tmp2_, "") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		const gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp3_ = self->priv->_selected_variant_id;
		_tmp4_ = g_strdup ((const gchar*) _tmp3_);
		result = _tmp4_;
		return result;
	}
	_tmp5_ = proton_plus_services_install_job_selected_variant (self);
	selected = _tmp5_;
	_tmp6_ = selected;
	if (_tmp6_ != NULL) {
		ProtonPlusModelsVariant* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp7_ = selected;
		_tmp8_ = proton_plus_models_variant_get_id (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_strdup (_tmp9_);
		result = _tmp10_;
		_g_object_unref0 (selected);
		return result;
	}
	{
		GeeLinkedList* _variant_list = NULL;
		ProtonPlusModelsRelease* _tmp11_;
		GeeLinkedList* _tmp12_;
		GeeLinkedList* _tmp13_;
		gint _variant_size = 0;
		GeeLinkedList* _tmp14_;
		gint _tmp15_;
		gint _tmp16_;
		gint _variant_index = 0;
		_tmp11_ = self->priv->_release;
		_tmp12_ = proton_plus_models_release_get_variants (_tmp11_);
		_tmp13_ = _tmp12_;
		_variant_list = _tmp13_;
		_tmp14_ = _variant_list;
		_tmp15_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp14_);
		_tmp16_ = _tmp15_;
		_variant_size = _tmp16_;
		_variant_index = -1;
		while (TRUE) {
			gint _tmp17_;
			gint _tmp18_;
			ProtonPlusModelsVariant* variant = NULL;
			GeeLinkedList* _tmp19_;
			gpointer _tmp20_;
			ProtonPlusModelsVariant* _tmp21_;
			gboolean _tmp22_;
			gboolean _tmp23_;
			_variant_index = _variant_index + 1;
			_tmp17_ = _variant_index;
			_tmp18_ = _variant_size;
			if (!(_tmp17_ < _tmp18_)) {
				break;
			}
			_tmp19_ = _variant_list;
			_tmp20_ = gee_abstract_list_get ((GeeAbstractList*) _tmp19_, _variant_index);
			variant = (ProtonPlusModelsVariant*) _tmp20_;
			_tmp21_ = variant;
			_tmp22_ = proton_plus_models_variant_get_is_default (_tmp21_);
			_tmp23_ = _tmp22_;
			if (_tmp23_) {
				ProtonPlusModelsVariant* _tmp24_;
				const gchar* _tmp25_;
				const gchar* _tmp26_;
				gchar* _tmp27_;
				_tmp24_ = variant;
				_tmp25_ = proton_plus_models_variant_get_id (_tmp24_);
				_tmp26_ = _tmp25_;
				_tmp27_ = g_strdup (_tmp26_);
				result = _tmp27_;
				_g_object_unref0 (variant);
				_g_object_unref0 (selected);
				return result;
			}
			_g_object_unref0 (variant);
		}
	}
	_tmp28_ = g_strdup ("");
	result = _tmp28_;
	_g_object_unref0 (selected);
	return result;
}

gchar*
proton_plus_services_install_job_effective_directory_name_for_state (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusModelsToolsProviderTool* provider_tool = NULL;
	ProtonPlusModelsTool* _tmp0_;
	ProtonPlusModelsToolsProviderTool* _tmp1_;
	gchar* _tmp2_ = NULL;
	ProtonPlusModelsToolsProviderTool* _tmp3_;
	gchar* _tmp7_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tool;
	_tmp1_ = _g_object_ref0 (PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (_tmp0_) ? ((ProtonPlusModelsToolsProviderTool*) _tmp0_) : NULL);
	provider_tool = _tmp1_;
	_tmp3_ = provider_tool;
	if (_tmp3_ != NULL) {
		ProtonPlusModelsToolsProviderTool* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = provider_tool;
		_tmp5_ = proton_plus_services_install_job_effective_directory_name (self, _tmp4_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp5_;
	} else {
		gchar* _tmp6_;
		_tmp6_ = g_strdup ("");
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp6_;
	}
	_tmp7_ = _tmp2_;
	_tmp2_ = NULL;
	result = _tmp7_;
	_g_free0 (_tmp2_);
	_g_object_unref0 (provider_tool);
	return result;
}

static ProtonPlusModelsVariant*
proton_plus_services_install_job_selected_variant (ProtonPlusServicesInstallJob* self)
{
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	gboolean _tmp17_ = FALSE;
	const gchar* _tmp18_;
	ProtonPlusModelsVariant* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_selected_variant_id;
	if (_tmp1_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = self->priv->_selected_variant_id;
		_tmp0_ = g_strcmp0 (_tmp2_, "") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		{
			GeeLinkedList* _variant_list = NULL;
			ProtonPlusModelsRelease* _tmp3_;
			GeeLinkedList* _tmp4_;
			GeeLinkedList* _tmp5_;
			gint _variant_size = 0;
			GeeLinkedList* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			gint _variant_index = 0;
			_tmp3_ = self->priv->_release;
			_tmp4_ = proton_plus_models_release_get_variants (_tmp3_);
			_tmp5_ = _tmp4_;
			_variant_list = _tmp5_;
			_tmp6_ = _variant_list;
			_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
			_tmp8_ = _tmp7_;
			_variant_size = _tmp8_;
			_variant_index = -1;
			while (TRUE) {
				gint _tmp9_;
				gint _tmp10_;
				ProtonPlusModelsVariant* variant = NULL;
				GeeLinkedList* _tmp11_;
				gpointer _tmp12_;
				ProtonPlusModelsVariant* _tmp13_;
				const gchar* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_;
				_variant_index = _variant_index + 1;
				_tmp9_ = _variant_index;
				_tmp10_ = _variant_size;
				if (!(_tmp9_ < _tmp10_)) {
					break;
				}
				_tmp11_ = _variant_list;
				_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _variant_index);
				variant = (ProtonPlusModelsVariant*) _tmp12_;
				_tmp13_ = variant;
				_tmp14_ = proton_plus_models_variant_get_id (_tmp13_);
				_tmp15_ = _tmp14_;
				_tmp16_ = self->priv->_selected_variant_id;
				if (g_strcmp0 (_tmp15_, _tmp16_) == 0) {
					result = variant;
					return result;
				}
				_g_object_unref0 (variant);
			}
		}
	}
	_tmp18_ = self->priv->_selected_variant_name;
	if (_tmp18_ == NULL) {
		_tmp17_ = TRUE;
	} else {
		const gchar* _tmp19_;
		_tmp19_ = self->priv->_selected_variant_name;
		_tmp17_ = g_strcmp0 (_tmp19_, "") == 0;
	}
	if (_tmp17_) {
		result = NULL;
		return result;
	}
	{
		GeeLinkedList* _variant_list = NULL;
		ProtonPlusModelsRelease* _tmp20_;
		GeeLinkedList* _tmp21_;
		GeeLinkedList* _tmp22_;
		gint _variant_size = 0;
		GeeLinkedList* _tmp23_;
		gint _tmp24_;
		gint _tmp25_;
		gint _variant_index = 0;
		_tmp20_ = self->priv->_release;
		_tmp21_ = proton_plus_models_release_get_variants (_tmp20_);
		_tmp22_ = _tmp21_;
		_variant_list = _tmp22_;
		_tmp23_ = _variant_list;
		_tmp24_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp23_);
		_tmp25_ = _tmp24_;
		_variant_size = _tmp25_;
		_variant_index = -1;
		while (TRUE) {
			gint _tmp26_;
			gint _tmp27_;
			ProtonPlusModelsVariant* variant = NULL;
			GeeLinkedList* _tmp28_;
			gpointer _tmp29_;
			ProtonPlusModelsVariant* _tmp30_;
			const gchar* _tmp31_;
			const gchar* _tmp32_;
			const gchar* _tmp33_;
			_variant_index = _variant_index + 1;
			_tmp26_ = _variant_index;
			_tmp27_ = _variant_size;
			if (!(_tmp26_ < _tmp27_)) {
				break;
			}
			_tmp28_ = _variant_list;
			_tmp29_ = gee_abstract_list_get ((GeeAbstractList*) _tmp28_, _variant_index);
			variant = (ProtonPlusModelsVariant*) _tmp29_;
			_tmp30_ = variant;
			_tmp31_ = proton_plus_models_variant_get_name (_tmp30_);
			_tmp32_ = _tmp31_;
			_tmp33_ = self->priv->_selected_variant_name;
			if (g_strcmp0 (_tmp32_, _tmp33_) == 0) {
				result = variant;
				return result;
			}
			_g_object_unref0 (variant);
		}
	}
	result = NULL;
	return result;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gchar*
proton_plus_services_install_job_effective_directory_name (ProtonPlusServicesInstallJob* self,
                                                           ProtonPlusModelsToolsProviderTool* provider_tool)
{
	gchar* name = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	ProtonPlusModelsVariant* selected = NULL;
	ProtonPlusModelsVariant* _tmp5_;
	gboolean _tmp6_ = FALSE;
	ProtonPlusModelsVariant* _tmp7_;
	gchar* suffix = NULL;
	ProtonPlusModelsVariant* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (provider_tool != NULL, NULL);
	_tmp0_ = proton_plus_services_install_job_get_title (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = proton_plus_models_tools_provider_tool_get_directory_name (provider_tool, _tmp2_);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	name = _tmp4_;
	_tmp5_ = proton_plus_services_install_job_selected_variant (self);
	selected = _tmp5_;
	_tmp7_ = selected;
	if (_tmp7_ == NULL) {
		_tmp6_ = TRUE;
	} else {
		ProtonPlusModelsVariant* _tmp8_;
		gboolean _tmp9_;
		gboolean _tmp10_;
		_tmp8_ = selected;
		_tmp9_ = proton_plus_models_variant_get_is_default (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp6_ = _tmp10_;
	}
	if (_tmp6_) {
		result = name;
		_g_object_unref0 (selected);
		return result;
	}
	_tmp11_ = selected;
	_tmp12_ = proton_plus_models_variant_get_name (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = string_replace (_tmp13_, " ", "_");
	_tmp15_ = _tmp14_;
	_tmp16_ = string_replace (_tmp15_, "/", "_");
	_tmp17_ = _tmp16_;
	_g_free0 (_tmp15_);
	suffix = _tmp17_;
	_tmp18_ = name;
	_tmp19_ = suffix;
	_tmp20_ = g_strdup_printf ("%s-%s", _tmp18_, _tmp19_);
	result = _tmp20_;
	_g_free0 (suffix);
	_g_object_unref0 (selected);
	_g_free0 (name);
	return result;
}

static void
proton_plus_services_install_job_update_install_location (ProtonPlusServicesInstallJob* self,
                                                          const gchar* override_location)
{
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	const gchar* _tmp1_;
	ProtonPlusModelsToolsProviderTool* provider_tool = NULL;
	ProtonPlusModelsTool* _tmp3_;
	ProtonPlusModelsToolsProviderTool* _tmp4_;
	ProtonPlusModelsToolsProviderTool* _tmp5_;
	ProtonPlusModelsTool* _tmp6_;
	ProtonPlusModelsGroup* _tmp7_;
	ProtonPlusModelsGroup* _tmp8_;
	ProtonPlusModelsLauncher* _tmp9_;
	ProtonPlusModelsLauncher* _tmp10_;
	ProtonPlusModelsTool* _tmp11_;
	ProtonPlusModelsGroup* _tmp12_;
	ProtonPlusModelsGroup* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	ProtonPlusModelsToolsProviderTool* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_steam_tinker_launch_context;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = self->priv->installation_location_override;
	if (_tmp1_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = self->priv->installation_location_override;
		proton_plus_services_install_job_set_install_location (self, (const gchar*) _tmp2_);
		return;
	}
	if (override_location != NULL) {
		proton_plus_services_install_job_set_install_location (self, override_location);
		return;
	}
	_tmp3_ = self->priv->_tool;
	_tmp4_ = _g_object_ref0 (PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (_tmp3_) ? ((ProtonPlusModelsToolsProviderTool*) _tmp3_) : NULL);
	provider_tool = _tmp4_;
	_tmp5_ = provider_tool;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (provider_tool);
		return;
	}
	_tmp6_ = self->priv->_tool;
	_tmp7_ = proton_plus_models_tool_get_group (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = proton_plus_models_group_get_launcher (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = self->priv->_tool;
	_tmp12_ = proton_plus_models_tool_get_group (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = proton_plus_models_launcher_get_primary_managed_tool_directory (_tmp10_, _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = provider_tool;
	_tmp17_ = proton_plus_services_install_job_effective_directory_name (self, _tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = g_build_filename (_tmp15_, _tmp18_, NULL);
	_tmp20_ = _tmp19_;
	proton_plus_services_install_job_set_install_location (self, _tmp20_);
	_g_free0 (_tmp20_);
	_g_free0 (_tmp18_);
	_g_free0 (_tmp15_);
	_g_object_unref0 (provider_tool);
}

ProtonPlusModelsRelease*
proton_plus_services_install_job_get_release (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusModelsRelease* result;
	ProtonPlusModelsRelease* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_release;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_install_job_set_release (ProtonPlusServicesInstallJob* self,
                                              ProtonPlusModelsRelease* value)
{
	ProtonPlusModelsRelease* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_release (self);
	if (old_value != value) {
		ProtonPlusModelsRelease* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_release);
		self->priv->_release = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_RELEASE_PROPERTY]);
	}
}

ProtonPlusModelsTool*
proton_plus_services_install_job_get_tool (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusModelsTool* result;
	ProtonPlusModelsTool* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tool;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_install_job_set_tool (ProtonPlusServicesInstallJob* self,
                                           ProtonPlusModelsTool* value)
{
	ProtonPlusModelsTool* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_tool (self);
	if (old_value != value) {
		ProtonPlusModelsTool* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_tool);
		self->priv->_tool = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_TOOL_PROPERTY]);
	}
}

ProtonPlusServicesInstallJobMode
proton_plus_services_install_job_get_mode (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusServicesInstallJobMode result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_mode;
	return result;
}

static void
proton_plus_services_install_job_set_mode (ProtonPlusServicesInstallJob* self,
                                           ProtonPlusServicesInstallJobMode value)
{
	ProtonPlusServicesInstallJobMode old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_mode (self);
	if (old_value != value) {
		self->priv->_mode = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_PROPERTY]);
	}
}

ProtonPlusModelsAssetsAsset*
proton_plus_services_install_job_get_selected_asset (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusModelsAssetsAsset* result;
	ProtonPlusModelsAssetsAsset* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_asset;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_install_job_set_selected_asset (ProtonPlusServicesInstallJob* self,
                                                     ProtonPlusModelsAssetsAsset* value)
{
	ProtonPlusModelsAssetsAsset* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_selected_asset (self);
	if (old_value != value) {
		ProtonPlusModelsAssetsAsset* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selected_asset);
		self->priv->_selected_asset = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_ASSET_PROPERTY]);
	}
}

ProtonPlusModelsProvidersArchiveInstallRequirement
proton_plus_services_install_job_get_archive_install_requirement (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusModelsProvidersArchiveInstallRequirement result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_archive_install_requirement;
	return result;
}

static void
proton_plus_services_install_job_set_archive_install_requirement (ProtonPlusServicesInstallJob* self,
                                                                  ProtonPlusModelsProvidersArchiveInstallRequirement value)
{
	ProtonPlusModelsProvidersArchiveInstallRequirement old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_archive_install_requirement (self);
	if (old_value != value) {
		self->priv->_archive_install_requirement = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY]);
	}
}

const gchar*
proton_plus_services_install_job_get_selected_variant_name (ProtonPlusServicesInstallJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_variant_name;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_install_job_set_selected_variant_name (ProtonPlusServicesInstallJob* self,
                                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_selected_variant_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_selected_variant_name);
		self->priv->_selected_variant_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_NAME_PROPERTY]);
	}
}

const gchar*
proton_plus_services_install_job_get_selected_variant_id (ProtonPlusServicesInstallJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_variant_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_install_job_set_selected_variant_id (ProtonPlusServicesInstallJob* self,
                                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_selected_variant_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_selected_variant_id);
		self->priv->_selected_variant_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_services_install_job_get_install_location (ProtonPlusServicesInstallJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_install_location;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_install_job_set_install_location (ProtonPlusServicesInstallJob* self,
                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_install_location (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_install_location);
		self->priv->_install_location = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_LOCATION_PROPERTY]);
	}
}

const gchar*
proton_plus_services_install_job_get_replacement_backup_path (ProtonPlusServicesInstallJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_replacement_backup_path;
	result = _tmp0_;
	return result;
}

void
proton_plus_services_install_job_set_replacement_backup_path (ProtonPlusServicesInstallJob* self,
                                                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_replacement_backup_path (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_replacement_backup_path);
		self->priv->_replacement_backup_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_REPLACEMENT_BACKUP_PATH_PROPERTY]);
	}
}

ProtonPlusServicesSteamTinkerLaunchContext*
proton_plus_services_install_job_get_steam_tinker_launch_context (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusServicesSteamTinkerLaunchContext* result;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_steam_tinker_launch_context;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_install_job_set_steam_tinker_launch_context (ProtonPlusServicesInstallJob* self,
                                                                  ProtonPlusServicesSteamTinkerLaunchContext* value)
{
	ProtonPlusServicesSteamTinkerLaunchContext* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_steam_tinker_launch_context (self);
	if (old_value != value) {
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_steam_tinker_launch_context);
		self->priv->_steam_tinker_launch_context = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_TINKER_LAUNCH_CONTEXT_PROPERTY]);
	}
}

gboolean
proton_plus_services_install_job_get_canceled (ProtonPlusServicesInstallJob* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_canceled;
	return result;
}

void
proton_plus_services_install_job_set_canceled (ProtonPlusServicesInstallJob* self,
                                               gboolean value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_canceled == value) {
		return;
	}
	self->priv->_canceled = value;
	if (self->priv->_canceled) {
		GCancellable* _tmp0_;
		_tmp0_ = self->priv->operation_cancellable;
		g_cancellable_cancel (_tmp0_);
	}
	g_object_notify ((GObject*) self, "canceled");
	g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_CANCELED_PROPERTY]);
}

const gchar*
proton_plus_services_install_job_get_progress (ProtonPlusServicesInstallJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_progress;
	result = _tmp0_;
	return result;
}

void
proton_plus_services_install_job_set_progress (ProtonPlusServicesInstallJob* self,
                                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_progress (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_progress);
		self->priv->_progress = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_PROPERTY]);
	}
}

gdouble
proton_plus_services_install_job_get_speed_kbps (ProtonPlusServicesInstallJob* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_speed_kbps;
	return result;
}

void
proton_plus_services_install_job_set_speed_kbps (ProtonPlusServicesInstallJob* self,
                                                 gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_speed_kbps (self);
	if (old_value != value) {
		self->priv->_speed_kbps = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SPEED_KBPS_PROPERTY]);
	}
}

gdouble
proton_plus_services_install_job_get_seconds_remaining (ProtonPlusServicesInstallJob* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_seconds_remaining;
	return result;
}

void
proton_plus_services_install_job_set_seconds_remaining (ProtonPlusServicesInstallJob* self,
                                                        gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_seconds_remaining (self);
	if (old_value != value) {
		self->priv->_seconds_remaining = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SECONDS_REMAINING_PROPERTY]);
	}
}

gboolean
proton_plus_services_install_job_get_is_percent (ProtonPlusServicesInstallJob* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_percent;
	return result;
}

void
proton_plus_services_install_job_set_is_percent (ProtonPlusServicesInstallJob* self,
                                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_is_percent (self);
	if (old_value != value) {
		self->priv->_is_percent = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_IS_PERCENT_PROPERTY]);
	}
}

gboolean
proton_plus_services_install_job_get_is_finished (ProtonPlusServicesInstallJob* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_finished;
	return result;
}

void
proton_plus_services_install_job_set_is_finished (ProtonPlusServicesInstallJob* self,
                                                  gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_is_finished (self);
	if (old_value != value) {
		self->priv->_is_finished = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_IS_FINISHED_PROPERTY]);
	}
}

gboolean
proton_plus_services_install_job_get_install_success (ProtonPlusServicesInstallJob* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_install_success;
	return result;
}

void
proton_plus_services_install_job_set_install_success (ProtonPlusServicesInstallJob* self,
                                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_install_success (self);
	if (old_value != value) {
		self->priv->_install_success = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_SUCCESS_PROPERTY]);
	}
}

const gchar*
proton_plus_services_install_job_get_error_message (ProtonPlusServicesInstallJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_error_message;
	result = _tmp0_;
	return result;
}

void
proton_plus_services_install_job_set_error_message (ProtonPlusServicesInstallJob* self,
                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_error_message (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_error_message);
		self->priv->_error_message = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_ERROR_MESSAGE_PROPERTY]);
	}
}

gboolean
proton_plus_services_install_job_get_has_steam_restart_record_result (ProtonPlusServicesInstallJob* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_has_steam_restart_record_result;
	return result;
}

void
proton_plus_services_install_job_set_has_steam_restart_record_result (ProtonPlusServicesInstallJob* self,
                                                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_has_steam_restart_record_result (self);
	if (old_value != value) {
		self->priv->_has_steam_restart_record_result = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_HAS_STEAM_RESTART_RECORD_RESULT_PROPERTY]);
	}
}

ProtonPlusServicesSteamRestartRecordResult
proton_plus_services_install_job_get_steam_restart_record_result (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusServicesSteamRestartRecordResult result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_steam_restart_record_result;
	return result;
}

void
proton_plus_services_install_job_set_steam_restart_record_result (ProtonPlusServicesInstallJob* self,
                                                                  ProtonPlusServicesSteamRestartRecordResult value)
{
	ProtonPlusServicesSteamRestartRecordResult old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_steam_restart_record_result (self);
	if (old_value != value) {
		self->priv->_steam_restart_record_result = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_RECORD_RESULT_PROPERTY]);
	}
}

const gchar*
proton_plus_services_install_job_get_steam_restart_warning (ProtonPlusServicesInstallJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_steam_restart_warning;
	result = _tmp0_;
	return result;
}

void
proton_plus_services_install_job_set_steam_restart_warning (ProtonPlusServicesInstallJob* self,
                                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_steam_restart_warning (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_steam_restart_warning);
		self->priv->_steam_restart_warning = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_WARNING_PROPERTY]);
	}
}

ProtonPlusServicesInstallJobState
proton_plus_services_install_job_get_state (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusServicesInstallJobState result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_state;
	return result;
}

void
proton_plus_services_install_job_set_state (ProtonPlusServicesInstallJob* self,
                                            ProtonPlusServicesInstallJobState value)
{
	ProtonPlusServicesInstallJobState old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_state (self);
	if (old_value != value) {
		self->priv->_state = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_PROPERTY]);
	}
}

ProtonPlusServicesInstallJobStep
proton_plus_services_install_job_get_step (ProtonPlusServicesInstallJob* self)
{
	ProtonPlusServicesInstallJobStep result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_step;
	return result;
}

void
proton_plus_services_install_job_set_step (ProtonPlusServicesInstallJob* self,
                                           ProtonPlusServicesInstallJobStep value)
{
	ProtonPlusServicesInstallJobStep old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_install_job_get_step (self);
	if (old_value != value) {
		self->priv->_step = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_PROPERTY]);
	}
}

gchar*
proton_plus_services_install_job_get_title (ProtonPlusServicesInstallJob* self)
{
	gchar* result;
	ProtonPlusServicesInstallJobMode _tmp0_;
	ProtonPlusModelsRelease* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_mode;
	if (_tmp0_ == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST) {
		ProtonPlusModelsTool* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp1_ = self->priv->_tool;
		_tmp2_ = proton_plus_models_tool_get_title (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_strdup_printf ("%s Latest", _tmp3_);
		result = _tmp4_;
		return result;
	}
	_tmp5_ = self->priv->_release;
	_tmp6_ = proton_plus_models_release_get_title (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup (_tmp7_);
	result = _tmp8_;
	return result;
}

gchar*
proton_plus_services_install_job_get_displayed_title (ProtonPlusServicesInstallJob* self)
{
	gchar* result;
	ProtonPlusServicesSteamTinkerLaunchContext* context = NULL;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp2_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_steam_tinker_launch_context;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	context = _tmp1_;
	_tmp2_ = context;
	if (_tmp2_ == NULL) {
		gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp3_ = proton_plus_services_install_job_get_title (self);
		_tmp4_ = _tmp3_;
		result = _tmp4_;
		_g_object_unref0 (context);
		return result;
	}
	_tmp5_ = context;
	_tmp6_ = proton_plus_services_steam_tinker_launch_context_get_local_date (_tmp5_);
	_tmp7_ = _tmp6_;
	if (g_strcmp0 (_tmp7_, "") != 0) {
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		_tmp8_ = proton_plus_services_install_job_get_title (self);
		_tmp9_ = _tmp8_;
		_tmp10_ = _tmp9_;
		_tmp11_ = context;
		_tmp12_ = proton_plus_services_steam_tinker_launch_context_get_local_date (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strdup_printf ("%s (%s)", _tmp10_, _tmp13_);
		_tmp15_ = _tmp14_;
		_g_free0 (_tmp10_);
		result = _tmp15_;
		_g_object_unref0 (context);
		return result;
	}
	_tmp16_ = context;
	_tmp17_ = proton_plus_services_steam_tinker_launch_context_get_latest_date (_tmp16_);
	_tmp18_ = _tmp17_;
	if (g_strcmp0 (_tmp18_, "") != 0) {
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		_tmp19_ = proton_plus_services_install_job_get_title (self);
		_tmp20_ = _tmp19_;
		_tmp21_ = _tmp20_;
		_tmp22_ = context;
		_tmp23_ = proton_plus_services_steam_tinker_launch_context_get_latest_date (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = g_strdup_printf ("%s (%s)", _tmp21_, _tmp24_);
		_tmp26_ = _tmp25_;
		_g_free0 (_tmp21_);
		result = _tmp26_;
		_g_object_unref0 (context);
		return result;
	}
	_tmp27_ = proton_plus_services_install_job_get_title (self);
	_tmp28_ = _tmp27_;
	result = _tmp28_;
	_g_object_unref0 (context);
	return result;
}

gchar*
proton_plus_services_install_job_get_usage_name (ProtonPlusServicesInstallJob* self)
{
	gchar* result;
	gchar* _tmp0_ = NULL;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	gchar* _tmp5_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_steam_tinker_launch_context;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup ("Proton-stl");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	} else {
		gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp3_ = proton_plus_services_install_job_get_title (self);
		_tmp4_ = _tmp3_;
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp4_;
	}
	_tmp5_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp5_;
	_g_free0 (_tmp0_);
	return result;
}

gchar*
proton_plus_services_install_job_get_operation_id (ProtonPlusServicesInstallJob* self)
{
	gchar* result;
	const gchar* _tmp0_ = NULL;
	ProtonPlusServicesInstallJobMode _tmp1_;
	gchar* release_identity = NULL;
	gchar* _tmp14_;
	gchar* variant_id = NULL;
	gchar* _tmp15_;
	ProtonPlusModelsTool* _tmp16_;
	ProtonPlusModelsGroup* _tmp17_;
	ProtonPlusModelsGroup* _tmp18_;
	ProtonPlusModelsLauncher* _tmp19_;
	ProtonPlusModelsLauncher* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	ProtonPlusModelsTool* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_mode;
	if (_tmp1_ == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED) {
		const gchar* _tmp2_ = NULL;
		ProtonPlusModelsRelease* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = self->priv->_release;
		_tmp4_ = proton_plus_models_release_get_upstream_release_id (_tmp3_);
		_tmp5_ = _tmp4_;
		if (g_strcmp0 (_tmp5_, "") != 0) {
			ProtonPlusModelsRelease* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			_tmp6_ = self->priv->_release;
			_tmp7_ = proton_plus_models_release_get_upstream_release_id (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp2_ = _tmp8_;
		} else {
			ProtonPlusModelsRelease* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			_tmp9_ = self->priv->_release;
			_tmp10_ = proton_plus_models_release_get_source_tag (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp2_ = _tmp11_;
		}
		_tmp0_ = _tmp2_;
	} else {
		const gchar* _tmp12_ = NULL;
		ProtonPlusServicesInstallJobMode _tmp13_;
		_tmp13_ = self->priv->_mode;
		if (_tmp13_ == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST) {
			_tmp12_ = "latest";
		} else {
			_tmp12_ = "steam-tinker-launch";
		}
		_tmp0_ = _tmp12_;
	}
	_tmp14_ = g_strdup (_tmp0_);
	release_identity = _tmp14_;
	_tmp15_ = proton_plus_services_install_job_selected_variant_identity (self);
	variant_id = _tmp15_;
	_tmp16_ = self->priv->_tool;
	_tmp17_ = proton_plus_models_tool_get_group (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = proton_plus_models_group_get_launcher (_tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = proton_plus_models_launcher_get_tool_target_id (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = self->priv->_tool;
	_tmp24_ = proton_plus_models_tool_get_id (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = proton_plus_services_install_job_mode_id (self);
	_tmp27_ = _tmp26_;
	_tmp28_ = g_strdup_printf ("%s/%s/%s/%s/%s", _tmp22_, _tmp25_, _tmp27_, release_identity, variant_id);
	_tmp29_ = _tmp28_;
	_g_free0 (_tmp27_);
	result = _tmp29_;
	_g_free0 (variant_id);
	_g_free0 (release_identity);
	return result;
}

static void
proton_plus_services_install_job_class_init (ProtonPlusServicesInstallJobClass * klass,
                                             gpointer klass_data)
{
	proton_plus_services_install_job_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesInstallJob_private_offset);
	((ProtonPlusServicesInstallJobClass *) klass)->download_archive = (void (*) (ProtonPlusServicesInstallJob*, const gchar*, const gchar*, GAsyncReadyCallback, gpointer)) proton_plus_services_install_job_real_download_archive;
	((ProtonPlusServicesInstallJobClass *) klass)->download_archive_finish = (gboolean (*) (ProtonPlusServicesInstallJob*, GAsyncResult*, gchar**)) proton_plus_services_install_job_real_download_archive_finish;
	((ProtonPlusServicesInstallJobClass *) klass)->promote_staged_installation = (void (*) (ProtonPlusServicesInstallJob*, const gchar*, GAsyncReadyCallback, gpointer)) proton_plus_services_install_job_real_promote_staged_installation;
	((ProtonPlusServicesInstallJobClass *) klass)->promote_staged_installation_finish = (gboolean (*) (ProtonPlusServicesInstallJob*, GAsyncResult*)) proton_plus_services_install_job_real_promote_staged_installation_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_services_install_job_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_services_install_job_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_install_job_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_RELEASE_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_RELEASE_PROPERTY] = g_param_spec_object ("release", "release", "release", PROTON_PLUS_MODELS_TYPE_RELEASE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_TOOL_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_TOOL_PROPERTY] = g_param_spec_object ("tool", "tool", "tool", PROTON_PLUS_MODELS_TYPE_TOOL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_PROPERTY] = g_param_spec_enum ("mode", "mode", "mode", PROTON_PLUS_SERVICES_INSTALL_JOB_TYPE_MODE, PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_ASSET_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_ASSET_PROPERTY] = g_param_spec_object ("selected-asset", "selected-asset", "selected-asset", PROTON_PLUS_MODELS_ASSETS_TYPE_ASSET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY] = g_param_spec_enum ("archive-install-requirement", "archive-install-requirement", "archive-install-requirement", PROTON_PLUS_MODELS_PROVIDERS_TYPE_ARCHIVE_INSTALL_REQUIREMENT, PROTON_PLUS_MODELS_PROVIDERS_ARCHIVE_INSTALL_REQUIREMENT_STANDARD, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_NAME_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_NAME_PROPERTY] = g_param_spec_string ("selected-variant-name", "selected-variant-name", "selected-variant-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_ID_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_ID_PROPERTY] = g_param_spec_string ("selected-variant-id", "selected-variant-id", "selected-variant-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_LOCATION_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_LOCATION_PROPERTY] = g_param_spec_string ("install-location", "install-location", "install-location", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_REPLACEMENT_BACKUP_PATH_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_REPLACEMENT_BACKUP_PATH_PROPERTY] = g_param_spec_string ("replacement-backup-path", "replacement-backup-path", "replacement-backup-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_TINKER_LAUNCH_CONTEXT_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_TINKER_LAUNCH_CONTEXT_PROPERTY] = g_param_spec_object ("steam-tinker-launch-context", "steam-tinker-launch-context", "steam-tinker-launch-context", PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_CONTEXT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_CANCELED_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_CANCELED_PROPERTY] = g_param_spec_boolean ("canceled", "canceled", "canceled", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_PROPERTY] = g_param_spec_string ("progress", "progress", "progress", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_SPEED_KBPS_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SPEED_KBPS_PROPERTY] = g_param_spec_double ("speed-kbps", "speed-kbps", "speed-kbps", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_SECONDS_REMAINING_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_SECONDS_REMAINING_PROPERTY] = g_param_spec_double ("seconds-remaining", "seconds-remaining", "seconds-remaining", -G_MAXDOUBLE, G_MAXDOUBLE, -1.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_IS_PERCENT_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_IS_PERCENT_PROPERTY] = g_param_spec_boolean ("is-percent", "is-percent", "is-percent", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_IS_FINISHED_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_IS_FINISHED_PROPERTY] = g_param_spec_boolean ("is-finished", "is-finished", "is-finished", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_SUCCESS_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_SUCCESS_PROPERTY] = g_param_spec_boolean ("install-success", "install-success", "install-success", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_ERROR_MESSAGE_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_ERROR_MESSAGE_PROPERTY] = g_param_spec_string ("error-message", "error-message", "error-message", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_HAS_STEAM_RESTART_RECORD_RESULT_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_HAS_STEAM_RESTART_RECORD_RESULT_PROPERTY] = g_param_spec_boolean ("has-steam-restart-record-result", "has-steam-restart-record-result", "has-steam-restart-record-result", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_RECORD_RESULT_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_RECORD_RESULT_PROPERTY] = g_param_spec_enum ("steam-restart-record-result", "steam-restart-record-result", "steam-restart-record-result", PROTON_PLUS_SERVICES_TYPE_STEAM_RESTART_RECORD_RESULT, PROTON_PLUS_SERVICES_STEAM_RESTART_RECORD_RESULT_ALREADY_SATISFIED, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_WARNING_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_WARNING_PROPERTY] = g_param_spec_string ("steam-restart-warning", "steam-restart-warning", "steam-restart-warning", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_PROPERTY] = g_param_spec_enum ("state", "state", "state", PROTON_PLUS_SERVICES_INSTALL_JOB_TYPE_STATE, PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_NOT_INSTALLED, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_PROPERTY] = g_param_spec_enum ("step", "step", "step", PROTON_PLUS_SERVICES_INSTALL_JOB_TYPE_STEP, PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_NOTHING, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_TITLE_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_DISPLAYED_TITLE_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_DISPLAYED_TITLE_PROPERTY] = g_param_spec_string ("displayed-title", "displayed-title", "displayed-title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_USAGE_NAME_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_USAGE_NAME_PROPERTY] = g_param_spec_string ("usage-name", "usage-name", "usage-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_INSTALL_JOB_OPERATION_ID_PROPERTY, proton_plus_services_install_job_properties[PROTON_PLUS_SERVICES_INSTALL_JOB_OPERATION_ID_PROPERTY] = g_param_spec_string ("operation-id", "operation-id", "operation-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	proton_plus_services_install_job_signals[PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_UPDATED_SIGNAL] = g_signal_new ("progress-updated", PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
proton_plus_services_install_job_instance_init (ProtonPlusServicesInstallJob * self,
                                                gpointer klass)
{
	gchar* _tmp0_;
	GCancellable* _tmp1_;
	self->priv = proton_plus_services_install_job_get_instance_private (self);
	self->priv->_mode = PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED;
	self->priv->_archive_install_requirement = PROTON_PLUS_MODELS_PROVIDERS_ARCHIVE_INSTALL_REQUIREMENT_STANDARD;
	self->priv->_selected_variant_name = NULL;
	self->priv->_selected_variant_id = NULL;
	_tmp0_ = g_strdup ("");
	self->priv->_install_location = _tmp0_;
	self->priv->installation_location_override = NULL;
	self->priv->_replacement_backup_path = NULL;
	self->priv->_steam_tinker_launch_context = NULL;
	_tmp1_ = g_cancellable_new ();
	self->priv->operation_cancellable = _tmp1_;
	self->priv->_canceled = FALSE;
	self->priv->_progress = NULL;
	self->priv->_speed_kbps = 0.0;
	self->priv->_seconds_remaining = -1.0;
	self->priv->_is_percent = FALSE;
	self->priv->_is_finished = FALSE;
	self->priv->_install_success = FALSE;
	self->priv->_error_message = NULL;
	self->priv->_has_steam_restart_record_result = FALSE;
	self->priv->_steam_restart_record_result = PROTON_PLUS_SERVICES_STEAM_RESTART_RECORD_RESULT_ALREADY_SATISFIED;
	self->priv->_steam_restart_warning = NULL;
	self->priv->recorded_steam_change_kind = NULL;
	self->priv->_state = PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_NOT_INSTALLED;
	self->priv->_step = PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_NOTHING;
}

static void
proton_plus_services_install_job_finalize (GObject * obj)
{
	ProtonPlusServicesInstallJob * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob);
	_g_object_unref0 (self->priv->_release);
	_g_object_unref0 (self->priv->_tool);
	_g_object_unref0 (self->priv->_selected_asset);
	_g_free0 (self->priv->_selected_variant_name);
	_g_free0 (self->priv->_selected_variant_id);
	_g_free0 (self->priv->_install_location);
	_g_free0 (self->priv->installation_location_override);
	_g_free0 (self->priv->_replacement_backup_path);
	_g_object_unref0 (self->priv->_steam_tinker_launch_context);
	_g_object_unref0 (self->priv->operation_cancellable);
	_g_free0 (self->priv->_progress);
	_g_free0 (self->priv->_error_message);
	_g_free0 (self->priv->_steam_restart_warning);
	_g_free0 (self->priv->recorded_steam_change_kind);
	G_OBJECT_CLASS (proton_plus_services_install_job_parent_class)->finalize (obj);
}

static GType
proton_plus_services_install_job_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesInstallJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_install_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesInstallJob), 0, (GInstanceInitFunc) proton_plus_services_install_job_instance_init, NULL };
	GType proton_plus_services_install_job_type_id;
	proton_plus_services_install_job_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesInstallJob", &g_define_type_info, 0);
	ProtonPlusServicesInstallJob_private_offset = g_type_add_instance_private (proton_plus_services_install_job_type_id, sizeof (ProtonPlusServicesInstallJobPrivate));
	return proton_plus_services_install_job_type_id;
}

GType
proton_plus_services_install_job_get_type (void)
{
	static volatile gsize proton_plus_services_install_job_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_install_job_type_id__once)) {
		GType proton_plus_services_install_job_type_id;
		proton_plus_services_install_job_type_id = proton_plus_services_install_job_get_type_once ();
		g_once_init_leave (&proton_plus_services_install_job_type_id__once, proton_plus_services_install_job_type_id);
	}
	return proton_plus_services_install_job_type_id__once;
}

static void
_vala_proton_plus_services_install_job_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	ProtonPlusServicesInstallJob * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_INSTALL_JOB_RELEASE_PROPERTY:
		g_value_set_object (value, proton_plus_services_install_job_get_release (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_TOOL_PROPERTY:
		g_value_set_object (value, proton_plus_services_install_job_get_tool (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_PROPERTY:
		g_value_set_enum (value, proton_plus_services_install_job_get_mode (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_ASSET_PROPERTY:
		g_value_set_object (value, proton_plus_services_install_job_get_selected_asset (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY:
		g_value_set_enum (value, proton_plus_services_install_job_get_archive_install_requirement (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_NAME_PROPERTY:
		g_value_set_string (value, proton_plus_services_install_job_get_selected_variant_name (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_ID_PROPERTY:
		g_value_set_string (value, proton_plus_services_install_job_get_selected_variant_id (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_LOCATION_PROPERTY:
		g_value_set_string (value, proton_plus_services_install_job_get_install_location (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_REPLACEMENT_BACKUP_PATH_PROPERTY:
		g_value_set_string (value, proton_plus_services_install_job_get_replacement_backup_path (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_TINKER_LAUNCH_CONTEXT_PROPERTY:
		g_value_set_object (value, proton_plus_services_install_job_get_steam_tinker_launch_context (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_CANCELED_PROPERTY:
		g_value_set_boolean (value, proton_plus_services_install_job_get_canceled (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_PROPERTY:
		g_value_set_string (value, proton_plus_services_install_job_get_progress (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SPEED_KBPS_PROPERTY:
		g_value_set_double (value, proton_plus_services_install_job_get_speed_kbps (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SECONDS_REMAINING_PROPERTY:
		g_value_set_double (value, proton_plus_services_install_job_get_seconds_remaining (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_IS_PERCENT_PROPERTY:
		g_value_set_boolean (value, proton_plus_services_install_job_get_is_percent (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_IS_FINISHED_PROPERTY:
		g_value_set_boolean (value, proton_plus_services_install_job_get_is_finished (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_SUCCESS_PROPERTY:
		g_value_set_boolean (value, proton_plus_services_install_job_get_install_success (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_ERROR_MESSAGE_PROPERTY:
		g_value_set_string (value, proton_plus_services_install_job_get_error_message (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_HAS_STEAM_RESTART_RECORD_RESULT_PROPERTY:
		g_value_set_boolean (value, proton_plus_services_install_job_get_has_steam_restart_record_result (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_RECORD_RESULT_PROPERTY:
		g_value_set_enum (value, proton_plus_services_install_job_get_steam_restart_record_result (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_WARNING_PROPERTY:
		g_value_set_string (value, proton_plus_services_install_job_get_steam_restart_warning (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_PROPERTY:
		g_value_set_enum (value, proton_plus_services_install_job_get_state (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_PROPERTY:
		g_value_set_enum (value, proton_plus_services_install_job_get_step (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_TITLE_PROPERTY:
		g_value_take_string (value, proton_plus_services_install_job_get_title (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_DISPLAYED_TITLE_PROPERTY:
		g_value_take_string (value, proton_plus_services_install_job_get_displayed_title (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_USAGE_NAME_PROPERTY:
		g_value_take_string (value, proton_plus_services_install_job_get_usage_name (self));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_OPERATION_ID_PROPERTY:
		g_value_take_string (value, proton_plus_services_install_job_get_operation_id (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_services_install_job_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec)
{
	ProtonPlusServicesInstallJob * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_INSTALL_JOB_RELEASE_PROPERTY:
		proton_plus_services_install_job_set_release (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_TOOL_PROPERTY:
		proton_plus_services_install_job_set_tool (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_PROPERTY:
		proton_plus_services_install_job_set_mode (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_ASSET_PROPERTY:
		proton_plus_services_install_job_set_selected_asset (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY:
		proton_plus_services_install_job_set_archive_install_requirement (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_NAME_PROPERTY:
		proton_plus_services_install_job_set_selected_variant_name (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SELECTED_VARIANT_ID_PROPERTY:
		proton_plus_services_install_job_set_selected_variant_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_LOCATION_PROPERTY:
		proton_plus_services_install_job_set_install_location (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_REPLACEMENT_BACKUP_PATH_PROPERTY:
		proton_plus_services_install_job_set_replacement_backup_path (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_TINKER_LAUNCH_CONTEXT_PROPERTY:
		proton_plus_services_install_job_set_steam_tinker_launch_context (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_CANCELED_PROPERTY:
		proton_plus_services_install_job_set_canceled (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_PROGRESS_PROPERTY:
		proton_plus_services_install_job_set_progress (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SPEED_KBPS_PROPERTY:
		proton_plus_services_install_job_set_speed_kbps (self, g_value_get_double (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_SECONDS_REMAINING_PROPERTY:
		proton_plus_services_install_job_set_seconds_remaining (self, g_value_get_double (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_IS_PERCENT_PROPERTY:
		proton_plus_services_install_job_set_is_percent (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_IS_FINISHED_PROPERTY:
		proton_plus_services_install_job_set_is_finished (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_INSTALL_SUCCESS_PROPERTY:
		proton_plus_services_install_job_set_install_success (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_ERROR_MESSAGE_PROPERTY:
		proton_plus_services_install_job_set_error_message (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_HAS_STEAM_RESTART_RECORD_RESULT_PROPERTY:
		proton_plus_services_install_job_set_has_steam_restart_record_result (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_RECORD_RESULT_PROPERTY:
		proton_plus_services_install_job_set_steam_restart_record_result (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEAM_RESTART_WARNING_PROPERTY:
		proton_plus_services_install_job_set_steam_restart_warning (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_PROPERTY:
		proton_plus_services_install_job_set_state (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_PROPERTY:
		proton_plus_services_install_job_set_step (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

