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

#include "protonplus_core.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gee.h>
#include <glib-object.h>
#include <json-glib/json-glib.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_RELEASE_0_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_TITLE_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_DESCRIPTION_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_RELEASE_DATE_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_ASSET_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_PAGE_URL_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_UPSTREAM_RELEASE_ID_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_SOURCE_TAG_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_DOWNLOAD_SIZE_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_KIND_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_ARTIFACTS_URL_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_VARIANTS_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_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)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))

struct _ProtonPlusModelsReleasePrivate {
	gchar* _title;
	gchar* _description;
	gchar* _release_date;
	ProtonPlusModelsAssetsAsset* _asset;
	gchar* _page_url;
	gchar* _upstream_release_id;
	gchar* _source_tag;
	ProtonPlusModelsReleaseKind _kind;
	gchar* _artifacts_url;
	GeeLinkedList* _variants;
};

static gint ProtonPlusModelsRelease_private_offset;
static gpointer proton_plus_models_release_parent_class = NULL;

static void proton_plus_models_release_set_title (ProtonPlusModelsRelease* self,
                                           const gchar* value);
static void proton_plus_models_release_set_description (ProtonPlusModelsRelease* self,
                                                 const gchar* value);
static void proton_plus_models_release_set_release_date (ProtonPlusModelsRelease* self,
                                                  const gchar* value);
static void proton_plus_models_release_set_asset (ProtonPlusModelsRelease* self,
                                           ProtonPlusModelsAssetsAsset* value);
static void proton_plus_models_release_set_page_url (ProtonPlusModelsRelease* self,
                                              const gchar* value);
static void proton_plus_models_release_set_upstream_release_id (ProtonPlusModelsRelease* self,
                                                         const gchar* value);
static void proton_plus_models_release_set_source_tag (ProtonPlusModelsRelease* self,
                                                const gchar* value);
static void proton_plus_models_release_set_kind (ProtonPlusModelsRelease* self,
                                          ProtonPlusModelsReleaseKind value);
static void proton_plus_models_release_set_artifacts_url (ProtonPlusModelsRelease* self,
                                                   const gchar* value);
static void proton_plus_models_release_set_variants (ProtonPlusModelsRelease* self,
                                              GeeLinkedList* value);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
static void _vala_JsonNode_free (JsonNode* self);
static gint64* _int64_dup (gint64* self);
static ProtonPlusModelsVariantCompatibility* proton_plus_models_release_compatibility_from_json (JsonObject* variant_obj);
static void proton_plus_models_release_finalize (GObject * obj);
static GType proton_plus_models_release_get_type_once (void);
static void _vala_proton_plus_models_release_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_proton_plus_models_release_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_models_release_get_instance_private (ProtonPlusModelsRelease* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsRelease_private_offset);
}

static GType
proton_plus_models_release_kind_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_MODELS_RELEASE_KIND_GENERIC, "PROTON_PLUS_MODELS_RELEASE_KIND_GENERIC", "generic"}, {PROTON_PLUS_MODELS_RELEASE_KIND_GITHUB_ACTION, "PROTON_PLUS_MODELS_RELEASE_KIND_GITHUB_ACTION", "github-action"}, {PROTON_PLUS_MODELS_RELEASE_KIND_STEAM_TINKER_LAUNCH, "PROTON_PLUS_MODELS_RELEASE_KIND_STEAM_TINKER_LAUNCH", "steam-tinker-launch"}, {0, NULL, NULL}};
	GType proton_plus_models_release_kind_type_id;
	proton_plus_models_release_kind_type_id = g_enum_register_static ("ProtonPlusModelsReleaseKind", values);
	return proton_plus_models_release_kind_type_id;
}

GType
proton_plus_models_release_kind_get_type (void)
{
	static volatile gsize proton_plus_models_release_kind_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_release_kind_type_id__once)) {
		GType proton_plus_models_release_kind_type_id;
		proton_plus_models_release_kind_type_id = proton_plus_models_release_kind_get_type_once ();
		g_once_init_leave (&proton_plus_models_release_kind_type_id__once, proton_plus_models_release_kind_type_id);
	}
	return proton_plus_models_release_kind_type_id__once;
}

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

