/* steam-restart-target.c generated by valac 0.56.19, the Vala compiler
 * generated from steam-restart-target.vala, do not modify */

#include "protonplus_core.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.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_MODELS_STEAM_RESTART_TARGET_0_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_ID_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DISPLAY_NAME_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DATA_ROOT_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_INSTALLATION_KIND_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_FLATPAK_APPLICATION_ID_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_EXECUTABLE_HINT_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DESKTOP_ENTRY_ID_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_STORAGE_ONLY_PROPERTY,
	PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _ProtonPlusModelsSteamRestartTargetPrivate {
	gchar* _id;
	gchar* _display_name;
	gchar* _data_root;
	ProtonPlusModelsSteamInstallationKind _installation_kind;
	gchar* _flatpak_application_id;
	gchar* _executable_hint;
	gchar* _desktop_entry_id;
	gboolean _storage_only;
};

static gint ProtonPlusModelsSteamRestartTarget_private_offset;
static gpointer proton_plus_models_steam_restart_target_parent_class = NULL;

static void proton_plus_models_steam_restart_target_set_data_root (ProtonPlusModelsSteamRestartTarget* self,
                                                            const gchar* value);
static void proton_plus_models_steam_restart_target_set_installation_kind (ProtonPlusModelsSteamRestartTarget* self,
                                                                    ProtonPlusModelsSteamInstallationKind value);
static void proton_plus_models_steam_restart_target_set_display_name (ProtonPlusModelsSteamRestartTarget* self,
                                                               const gchar* value);
static void proton_plus_models_steam_restart_target_set_flatpak_application_id (ProtonPlusModelsSteamRestartTarget* self,
                                                                         const gchar* value);
static void proton_plus_models_steam_restart_target_set_executable_hint (ProtonPlusModelsSteamRestartTarget* self,
                                                                  const gchar* value);
static void proton_plus_models_steam_restart_target_set_desktop_entry_id (ProtonPlusModelsSteamRestartTarget* self,
                                                                   const gchar* value);
static void proton_plus_models_steam_restart_target_set_storage_only (ProtonPlusModelsSteamRestartTarget* self,
                                                               gboolean value);
static gchar* proton_plus_models_steam_restart_target_build_id (ProtonPlusModelsSteamRestartTarget* self);
static void proton_plus_models_steam_restart_target_set_id (ProtonPlusModelsSteamRestartTarget* self,
                                                     const gchar* value);
static void proton_plus_models_steam_restart_target_finalize (GObject * obj);
static GType proton_plus_models_steam_restart_target_get_type_once (void);
static void _vala_proton_plus_models_steam_restart_target_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec);
static void _vala_proton_plus_models_steam_restart_target_set_property (GObject * object,
                                                                 guint property_id,
                                                                 const GValue * value,
                                                                 GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static GType
proton_plus_models_steam_installation_kind_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_NATIVE, "PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_NATIVE", "native"}, {PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_FLATPAK, "PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_FLATPAK", "flatpak"}, {PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_SNAP, "PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_SNAP", "snap"}, {PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_CUSTOM, "PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_CUSTOM", "custom"}, {PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_UNKNOWN, "PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_UNKNOWN", "unknown"}, {0, NULL, NULL}};
	GType proton_plus_models_steam_installation_kind_type_id;
	proton_plus_models_steam_installation_kind_type_id = g_enum_register_static ("ProtonPlusModelsSteamInstallationKind", values);
	return proton_plus_models_steam_installation_kind_type_id;
}

GType
proton_plus_models_steam_installation_kind_get_type (void)
{
	static volatile gsize proton_plus_models_steam_installation_kind_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_steam_installation_kind_type_id__once)) {
		GType proton_plus_models_steam_installation_kind_type_id;
		proton_plus_models_steam_installation_kind_type_id = proton_plus_models_steam_installation_kind_get_type_once ();
		g_once_init_leave (&proton_plus_models_steam_installation_kind_type_id__once, proton_plus_models_steam_installation_kind_type_id);
	}
	return proton_plus_models_steam_installation_kind_type_id__once;
}

