/* provider-definition.c generated by valac 0.56.19, the Vala compiler
 * generated from provider-definition.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_PROVIDERS_VARIANT_DEFINITION_0_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ID_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_NAME_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_FORMAT_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_IS_DEFAULT_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_COMPATIBILITY_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ALTERNATE_FORMATS_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef enum  {
	PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_TEMPLATE,
	PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_LOWERCASE,
	PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_REPLACE,
	PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_CONDITIONAL
} ProtonPlusModelsProvidersInstallLayoutKind;

#define PROTON_PLUS_MODELS_PROVIDERS_TYPE_INSTALL_LAYOUT_KIND (proton_plus_models_providers_install_layout_kind_get_type ())
enum  {
	PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_0_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_LAUNCHER_FAMILY_ID_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_providers_install_layout_properties[PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_NUM_PROPERTIES];
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
enum  {
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_TEMPLATE_0_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_TEMPLATE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_providers_provider_template_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_TEMPLATE_NUM_PROPERTIES];
enum  {
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_0_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_CATEGORY_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_TYPE_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_PROVIDER_ID_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TITLE_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_DESCRIPTION_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ENDPOINT_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_REPOSITORY_URL_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SORT_PRIORITY_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TAG_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_URL_TEMPLATE_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SINGLE_ARCHIVE_RELEASES_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ASSET_FILTERS_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ASSET_EXCLUSIONS_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_ENDPOINTS_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_ID_PROPERTY,
	PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_NUM_PROPERTIES];
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _ProtonPlusModelsProvidersVariantDefinitionPrivate {
	gchar* _id;
	gchar* _name;
	gchar* _format;
	gboolean _is_default;
	ProtonPlusModelsVariantCompatibility* _compatibility;
	gchar** alternate_format_values;
	gint alternate_format_values_length1;
	gint _alternate_format_values_size_;
};

struct _ProtonPlusModelsProvidersInstallLayoutPrivate {
	gchar* _launcher_family_id;
	ProtonPlusModelsProvidersInstallLayoutKind kind;
	gchar* layout_template;
	gchar* search;
	gchar* replacement;
	gchar* marker;
	gchar* true_template;
	gchar* false_template;
};

struct _ProtonPlusModelsProvidersProviderDefinitionPrivate {
	ProtonPlusModelsProvidersCategory _category;
	ProtonPlusModelsProvidersSourceType _source_type;
	gchar* _provider_id;
	gchar* _title;
	gchar* _description;
	gchar* _endpoint;
	gchar* _repository_url;
	gint _sort_priority;
	gboolean _legacy;
	gchar* _tag;
	ProtonPlusModelsProvidersVariantDefinition** variants;
	gint variants_length1;
	gint _variants_size_;
	ProtonPlusModelsProvidersInstallLayout** install_layouts;
	gint install_layouts_length1;
	gint _install_layouts_size_;
	gchar** asset_filter_values;
	gint asset_filter_values_length1;
	gint _asset_filter_values_size_;
	gchar** asset_exclusion_values;
	gint asset_exclusion_values_length1;
	gint _asset_exclusion_values_size_;
	gchar** legacy_endpoint_values;
	gint legacy_endpoint_values_length1;
	gint _legacy_endpoint_values_size_;
	gchar* _url_template;
	ProtonPlusModelsProvidersArchiveInstallRequirement _archive_install_requirement;
	gboolean _single_archive_releases;
};

static gint ProtonPlusModelsProvidersVariantDefinition_private_offset;
static gpointer proton_plus_models_providers_variant_definition_parent_class = NULL;
static gint ProtonPlusModelsProvidersInstallLayout_private_offset;
static gpointer proton_plus_models_providers_install_layout_parent_class = NULL;
static gpointer proton_plus_models_providers_provider_template_parent_class = NULL;
static gint ProtonPlusModelsProvidersProviderDefinition_private_offset;
static gpointer proton_plus_models_providers_provider_definition_parent_class = NULL;

static void proton_plus_models_providers_variant_definition_set_id (ProtonPlusModelsProvidersVariantDefinition* self,
                                                             const gchar* value);
static void proton_plus_models_providers_variant_definition_set_name (ProtonPlusModelsProvidersVariantDefinition* self,
                                                               const gchar* value);
static void proton_plus_models_providers_variant_definition_set_format (ProtonPlusModelsProvidersVariantDefinition* self,
                                                                 const gchar* value);
static void proton_plus_models_providers_variant_definition_set_is_default (ProtonPlusModelsProvidersVariantDefinition* self,
                                                                     gboolean value);
static void proton_plus_models_providers_variant_definition_set_compatibility (ProtonPlusModelsProvidersVariantDefinition* self,
                                                                        ProtonPlusModelsVariantCompatibility* value);
static gchar** proton_plus_models_providers_variant_definition_copy_strings (gchar** values,
                                                                      gint values_length1,
                                                                      gint* result_length1);
static void proton_plus_models_providers_variant_definition_finalize (GObject * obj);
static GType proton_plus_models_providers_variant_definition_get_type_once (void);
static void _vala_proton_plus_models_providers_variant_definition_get_property (GObject * object,
                                                                         guint property_id,
                                                                         GValue * value,
                                                                         GParamSpec * pspec);
static void _vala_proton_plus_models_providers_variant_definition_set_property (GObject * object,
                                                                         guint property_id,
                                                                         const GValue * value,
                                                                         GParamSpec * pspec);
VALA_EXTERN GType proton_plus_models_providers_install_layout_kind_get_type (void) G_GNUC_CONST ;
static ProtonPlusModelsProvidersInstallLayout* proton_plus_models_providers_install_layout_new (const gchar* launcher_family_id,
                                                                                         ProtonPlusModelsProvidersInstallLayoutKind kind,
                                                                                         const gchar* template,
                                                                                         const gchar* search,
                                                                                         const gchar* replacement,
                                                                                         const gchar* marker,
                                                                                         const gchar* true_template,
                                                                                         const gchar* false_template);
static ProtonPlusModelsProvidersInstallLayout* proton_plus_models_providers_install_layout_construct (GType object_type,
                                                                                               const gchar* launcher_family_id,
                                                                                               ProtonPlusModelsProvidersInstallLayoutKind kind,
                                                                                               const gchar* template,
                                                                                               const gchar* search,
                                                                                               const gchar* replacement,
                                                                                               const gchar* marker,
                                                                                               const gchar* true_template,
                                                                                               const gchar* false_template);
static void proton_plus_models_providers_install_layout_set_launcher_family_id (ProtonPlusModelsProvidersInstallLayout* self,
                                                                         const gchar* value);
VALA_EXTERN ProtonPlusModelsProvidersInstallLayout* proton_plus_models_providers_install_layout_copy (ProtonPlusModelsProvidersInstallLayout* self);
static void proton_plus_models_providers_install_layout_finalize (GObject * obj);
static GType proton_plus_models_providers_install_layout_get_type_once (void);
static void _vala_proton_plus_models_providers_install_layout_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec);
static void _vala_proton_plus_models_providers_install_layout_set_property (GObject * object,
                                                                     guint property_id,
                                                                     const GValue * value,
                                                                     GParamSpec * pspec);
static GType proton_plus_models_providers_provider_template_get_type_once (void);
static void proton_plus_models_providers_provider_definition_set_category (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                    ProtonPlusModelsProvidersCategory value);
static void proton_plus_models_providers_provider_definition_set_source_type (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                       ProtonPlusModelsProvidersSourceType value);
static void proton_plus_models_providers_provider_definition_set_provider_id (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                       const gchar* value);
static void proton_plus_models_providers_provider_definition_set_title (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                 const gchar* value);
static void proton_plus_models_providers_provider_definition_set_description (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                       const gchar* value);
static void proton_plus_models_providers_provider_definition_set_endpoint (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                    const gchar* value);
static void proton_plus_models_providers_provider_definition_set_repository_url (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                          const gchar* value);
static void proton_plus_models_providers_provider_definition_set_sort_priority (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                         gint value);
static ProtonPlusModelsProvidersVariantDefinition** proton_plus_models_providers_provider_definition_copy_variants (ProtonPlusModelsProvidersVariantDefinition** values,
                                                                                                             gint values_length1,
                                                                                                             gint* result_length1);
static ProtonPlusModelsProvidersInstallLayout** proton_plus_models_providers_provider_definition_copy_install_layouts (ProtonPlusModelsProvidersInstallLayout** values,
                                                                                                                gint values_length1,
                                                                                                                gint* result_length1);
static gchar** proton_plus_models_providers_provider_definition_copy_strings (gchar** values,
                                                                       gint values_length1,
                                                                       gint* result_length1);
static void proton_plus_models_providers_provider_definition_set_tag (ProtonPlusModelsProvidersProviderDefinition* self,
                                                               const gchar* value);
static void proton_plus_models_providers_provider_definition_set_legacy (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                  gboolean value);
static void proton_plus_models_providers_provider_definition_set_url_template (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                        const gchar* value);
static void proton_plus_models_providers_provider_definition_set_archive_install_requirement (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                                       ProtonPlusModelsProvidersArchiveInstallRequirement value);
static void proton_plus_models_providers_provider_definition_set_single_archive_releases (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                                   gboolean value);
static void proton_plus_models_providers_provider_definition_finalize (GObject * obj);
static GType proton_plus_models_providers_provider_definition_get_type_once (void);
static void _vala_proton_plus_models_providers_provider_definition_get_property (GObject * object,
                                                                          guint property_id,
                                                                          GValue * value,
                                                                          GParamSpec * pspec);
static void _vala_proton_plus_models_providers_provider_definition_set_property (GObject * object,
                                                                          guint property_id,
                                                                          const GValue * value,
                                                                          GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static GType
proton_plus_models_providers_category_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK, "PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK", "dxvk"}, {PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_VKD3D, "PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_VKD3D", "vkd3d"}, {PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON, "PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON", "proton"}, {PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE, "PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE", "wine"}, {0, NULL, NULL}};
	GType proton_plus_models_providers_category_type_id;
	proton_plus_models_providers_category_type_id = g_enum_register_static ("ProtonPlusModelsProvidersCategory", values);
	return proton_plus_models_providers_category_type_id;
}

GType
proton_plus_models_providers_category_get_type (void)
{
	static volatile gsize proton_plus_models_providers_category_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_providers_category_type_id__once)) {
		GType proton_plus_models_providers_category_type_id;
		proton_plus_models_providers_category_type_id = proton_plus_models_providers_category_get_type_once ();
		g_once_init_leave (&proton_plus_models_providers_category_type_id__once, proton_plus_models_providers_category_type_id);
	}
	return proton_plus_models_providers_category_type_id__once;
}

static GType
proton_plus_models_providers_source_type_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITHUB, "PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITHUB", "github"}, {PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITHUB_ACTIONS, "PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITHUB_ACTIONS", "github-actions"}, {PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITLAB, "PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITLAB", "gitlab"}, {PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_FORGEJO, "PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_FORGEJO", "forgejo"}, {0, NULL, NULL}};
	GType proton_plus_models_providers_source_type_type_id;
	proton_plus_models_providers_source_type_type_id = g_enum_register_static ("ProtonPlusModelsProvidersSourceType", values);
	return proton_plus_models_providers_source_type_type_id;
}

GType
proton_plus_models_providers_source_type_get_type (void)
{
	static volatile gsize proton_plus_models_providers_source_type_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_providers_source_type_type_id__once)) {
		GType proton_plus_models_providers_source_type_type_id;
		proton_plus_models_providers_source_type_type_id = proton_plus_models_providers_source_type_get_type_once ();
		g_once_init_leave (&proton_plus_models_providers_source_type_type_id__once, proton_plus_models_providers_source_type_type_id);
	}
	return proton_plus_models_providers_source_type_type_id__once;
}

static GType
proton_plus_models_providers_archive_install_requirement_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_MODELS_PROVIDERS_ARCHIVE_INSTALL_REQUIREMENT_STANDARD, "PROTON_PLUS_MODELS_PROVIDERS_ARCHIVE_INSTALL_REQUIREMENT_STANDARD", "standard"}, {PROTON_PLUS_MODELS_PROVIDERS_ARCHIVE_INSTALL_REQUIREMENT_NESTED_ARCHIVE, "PROTON_PLUS_MODELS_PROVIDERS_ARCHIVE_INSTALL_REQUIREMENT_NESTED_ARCHIVE", "nested-archive"}, {0, NULL, NULL}};
	GType proton_plus_models_providers_archive_install_requirement_type_id;
	proton_plus_models_providers_archive_install_requirement_type_id = g_enum_register_static ("ProtonPlusModelsProvidersArchiveInstallRequirement", values);
	return proton_plus_models_providers_archive_install_requirement_type_id;
}

GType
proton_plus_models_providers_archive_install_requirement_get_type (void)
{
	static volatile gsize proton_plus_models_providers_archive_install_requirement_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_providers_archive_install_requirement_type_id__once)) {
		GType proton_plus_models_providers_archive_install_requirement_type_id;
		proton_plus_models_providers_archive_install_requirement_type_id = proton_plus_models_providers_archive_install_requirement_get_type_once ();
		g_once_init_leave (&proton_plus_models_providers_archive_install_requirement_type_id__once, proton_plus_models_providers_archive_install_requirement_type_id);
	}
	return proton_plus_models_providers_archive_install_requirement_type_id__once;
}

static inline gpointer
proton_plus_models_providers_variant_definition_get_instance_private (ProtonPlusModelsProvidersVariantDefinition* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsProvidersVariantDefinition_private_offset);
}

ProtonPlusModelsProvidersVariantDefinition*
proton_plus_models_providers_variant_definition_construct (GType object_type,
                                                           const gchar* id,
                                                           const gchar* name,
                                                           const gchar* format,
                                                           gboolean is_default,
                                                           ProtonPlusModelsVariantCompatibility* compatibility,
                                                           gchar** alternate_formats,
                                                           gint alternate_formats_length1)
{
	ProtonPlusModelsProvidersVariantDefinition * self = NULL;
	ProtonPlusModelsVariantCompatibility* _tmp0_ = NULL;
	gint _tmp3_ = 0;
	gchar** _tmp4_;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (format != NULL, NULL);
	self = (ProtonPlusModelsProvidersVariantDefinition*) g_object_new (object_type, NULL);
	proton_plus_models_providers_variant_definition_set_id (self, id);
	proton_plus_models_providers_variant_definition_set_name (self, name);
	proton_plus_models_providers_variant_definition_set_format (self, format);
	proton_plus_models_providers_variant_definition_set_is_default (self, is_default);
	if (compatibility != NULL) {
		ProtonPlusModelsVariantCompatibility* _tmp1_;
		_tmp1_ = proton_plus_models_variant_compatibility_copy (compatibility);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		ProtonPlusModelsVariantCompatibility* _tmp2_;
		_tmp2_ = proton_plus_models_variant_compatibility_unspecified ();
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	proton_plus_models_providers_variant_definition_set_compatibility (self, _tmp0_);
	_tmp4_ = proton_plus_models_providers_variant_definition_copy_strings (alternate_formats, (gint) alternate_formats_length1, &_tmp3_);
	self->priv->alternate_format_values = (_vala_array_free (self->priv->alternate_format_values, self->priv->alternate_format_values_length1, (GDestroyNotify) g_free), NULL);
	self->priv->alternate_format_values = _tmp4_;
	self->priv->alternate_format_values_length1 = _tmp3_;
	self->priv->_alternate_format_values_size_ = self->priv->alternate_format_values_length1;
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusModelsProvidersVariantDefinition*
proton_plus_models_providers_variant_definition_new (const gchar* id,
                                                     const gchar* name,
                                                     const gchar* format,
                                                     gboolean is_default,
                                                     ProtonPlusModelsVariantCompatibility* compatibility,
                                                     gchar** alternate_formats,
                                                     gint alternate_formats_length1)
{
	return proton_plus_models_providers_variant_definition_construct (PROTON_PLUS_MODELS_PROVIDERS_TYPE_VARIANT_DEFINITION, id, name, format, is_default, compatibility, alternate_formats, alternate_formats_length1);
}

gchar**
proton_plus_models_providers_variant_definition_get_asset_formats (ProtonPlusModelsProvidersVariantDefinition* self,
                                                                   gint* result_length1)
{
	gchar** formats = NULL;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint formats_length1;
	gint _formats_size_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->alternate_format_values;
	_tmp0__length1 = self->priv->alternate_format_values_length1;
	_tmp1_ = g_new0 (gchar*, (_tmp0__length1 + 1) + 1);
	formats = _tmp1_;
	formats_length1 = _tmp0__length1 + 1;
	_formats_size_ = formats_length1;
	_tmp2_ = formats;
	_tmp2__length1 = formats_length1;
	_tmp3_ = self->priv->_format;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_tmp2_[0]);
	_tmp2_[0] = _tmp4_;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				gchar** _tmp7_;
				gint _tmp7__length1;
				gchar** _tmp8_;
				gint _tmp8__length1;
				gchar** _tmp9_;
				gint _tmp9__length1;
				const gchar* _tmp10_;
				gchar* _tmp11_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = index;
					index = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = self->priv->alternate_format_values;
				_tmp7__length1 = self->priv->alternate_format_values_length1;
				if (!(index < _tmp7__length1)) {
					break;
				}
				_tmp8_ = formats;
				_tmp8__length1 = formats_length1;
				_tmp9_ = self->priv->alternate_format_values;
				_tmp9__length1 = self->priv->alternate_format_values_length1;
				_tmp10_ = _tmp9_[index];
				_tmp11_ = g_strdup (_tmp10_);
				_g_free0 (_tmp8_[index + 1]);
				_tmp8_[index + 1] = _tmp11_;
			}
		}
	}
	_tmp12_ = formats;
	_tmp12__length1 = formats_length1;
	if (result_length1) {
		*result_length1 = _tmp12__length1;
	}
	result = _tmp12_;
	return result;
}

static gchar**
proton_plus_models_providers_variant_definition_copy_strings (gchar** values,
                                                              gint values_length1,
                                                              gint* result_length1)
{
	gchar** copied = NULL;
	gchar** _tmp2_;
	gint copied_length1;
	gint _copied_size_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	gchar** result;
	if (values == NULL) {
		gchar** _tmp0_;
		gchar** _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (gchar*, 0 + 1);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	}
	_tmp2_ = g_new0 (gchar*, values_length1 + 1);
	copied = _tmp2_;
	copied_length1 = values_length1;
	_copied_size_ = copied_length1;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				gchar** _tmp5_;
				gint _tmp5__length1;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = index;
					index = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				if (!(index < values_length1)) {
					break;
				}
				_tmp5_ = copied;
				_tmp5__length1 = copied_length1;
				_tmp6_ = values[index];
				_tmp7_ = g_strdup (_tmp6_);
				_g_free0 (_tmp5_[index]);
				_tmp5_[index] = _tmp7_;
			}
		}
	}
	_tmp8_ = copied;
	_tmp8__length1 = copied_length1;
	if (result_length1) {
		*result_length1 = _tmp8__length1;
	}
	result = _tmp8_;
	return result;
}

const gchar*
proton_plus_models_providers_variant_definition_get_id (ProtonPlusModelsProvidersVariantDefinition* 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_providers_variant_definition_set_id (ProtonPlusModelsProvidersVariantDefinition* self,
                                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_variant_definition_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_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_variant_definition_get_name (ProtonPlusModelsProvidersVariantDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_variant_definition_set_name (ProtonPlusModelsProvidersVariantDefinition* self,
                                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_variant_definition_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_NAME_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_variant_definition_get_format (ProtonPlusModelsProvidersVariantDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_format;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_variant_definition_set_format (ProtonPlusModelsProvidersVariantDefinition* self,
                                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_variant_definition_get_format (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_format);
		self->priv->_format = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_FORMAT_PROPERTY]);
	}
}

gboolean
proton_plus_models_providers_variant_definition_get_is_default (ProtonPlusModelsProvidersVariantDefinition* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_default;
	return result;
}

static void
proton_plus_models_providers_variant_definition_set_is_default (ProtonPlusModelsProvidersVariantDefinition* self,
                                                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_variant_definition_get_is_default (self);
	if (old_value != value) {
		self->priv->_is_default = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_IS_DEFAULT_PROPERTY]);
	}
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_providers_variant_definition_get_compatibility (ProtonPlusModelsProvidersVariantDefinition* self)
{
	ProtonPlusModelsVariantCompatibility* result;
	ProtonPlusModelsVariantCompatibility* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_compatibility;
	result = _tmp0_;
	return result;
}

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

static void
proton_plus_models_providers_variant_definition_set_compatibility (ProtonPlusModelsProvidersVariantDefinition* self,
                                                                   ProtonPlusModelsVariantCompatibility* value)
{
	ProtonPlusModelsVariantCompatibility* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_variant_definition_get_compatibility (self);
	if (old_value != value) {
		ProtonPlusModelsVariantCompatibility* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_compatibility);
		self->priv->_compatibility = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_COMPATIBILITY_PROPERTY]);
	}
}

gchar**
proton_plus_models_providers_variant_definition_get_alternate_formats (ProtonPlusModelsProvidersVariantDefinition* self,
                                                                       gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->alternate_format_values;
	_tmp0__length1 = self->priv->alternate_format_values_length1;
	_tmp2_ = proton_plus_models_providers_variant_definition_copy_strings (_tmp0_, (gint) _tmp0__length1, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

static void
proton_plus_models_providers_variant_definition_class_init (ProtonPlusModelsProvidersVariantDefinitionClass * klass,
                                                            gpointer klass_data)
{
	proton_plus_models_providers_variant_definition_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsProvidersVariantDefinition_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_providers_variant_definition_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_providers_variant_definition_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_providers_variant_definition_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ID_PROPERTY, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_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_PROVIDERS_VARIANT_DEFINITION_NAME_PROPERTY, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_FORMAT_PROPERTY, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_FORMAT_PROPERTY] = g_param_spec_string ("format", "format", "format", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_IS_DEFAULT_PROPERTY, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_IS_DEFAULT_PROPERTY] = g_param_spec_boolean ("is-default", "is-default", "is-default", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_COMPATIBILITY_PROPERTY, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_COMPATIBILITY_PROPERTY] = g_param_spec_object ("compatibility", "compatibility", "compatibility", PROTON_PLUS_MODELS_TYPE_VARIANT_COMPATIBILITY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ALTERNATE_FORMATS_PROPERTY, proton_plus_models_providers_variant_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ALTERNATE_FORMATS_PROPERTY] = g_param_spec_boxed ("alternate-formats", "alternate-formats", "alternate-formats", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_providers_variant_definition_instance_init (ProtonPlusModelsProvidersVariantDefinition * self,
                                                               gpointer klass)
{
	self->priv = proton_plus_models_providers_variant_definition_get_instance_private (self);
}

static void
proton_plus_models_providers_variant_definition_finalize (GObject * obj)
{
	ProtonPlusModelsProvidersVariantDefinition * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_PROVIDERS_TYPE_VARIANT_DEFINITION, ProtonPlusModelsProvidersVariantDefinition);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_format);
	_g_object_unref0 (self->priv->_compatibility);
	self->priv->alternate_format_values = (_vala_array_free (self->priv->alternate_format_values, self->priv->alternate_format_values_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (proton_plus_models_providers_variant_definition_parent_class)->finalize (obj);
}

static GType
proton_plus_models_providers_variant_definition_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsProvidersVariantDefinitionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_providers_variant_definition_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsProvidersVariantDefinition), 0, (GInstanceInitFunc) proton_plus_models_providers_variant_definition_instance_init, NULL };
	GType proton_plus_models_providers_variant_definition_type_id;
	proton_plus_models_providers_variant_definition_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsProvidersVariantDefinition", &g_define_type_info, 0);
	ProtonPlusModelsProvidersVariantDefinition_private_offset = g_type_add_instance_private (proton_plus_models_providers_variant_definition_type_id, sizeof (ProtonPlusModelsProvidersVariantDefinitionPrivate));
	return proton_plus_models_providers_variant_definition_type_id;
}

GType
proton_plus_models_providers_variant_definition_get_type (void)
{
	static volatile gsize proton_plus_models_providers_variant_definition_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_providers_variant_definition_type_id__once)) {
		GType proton_plus_models_providers_variant_definition_type_id;
		proton_plus_models_providers_variant_definition_type_id = proton_plus_models_providers_variant_definition_get_type_once ();
		g_once_init_leave (&proton_plus_models_providers_variant_definition_type_id__once, proton_plus_models_providers_variant_definition_type_id);
	}
	return proton_plus_models_providers_variant_definition_type_id__once;
}

static void
_vala_proton_plus_models_providers_variant_definition_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec)
{
	ProtonPlusModelsProvidersVariantDefinition * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_PROVIDERS_TYPE_VARIANT_DEFINITION, ProtonPlusModelsProvidersVariantDefinition);
	switch (property_id) {
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_variant_definition_get_id (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_NAME_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_variant_definition_get_name (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_FORMAT_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_variant_definition_get_format (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_IS_DEFAULT_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_providers_variant_definition_get_is_default (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_COMPATIBILITY_PROPERTY:
		g_value_set_object (value, proton_plus_models_providers_variant_definition_get_compatibility (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ALTERNATE_FORMATS_PROPERTY:
		{
			int length;
			g_value_take_boxed (value, proton_plus_models_providers_variant_definition_get_alternate_formats (self, &length));
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_providers_variant_definition_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec)
{
	ProtonPlusModelsProvidersVariantDefinition * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_PROVIDERS_TYPE_VARIANT_DEFINITION, ProtonPlusModelsProvidersVariantDefinition);
	switch (property_id) {
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_ID_PROPERTY:
		proton_plus_models_providers_variant_definition_set_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_NAME_PROPERTY:
		proton_plus_models_providers_variant_definition_set_name (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_FORMAT_PROPERTY:
		proton_plus_models_providers_variant_definition_set_format (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_IS_DEFAULT_PROPERTY:
		proton_plus_models_providers_variant_definition_set_is_default (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_VARIANT_DEFINITION_COMPATIBILITY_PROPERTY:
		proton_plus_models_providers_variant_definition_set_compatibility (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static GType
proton_plus_models_providers_install_layout_kind_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_TEMPLATE, "PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_TEMPLATE", "template"}, {PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_LOWERCASE, "PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_LOWERCASE", "lowercase"}, {PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_REPLACE, "PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_REPLACE", "replace"}, {PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_CONDITIONAL, "PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_CONDITIONAL", "conditional"}, {0, NULL, NULL}};
	GType proton_plus_models_providers_install_layout_kind_type_id;
	proton_plus_models_providers_install_layout_kind_type_id = g_enum_register_static ("ProtonPlusModelsProvidersInstallLayoutKind", values);
	return proton_plus_models_providers_install_layout_kind_type_id;
}

GType
proton_plus_models_providers_install_layout_kind_get_type (void)
{
	static volatile gsize proton_plus_models_providers_install_layout_kind_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_providers_install_layout_kind_type_id__once)) {
		GType proton_plus_models_providers_install_layout_kind_type_id;
		proton_plus_models_providers_install_layout_kind_type_id = proton_plus_models_providers_install_layout_kind_get_type_once ();
		g_once_init_leave (&proton_plus_models_providers_install_layout_kind_type_id__once, proton_plus_models_providers_install_layout_kind_type_id);
	}
	return proton_plus_models_providers_install_layout_kind_type_id__once;
}

static inline gpointer
proton_plus_models_providers_install_layout_get_instance_private (ProtonPlusModelsProvidersInstallLayout* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsProvidersInstallLayout_private_offset);
}

static ProtonPlusModelsProvidersInstallLayout*
proton_plus_models_providers_install_layout_construct (GType object_type,
                                                       const gchar* launcher_family_id,
                                                       ProtonPlusModelsProvidersInstallLayoutKind kind,
                                                       const gchar* template,
                                                       const gchar* search,
                                                       const gchar* replacement,
                                                       const gchar* marker,
                                                       const gchar* true_template,
                                                       const gchar* false_template)
{
	ProtonPlusModelsProvidersInstallLayout * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_val_if_fail (launcher_family_id != NULL, NULL);
	g_return_val_if_fail (template != NULL, NULL);
	g_return_val_if_fail (search != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	g_return_val_if_fail (marker != NULL, NULL);
	g_return_val_if_fail (true_template != NULL, NULL);
	g_return_val_if_fail (false_template != NULL, NULL);
	self = (ProtonPlusModelsProvidersInstallLayout*) g_object_new (object_type, NULL);
	switch (kind) {
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_TEMPLATE:
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_LOWERCASE:
		{
			_vala_assert (g_strcmp0 (template, "") != 0, "template != \"\"");
			break;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_REPLACE:
		{
			_vala_assert (g_strcmp0 (template, "") != 0, "template != \"\"");
			_vala_assert (g_strcmp0 (search, "") != 0, "search != \"\"");
			_vala_assert (g_strcmp0 (replacement, "") != 0, "replacement != \"\"");
			break;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_CONDITIONAL:
		{
			_vala_assert (g_strcmp0 (marker, "") != 0, "marker != \"\"");
			_vala_assert (g_strcmp0 (true_template, "") != 0, "true_template != \"\"");
			_vala_assert (g_strcmp0 (false_template, "") != 0, "false_template != \"\"");
			break;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
	proton_plus_models_providers_install_layout_set_launcher_family_id (self, launcher_family_id);
	self->priv->kind = kind;
	_tmp0_ = g_strdup (template);
	_g_free0 (self->priv->layout_template);
	self->priv->layout_template = _tmp0_;
	_tmp1_ = g_strdup (search);
	_g_free0 (self->priv->search);
	self->priv->search = _tmp1_;
	_tmp2_ = g_strdup (replacement);
	_g_free0 (self->priv->replacement);
	self->priv->replacement = _tmp2_;
	_tmp3_ = g_strdup (marker);
	_g_free0 (self->priv->marker);
	self->priv->marker = _tmp3_;
	_tmp4_ = g_strdup (true_template);
	_g_free0 (self->priv->true_template);
	self->priv->true_template = _tmp4_;
	_tmp5_ = g_strdup (false_template);
	_g_free0 (self->priv->false_template);
	self->priv->false_template = _tmp5_;
	return self;
}

static ProtonPlusModelsProvidersInstallLayout*
proton_plus_models_providers_install_layout_new (const gchar* launcher_family_id,
                                                 ProtonPlusModelsProvidersInstallLayoutKind kind,
                                                 const gchar* template,
                                                 const gchar* search,
                                                 const gchar* replacement,
                                                 const gchar* marker,
                                                 const gchar* true_template,
                                                 const gchar* false_template)
{
	return proton_plus_models_providers_install_layout_construct (PROTON_PLUS_MODELS_PROVIDERS_TYPE_INSTALL_LAYOUT, launcher_family_id, kind, template, search, replacement, marker, true_template, false_template);
}

ProtonPlusModelsProvidersInstallLayout*
proton_plus_models_providers_install_layout_template (const gchar* launcher_family_id,
                                                      const gchar* template)
{
	ProtonPlusModelsProvidersInstallLayout* _tmp0_;
	ProtonPlusModelsProvidersInstallLayout* result;
	g_return_val_if_fail (launcher_family_id != NULL, NULL);
	g_return_val_if_fail (template != NULL, NULL);
	_tmp0_ = proton_plus_models_providers_install_layout_new (launcher_family_id, PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_TEMPLATE, template, "", "", "", "", "");
	result = _tmp0_;
	return result;
}

ProtonPlusModelsProvidersInstallLayout*
proton_plus_models_providers_install_layout_lowercase (const gchar* launcher_family_id,
                                                       const gchar* template)
{
	ProtonPlusModelsProvidersInstallLayout* _tmp0_;
	ProtonPlusModelsProvidersInstallLayout* result;
	g_return_val_if_fail (launcher_family_id != NULL, NULL);
	g_return_val_if_fail (template != NULL, NULL);
	_tmp0_ = proton_plus_models_providers_install_layout_new (launcher_family_id, PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_LOWERCASE, template, "", "", "", "", "");
	result = _tmp0_;
	return result;
}

ProtonPlusModelsProvidersInstallLayout*
proton_plus_models_providers_install_layout_replace (const gchar* launcher_family_id,
                                                     const gchar* template,
                                                     const gchar* search,
                                                     const gchar* replacement)
{
	ProtonPlusModelsProvidersInstallLayout* _tmp0_;
	ProtonPlusModelsProvidersInstallLayout* result;
	g_return_val_if_fail (launcher_family_id != NULL, NULL);
	g_return_val_if_fail (template != NULL, NULL);
	g_return_val_if_fail (search != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	_tmp0_ = proton_plus_models_providers_install_layout_new (launcher_family_id, PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_REPLACE, template, search, replacement, "", "", "");
	result = _tmp0_;
	return result;
}

ProtonPlusModelsProvidersInstallLayout*
proton_plus_models_providers_install_layout_conditional (const gchar* launcher_family_id,
                                                         const gchar* marker,
                                                         const gchar* true_template,
                                                         const gchar* false_template)
{
	ProtonPlusModelsProvidersInstallLayout* _tmp0_;
	ProtonPlusModelsProvidersInstallLayout* result;
	g_return_val_if_fail (launcher_family_id != NULL, NULL);
	g_return_val_if_fail (marker != NULL, NULL);
	g_return_val_if_fail (true_template != NULL, NULL);
	g_return_val_if_fail (false_template != NULL, NULL);
	_tmp0_ = proton_plus_models_providers_install_layout_new (launcher_family_id, PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_CONDITIONAL, "", "", "", marker, true_template, false_template);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsProvidersInstallLayout*
proton_plus_models_providers_install_layout_copy (ProtonPlusModelsProvidersInstallLayout* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	ProtonPlusModelsProvidersInstallLayout* _tmp7_;
	ProtonPlusModelsProvidersInstallLayout* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launcher_family_id;
	_tmp1_ = self->priv->layout_template;
	_tmp2_ = self->priv->search;
	_tmp3_ = self->priv->replacement;
	_tmp4_ = self->priv->marker;
	_tmp5_ = self->priv->true_template;
	_tmp6_ = self->priv->false_template;
	_tmp7_ = proton_plus_models_providers_install_layout_new (_tmp0_, self->priv->kind, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_);
	result = _tmp7_;
	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 gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

gchar*
proton_plus_models_providers_install_layout_render (ProtonPlusModelsProvidersInstallLayout* self,
                                                    const gchar* title,
                                                    const gchar* release_name)
{
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (release_name != NULL, NULL);
	switch (self->priv->kind) {
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_TEMPLATE:
		{
			const gchar* _tmp0_;
			gchar* _tmp1_;
			_tmp0_ = self->priv->layout_template;
			_tmp1_ = proton_plus_models_providers_provider_template_render (_tmp0_, title, release_name, NULL);
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_LOWERCASE:
		{
			const gchar* _tmp2_;
			gchar* _tmp3_;
			gchar* _tmp4_;
			gchar* _tmp5_;
			gchar* _tmp6_;
			_tmp2_ = self->priv->layout_template;
			_tmp3_ = proton_plus_models_providers_provider_template_render (_tmp2_, title, release_name, NULL);
			_tmp4_ = _tmp3_;
			_tmp5_ = g_ascii_strdown (_tmp4_, (gssize) -1);
			_tmp6_ = _tmp5_;
			_g_free0 (_tmp4_);
			result = _tmp6_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_REPLACE:
		{
			const gchar* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			gchar* _tmp12_;
			gchar* _tmp13_;
			_tmp7_ = self->priv->layout_template;
			_tmp8_ = proton_plus_models_providers_provider_template_render (_tmp7_, title, release_name, NULL);
			_tmp9_ = _tmp8_;
			_tmp10_ = self->priv->search;
			_tmp11_ = self->priv->replacement;
			_tmp12_ = string_replace (_tmp9_, _tmp10_, _tmp11_);
			_tmp13_ = _tmp12_;
			_g_free0 (_tmp9_);
			result = _tmp13_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_KIND_CONDITIONAL:
		{
			const gchar* _tmp14_ = NULL;
			const gchar* _tmp15_;
			gchar* selected_template = NULL;
			gchar* _tmp18_;
			const gchar* _tmp19_;
			gchar* _tmp20_;
			_tmp15_ = self->priv->marker;
			if (string_contains (release_name, _tmp15_)) {
				const gchar* _tmp16_;
				_tmp16_ = self->priv->true_template;
				_tmp14_ = _tmp16_;
			} else {
				const gchar* _tmp17_;
				_tmp17_ = self->priv->false_template;
				_tmp14_ = _tmp17_;
			}
			_tmp18_ = g_strdup (_tmp14_);
			selected_template = _tmp18_;
			_tmp19_ = selected_template;
			_tmp20_ = proton_plus_models_providers_provider_template_render (_tmp19_, title, release_name, NULL);
			result = _tmp20_;
			_g_free0 (selected_template);
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

const gchar*
proton_plus_models_providers_install_layout_get_launcher_family_id (ProtonPlusModelsProvidersInstallLayout* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launcher_family_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_install_layout_set_launcher_family_id (ProtonPlusModelsProvidersInstallLayout* self,
                                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_install_layout_get_launcher_family_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_launcher_family_id);
		self->priv->_launcher_family_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_install_layout_properties[PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_LAUNCHER_FAMILY_ID_PROPERTY]);
	}
}

static void
proton_plus_models_providers_install_layout_class_init (ProtonPlusModelsProvidersInstallLayoutClass * klass,
                                                        gpointer klass_data)
{
	proton_plus_models_providers_install_layout_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsProvidersInstallLayout_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_providers_install_layout_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_providers_install_layout_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_providers_install_layout_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_LAUNCHER_FAMILY_ID_PROPERTY, proton_plus_models_providers_install_layout_properties[PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_LAUNCHER_FAMILY_ID_PROPERTY] = g_param_spec_string ("launcher-family-id", "launcher-family-id", "launcher-family-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_providers_install_layout_instance_init (ProtonPlusModelsProvidersInstallLayout * self,
                                                           gpointer klass)
{
	self->priv = proton_plus_models_providers_install_layout_get_instance_private (self);
}

static void
proton_plus_models_providers_install_layout_finalize (GObject * obj)
{
	ProtonPlusModelsProvidersInstallLayout * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_PROVIDERS_TYPE_INSTALL_LAYOUT, ProtonPlusModelsProvidersInstallLayout);
	_g_free0 (self->priv->_launcher_family_id);
	_g_free0 (self->priv->layout_template);
	_g_free0 (self->priv->search);
	_g_free0 (self->priv->replacement);
	_g_free0 (self->priv->marker);
	_g_free0 (self->priv->true_template);
	_g_free0 (self->priv->false_template);
	G_OBJECT_CLASS (proton_plus_models_providers_install_layout_parent_class)->finalize (obj);
}

static GType
proton_plus_models_providers_install_layout_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsProvidersInstallLayoutClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_providers_install_layout_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsProvidersInstallLayout), 0, (GInstanceInitFunc) proton_plus_models_providers_install_layout_instance_init, NULL };
	GType proton_plus_models_providers_install_layout_type_id;
	proton_plus_models_providers_install_layout_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsProvidersInstallLayout", &g_define_type_info, 0);
	ProtonPlusModelsProvidersInstallLayout_private_offset = g_type_add_instance_private (proton_plus_models_providers_install_layout_type_id, sizeof (ProtonPlusModelsProvidersInstallLayoutPrivate));
	return proton_plus_models_providers_install_layout_type_id;
}

GType
proton_plus_models_providers_install_layout_get_type (void)
{
	static volatile gsize proton_plus_models_providers_install_layout_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_providers_install_layout_type_id__once)) {
		GType proton_plus_models_providers_install_layout_type_id;
		proton_plus_models_providers_install_layout_type_id = proton_plus_models_providers_install_layout_get_type_once ();
		g_once_init_leave (&proton_plus_models_providers_install_layout_type_id__once, proton_plus_models_providers_install_layout_type_id);
	}
	return proton_plus_models_providers_install_layout_type_id__once;
}

static void
_vala_proton_plus_models_providers_install_layout_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec)
{
	ProtonPlusModelsProvidersInstallLayout * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_PROVIDERS_TYPE_INSTALL_LAYOUT, ProtonPlusModelsProvidersInstallLayout);
	switch (property_id) {
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_LAUNCHER_FAMILY_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_install_layout_get_launcher_family_id (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_providers_install_layout_set_property (GObject * object,
                                                                guint property_id,
                                                                const GValue * value,
                                                                GParamSpec * pspec)
{
	ProtonPlusModelsProvidersInstallLayout * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_PROVIDERS_TYPE_INSTALL_LAYOUT, ProtonPlusModelsProvidersInstallLayout);
	switch (property_id) {
		case PROTON_PLUS_MODELS_PROVIDERS_INSTALL_LAYOUT_LAUNCHER_FAMILY_ID_PROPERTY:
		proton_plus_models_providers_install_layout_set_launcher_family_id (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

gchar*
proton_plus_models_providers_provider_template_render (const gchar* template,
                                                       const gchar* title,
                                                       const gchar* release_name,
                                                       const gchar* tag_name)
{
	gchar* _tmp0_ = NULL;
	gchar* release_version = NULL;
	gchar* _tmp3_;
	gchar* rendered = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* result;
	g_return_val_if_fail (template != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (release_name != NULL, NULL);
	if (g_str_has_prefix (release_name, "v")) {
		gchar* _tmp1_;
		_tmp1_ = string_substring (release_name, (glong) 1, (glong) -1);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (release_name);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	release_version = _tmp3_;
	_tmp4_ = string_replace (template, "$title", title);
	_tmp5_ = _tmp4_;
	_tmp6_ = release_version;
	_tmp7_ = string_replace (_tmp5_, "$release_version", _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = string_replace (_tmp8_, "$release_name", release_name);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp8_);
	_g_free0 (_tmp5_);
	rendered = _tmp10_;
	if (tag_name == NULL) {
		result = rendered;
		_g_free0 (release_version);
		_g_free0 (_tmp0_);
		return result;
	}
	_tmp11_ = rendered;
	_tmp12_ = string_replace (_tmp11_, "$tag_name", tag_name);
	result = _tmp12_;
	_g_free0 (rendered);
	_g_free0 (release_version);
	_g_free0 (_tmp0_);
	return result;
}

ProtonPlusModelsProvidersProviderTemplate*
proton_plus_models_providers_provider_template_construct (GType object_type)
{
	ProtonPlusModelsProvidersProviderTemplate * self = NULL;
	self = (ProtonPlusModelsProvidersProviderTemplate*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusModelsProvidersProviderTemplate*
proton_plus_models_providers_provider_template_new (void)
{
	return proton_plus_models_providers_provider_template_construct (PROTON_PLUS_MODELS_PROVIDERS_TYPE_PROVIDER_TEMPLATE);
}

static void
proton_plus_models_providers_provider_template_class_init (ProtonPlusModelsProvidersProviderTemplateClass * klass,
                                                           gpointer klass_data)
{
	proton_plus_models_providers_provider_template_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_models_providers_provider_template_instance_init (ProtonPlusModelsProvidersProviderTemplate * self,
                                                              gpointer klass)
{
}

static GType
proton_plus_models_providers_provider_template_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsProvidersProviderTemplateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_providers_provider_template_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsProvidersProviderTemplate), 0, (GInstanceInitFunc) proton_plus_models_providers_provider_template_instance_init, NULL };
	GType proton_plus_models_providers_provider_template_type_id;
	proton_plus_models_providers_provider_template_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsProvidersProviderTemplate", &g_define_type_info, 0);
	return proton_plus_models_providers_provider_template_type_id;
}

GType
proton_plus_models_providers_provider_template_get_type (void)
{
	static volatile gsize proton_plus_models_providers_provider_template_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_providers_provider_template_type_id__once)) {
		GType proton_plus_models_providers_provider_template_type_id;
		proton_plus_models_providers_provider_template_type_id = proton_plus_models_providers_provider_template_get_type_once ();
		g_once_init_leave (&proton_plus_models_providers_provider_template_type_id__once, proton_plus_models_providers_provider_template_type_id);
	}
	return proton_plus_models_providers_provider_template_type_id__once;
}

static inline gpointer
proton_plus_models_providers_provider_definition_get_instance_private (ProtonPlusModelsProvidersProviderDefinition* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsProvidersProviderDefinition_private_offset);
}

ProtonPlusModelsProvidersProviderDefinition*
proton_plus_models_providers_provider_definition_construct (GType object_type,
                                                            ProtonPlusModelsProvidersCategory category,
                                                            ProtonPlusModelsProvidersSourceType source_type,
                                                            const gchar* provider_id,
                                                            const gchar* title,
                                                            const gchar* description,
                                                            const gchar* endpoint,
                                                            const gchar* repository_url,
                                                            gint sort_priority,
                                                            ProtonPlusModelsProvidersVariantDefinition** variants,
                                                            gint variants_length1,
                                                            ProtonPlusModelsProvidersInstallLayout** install_layouts,
                                                            gint install_layouts_length1,
                                                            gchar** asset_filters,
                                                            gint asset_filters_length1,
                                                            gchar** asset_exclusions,
                                                            gint asset_exclusions_length1,
                                                            const gchar* tag,
                                                            gboolean legacy,
                                                            const gchar* url_template,
                                                            ProtonPlusModelsProvidersArchiveInstallRequirement archive_install_requirement,
                                                            gboolean single_archive_releases,
                                                            gchar** legacy_endpoints,
                                                            gint legacy_endpoints_length1)
{
	ProtonPlusModelsProvidersProviderDefinition * self = NULL;
	gint _tmp0_ = 0;
	ProtonPlusModelsProvidersVariantDefinition** _tmp1_;
	gint _tmp2_ = 0;
	ProtonPlusModelsProvidersInstallLayout** _tmp3_;
	gint _tmp4_ = 0;
	gchar** _tmp5_;
	gint _tmp6_ = 0;
	gchar** _tmp7_;
	gint _tmp8_ = 0;
	gchar** _tmp9_;
	g_return_val_if_fail (provider_id != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	g_return_val_if_fail (endpoint != NULL, NULL);
	g_return_val_if_fail (repository_url != NULL, NULL);
	g_return_val_if_fail (tag != NULL, NULL);
	g_return_val_if_fail (url_template != NULL, NULL);
	self = (ProtonPlusModelsProvidersProviderDefinition*) g_object_new (object_type, NULL);
	proton_plus_models_providers_provider_definition_set_category (self, category);
	proton_plus_models_providers_provider_definition_set_source_type (self, source_type);
	proton_plus_models_providers_provider_definition_set_provider_id (self, provider_id);
	proton_plus_models_providers_provider_definition_set_title (self, title);
	proton_plus_models_providers_provider_definition_set_description (self, description);
	proton_plus_models_providers_provider_definition_set_endpoint (self, endpoint);
	proton_plus_models_providers_provider_definition_set_repository_url (self, repository_url);
	proton_plus_models_providers_provider_definition_set_sort_priority (self, sort_priority);
	_tmp1_ = proton_plus_models_providers_provider_definition_copy_variants (variants, (gint) variants_length1, &_tmp0_);
	self->priv->variants = (_vala_array_free (self->priv->variants, self->priv->variants_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->variants = _tmp1_;
	self->priv->variants_length1 = _tmp0_;
	self->priv->_variants_size_ = self->priv->variants_length1;
	_tmp3_ = proton_plus_models_providers_provider_definition_copy_install_layouts (install_layouts, (gint) install_layouts_length1, &_tmp2_);
	self->priv->install_layouts = (_vala_array_free (self->priv->install_layouts, self->priv->install_layouts_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->install_layouts = _tmp3_;
	self->priv->install_layouts_length1 = _tmp2_;
	self->priv->_install_layouts_size_ = self->priv->install_layouts_length1;
	_tmp5_ = proton_plus_models_providers_provider_definition_copy_strings (asset_filters, (gint) asset_filters_length1, &_tmp4_);
	self->priv->asset_filter_values = (_vala_array_free (self->priv->asset_filter_values, self->priv->asset_filter_values_length1, (GDestroyNotify) g_free), NULL);
	self->priv->asset_filter_values = _tmp5_;
	self->priv->asset_filter_values_length1 = _tmp4_;
	self->priv->_asset_filter_values_size_ = self->priv->asset_filter_values_length1;
	_tmp7_ = proton_plus_models_providers_provider_definition_copy_strings (asset_exclusions, (gint) asset_exclusions_length1, &_tmp6_);
	self->priv->asset_exclusion_values = (_vala_array_free (self->priv->asset_exclusion_values, self->priv->asset_exclusion_values_length1, (GDestroyNotify) g_free), NULL);
	self->priv->asset_exclusion_values = _tmp7_;
	self->priv->asset_exclusion_values_length1 = _tmp6_;
	self->priv->_asset_exclusion_values_size_ = self->priv->asset_exclusion_values_length1;
	_tmp9_ = proton_plus_models_providers_provider_definition_copy_strings (legacy_endpoints, (gint) legacy_endpoints_length1, &_tmp8_);
	self->priv->legacy_endpoint_values = (_vala_array_free (self->priv->legacy_endpoint_values, self->priv->legacy_endpoint_values_length1, (GDestroyNotify) g_free), NULL);
	self->priv->legacy_endpoint_values = _tmp9_;
	self->priv->legacy_endpoint_values_length1 = _tmp8_;
	self->priv->_legacy_endpoint_values_size_ = self->priv->legacy_endpoint_values_length1;
	proton_plus_models_providers_provider_definition_set_tag (self, tag);
	proton_plus_models_providers_provider_definition_set_legacy (self, legacy);
	proton_plus_models_providers_provider_definition_set_url_template (self, url_template);
	proton_plus_models_providers_provider_definition_set_archive_install_requirement (self, archive_install_requirement);
	proton_plus_models_providers_provider_definition_set_single_archive_releases (self, single_archive_releases);
	return self;
}

ProtonPlusModelsProvidersProviderDefinition*
proton_plus_models_providers_provider_definition_new (ProtonPlusModelsProvidersCategory category,
                                                      ProtonPlusModelsProvidersSourceType source_type,
                                                      const gchar* provider_id,
                                                      const gchar* title,
                                                      const gchar* description,
                                                      const gchar* endpoint,
                                                      const gchar* repository_url,
                                                      gint sort_priority,
                                                      ProtonPlusModelsProvidersVariantDefinition** variants,
                                                      gint variants_length1,
                                                      ProtonPlusModelsProvidersInstallLayout** install_layouts,
                                                      gint install_layouts_length1,
                                                      gchar** asset_filters,
                                                      gint asset_filters_length1,
                                                      gchar** asset_exclusions,
                                                      gint asset_exclusions_length1,
                                                      const gchar* tag,
                                                      gboolean legacy,
                                                      const gchar* url_template,
                                                      ProtonPlusModelsProvidersArchiveInstallRequirement archive_install_requirement,
                                                      gboolean single_archive_releases,
                                                      gchar** legacy_endpoints,
                                                      gint legacy_endpoints_length1)
{
	return proton_plus_models_providers_provider_definition_construct (PROTON_PLUS_MODELS_PROVIDERS_TYPE_PROVIDER_DEFINITION, category, source_type, provider_id, title, description, endpoint, repository_url, sort_priority, variants, variants_length1, install_layouts, install_layouts_length1, asset_filters, asset_filters_length1, asset_exclusions, asset_exclusions_length1, tag, legacy, url_template, archive_install_requirement, single_archive_releases, legacy_endpoints, legacy_endpoints_length1);
}

static ProtonPlusModelsProvidersVariantDefinition**
proton_plus_models_providers_provider_definition_copy_variants (ProtonPlusModelsProvidersVariantDefinition** values,
                                                                gint values_length1,
                                                                gint* result_length1)
{
	ProtonPlusModelsProvidersVariantDefinition** copied = NULL;
	ProtonPlusModelsProvidersVariantDefinition** _tmp0_;
	gint copied_length1;
	gint _copied_size_;
	ProtonPlusModelsProvidersVariantDefinition** _tmp27_;
	gint _tmp27__length1;
	ProtonPlusModelsProvidersVariantDefinition** result;
	_tmp0_ = g_new0 (ProtonPlusModelsProvidersVariantDefinition*, values_length1 + 1);
	copied = _tmp0_;
	copied_length1 = values_length1;
	_copied_size_ = copied_length1;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				ProtonPlusModelsProvidersVariantDefinition* value = NULL;
				ProtonPlusModelsProvidersVariantDefinition* _tmp3_;
				ProtonPlusModelsProvidersVariantDefinition* _tmp4_;
				ProtonPlusModelsProvidersVariantDefinition** _tmp5_;
				gint _tmp5__length1;
				ProtonPlusModelsProvidersVariantDefinition* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				ProtonPlusModelsProvidersVariantDefinition* _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				ProtonPlusModelsProvidersVariantDefinition* _tmp12_;
				const gchar* _tmp13_;
				const gchar* _tmp14_;
				ProtonPlusModelsProvidersVariantDefinition* _tmp15_;
				gboolean _tmp16_;
				gboolean _tmp17_;
				ProtonPlusModelsProvidersVariantDefinition* _tmp18_;
				ProtonPlusModelsVariantCompatibility* _tmp19_;
				ProtonPlusModelsVariantCompatibility* _tmp20_;
				ProtonPlusModelsProvidersVariantDefinition* _tmp21_;
				gchar** _tmp22_;
				gint _tmp22__length1;
				gint _tmp23_ = 0;
				gchar** _tmp24_;
				gint _tmp24__length1;
				gchar** _tmp25_;
				gint _tmp25__length1;
				ProtonPlusModelsProvidersVariantDefinition* _tmp26_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = index;
					index = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(index < values_length1)) {
					break;
				}
				_tmp3_ = values[index];
				_tmp4_ = _g_object_ref0 (_tmp3_);
				value = _tmp4_;
				_tmp5_ = copied;
				_tmp5__length1 = copied_length1;
				_tmp6_ = value;
				_tmp7_ = proton_plus_models_providers_variant_definition_get_id (_tmp6_);
				_tmp8_ = _tmp7_;
				_tmp9_ = value;
				_tmp10_ = proton_plus_models_providers_variant_definition_get_name (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = value;
				_tmp13_ = proton_plus_models_providers_variant_definition_get_format (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = value;
				_tmp16_ = proton_plus_models_providers_variant_definition_get_is_default (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = value;
				_tmp19_ = proton_plus_models_providers_variant_definition_get_compatibility (_tmp18_);
				_tmp20_ = _tmp19_;
				_tmp21_ = value;
				_tmp22_ = proton_plus_models_providers_variant_definition_get_alternate_formats (_tmp21_, &_tmp23_);
				_tmp22__length1 = _tmp23_;
				_tmp24_ = _tmp22_;
				_tmp24__length1 = _tmp22__length1;
				_tmp25_ = _tmp24_;
				_tmp25__length1 = _tmp24__length1;
				_tmp26_ = proton_plus_models_providers_variant_definition_new (_tmp8_, _tmp11_, _tmp14_, _tmp17_, _tmp20_, _tmp25_, _tmp24__length1);
				_g_object_unref0 (_tmp5_[index]);
				_tmp5_[index] = _tmp26_;
				_tmp25_ = (_vala_array_free (_tmp25_, _tmp25__length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (value);
			}
		}
	}
	_tmp27_ = copied;
	_tmp27__length1 = copied_length1;
	if (result_length1) {
		*result_length1 = _tmp27__length1;
	}
	result = _tmp27_;
	return result;
}

static ProtonPlusModelsProvidersInstallLayout**
proton_plus_models_providers_provider_definition_copy_install_layouts (ProtonPlusModelsProvidersInstallLayout** values,
                                                                       gint values_length1,
                                                                       gint* result_length1)
{
	ProtonPlusModelsProvidersInstallLayout** copied = NULL;
	ProtonPlusModelsProvidersInstallLayout** _tmp0_;
	gint copied_length1;
	gint _copied_size_;
	ProtonPlusModelsProvidersInstallLayout** _tmp8_;
	gint _tmp8__length1;
	ProtonPlusModelsProvidersInstallLayout** result;
	_tmp0_ = g_new0 (ProtonPlusModelsProvidersInstallLayout*, values_length1 + 1);
	copied = _tmp0_;
	copied_length1 = values_length1;
	_copied_size_ = copied_length1;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				ProtonPlusModelsProvidersInstallLayout* value = NULL;
				ProtonPlusModelsProvidersInstallLayout* _tmp3_;
				ProtonPlusModelsProvidersInstallLayout* _tmp4_;
				ProtonPlusModelsProvidersInstallLayout** _tmp5_;
				gint _tmp5__length1;
				ProtonPlusModelsProvidersInstallLayout* _tmp6_;
				ProtonPlusModelsProvidersInstallLayout* _tmp7_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = index;
					index = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(index < values_length1)) {
					break;
				}
				_tmp3_ = values[index];
				_tmp4_ = _g_object_ref0 (_tmp3_);
				value = _tmp4_;
				_tmp5_ = copied;
				_tmp5__length1 = copied_length1;
				_tmp6_ = value;
				_tmp7_ = proton_plus_models_providers_install_layout_copy (_tmp6_);
				_g_object_unref0 (_tmp5_[index]);
				_tmp5_[index] = _tmp7_;
				_g_object_unref0 (value);
			}
		}
	}
	_tmp8_ = copied;
	_tmp8__length1 = copied_length1;
	if (result_length1) {
		*result_length1 = _tmp8__length1;
	}
	result = _tmp8_;
	return result;
}

static gchar**
proton_plus_models_providers_provider_definition_copy_strings (gchar** values,
                                                               gint values_length1,
                                                               gint* result_length1)
{
	gchar** copied = NULL;
	gchar** _tmp2_;
	gint copied_length1;
	gint _copied_size_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	gchar** result;
	if (values == NULL) {
		gchar** _tmp0_;
		gchar** _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (gchar*, 0 + 1);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	}
	_tmp2_ = g_new0 (gchar*, values_length1 + 1);
	copied = _tmp2_;
	copied_length1 = values_length1;
	_copied_size_ = copied_length1;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				gchar** _tmp5_;
				gint _tmp5__length1;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = index;
					index = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				if (!(index < values_length1)) {
					break;
				}
				_tmp5_ = copied;
				_tmp5__length1 = copied_length1;
				_tmp6_ = values[index];
				_tmp7_ = g_strdup (_tmp6_);
				_g_free0 (_tmp5_[index]);
				_tmp5_[index] = _tmp7_;
			}
		}
	}
	_tmp8_ = copied;
	_tmp8__length1 = copied_length1;
	if (result_length1) {
		*result_length1 = _tmp8__length1;
	}
	result = _tmp8_;
	return result;
}

ProtonPlusModelsProvidersVariantDefinition**
proton_plus_models_providers_provider_definition_get_variants (ProtonPlusModelsProvidersProviderDefinition* self,
                                                               gint* result_length1)
{
	ProtonPlusModelsProvidersVariantDefinition** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	ProtonPlusModelsProvidersVariantDefinition** _tmp2_;
	ProtonPlusModelsProvidersVariantDefinition** _tmp3_;
	gint _tmp3__length1;
	ProtonPlusModelsProvidersVariantDefinition** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->variants;
	_tmp0__length1 = self->priv->variants_length1;
	_tmp2_ = proton_plus_models_providers_provider_definition_copy_variants (_tmp0_, (gint) _tmp0__length1, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

ProtonPlusModelsProvidersInstallLayout**
proton_plus_models_providers_provider_definition_get_install_layouts (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                      gint* result_length1)
{
	ProtonPlusModelsProvidersInstallLayout** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	ProtonPlusModelsProvidersInstallLayout** _tmp2_;
	ProtonPlusModelsProvidersInstallLayout** _tmp3_;
	gint _tmp3__length1;
	ProtonPlusModelsProvidersInstallLayout** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->install_layouts;
	_tmp0__length1 = self->priv->install_layouts_length1;
	_tmp2_ = proton_plus_models_providers_provider_definition_copy_install_layouts (_tmp0_, (gint) _tmp0__length1, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

ProtonPlusModelsProvidersInstallLayout*
proton_plus_models_providers_provider_definition_get_install_layout (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                     const gchar* launcher_family_id)
{
	ProtonPlusModelsProvidersInstallLayout** _tmp0_;
	gint _tmp0__length1;
	ProtonPlusModelsProvidersInstallLayout** _tmp7_;
	gint _tmp7__length1;
	ProtonPlusModelsProvidersInstallLayout* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (launcher_family_id != NULL, NULL);
	_tmp0_ = self->priv->install_layouts;
	_tmp0__length1 = self->priv->install_layouts_length1;
	{
		ProtonPlusModelsProvidersInstallLayout** layout_collection = NULL;
		gint layout_collection_length1 = 0;
		gint _layout_collection_size_ = 0;
		gint layout_it = 0;
		layout_collection = _tmp0_;
		layout_collection_length1 = _tmp0__length1;
		for (layout_it = 0; layout_it < layout_collection_length1; layout_it = layout_it + 1) {
			ProtonPlusModelsProvidersInstallLayout* _tmp1_;
			ProtonPlusModelsProvidersInstallLayout* layout = NULL;
			_tmp1_ = _g_object_ref0 (layout_collection[layout_it]);
			layout = _tmp1_;
			{
				ProtonPlusModelsProvidersInstallLayout* _tmp2_;
				const gchar* _tmp3_;
				const gchar* _tmp4_;
				_tmp2_ = layout;
				_tmp3_ = proton_plus_models_providers_install_layout_get_launcher_family_id (_tmp2_);
				_tmp4_ = _tmp3_;
				if (g_strcmp0 (_tmp4_, launcher_family_id) == 0) {
					ProtonPlusModelsProvidersInstallLayout* _tmp5_;
					ProtonPlusModelsProvidersInstallLayout* _tmp6_;
					_tmp5_ = layout;
					_tmp6_ = proton_plus_models_providers_install_layout_copy (_tmp5_);
					result = _tmp6_;
					_g_object_unref0 (layout);
					return result;
				}
				_g_object_unref0 (layout);
			}
		}
	}
	_tmp7_ = self->priv->install_layouts;
	_tmp7__length1 = self->priv->install_layouts_length1;
	{
		ProtonPlusModelsProvidersInstallLayout** layout_collection = NULL;
		gint layout_collection_length1 = 0;
		gint _layout_collection_size_ = 0;
		gint layout_it = 0;
		layout_collection = _tmp7_;
		layout_collection_length1 = _tmp7__length1;
		for (layout_it = 0; layout_it < layout_collection_length1; layout_it = layout_it + 1) {
			ProtonPlusModelsProvidersInstallLayout* _tmp8_;
			ProtonPlusModelsProvidersInstallLayout* layout = NULL;
			_tmp8_ = _g_object_ref0 (layout_collection[layout_it]);
			layout = _tmp8_;
			{
				ProtonPlusModelsProvidersInstallLayout* _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				_tmp9_ = layout;
				_tmp10_ = proton_plus_models_providers_install_layout_get_launcher_family_id (_tmp9_);
				_tmp11_ = _tmp10_;
				if (g_strcmp0 (_tmp11_, "default") == 0) {
					ProtonPlusModelsProvidersInstallLayout* _tmp12_;
					ProtonPlusModelsProvidersInstallLayout* _tmp13_;
					_tmp12_ = layout;
					_tmp13_ = proton_plus_models_providers_install_layout_copy (_tmp12_);
					result = _tmp13_;
					_g_object_unref0 (layout);
					return result;
				}
				_g_object_unref0 (layout);
			}
		}
	}
	result = NULL;
	return result;
}

gboolean
proton_plus_models_providers_provider_definition_matches_endpoint (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                   const gchar* candidate)
{
	const gchar* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (candidate != NULL, FALSE);
	if (g_strcmp0 (candidate, "") == 0) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_endpoint;
	if (g_strcmp0 (candidate, _tmp0_) == 0) {
		result = TRUE;
		return result;
	}
	_tmp1_ = self->priv->legacy_endpoint_values;
	_tmp1__length1 = self->priv->legacy_endpoint_values_length1;
	{
		gchar** legacy_endpoint_collection = NULL;
		gint legacy_endpoint_collection_length1 = 0;
		gint _legacy_endpoint_collection_size_ = 0;
		gint legacy_endpoint_it = 0;
		legacy_endpoint_collection = _tmp1_;
		legacy_endpoint_collection_length1 = _tmp1__length1;
		for (legacy_endpoint_it = 0; legacy_endpoint_it < legacy_endpoint_collection_length1; legacy_endpoint_it = legacy_endpoint_it + 1) {
			gchar* _tmp2_;
			gchar* legacy_endpoint = NULL;
			_tmp2_ = g_strdup (legacy_endpoint_collection[legacy_endpoint_it]);
			legacy_endpoint = _tmp2_;
			{
				const gchar* _tmp3_;
				_tmp3_ = legacy_endpoint;
				if (g_strcmp0 (candidate, _tmp3_) == 0) {
					result = TRUE;
					_g_free0 (legacy_endpoint);
					return result;
				}
				_g_free0 (legacy_endpoint);
			}
		}
	}
	result = FALSE;
	return result;
}

gchar*
proton_plus_models_providers_provider_definition_source_id_for (ProtonPlusModelsProvidersSourceType source_type)
{
	gchar* result;
	switch (source_type) {
		case PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITHUB:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("github");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITHUB_ACTIONS:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("github-actions");
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITLAB:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("gitlab");
			result = _tmp2_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_FORGEJO:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("forgejo");
			result = _tmp3_;
			return result;
		}
		default:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("");
			result = _tmp4_;
			return result;
		}
	}
}

ProtonPlusModelsProvidersCategory
proton_plus_models_providers_provider_definition_get_category (ProtonPlusModelsProvidersProviderDefinition* self)
{
	ProtonPlusModelsProvidersCategory result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_category;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_category (ProtonPlusModelsProvidersProviderDefinition* self,
                                                               ProtonPlusModelsProvidersCategory value)
{
	ProtonPlusModelsProvidersCategory old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_category (self);
	if (old_value != value) {
		self->priv->_category = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_CATEGORY_PROPERTY]);
	}
}

ProtonPlusModelsProvidersSourceType
proton_plus_models_providers_provider_definition_get_source_type (ProtonPlusModelsProvidersProviderDefinition* self)
{
	ProtonPlusModelsProvidersSourceType result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_source_type;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_source_type (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                  ProtonPlusModelsProvidersSourceType value)
{
	ProtonPlusModelsProvidersSourceType old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_source_type (self);
	if (old_value != value) {
		self->priv->_source_type = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_TYPE_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_provider_definition_get_provider_id (ProtonPlusModelsProvidersProviderDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_provider_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_provider_id (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_provider_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_provider_id);
		self->priv->_provider_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_PROVIDER_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_provider_definition_get_title (ProtonPlusModelsProvidersProviderDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_title (ProtonPlusModelsProvidersProviderDefinition* self,
                                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TITLE_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_provider_definition_get_description (ProtonPlusModelsProvidersProviderDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_description (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description);
		self->priv->_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_DESCRIPTION_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_provider_definition_get_endpoint (ProtonPlusModelsProvidersProviderDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_endpoint;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_endpoint (ProtonPlusModelsProvidersProviderDefinition* self,
                                                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_endpoint (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_endpoint);
		self->priv->_endpoint = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ENDPOINT_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_provider_definition_get_repository_url (ProtonPlusModelsProvidersProviderDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_repository_url;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_repository_url (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_repository_url (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_repository_url);
		self->priv->_repository_url = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_REPOSITORY_URL_PROPERTY]);
	}
}

gint
proton_plus_models_providers_provider_definition_get_sort_priority (ProtonPlusModelsProvidersProviderDefinition* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_sort_priority;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_sort_priority (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                    gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_sort_priority (self);
	if (old_value != value) {
		self->priv->_sort_priority = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SORT_PRIORITY_PROPERTY]);
	}
}

gboolean
proton_plus_models_providers_provider_definition_get_legacy (ProtonPlusModelsProvidersProviderDefinition* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_legacy;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_legacy (ProtonPlusModelsProvidersProviderDefinition* self,
                                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_legacy (self);
	if (old_value != value) {
		self->priv->_legacy = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_provider_definition_get_tag (ProtonPlusModelsProvidersProviderDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tag;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_tag (ProtonPlusModelsProvidersProviderDefinition* self,
                                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_tag (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_tag);
		self->priv->_tag = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TAG_PROPERTY]);
	}
}

const gchar*
proton_plus_models_providers_provider_definition_get_url_template (ProtonPlusModelsProvidersProviderDefinition* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_url_template;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_url_template (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_url_template (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_url_template);
		self->priv->_url_template = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_URL_TEMPLATE_PROPERTY]);
	}
}

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

static void
proton_plus_models_providers_provider_definition_set_archive_install_requirement (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                                  ProtonPlusModelsProvidersArchiveInstallRequirement value)
{
	ProtonPlusModelsProvidersArchiveInstallRequirement old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_archive_install_requirement (self);
	if (old_value != value) {
		self->priv->_archive_install_requirement = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY]);
	}
}

gboolean
proton_plus_models_providers_provider_definition_get_single_archive_releases (ProtonPlusModelsProvidersProviderDefinition* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_single_archive_releases;
	return result;
}

static void
proton_plus_models_providers_provider_definition_set_single_archive_releases (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_providers_provider_definition_get_single_archive_releases (self);
	if (old_value != value) {
		self->priv->_single_archive_releases = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SINGLE_ARCHIVE_RELEASES_PROPERTY]);
	}
}

gchar**
proton_plus_models_providers_provider_definition_get_asset_filters (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                    gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->asset_filter_values;
	_tmp0__length1 = self->priv->asset_filter_values_length1;
	_tmp2_ = proton_plus_models_providers_provider_definition_copy_strings (_tmp0_, (gint) _tmp0__length1, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

gchar**
proton_plus_models_providers_provider_definition_get_asset_exclusions (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                       gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->asset_exclusion_values;
	_tmp0__length1 = self->priv->asset_exclusion_values_length1;
	_tmp2_ = proton_plus_models_providers_provider_definition_copy_strings (_tmp0_, (gint) _tmp0__length1, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

gchar**
proton_plus_models_providers_provider_definition_get_legacy_endpoints (ProtonPlusModelsProvidersProviderDefinition* self,
                                                                       gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->legacy_endpoint_values;
	_tmp0__length1 = self->priv->legacy_endpoint_values_length1;
	_tmp2_ = proton_plus_models_providers_provider_definition_copy_strings (_tmp0_, (gint) _tmp0__length1, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

gchar*
proton_plus_models_providers_provider_definition_get_source_id (ProtonPlusModelsProvidersProviderDefinition* self)
{
	gchar* result;
	ProtonPlusModelsProvidersSourceType _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source_type;
	_tmp1_ = proton_plus_models_providers_provider_definition_source_id_for (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
proton_plus_models_providers_provider_definition_class_init (ProtonPlusModelsProvidersProviderDefinitionClass * klass,
                                                             gpointer klass_data)
{
	proton_plus_models_providers_provider_definition_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsProvidersProviderDefinition_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_providers_provider_definition_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_providers_provider_definition_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_providers_provider_definition_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_CATEGORY_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_CATEGORY_PROPERTY] = g_param_spec_enum ("category", "category", "category", PROTON_PLUS_MODELS_PROVIDERS_TYPE_CATEGORY, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_TYPE_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_TYPE_PROPERTY] = g_param_spec_enum ("source-type", "source-type", "source-type", PROTON_PLUS_MODELS_PROVIDERS_TYPE_SOURCE_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_PROVIDER_ID_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_PROVIDER_ID_PROPERTY] = g_param_spec_string ("provider-id", "provider-id", "provider-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TITLE_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_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_MODELS_PROVIDERS_PROVIDER_DEFINITION_DESCRIPTION_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ENDPOINT_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ENDPOINT_PROPERTY] = g_param_spec_string ("endpoint", "endpoint", "endpoint", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_REPOSITORY_URL_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_REPOSITORY_URL_PROPERTY] = g_param_spec_string ("repository-url", "repository-url", "repository-url", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SORT_PRIORITY_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SORT_PRIORITY_PROPERTY] = g_param_spec_int ("sort-priority", "sort-priority", "sort-priority", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_PROPERTY] = g_param_spec_boolean ("legacy", "legacy", "legacy", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TAG_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TAG_PROPERTY] = g_param_spec_string ("tag", "tag", "tag", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_URL_TEMPLATE_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_URL_TEMPLATE_PROPERTY] = g_param_spec_string ("url-template", "url-template", "url-template", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_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, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SINGLE_ARCHIVE_RELEASES_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SINGLE_ARCHIVE_RELEASES_PROPERTY] = g_param_spec_boolean ("single-archive-releases", "single-archive-releases", "single-archive-releases", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ASSET_FILTERS_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ASSET_FILTERS_PROPERTY] = g_param_spec_boxed ("asset-filters", "asset-filters", "asset-filters", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ASSET_EXCLUSIONS_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ASSET_EXCLUSIONS_PROPERTY] = g_param_spec_boxed ("asset-exclusions", "asset-exclusions", "asset-exclusions", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_ENDPOINTS_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_ENDPOINTS_PROPERTY] = g_param_spec_boxed ("legacy-endpoints", "legacy-endpoints", "legacy-endpoints", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_ID_PROPERTY, proton_plus_models_providers_provider_definition_properties[PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_ID_PROPERTY] = g_param_spec_string ("source-id", "source-id", "source-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_providers_provider_definition_instance_init (ProtonPlusModelsProvidersProviderDefinition * self,
                                                                gpointer klass)
{
	self->priv = proton_plus_models_providers_provider_definition_get_instance_private (self);
}

static void
proton_plus_models_providers_provider_definition_finalize (GObject * obj)
{
	ProtonPlusModelsProvidersProviderDefinition * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_PROVIDERS_TYPE_PROVIDER_DEFINITION, ProtonPlusModelsProvidersProviderDefinition);
	_g_free0 (self->priv->_provider_id);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_description);
	_g_free0 (self->priv->_endpoint);
	_g_free0 (self->priv->_repository_url);
	_g_free0 (self->priv->_tag);
	self->priv->variants = (_vala_array_free (self->priv->variants, self->priv->variants_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->install_layouts = (_vala_array_free (self->priv->install_layouts, self->priv->install_layouts_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->asset_filter_values = (_vala_array_free (self->priv->asset_filter_values, self->priv->asset_filter_values_length1, (GDestroyNotify) g_free), NULL);
	self->priv->asset_exclusion_values = (_vala_array_free (self->priv->asset_exclusion_values, self->priv->asset_exclusion_values_length1, (GDestroyNotify) g_free), NULL);
	self->priv->legacy_endpoint_values = (_vala_array_free (self->priv->legacy_endpoint_values, self->priv->legacy_endpoint_values_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (self->priv->_url_template);
	G_OBJECT_CLASS (proton_plus_models_providers_provider_definition_parent_class)->finalize (obj);
}

static GType
proton_plus_models_providers_provider_definition_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsProvidersProviderDefinitionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_providers_provider_definition_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsProvidersProviderDefinition), 0, (GInstanceInitFunc) proton_plus_models_providers_provider_definition_instance_init, NULL };
	GType proton_plus_models_providers_provider_definition_type_id;
	proton_plus_models_providers_provider_definition_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsProvidersProviderDefinition", &g_define_type_info, 0);
	ProtonPlusModelsProvidersProviderDefinition_private_offset = g_type_add_instance_private (proton_plus_models_providers_provider_definition_type_id, sizeof (ProtonPlusModelsProvidersProviderDefinitionPrivate));
	return proton_plus_models_providers_provider_definition_type_id;
}

GType
proton_plus_models_providers_provider_definition_get_type (void)
{
	static volatile gsize proton_plus_models_providers_provider_definition_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_providers_provider_definition_type_id__once)) {
		GType proton_plus_models_providers_provider_definition_type_id;
		proton_plus_models_providers_provider_definition_type_id = proton_plus_models_providers_provider_definition_get_type_once ();
		g_once_init_leave (&proton_plus_models_providers_provider_definition_type_id__once, proton_plus_models_providers_provider_definition_type_id);
	}
	return proton_plus_models_providers_provider_definition_type_id__once;
}

static void
_vala_proton_plus_models_providers_provider_definition_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec)
{
	ProtonPlusModelsProvidersProviderDefinition * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_PROVIDERS_TYPE_PROVIDER_DEFINITION, ProtonPlusModelsProvidersProviderDefinition);
	switch (property_id) {
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_CATEGORY_PROPERTY:
		g_value_set_enum (value, proton_plus_models_providers_provider_definition_get_category (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_TYPE_PROPERTY:
		g_value_set_enum (value, proton_plus_models_providers_provider_definition_get_source_type (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_PROVIDER_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_provider_definition_get_provider_id (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TITLE_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_provider_definition_get_title (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_DESCRIPTION_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_provider_definition_get_description (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ENDPOINT_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_provider_definition_get_endpoint (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_REPOSITORY_URL_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_provider_definition_get_repository_url (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SORT_PRIORITY_PROPERTY:
		g_value_set_int (value, proton_plus_models_providers_provider_definition_get_sort_priority (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_providers_provider_definition_get_legacy (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TAG_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_provider_definition_get_tag (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_URL_TEMPLATE_PROPERTY:
		g_value_set_string (value, proton_plus_models_providers_provider_definition_get_url_template (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY:
		g_value_set_enum (value, proton_plus_models_providers_provider_definition_get_archive_install_requirement (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SINGLE_ARCHIVE_RELEASES_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_providers_provider_definition_get_single_archive_releases (self));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ASSET_FILTERS_PROPERTY:
		{
			int length;
			g_value_take_boxed (value, proton_plus_models_providers_provider_definition_get_asset_filters (self, &length));
		}
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ASSET_EXCLUSIONS_PROPERTY:
		{
			int length;
			g_value_take_boxed (value, proton_plus_models_providers_provider_definition_get_asset_exclusions (self, &length));
		}
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_ENDPOINTS_PROPERTY:
		{
			int length;
			g_value_take_boxed (value, proton_plus_models_providers_provider_definition_get_legacy_endpoints (self, &length));
		}
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_ID_PROPERTY:
		g_value_take_string (value, proton_plus_models_providers_provider_definition_get_source_id (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_providers_provider_definition_set_property (GObject * object,
                                                                     guint property_id,
                                                                     const GValue * value,
                                                                     GParamSpec * pspec)
{
	ProtonPlusModelsProvidersProviderDefinition * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_PROVIDERS_TYPE_PROVIDER_DEFINITION, ProtonPlusModelsProvidersProviderDefinition);
	switch (property_id) {
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_CATEGORY_PROPERTY:
		proton_plus_models_providers_provider_definition_set_category (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SOURCE_TYPE_PROPERTY:
		proton_plus_models_providers_provider_definition_set_source_type (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_PROVIDER_ID_PROPERTY:
		proton_plus_models_providers_provider_definition_set_provider_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TITLE_PROPERTY:
		proton_plus_models_providers_provider_definition_set_title (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_DESCRIPTION_PROPERTY:
		proton_plus_models_providers_provider_definition_set_description (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ENDPOINT_PROPERTY:
		proton_plus_models_providers_provider_definition_set_endpoint (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_REPOSITORY_URL_PROPERTY:
		proton_plus_models_providers_provider_definition_set_repository_url (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SORT_PRIORITY_PROPERTY:
		proton_plus_models_providers_provider_definition_set_sort_priority (self, g_value_get_int (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_LEGACY_PROPERTY:
		proton_plus_models_providers_provider_definition_set_legacy (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_TAG_PROPERTY:
		proton_plus_models_providers_provider_definition_set_tag (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_URL_TEMPLATE_PROPERTY:
		proton_plus_models_providers_provider_definition_set_url_template (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_ARCHIVE_INSTALL_REQUIREMENT_PROPERTY:
		proton_plus_models_providers_provider_definition_set_archive_install_requirement (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_PROVIDERS_PROVIDER_DEFINITION_SINGLE_ARCHIVE_RELEASES_PROPERTY:
		proton_plus_models_providers_provider_definition_set_single_archive_releases (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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;
}