ProtonPlusModelsRelease*
proton_plus_models_release_construct (GType object_type,
                                      const gchar* title,
                                      const gchar* description,
                                      const gchar* release_date,
                                      ProtonPlusModelsAssetsAsset* asset,
                                      const gchar* page_url,
                                      gint64* download_size,
                                      const gchar* upstream_release_id,
                                      const gchar* source_tag,
                                      ProtonPlusModelsReleaseKind kind,
                                      const gchar* artifacts_url)
{
	ProtonPlusModelsRelease * self = NULL;
	ProtonPlusModelsAssetsAsset* _tmp0_ = NULL;
	GeeLinkedList* _tmp9_;
	GeeLinkedList* _tmp10_;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	g_return_val_if_fail (release_date != NULL, NULL);
	g_return_val_if_fail (asset != NULL, NULL);
	g_return_val_if_fail (page_url != NULL, NULL);
	g_return_val_if_fail (upstream_release_id != NULL, NULL);
	g_return_val_if_fail (source_tag != NULL, NULL);
	g_return_val_if_fail (artifacts_url != NULL, NULL);
	self = (ProtonPlusModelsRelease*) g_object_new (object_type, NULL);
	proton_plus_models_release_set_title (self, title);
	proton_plus_models_release_set_description (self, description);
	proton_plus_models_release_set_release_date (self, release_date);
	if (download_size != NULL) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		ProtonPlusModelsAssetsAsset* _tmp7_;
		_tmp1_ = proton_plus_models_assets_asset_get_name (asset);
		_tmp2_ = _tmp1_;
		_tmp3_ = proton_plus_models_assets_asset_get_download_url (asset);
		_tmp4_ = _tmp3_;
		_tmp5_ = proton_plus_models_assets_asset_get_digest (asset);
		_tmp6_ = _tmp5_;
		_tmp7_ = proton_plus_models_assets_asset_new (_tmp2_, _tmp4_, (gint64) (*download_size), _tmp6_);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp7_;
	} else {
		ProtonPlusModelsAssetsAsset* _tmp8_;
		_tmp8_ = _g_object_ref0 (asset);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp8_;
	}
	proton_plus_models_release_set_asset (self, _tmp0_);
	proton_plus_models_release_set_page_url (self, page_url);
	proton_plus_models_release_set_upstream_release_id (self, upstream_release_id);
	proton_plus_models_release_set_source_tag (self, source_tag);
	proton_plus_models_release_set_kind (self, kind);
	proton_plus_models_release_set_artifacts_url (self, artifacts_url);
	_tmp9_ = gee_linked_list_new (PROTON_PLUS_MODELS_TYPE_VARIANT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_tmp10_ = _tmp9_;
	proton_plus_models_release_set_variants (self, _tmp10_);
	_g_object_unref0 (_tmp10_);
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusModelsRelease*
proton_plus_models_release_new (const gchar* title,
                                const gchar* description,
                                const gchar* release_date,
                                ProtonPlusModelsAssetsAsset* asset,
                                const gchar* page_url,
                                gint64* download_size,
                                const gchar* upstream_release_id,
                                const gchar* source_tag,
                                ProtonPlusModelsReleaseKind kind,
                                const gchar* artifacts_url)
{
	return proton_plus_models_release_construct (PROTON_PLUS_MODELS_TYPE_RELEASE, title, description, release_date, asset, page_url, download_size, upstream_release_id, source_tag, kind, artifacts_url);
}

static gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

JsonObject*
proton_plus_models_release_to_json (ProtonPlusModelsRelease* self)
{
	JsonObject* obj = NULL;
	JsonObject* _tmp0_;
	JsonObject* _tmp1_;
	ProtonPlusModelsReleaseKind _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	JsonObject* _tmp5_;
	const gchar* _tmp6_;
	JsonObject* _tmp7_;
	const gchar* _tmp8_;
	JsonObject* _tmp9_;
	const gchar* _tmp10_;
	JsonObject* _tmp11_;
	ProtonPlusModelsAssetsAsset* _tmp12_;
	JsonObject* _tmp13_;
	JsonObject* _tmp14_;
	const gchar* _tmp15_;
	JsonObject* _tmp16_;
	const gchar* _tmp17_;
	JsonObject* _tmp18_;
	const gchar* _tmp19_;
	JsonObject* _tmp20_;
	gint64 _tmp21_;
	gint64 _tmp22_;
	const gchar* _tmp23_;
	JsonArray* variants_array = NULL;
	JsonArray* _tmp26_;
	JsonObject* _tmp73_;
	JsonArray* _tmp74_;
	JsonArray* _tmp75_;
	JsonObject* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = json_object_new ();
	obj = _tmp0_;
	_tmp1_ = obj;
	_tmp2_ = self->priv->_kind;
	_tmp3_ = proton_plus_models_release_kind_to_string (_tmp2_);
	_tmp4_ = _tmp3_;
	json_object_set_string_member (_tmp1_, "kind", _tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = obj;
	_tmp6_ = self->priv->_title;
	json_object_set_string_member (_tmp5_, "title", _tmp6_);
	_tmp7_ = obj;
	_tmp8_ = self->priv->_description;
	json_object_set_string_member (_tmp7_, "description", _tmp8_);
	_tmp9_ = obj;
	_tmp10_ = self->priv->_release_date;
	json_object_set_string_member (_tmp9_, "release_date", _tmp10_);
	_tmp11_ = obj;
	_tmp12_ = self->priv->_asset;
	_tmp13_ = proton_plus_models_assets_asset_to_json (_tmp12_, FALSE);
	json_object_set_object_member (_tmp11_, "asset", _tmp13_);
	_tmp14_ = obj;
	_tmp15_ = self->priv->_page_url;
	json_object_set_string_member (_tmp14_, "page_url", _tmp15_);
	_tmp16_ = obj;
	_tmp17_ = self->priv->_upstream_release_id;
	json_object_set_string_member (_tmp16_, "upstream_release_id", _tmp17_);
	_tmp18_ = obj;
	_tmp19_ = self->priv->_source_tag;
	json_object_set_string_member (_tmp18_, "source_tag", _tmp19_);
	_tmp20_ = obj;
	_tmp21_ = proton_plus_models_release_get_download_size (self);
	_tmp22_ = _tmp21_;
	json_object_set_int_member (_tmp20_, "download_size", _tmp22_);
	_tmp23_ = self->priv->_artifacts_url;
	if (g_strcmp0 (_tmp23_, "") != 0) {
		JsonObject* _tmp24_;
		const gchar* _tmp25_;
		_tmp24_ = obj;
		_tmp25_ = self->priv->_artifacts_url;
		json_object_set_string_member (_tmp24_, "artifacts_url", _tmp25_);
	}
	_tmp26_ = json_array_new ();
	variants_array = _tmp26_;
	{
		GeeLinkedList* _variant_list = NULL;
		GeeLinkedList* _tmp27_;
		gint _variant_size = 0;
		GeeLinkedList* _tmp28_;
		gint _tmp29_;
		gint _tmp30_;
		gint _variant_index = 0;
		_tmp27_ = self->priv->_variants;
		_variant_list = _tmp27_;
		_tmp28_ = _variant_list;
		_tmp29_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp28_);
		_tmp30_ = _tmp29_;
		_variant_size = _tmp30_;
		_variant_index = -1;
		while (TRUE) {
			gint _tmp31_;
			gint _tmp32_;
			ProtonPlusModelsVariant* variant = NULL;
			GeeLinkedList* _tmp33_;
			gpointer _tmp34_;
			JsonObject* variant_obj = NULL;
			JsonObject* _tmp35_;
			JsonObject* _tmp36_;
			ProtonPlusModelsVariant* _tmp37_;
			const gchar* _tmp38_;
			const gchar* _tmp39_;
			JsonObject* _tmp40_;
			ProtonPlusModelsVariant* _tmp41_;
			const gchar* _tmp42_;
			const gchar* _tmp43_;
			JsonObject* _tmp44_;
			ProtonPlusModelsVariant* _tmp45_;
			const gchar* _tmp46_;
			const gchar* _tmp47_;
			JsonObject* _tmp48_;
			ProtonPlusModelsVariant* _tmp49_;
			gboolean _tmp50_;
			gboolean _tmp51_;
			const gchar* _tmp52_ = NULL;
			ProtonPlusModelsVariant* _tmp53_;
			const gchar* _tmp54_;
			const gchar* _tmp55_;
			JsonObject* _tmp56_;
			ProtonPlusModelsVariant* _tmp57_;
			ProtonPlusModelsAssetsAsset* _tmp58_;
			ProtonPlusModelsAssetsAsset* _tmp59_;
			JsonObject* _tmp65_;
			ProtonPlusModelsVariant* _tmp66_;
			ProtonPlusModelsVariantCompatibility* _tmp67_;
			ProtonPlusModelsVariantCompatibility* _tmp68_;
			JsonObject* _tmp69_;
			JsonArray* _tmp70_;
			JsonObject* _tmp71_;
			JsonObject* _tmp72_;
			_variant_index = _variant_index + 1;
			_tmp31_ = _variant_index;
			_tmp32_ = _variant_size;
			if (!(_tmp31_ < _tmp32_)) {
				break;
			}
			_tmp33_ = _variant_list;
			_tmp34_ = gee_abstract_list_get ((GeeAbstractList*) _tmp33_, _variant_index);
			variant = (ProtonPlusModelsVariant*) _tmp34_;
			_tmp35_ = json_object_new ();
			variant_obj = _tmp35_;
			_tmp36_ = variant_obj;
			_tmp37_ = variant;
			_tmp38_ = proton_plus_models_variant_get_id (_tmp37_);
			_tmp39_ = _tmp38_;
			json_object_set_string_member (_tmp36_, "id", _tmp39_);
			_tmp40_ = variant_obj;
			_tmp41_ = variant;
			_tmp42_ = proton_plus_models_variant_get_name (_tmp41_);
			_tmp43_ = _tmp42_;
			json_object_set_string_member (_tmp40_, "name", _tmp43_);
			_tmp44_ = variant_obj;
			_tmp45_ = variant;
			_tmp46_ = proton_plus_models_variant_get_format (_tmp45_);
			_tmp47_ = _tmp46_;
			json_object_set_string_member (_tmp44_, "format", _tmp47_);
			_tmp48_ = variant_obj;
			_tmp49_ = variant;
			_tmp50_ = proton_plus_models_variant_get_is_default (_tmp49_);
			_tmp51_ = _tmp50_;
			json_object_set_boolean_member (_tmp48_, "default", _tmp51_);
			_tmp53_ = variant;
			_tmp54_ = proton_plus_models_variant_get_download_url (_tmp53_);
			_tmp55_ = _tmp54_;
			_tmp52_ = _tmp55_;
			if (_tmp52_ == NULL) {
				_tmp52_ = "";
			}
			_tmp56_ = variant_obj;
			json_object_set_string_member (_tmp56_, "download_url", _tmp52_);
			_tmp57_ = variant;
			_tmp58_ = proton_plus_models_variant_get_asset (_tmp57_);
			_tmp59_ = _tmp58_;
			if (_tmp59_ != NULL) {
				JsonObject* _tmp60_;
				ProtonPlusModelsVariant* _tmp61_;
				ProtonPlusModelsAssetsAsset* _tmp62_;
				ProtonPlusModelsAssetsAsset* _tmp63_;
				JsonObject* _tmp64_;
				_tmp60_ = variant_obj;
				_tmp61_ = variant;
				_tmp62_ = proton_plus_models_variant_get_asset (_tmp61_);
				_tmp63_ = _tmp62_;
				_tmp64_ = proton_plus_models_assets_asset_to_json (_tmp63_, TRUE);
				json_object_set_object_member (_tmp60_, "asset", _tmp64_);
			}
			_tmp65_ = variant_obj;
			_tmp66_ = variant;
			_tmp67_ = proton_plus_models_variant_get_compatibility (_tmp66_);
			_tmp68_ = _tmp67_;
			_tmp69_ = proton_plus_models_variant_compatibility_to_json (_tmp68_);
			json_object_set_object_member (_tmp65_, "compatibility", _tmp69_);
			_tmp70_ = variants_array;
			_tmp71_ = variant_obj;
			_tmp72_ = _json_object_ref0 (_tmp71_);
			json_array_add_object_element (_tmp70_, _tmp72_);
			_json_object_unref0 (variant_obj);
			_g_object_unref0 (variant);
		}
	}
	_tmp73_ = obj;
	_tmp74_ = variants_array;
	_tmp75_ = _json_array_ref0 (_tmp74_);
	json_object_set_array_member (_tmp73_, "variants", _tmp75_);
	result = obj;
	_json_array_unref0 (variants_array);
	return result;
}

static JsonNode*
_vala_JsonNode_copy (JsonNode* self)
{
	return g_boxed_copy (json_node_get_type (), self);
}

static gpointer
__vala_JsonNode_copy0 (gpointer self)
{
	return self ? _vala_JsonNode_copy (self) : NULL;
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

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

static gpointer
__int64_dup0 (gpointer self)
{
	return self ? _int64_dup (self) : NULL;
}

ProtonPlusModelsRelease*
proton_plus_models_release_from_json (JsonObject* obj)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	JsonNode* asset_node = NULL;
	JsonNode* _tmp3_;
	JsonNode* _tmp4_;
	gboolean _tmp5_ = FALSE;
	JsonNode* _tmp6_;
	ProtonPlusModelsAssetsAsset* asset = NULL;
	JsonNode* _tmp8_;
	JsonObject* _tmp9_;
	ProtonPlusModelsAssetsAsset* _tmp10_;
	ProtonPlusModelsAssetsAsset* _tmp11_;
	gchar* title = NULL;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* source_tag = NULL;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* upstream_release_id = NULL;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* kind_string = NULL;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gboolean _tmp20_ = FALSE;
	const gchar* _tmp21_;
	const gchar* _tmp25_;
	gint64* cached_download_size = NULL;
	ProtonPlusModelsRelease* release = NULL;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	ProtonPlusModelsAssetsAsset* _tmp31_;
	const gchar* _tmp32_;
	gint64* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	ProtonPlusModelsRelease* _tmp38_;
	JsonArray* variants_array = NULL;
	JsonArray* _tmp39_;
	JsonArray* _tmp40_;
	JsonArray* _tmp41_;
	ProtonPlusModelsRelease* result;
	if (obj == NULL) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = !json_object_has_member (obj, "kind");
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = !json_object_has_member (obj, "title");
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = !json_object_has_member (obj, "asset");
	}
	if (_tmp0_) {
		result = NULL;
		return result;
	}
	_tmp3_ = json_object_get_member (obj, "asset");
	_tmp4_ = __vala_JsonNode_copy0 (_tmp3_);
	asset_node = _tmp4_;
	_tmp6_ = asset_node;
	if (_tmp6_ == NULL) {
		_tmp5_ = TRUE;
	} else {
		JsonNode* _tmp7_;
		_tmp7_ = asset_node;
		_tmp5_ = json_node_get_node_type (_tmp7_) != JSON_NODE_OBJECT;
	}
	if (_tmp5_) {
		result = NULL;
		__vala_JsonNode_free0 (asset_node);
		return result;
	}
	_tmp8_ = asset_node;
	_tmp9_ = json_node_get_object (_tmp8_);
	_tmp10_ = proton_plus_models_assets_asset_from_json (_tmp9_);
	asset = _tmp10_;
	_tmp11_ = asset;
	if (_tmp11_ == NULL) {
		result = NULL;
		_g_object_unref0 (asset);
		__vala_JsonNode_free0 (asset_node);
		return result;
	}
	_tmp12_ = json_object_get_string_member_with_default (obj, "title", "");
	_tmp13_ = g_strdup (_tmp12_);
	title = _tmp13_;
	_tmp14_ = json_object_get_string_member_with_default (obj, "source_tag", "");
	_tmp15_ = g_strdup (_tmp14_);
	source_tag = _tmp15_;
	_tmp16_ = json_object_get_string_member_with_default (obj, "upstream_release_id", "");
	_tmp17_ = g_strdup (_tmp16_);
	upstream_release_id = _tmp17_;
	_tmp18_ = json_object_get_string_member_with_default (obj, "kind", "");
	_tmp19_ = g_strdup (_tmp18_);
	kind_string = _tmp19_;
	_tmp21_ = title;
	if (g_strcmp0 (_tmp21_, "") == 0) {
		_tmp20_ = TRUE;
	} else {
		gboolean _tmp22_ = FALSE;
		const gchar* _tmp23_;
		_tmp23_ = upstream_release_id;
		if (g_strcmp0 (_tmp23_, "") == 0) {
			const gchar* _tmp24_;
			_tmp24_ = source_tag;
			_tmp22_ = g_strcmp0 (_tmp24_, "") == 0;
		} else {
			_tmp22_ = FALSE;
		}
		_tmp20_ = _tmp22_;
	}
	if (_tmp20_) {
		result = NULL;
		_g_free0 (kind_string);
		_g_free0 (upstream_release_id);
		_g_free0 (source_tag);
		_g_free0 (title);
		_g_object_unref0 (asset);
		__vala_JsonNode_free0 (asset_node);
		return result;
	}
	_tmp25_ = kind_string;
	if (g_strcmp0 (_tmp25_, "latest") == 0) {
		result = NULL;
		_g_free0 (kind_string);
		_g_free0 (upstream_release_id);
		_g_free0 (source_tag);
		_g_free0 (title);
		_g_object_unref0 (asset);
		__vala_JsonNode_free0 (asset_node);
		return result;
	}
	cached_download_size = NULL;
	if (json_object_has_member (obj, "download_size")) {
		gint64 _tmp26_;
		gint64* _tmp27_;
		_tmp26_ = json_object_get_int_member (obj, "download_size");
		_tmp27_ = __int64_dup0 (&_tmp26_);
		_g_free0 (cached_download_size);
		cached_download_size = _tmp27_;
	}
	_tmp28_ = title;
	_tmp29_ = json_object_get_string_member_with_default (obj, "description", "");
	_tmp30_ = json_object_get_string_member_with_default (obj, "release_date", "");
	_tmp31_ = asset;
	_tmp32_ = json_object_get_string_member_with_default (obj, "page_url", "");
	_tmp33_ = cached_download_size;
	_tmp34_ = upstream_release_id;
	_tmp35_ = source_tag;
	_tmp36_ = kind_string;
	_tmp37_ = json_object_get_string_member_with_default (obj, "artifacts_url", "");
	_tmp38_ = proton_plus_models_release_new (_tmp28_, _tmp29_, _tmp30_, _tmp31_, _tmp32_, _tmp33_, _tmp34_, _tmp35_, proton_plus_models_release_kind_from_string (_tmp36_), _tmp37_);
	release = _tmp38_;
	_tmp39_ = json_object_get_array_member (obj, "variants");
	_tmp40_ = _json_array_ref0 (_tmp39_);
	variants_array = _tmp40_;
	_tmp41_ = variants_array;
	if (_tmp41_ != NULL) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp42_ = FALSE;
				_tmp42_ = TRUE;
				while (TRUE) {
					JsonArray* _tmp44_;
					JsonObject* variant_obj = NULL;
					JsonArray* _tmp45_;
					JsonObject* _tmp46_;
					JsonObject* _tmp47_;
					JsonObject* _tmp48_;
					gchar* name = NULL;
					JsonObject* _tmp49_;
					const gchar* _tmp50_;
					gchar* _tmp51_;
					const gchar* _tmp52_;
					ProtonPlusModelsAssetsAsset* variant_asset = NULL;
					JsonNode* variant_asset_node = NULL;
					JsonObject* _tmp53_;
					JsonNode* _tmp54_;
					JsonNode* _tmp55_;
					gboolean _tmp56_ = FALSE;
					JsonNode* _tmp57_;
					gchar* variant_download_url = NULL;
					JsonObject* _tmp62_;
					const gchar* _tmp63_;
					gchar* _tmp64_;
					gboolean _tmp65_ = FALSE;
					const gchar* _tmp66_;
					gboolean _tmp72_ = FALSE;
					JsonObject* _tmp73_;
					ProtonPlusModelsRelease* _tmp75_;
					GeeLinkedList* _tmp76_;
					JsonObject* _tmp77_;
					const gchar* _tmp78_;
					const gchar* _tmp79_;
					JsonObject* _tmp80_;
					const gchar* _tmp81_;
					const gchar* _tmp82_;
					JsonObject* _tmp83_;
					ProtonPlusModelsVariantCompatibility* _tmp84_;
					ProtonPlusModelsVariantCompatibility* _tmp85_;
					ProtonPlusModelsAssetsAsset* _tmp86_;
					ProtonPlusModelsVariant* _tmp87_;
					ProtonPlusModelsVariant* _tmp88_;
					if (!_tmp42_) {
						gint _tmp43_;
						_tmp43_ = i;
						i = _tmp43_ + 1;
					}
					_tmp42_ = FALSE;
					_tmp44_ = variants_array;
					if (!(((guint) i) < json_array_get_length (_tmp44_))) {
						break;
					}
					_tmp45_ = variants_array;
					_tmp46_ = json_array_get_object_element (_tmp45_, (guint) i);
					_tmp47_ = _json_object_ref0 (_tmp46_);
					variant_obj = _tmp47_;
					_tmp48_ = variant_obj;
					if (_tmp48_ == NULL) {
						_json_object_unref0 (variant_obj);
						continue;
					}
					_tmp49_ = variant_obj;
					_tmp50_ = json_object_get_string_member_with_default (_tmp49_, "name", "");
					_tmp51_ = g_strdup (_tmp50_);
					name = _tmp51_;
					_tmp52_ = name;
					if (g_strcmp0 (_tmp52_, "") == 0) {
						_g_free0 (name);
						_json_object_unref0 (variant_obj);
						continue;
					}
					variant_asset = NULL;
					_tmp53_ = variant_obj;
					_tmp54_ = json_object_get_member (_tmp53_, "asset");
					_tmp55_ = __vala_JsonNode_copy0 (_tmp54_);
					variant_asset_node = _tmp55_;
					_tmp57_ = variant_asset_node;
					if (_tmp57_ != NULL) {
						JsonNode* _tmp58_;
						_tmp58_ = variant_asset_node;
						_tmp56_ = json_node_get_node_type (_tmp58_) == JSON_NODE_OBJECT;
					} else {
						_tmp56_ = FALSE;
					}
					if (_tmp56_) {
						JsonNode* _tmp59_;
						JsonObject* _tmp60_;
						ProtonPlusModelsAssetsAsset* _tmp61_;
						_tmp59_ = variant_asset_node;
						_tmp60_ = json_node_get_object (_tmp59_);
						_tmp61_ = proton_plus_models_assets_asset_from_json (_tmp60_);
						_g_object_unref0 (variant_asset);
						variant_asset = _tmp61_;
					}
					_tmp62_ = variant_obj;
					_tmp63_ = json_object_get_string_member_with_default (_tmp62_, "download_url", "");
					_tmp64_ = g_strdup (_tmp63_);
					variant_download_url = _tmp64_;
					_tmp66_ = variant_download_url;
					if (g_strcmp0 (_tmp66_, "") == 0) {
						ProtonPlusModelsAssetsAsset* _tmp67_;
						_tmp67_ = variant_asset;
						_tmp65_ = _tmp67_ != NULL;
					} else {
						_tmp65_ = FALSE;
					}
					if (_tmp65_) {
						ProtonPlusModelsAssetsAsset* _tmp68_;
						const gchar* _tmp69_;
						const gchar* _tmp70_;
						gchar* _tmp71_;
						_tmp68_ = variant_asset;
						_tmp69_ = proton_plus_models_assets_asset_get_download_url (_tmp68_);
						_tmp70_ = _tmp69_;
						_tmp71_ = g_strdup (_tmp70_);
						_g_free0 (variant_download_url);
						variant_download_url = _tmp71_;
					}
					_tmp73_ = variant_obj;
					if (json_object_has_member (_tmp73_, "default")) {
						JsonObject* _tmp74_;
						_tmp74_ = variant_obj;
						_tmp72_ = json_object_get_boolean_member (_tmp74_, "default");
					} else {
						_tmp72_ = FALSE;
					}
					_tmp75_ = release;
					_tmp76_ = _tmp75_->priv->_variants;
					_tmp77_ = variant_obj;
					_tmp78_ = json_object_get_string_member_with_default (_tmp77_, "id", "");
					_tmp79_ = name;
					_tmp80_ = variant_obj;
					_tmp81_ = json_object_get_string_member_with_default (_tmp80_, "format", "");
					_tmp82_ = variant_download_url;
					_tmp83_ = variant_obj;
					_tmp84_ = proton_plus_models_release_compatibility_from_json (_tmp83_);
					_tmp85_ = _tmp84_;
					_tmp86_ = variant_asset;
					_tmp87_ = proton_plus_models_variant_new (_tmp78_, _tmp79_, _tmp81_, _tmp72_, _tmp82_, _tmp85_, _tmp86_);
					_tmp88_ = _tmp87_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp76_, _tmp88_);
					_g_object_unref0 (_tmp88_);
					_g_object_unref0 (_tmp85_);
					_g_free0 (variant_download_url);
					__vala_JsonNode_free0 (variant_asset_node);
					_g_object_unref0 (variant_asset);
					_g_free0 (name);
					_json_object_unref0 (variant_obj);
				}
			}
		}
	}
	result = release;
	_json_array_unref0 (variants_array);
	_g_free0 (cached_download_size);
	_g_free0 (kind_string);
	_g_free0 (upstream_release_id);
	_g_free0 (source_tag);
	_g_free0 (title);
	_g_object_unref0 (asset);
	__vala_JsonNode_free0 (asset_node);
	return result;
}