static inline gpointer
proton_plus_models_steam_restart_target_get_instance_private (ProtonPlusModelsSteamRestartTarget* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsSteamRestartTarget_private_offset);
}

ProtonPlusModelsSteamRestartTarget*
proton_plus_models_steam_restart_target_construct (GType object_type,
                                                   const gchar* data_root,
                                                   ProtonPlusModelsSteamInstallationKind installation_kind,
                                                   const gchar* display_name,
                                                   const gchar* flatpak_application_id,
                                                   const gchar* executable_hint,
                                                   const gchar* desktop_entry_id,
                                                   gboolean storage_only)
{
	ProtonPlusModelsSteamRestartTarget * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (data_root != NULL, NULL);
	g_return_val_if_fail (display_name != NULL, NULL);
	self = (ProtonPlusModelsSteamRestartTarget*) g_object_new (object_type, NULL);
	_tmp0_ = proton_plus_models_steam_restart_target_normalize_data_root (data_root);
	_tmp1_ = _tmp0_;
	proton_plus_models_steam_restart_target_set_data_root (self, _tmp1_);
	_g_free0 (_tmp1_);
	proton_plus_models_steam_restart_target_set_installation_kind (self, installation_kind);
	proton_plus_models_steam_restart_target_set_display_name (self, display_name);
	proton_plus_models_steam_restart_target_set_flatpak_application_id (self, flatpak_application_id);
	proton_plus_models_steam_restart_target_set_executable_hint (self, executable_hint);
	proton_plus_models_steam_restart_target_set_desktop_entry_id (self, desktop_entry_id);
	proton_plus_models_steam_restart_target_set_storage_only (self, storage_only);
	_tmp2_ = proton_plus_models_steam_restart_target_build_id (self);
	_tmp3_ = _tmp2_;
	proton_plus_models_steam_restart_target_set_id (self, _tmp3_);
	_g_free0 (_tmp3_);
	return self;
}

ProtonPlusModelsSteamRestartTarget*
proton_plus_models_steam_restart_target_new (const gchar* data_root,
                                             ProtonPlusModelsSteamInstallationKind installation_kind,
                                             const gchar* display_name,
                                             const gchar* flatpak_application_id,
                                             const gchar* executable_hint,
                                             const gchar* desktop_entry_id,
                                             gboolean storage_only)
{
	return proton_plus_models_steam_restart_target_construct (PROTON_PLUS_MODELS_TYPE_STEAM_RESTART_TARGET, data_root, installation_kind, display_name, flatpak_application_id, executable_hint, desktop_entry_id, storage_only);
}