gchar*
proton_plus_models_release_kind_to_string (ProtonPlusModelsReleaseKind kind)
{
	gchar* result;
	switch (kind) {
		case PROTON_PLUS_MODELS_RELEASE_KIND_GITHUB_ACTION:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("github-action");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_RELEASE_KIND_STEAM_TINKER_LAUNCH:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("steam-tinker-launch");
			result = _tmp1_;
			return result;
		}
		default:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("generic");
			result = _tmp2_;
			return result;
		}
	}
}

ProtonPlusModelsReleaseKind
proton_plus_models_release_kind_from_string (const gchar* kind)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	ProtonPlusModelsReleaseKind result;
	g_return_val_if_fail (kind != NULL, 0);
	_tmp0_ = kind;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("github-action")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_RELEASE_KIND_GITHUB_ACTION;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("steam-tinker-launch")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_RELEASE_KIND_STEAM_TINKER_LAUNCH;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_RELEASE_KIND_GENERIC;
				return result;
			}
		}
	}
}

static ProtonPlusModelsVariantCompatibility*
proton_plus_models_release_compatibility_from_json (JsonObject* variant_obj)
{
	JsonNode* node = NULL;
	JsonNode* _tmp1_;
	JsonNode* _tmp2_;
	gboolean _tmp3_ = FALSE;
	JsonNode* _tmp4_;
	JsonNode* _tmp7_;
	JsonObject* _tmp8_;
	ProtonPlusModelsVariantCompatibility* _tmp9_;
	ProtonPlusModelsVariantCompatibility* result;
	g_return_val_if_fail (variant_obj != NULL, NULL);
	if (!json_object_has_member (variant_obj, "compatibility")) {
		ProtonPlusModelsVariantCompatibility* _tmp0_;
		_tmp0_ = proton_plus_models_variant_compatibility_unspecified ();
		result = _tmp0_;
		return result;
	}
	_tmp1_ = json_object_get_member (variant_obj, "compatibility");
	_tmp2_ = __vala_JsonNode_copy0 (_tmp1_);
	node = _tmp2_;
	_tmp4_ = node;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		JsonNode* _tmp5_;
		_tmp5_ = node;
		_tmp3_ = json_node_get_node_type (_tmp5_) != JSON_NODE_OBJECT;
	}
	if (_tmp3_) {
		ProtonPlusModelsVariantCompatibility* _tmp6_;
		_tmp6_ = proton_plus_models_variant_compatibility_unspecified ();
		result = _tmp6_;
		__vala_JsonNode_free0 (node);
		return result;
	}
	_tmp7_ = node;
	_tmp8_ = json_node_get_object (_tmp7_);
	_tmp9_ = proton_plus_models_variant_compatibility_from_json (_tmp8_);
	result = _tmp9_;
	__vala_JsonNode_free0 (node);
	return result;
}

const gchar*
proton_plus_models_release_get_title (ProtonPlusModelsRelease* 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_release_set_title (ProtonPlusModelsRelease* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_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_release_properties[PROTON_PLUS_MODELS_RELEASE_TITLE_PROPERTY]);
	}
}

const gchar*
proton_plus_models_release_get_description (ProtonPlusModelsRelease* 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_release_set_description (ProtonPlusModelsRelease* self,
                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_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_release_properties[PROTON_PLUS_MODELS_RELEASE_DESCRIPTION_PROPERTY]);
	}
}

const gchar*
proton_plus_models_release_get_release_date (ProtonPlusModelsRelease* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_release_date;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_release_set_release_date (ProtonPlusModelsRelease* self,
                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_get_release_date (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_release_date);
		self->priv->_release_date = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_RELEASE_DATE_PROPERTY]);
	}
}

ProtonPlusModelsAssetsAsset*
proton_plus_models_release_get_asset (ProtonPlusModelsRelease* self)
{
	ProtonPlusModelsAssetsAsset* result;
	ProtonPlusModelsAssetsAsset* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_asset;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_release_set_asset (ProtonPlusModelsRelease* self,
                                      ProtonPlusModelsAssetsAsset* value)
{
	ProtonPlusModelsAssetsAsset* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_get_asset (self);
	if (old_value != value) {
		ProtonPlusModelsAssetsAsset* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_asset);
		self->priv->_asset = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_ASSET_PROPERTY]);
	}
}