ProtonPlusModelsSteamRestartTarget*
proton_plus_models_steam_restart_target_for_native (const gchar* data_root,
                                                    const gchar* display_name,
                                                    const gchar* desktop_entry_id)
{
	ProtonPlusModelsSteamRestartTarget* _tmp0_;
	ProtonPlusModelsSteamRestartTarget* result;
	g_return_val_if_fail (data_root != NULL, NULL);
	g_return_val_if_fail (display_name != NULL, NULL);
	_tmp0_ = proton_plus_models_steam_restart_target_new (data_root, PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_NATIVE, display_name, NULL, "/usr/bin/steam", desktop_entry_id, FALSE);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsSteamRestartTarget*
proton_plus_models_steam_restart_target_for_flatpak (const gchar* data_root)
{
	ProtonPlusModelsSteamRestartTarget* _tmp0_;
	ProtonPlusModelsSteamRestartTarget* result;
	g_return_val_if_fail (data_root != NULL, NULL);
	_tmp0_ = proton_plus_models_steam_restart_target_new (data_root, PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_FLATPAK, "Steam (Flatpak)", "com.valvesoftware.Steam", NULL, "com.valvesoftware.Steam.desktop", FALSE);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsSteamRestartTarget*
proton_plus_models_steam_restart_target_for_snap (const gchar* data_root)
{
	ProtonPlusModelsSteamRestartTarget* _tmp0_;
	ProtonPlusModelsSteamRestartTarget* result;
	g_return_val_if_fail (data_root != NULL, NULL);
	_tmp0_ = proton_plus_models_steam_restart_target_new (data_root, PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_SNAP, "Steam (Snap)", NULL, "/snap/bin/steam", "steam.desktop", FALSE);
	result = _tmp0_;
	return result;
}

gchar*
proton_plus_models_steam_restart_target_normalize_data_root (const gchar* value)
{
	gchar* canonical = NULL;
	gchar* _tmp0_;
	gchar* resolved = NULL;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_;
	gchar* _tmp6_;
	gchar* result;
	g_return_val_if_fail (value != NULL, NULL);
	_tmp0_ = g_canonicalize_filename (value, NULL);
	canonical = _tmp0_;
	_tmp1_ = canonical;
	_tmp2_ = realpath (_tmp1_, NULL);
	resolved = _tmp2_;
	_tmp4_ = resolved;
	_tmp3_ = _tmp4_;
	if (_tmp3_ == NULL) {
		const gchar* _tmp5_;
		_tmp5_ = canonical;
		_tmp3_ = _tmp5_;
	}
	_tmp6_ = g_strdup (_tmp3_);
	result = _tmp6_;
	_g_free0 (resolved);
	_g_free0 (canonical);
	return result;
}

static gchar*
proton_plus_models_steam_restart_target_build_id (ProtonPlusModelsSteamRestartTarget* self)
{
	gchar* kind = NULL;
	gchar* _tmp0_;
	ProtonPlusModelsSteamInstallationKind _tmp1_;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp7_;
	gchar* app = NULL;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("unknown");
	kind = _tmp0_;
	_tmp1_ = self->priv->_installation_kind;
	switch (_tmp1_) {
		case PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_NATIVE:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("native");
			_g_free0 (kind);
			kind = _tmp2_;
			break;
		}
		case PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_FLATPAK:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("flatpak");
			_g_free0 (kind);
			kind = _tmp3_;
			break;
		}
		case PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_SNAP:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("snap");
			_g_free0 (kind);
			kind = _tmp4_;
			break;
		}
		case PROTON_PLUS_MODELS_STEAM_INSTALLATION_KIND_CUSTOM:
		{
			gchar* _tmp5_;
			_tmp5_ = g_strdup ("custom");
			_g_free0 (kind);
			kind = _tmp5_;
			break;
		}
		default:
		{
			break;
		}
	}
	_tmp7_ = self->priv->_flatpak_application_id;
	_tmp6_ = _tmp7_;
	if (_tmp6_ == NULL) {
		_tmp6_ = "";
	}
	_tmp8_ = g_strdup (_tmp6_);
	app = _tmp8_;
	_tmp9_ = kind;
	_tmp10_ = self->priv->_data_root;
	_tmp11_ = g_strdup_printf ("steam:%s:%s:%s", _tmp9_, app, _tmp10_);
	result = _tmp11_;
	_g_free0 (app);
	_g_free0 (kind);
	return result;
}

const gchar*
proton_plus_models_steam_restart_target_get_id (ProtonPlusModelsSteamRestartTarget* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_steam_restart_target_set_id (ProtonPlusModelsSteamRestartTarget* self,
                                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_steam_restart_target_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_steam_restart_target_get_display_name (ProtonPlusModelsSteamRestartTarget* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_display_name;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_steam_restart_target_set_display_name (ProtonPlusModelsSteamRestartTarget* self,
                                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_steam_restart_target_get_display_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_display_name);
		self->priv->_display_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DISPLAY_NAME_PROPERTY]);
	}
}

const gchar*
proton_plus_models_steam_restart_target_get_data_root (ProtonPlusModelsSteamRestartTarget* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_data_root;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_steam_restart_target_set_data_root (ProtonPlusModelsSteamRestartTarget* self,
                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_steam_restart_target_get_data_root (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_data_root);
		self->priv->_data_root = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DATA_ROOT_PROPERTY]);
	}
}

ProtonPlusModelsSteamInstallationKind
proton_plus_models_steam_restart_target_get_installation_kind (ProtonPlusModelsSteamRestartTarget* self)
{
	ProtonPlusModelsSteamInstallationKind result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_installation_kind;
	return result;
}