const gchar*
proton_plus_models_release_get_page_url (ProtonPlusModelsRelease* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_page_url;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_release_set_page_url (ProtonPlusModelsRelease* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_get_page_url (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_page_url);
		self->priv->_page_url = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_PAGE_URL_PROPERTY]);
	}
}

const gchar*
proton_plus_models_release_get_upstream_release_id (ProtonPlusModelsRelease* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_upstream_release_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_release_set_upstream_release_id (ProtonPlusModelsRelease* self,
                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_get_upstream_release_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_upstream_release_id);
		self->priv->_upstream_release_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_UPSTREAM_RELEASE_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_release_get_source_tag (ProtonPlusModelsRelease* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source_tag;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_release_set_source_tag (ProtonPlusModelsRelease* self,
                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_get_source_tag (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_source_tag);
		self->priv->_source_tag = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_SOURCE_TAG_PROPERTY]);
	}
}

gint64
proton_plus_models_release_get_download_size (ProtonPlusModelsRelease* self)
{
	gint64 result;
	ProtonPlusModelsAssetsAsset* _tmp0_;
	gint64 _tmp1_;
	gint64 _tmp2_;
	g_return_val_if_fail (self != NULL, -1LL);
	_tmp0_ = self->priv->_asset;
	_tmp1_ = proton_plus_models_assets_asset_get_download_size (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

ProtonPlusModelsReleaseKind
proton_plus_models_release_get_kind (ProtonPlusModelsRelease* self)
{
	ProtonPlusModelsReleaseKind result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_kind;
	return result;
}

static void
proton_plus_models_release_set_kind (ProtonPlusModelsRelease* self,
                                     ProtonPlusModelsReleaseKind value)
{
	ProtonPlusModelsReleaseKind old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_get_kind (self);
	if (old_value != value) {
		self->priv->_kind = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_KIND_PROPERTY]);
	}
}

const gchar*
proton_plus_models_release_get_artifacts_url (ProtonPlusModelsRelease* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_artifacts_url;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_release_set_artifacts_url (ProtonPlusModelsRelease* self,
                                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_get_artifacts_url (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_artifacts_url);
		self->priv->_artifacts_url = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_ARTIFACTS_URL_PROPERTY]);
	}
}

GeeLinkedList*
proton_plus_models_release_get_variants (ProtonPlusModelsRelease* self)
{
	GeeLinkedList* result;
	GeeLinkedList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_variants;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_release_set_variants (ProtonPlusModelsRelease* self,
                                         GeeLinkedList* value)
{
	GeeLinkedList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_get_variants (self);
	if (old_value != value) {
		GeeLinkedList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_variants);
		self->priv->_variants = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_VARIANTS_PROPERTY]);
	}
}

static void
proton_plus_models_release_class_init (ProtonPlusModelsReleaseClass * klass,
                                       gpointer klass_data)
{
	proton_plus_models_release_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsRelease_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_release_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_release_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_release_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_TITLE_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_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_RELEASE_DESCRIPTION_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_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_RELEASE_RELEASE_DATE_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_RELEASE_DATE_PROPERTY] = g_param_spec_string ("release-date", "release-date", "release-date", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_ASSET_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_ASSET_PROPERTY] = g_param_spec_object ("asset", "asset", "asset", PROTON_PLUS_MODELS_ASSETS_TYPE_ASSET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_PAGE_URL_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_PAGE_URL_PROPERTY] = g_param_spec_string ("page-url", "page-url", "page-url", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_UPSTREAM_RELEASE_ID_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_UPSTREAM_RELEASE_ID_PROPERTY] = g_param_spec_string ("upstream-release-id", "upstream-release-id", "upstream-release-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_SOURCE_TAG_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_SOURCE_TAG_PROPERTY] = g_param_spec_string ("source-tag", "source-tag", "source-tag", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_DOWNLOAD_SIZE_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_DOWNLOAD_SIZE_PROPERTY] = g_param_spec_int64 ("download-size", "download-size", "download-size", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_KIND_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_KIND_PROPERTY] = g_param_spec_enum ("kind", "kind", "kind", PROTON_PLUS_MODELS_RELEASE_TYPE_KIND, PROTON_PLUS_MODELS_RELEASE_KIND_GENERIC, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_ARTIFACTS_URL_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_ARTIFACTS_URL_PROPERTY] = g_param_spec_string ("artifacts-url", "artifacts-url", "artifacts-url", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_VARIANTS_PROPERTY, proton_plus_models_release_properties[PROTON_PLUS_MODELS_RELEASE_VARIANTS_PROPERTY] = g_param_spec_object ("variants", "variants", "variants", GEE_TYPE_LINKED_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_release_instance_init (ProtonPlusModelsRelease * self,
                                          gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	self->priv = proton_plus_models_release_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_upstream_release_id = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_source_tag = _tmp1_;
	self->priv->_kind = PROTON_PLUS_MODELS_RELEASE_KIND_GENERIC;
	_tmp2_ = g_strdup ("");
	self->priv->_artifacts_url = _tmp2_;
}