static void
proton_plus_models_steam_restart_target_set_installation_kind (ProtonPlusModelsSteamRestartTarget* self,
                                                               ProtonPlusModelsSteamInstallationKind value)
{
	ProtonPlusModelsSteamInstallationKind old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_steam_restart_target_get_installation_kind (self);
	if (old_value != value) {
		self->priv->_installation_kind = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_INSTALLATION_KIND_PROPERTY]);
	}
}

const gchar*
proton_plus_models_steam_restart_target_get_flatpak_application_id (ProtonPlusModelsSteamRestartTarget* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_flatpak_application_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_steam_restart_target_set_flatpak_application_id (ProtonPlusModelsSteamRestartTarget* self,
                                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_steam_restart_target_get_flatpak_application_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_flatpak_application_id);
		self->priv->_flatpak_application_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_FLATPAK_APPLICATION_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_steam_restart_target_get_executable_hint (ProtonPlusModelsSteamRestartTarget* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_executable_hint;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_steam_restart_target_set_executable_hint (ProtonPlusModelsSteamRestartTarget* self,
                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_steam_restart_target_get_executable_hint (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_executable_hint);
		self->priv->_executable_hint = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_EXECUTABLE_HINT_PROPERTY]);
	}
}

const gchar*
proton_plus_models_steam_restart_target_get_desktop_entry_id (ProtonPlusModelsSteamRestartTarget* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_desktop_entry_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_steam_restart_target_set_desktop_entry_id (ProtonPlusModelsSteamRestartTarget* self,
                                                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_steam_restart_target_get_desktop_entry_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_desktop_entry_id);
		self->priv->_desktop_entry_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DESKTOP_ENTRY_ID_PROPERTY]);
	}
}

gboolean
proton_plus_models_steam_restart_target_get_storage_only (ProtonPlusModelsSteamRestartTarget* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_storage_only;
	return result;
}

static void
proton_plus_models_steam_restart_target_set_storage_only (ProtonPlusModelsSteamRestartTarget* self,
                                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_steam_restart_target_get_storage_only (self);
	if (old_value != value) {
		self->priv->_storage_only = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_STORAGE_ONLY_PROPERTY]);
	}
}

static void
proton_plus_models_steam_restart_target_class_init (ProtonPlusModelsSteamRestartTargetClass * klass,
                                                    gpointer klass_data)
{
	proton_plus_models_steam_restart_target_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsSteamRestartTarget_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_steam_restart_target_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_steam_restart_target_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_steam_restart_target_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_ID_PROPERTY, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DISPLAY_NAME_PROPERTY, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DISPLAY_NAME_PROPERTY] = g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DATA_ROOT_PROPERTY, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DATA_ROOT_PROPERTY] = g_param_spec_string ("data-root", "data-root", "data-root", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_INSTALLATION_KIND_PROPERTY, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_INSTALLATION_KIND_PROPERTY] = g_param_spec_enum ("installation-kind", "installation-kind", "installation-kind", PROTON_PLUS_MODELS_TYPE_STEAM_INSTALLATION_KIND, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_FLATPAK_APPLICATION_ID_PROPERTY, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_FLATPAK_APPLICATION_ID_PROPERTY] = g_param_spec_string ("flatpak-application-id", "flatpak-application-id", "flatpak-application-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_EXECUTABLE_HINT_PROPERTY, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_EXECUTABLE_HINT_PROPERTY] = g_param_spec_string ("executable-hint", "executable-hint", "executable-hint", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DESKTOP_ENTRY_ID_PROPERTY, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DESKTOP_ENTRY_ID_PROPERTY] = g_param_spec_string ("desktop-entry-id", "desktop-entry-id", "desktop-entry-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_STORAGE_ONLY_PROPERTY, proton_plus_models_steam_restart_target_properties[PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_STORAGE_ONLY_PROPERTY] = g_param_spec_boolean ("storage-only", "storage-only", "storage-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_steam_restart_target_instance_init (ProtonPlusModelsSteamRestartTarget * self,
                                                       gpointer klass)
{
	self->priv = proton_plus_models_steam_restart_target_get_instance_private (self);
}

static void
proton_plus_models_steam_restart_target_finalize (GObject * obj)
{
	ProtonPlusModelsSteamRestartTarget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_STEAM_RESTART_TARGET, ProtonPlusModelsSteamRestartTarget);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_display_name);
	_g_free0 (self->priv->_data_root);
	_g_free0 (self->priv->_flatpak_application_id);
	_g_free0 (self->priv->_executable_hint);
	_g_free0 (self->priv->_desktop_entry_id);
	G_OBJECT_CLASS (proton_plus_models_steam_restart_target_parent_class)->finalize (obj);
}