static void
proton_plus_models_release_finalize (GObject * obj)
{
	ProtonPlusModelsRelease * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsRelease);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_description);
	_g_free0 (self->priv->_release_date);
	_g_object_unref0 (self->priv->_asset);
	_g_free0 (self->priv->_page_url);
	_g_free0 (self->priv->_upstream_release_id);
	_g_free0 (self->priv->_source_tag);
	_g_free0 (self->priv->_artifacts_url);
	_g_object_unref0 (self->priv->_variants);
	G_OBJECT_CLASS (proton_plus_models_release_parent_class)->finalize (obj);
}

static GType
proton_plus_models_release_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsReleaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_release_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsRelease), 0, (GInstanceInitFunc) proton_plus_models_release_instance_init, NULL };
	GType proton_plus_models_release_type_id;
	proton_plus_models_release_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsRelease", &g_define_type_info, 0);
	ProtonPlusModelsRelease_private_offset = g_type_add_instance_private (proton_plus_models_release_type_id, sizeof (ProtonPlusModelsReleasePrivate));
	return proton_plus_models_release_type_id;
}

GType
proton_plus_models_release_get_type (void)
{
	static volatile gsize proton_plus_models_release_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_release_type_id__once)) {
		GType proton_plus_models_release_type_id;
		proton_plus_models_release_type_id = proton_plus_models_release_get_type_once ();
		g_once_init_leave (&proton_plus_models_release_type_id__once, proton_plus_models_release_type_id);
	}
	return proton_plus_models_release_type_id__once;
}

static void
_vala_proton_plus_models_release_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	ProtonPlusModelsRelease * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsRelease);
	switch (property_id) {
		case PROTON_PLUS_MODELS_RELEASE_TITLE_PROPERTY:
		g_value_set_string (value, proton_plus_models_release_get_title (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_DESCRIPTION_PROPERTY:
		g_value_set_string (value, proton_plus_models_release_get_description (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_RELEASE_DATE_PROPERTY:
		g_value_set_string (value, proton_plus_models_release_get_release_date (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_ASSET_PROPERTY:
		g_value_set_object (value, proton_plus_models_release_get_asset (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_PAGE_URL_PROPERTY:
		g_value_set_string (value, proton_plus_models_release_get_page_url (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_UPSTREAM_RELEASE_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_release_get_upstream_release_id (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_SOURCE_TAG_PROPERTY:
		g_value_set_string (value, proton_plus_models_release_get_source_tag (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_DOWNLOAD_SIZE_PROPERTY:
		g_value_set_int64 (value, proton_plus_models_release_get_download_size (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_KIND_PROPERTY:
		g_value_set_enum (value, proton_plus_models_release_get_kind (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_ARTIFACTS_URL_PROPERTY:
		g_value_set_string (value, proton_plus_models_release_get_artifacts_url (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_VARIANTS_PROPERTY:
		g_value_set_object (value, proton_plus_models_release_get_variants (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_release_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	ProtonPlusModelsRelease * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsRelease);
	switch (property_id) {
		case PROTON_PLUS_MODELS_RELEASE_TITLE_PROPERTY:
		proton_plus_models_release_set_title (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_DESCRIPTION_PROPERTY:
		proton_plus_models_release_set_description (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_RELEASE_DATE_PROPERTY:
		proton_plus_models_release_set_release_date (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_ASSET_PROPERTY:
		proton_plus_models_release_set_asset (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_PAGE_URL_PROPERTY:
		proton_plus_models_release_set_page_url (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_UPSTREAM_RELEASE_ID_PROPERTY:
		proton_plus_models_release_set_upstream_release_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_SOURCE_TAG_PROPERTY:
		proton_plus_models_release_set_source_tag (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_KIND_PROPERTY:
		proton_plus_models_release_set_kind (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_ARTIFACTS_URL_PROPERTY:
		proton_plus_models_release_set_artifacts_url (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_VARIANTS_PROPERTY:
		proton_plus_models_release_set_variants (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