static GType
proton_plus_models_steam_restart_target_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsSteamRestartTargetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_steam_restart_target_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsSteamRestartTarget), 0, (GInstanceInitFunc) proton_plus_models_steam_restart_target_instance_init, NULL };
	GType proton_plus_models_steam_restart_target_type_id;
	proton_plus_models_steam_restart_target_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsSteamRestartTarget", &g_define_type_info, 0);
	ProtonPlusModelsSteamRestartTarget_private_offset = g_type_add_instance_private (proton_plus_models_steam_restart_target_type_id, sizeof (ProtonPlusModelsSteamRestartTargetPrivate));
	return proton_plus_models_steam_restart_target_type_id;
}

GType
proton_plus_models_steam_restart_target_get_type (void)
{
	static volatile gsize proton_plus_models_steam_restart_target_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_steam_restart_target_type_id__once)) {
		GType proton_plus_models_steam_restart_target_type_id;
		proton_plus_models_steam_restart_target_type_id = proton_plus_models_steam_restart_target_get_type_once ();
		g_once_init_leave (&proton_plus_models_steam_restart_target_type_id__once, proton_plus_models_steam_restart_target_type_id);
	}
	return proton_plus_models_steam_restart_target_type_id__once;
}

static void
_vala_proton_plus_models_steam_restart_target_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec)
{
	ProtonPlusModelsSteamRestartTarget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_STEAM_RESTART_TARGET, ProtonPlusModelsSteamRestartTarget);
	switch (property_id) {
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_steam_restart_target_get_id (self));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DISPLAY_NAME_PROPERTY:
		g_value_set_string (value, proton_plus_models_steam_restart_target_get_display_name (self));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DATA_ROOT_PROPERTY:
		g_value_set_string (value, proton_plus_models_steam_restart_target_get_data_root (self));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_INSTALLATION_KIND_PROPERTY:
		g_value_set_enum (value, proton_plus_models_steam_restart_target_get_installation_kind (self));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_FLATPAK_APPLICATION_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_steam_restart_target_get_flatpak_application_id (self));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_EXECUTABLE_HINT_PROPERTY:
		g_value_set_string (value, proton_plus_models_steam_restart_target_get_executable_hint (self));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DESKTOP_ENTRY_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_steam_restart_target_get_desktop_entry_id (self));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_STORAGE_ONLY_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_steam_restart_target_get_storage_only (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_steam_restart_target_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec)
{
	ProtonPlusModelsSteamRestartTarget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_STEAM_RESTART_TARGET, ProtonPlusModelsSteamRestartTarget);
	switch (property_id) {
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_ID_PROPERTY:
		proton_plus_models_steam_restart_target_set_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DISPLAY_NAME_PROPERTY:
		proton_plus_models_steam_restart_target_set_display_name (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DATA_ROOT_PROPERTY:
		proton_plus_models_steam_restart_target_set_data_root (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_INSTALLATION_KIND_PROPERTY:
		proton_plus_models_steam_restart_target_set_installation_kind (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_FLATPAK_APPLICATION_ID_PROPERTY:
		proton_plus_models_steam_restart_target_set_flatpak_application_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_EXECUTABLE_HINT_PROPERTY:
		proton_plus_models_steam_restart_target_set_executable_hint (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_DESKTOP_ENTRY_ID_PROPERTY:
		proton_plus_models_steam_restart_target_set_desktop_entry_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_STEAM_RESTART_TARGET_STORAGE_ONLY_PROPERTY:
		proton_plus_models_steam_restart_target_set_storage_only (self, g_value_get_boolean (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;
}

