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

#include "protonplus_core.h"
#include <gee.h>
#include <glib-object.h>
#include <glib.h>
#include <string.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_CATALOG_RESULT_0_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_CODE_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_RELEASES_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_SUCCEEDED_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_release_catalog_result_properties[PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_0_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_CODE_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_RELEASE_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_SUCCEEDED_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_HAS_RELEASE_PROPERTY,
	PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_release_lookup_result_properties[PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_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 _ProtonPlusModelsReleaseCatalogResultPrivate {
	ProtonPlusReturnCode _code;
	GeeLinkedList* _releases;
};

struct _ProtonPlusModelsReleaseLookupResultPrivate {
	ProtonPlusReturnCode _code;
	ProtonPlusModelsRelease* _release;
};

static gint ProtonPlusModelsReleaseCatalogResult_private_offset;
static gpointer proton_plus_models_release_catalog_result_parent_class = NULL;
static gint ProtonPlusModelsReleaseLookupResult_private_offset;
static gpointer proton_plus_models_release_lookup_result_parent_class = NULL;

static ProtonPlusModelsReleaseCatalogResult* proton_plus_models_release_catalog_result_new (ProtonPlusReturnCode code,
                                                                                     GeeLinkedList* releases);
static ProtonPlusModelsReleaseCatalogResult* proton_plus_models_release_catalog_result_construct (GType object_type,
                                                                                           ProtonPlusReturnCode code,
                                                                                           GeeLinkedList* releases);
static void proton_plus_models_release_catalog_result_finalize (GObject * obj);
static GType proton_plus_models_release_catalog_result_get_type_once (void);
static void _vala_proton_plus_models_release_catalog_result_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec);
static void _vala_proton_plus_models_release_catalog_result_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec);
static ProtonPlusModelsReleaseLookupResult* proton_plus_models_release_lookup_result_new (ProtonPlusReturnCode code,
                                                                                   ProtonPlusModelsRelease* release);
static ProtonPlusModelsReleaseLookupResult* proton_plus_models_release_lookup_result_construct (GType object_type,
                                                                                         ProtonPlusReturnCode code,
                                                                                         ProtonPlusModelsRelease* release);
static void proton_plus_models_release_lookup_result_finalize (GObject * obj);
static GType proton_plus_models_release_lookup_result_get_type_once (void);
static void _vala_proton_plus_models_release_lookup_result_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec);
static void _vala_proton_plus_models_release_lookup_result_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_catalog_result_get_instance_private (ProtonPlusModelsReleaseCatalogResult* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsReleaseCatalogResult_private_offset);
}

static ProtonPlusModelsReleaseCatalogResult*
proton_plus_models_release_catalog_result_construct (GType object_type,
                                                     ProtonPlusReturnCode code,
                                                     GeeLinkedList* releases)
{
	ProtonPlusModelsReleaseCatalogResult * self = NULL;
	g_return_val_if_fail (releases != NULL, NULL);
	self = (ProtonPlusModelsReleaseCatalogResult*) g_object_new (object_type, "code", code, "releases", releases, NULL);
	return self;
}

static ProtonPlusModelsReleaseCatalogResult*
proton_plus_models_release_catalog_result_new (ProtonPlusReturnCode code,
                                               GeeLinkedList* releases)
{
	return proton_plus_models_release_catalog_result_construct (PROTON_PLUS_MODELS_TYPE_RELEASE_CATALOG_RESULT, code, releases);
}

ProtonPlusModelsReleaseCatalogResult*
proton_plus_models_release_catalog_result_success (GeeLinkedList* releases)
{
	ProtonPlusModelsReleaseCatalogResult* _tmp0_;
	ProtonPlusModelsReleaseCatalogResult* result;
	g_return_val_if_fail (releases != NULL, NULL);
	_tmp0_ = proton_plus_models_release_catalog_result_new (PROTON_PLUS_RETURN_CODE_RELEASES_LOADED, releases);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsReleaseCatalogResult*
proton_plus_models_release_catalog_result_failure (ProtonPlusReturnCode code,
                                                   GeeLinkedList* releases)
{
	ProtonPlusModelsReleaseCatalogResult* _tmp0_;
	ProtonPlusModelsReleaseCatalogResult* result;
	g_return_val_if_fail (releases != NULL, NULL);
	_vala_assert (code != PROTON_PLUS_RETURN_CODE_RELEASES_LOADED, "code != ReturnCode.RELEASES_LOADED");
	_tmp0_ = proton_plus_models_release_catalog_result_new (code, releases);
	result = _tmp0_;
	return result;
}

ProtonPlusReturnCode
proton_plus_models_release_catalog_result_get_code (ProtonPlusModelsReleaseCatalogResult* self)
{
	ProtonPlusReturnCode result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_code;
	return result;
}

static void
proton_plus_models_release_catalog_result_set_code (ProtonPlusModelsReleaseCatalogResult* self,
                                                    ProtonPlusReturnCode value)
{
	ProtonPlusReturnCode old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_catalog_result_get_code (self);
	if (old_value != value) {
		self->priv->_code = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_catalog_result_properties[PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_CODE_PROPERTY]);
	}
}

GeeLinkedList*
proton_plus_models_release_catalog_result_get_releases (ProtonPlusModelsReleaseCatalogResult* self)
{
	GeeLinkedList* result;
	GeeLinkedList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_releases;
	result = _tmp0_;
	return result;
}

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

static void
proton_plus_models_release_catalog_result_set_releases (ProtonPlusModelsReleaseCatalogResult* self,
                                                        GeeLinkedList* value)
{
	GeeLinkedList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_catalog_result_get_releases (self);
	if (old_value != value) {
		GeeLinkedList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_releases);
		self->priv->_releases = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_catalog_result_properties[PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_RELEASES_PROPERTY]);
	}
}

gboolean
proton_plus_models_release_catalog_result_get_succeeded (ProtonPlusModelsReleaseCatalogResult* self)
{
	gboolean result;
	ProtonPlusReturnCode _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_code;
	result = _tmp0_ == PROTON_PLUS_RETURN_CODE_RELEASES_LOADED;
	return result;
}

static void
proton_plus_models_release_catalog_result_class_init (ProtonPlusModelsReleaseCatalogResultClass * klass,
                                                      gpointer klass_data)
{
	proton_plus_models_release_catalog_result_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsReleaseCatalogResult_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_release_catalog_result_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_release_catalog_result_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_release_catalog_result_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_CODE_PROPERTY, proton_plus_models_release_catalog_result_properties[PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_CODE_PROPERTY] = g_param_spec_enum ("code", "code", "code", PROTON_PLUS_TYPE_RETURN_CODE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_RELEASES_PROPERTY, proton_plus_models_release_catalog_result_properties[PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_RELEASES_PROPERTY] = g_param_spec_object ("releases", "releases", "releases", GEE_TYPE_LINKED_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_SUCCEEDED_PROPERTY, proton_plus_models_release_catalog_result_properties[PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_SUCCEEDED_PROPERTY] = g_param_spec_boolean ("succeeded", "succeeded", "succeeded", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_release_catalog_result_instance_init (ProtonPlusModelsReleaseCatalogResult * self,
                                                         gpointer klass)
{
	self->priv = proton_plus_models_release_catalog_result_get_instance_private (self);
}

static void
proton_plus_models_release_catalog_result_finalize (GObject * obj)
{
	ProtonPlusModelsReleaseCatalogResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_RELEASE_CATALOG_RESULT, ProtonPlusModelsReleaseCatalogResult);
	_g_object_unref0 (self->priv->_releases);
	G_OBJECT_CLASS (proton_plus_models_release_catalog_result_parent_class)->finalize (obj);
}

static GType
proton_plus_models_release_catalog_result_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsReleaseCatalogResultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_release_catalog_result_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsReleaseCatalogResult), 0, (GInstanceInitFunc) proton_plus_models_release_catalog_result_instance_init, NULL };
	GType proton_plus_models_release_catalog_result_type_id;
	proton_plus_models_release_catalog_result_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsReleaseCatalogResult", &g_define_type_info, 0);
	ProtonPlusModelsReleaseCatalogResult_private_offset = g_type_add_instance_private (proton_plus_models_release_catalog_result_type_id, sizeof (ProtonPlusModelsReleaseCatalogResultPrivate));
	return proton_plus_models_release_catalog_result_type_id;
}

GType
proton_plus_models_release_catalog_result_get_type (void)
{
	static volatile gsize proton_plus_models_release_catalog_result_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_release_catalog_result_type_id__once)) {
		GType proton_plus_models_release_catalog_result_type_id;
		proton_plus_models_release_catalog_result_type_id = proton_plus_models_release_catalog_result_get_type_once ();
		g_once_init_leave (&proton_plus_models_release_catalog_result_type_id__once, proton_plus_models_release_catalog_result_type_id);
	}
	return proton_plus_models_release_catalog_result_type_id__once;
}

static void
_vala_proton_plus_models_release_catalog_result_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec)
{
	ProtonPlusModelsReleaseCatalogResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_RELEASE_CATALOG_RESULT, ProtonPlusModelsReleaseCatalogResult);
	switch (property_id) {
		case PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_CODE_PROPERTY:
		g_value_set_enum (value, proton_plus_models_release_catalog_result_get_code (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_RELEASES_PROPERTY:
		g_value_set_object (value, proton_plus_models_release_catalog_result_get_releases (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_SUCCEEDED_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_release_catalog_result_get_succeeded (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_release_catalog_result_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec)
{
	ProtonPlusModelsReleaseCatalogResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_RELEASE_CATALOG_RESULT, ProtonPlusModelsReleaseCatalogResult);
	switch (property_id) {
		case PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_CODE_PROPERTY:
		proton_plus_models_release_catalog_result_set_code (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_CATALOG_RESULT_RELEASES_PROPERTY:
		proton_plus_models_release_catalog_result_set_releases (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_models_release_lookup_result_get_instance_private (ProtonPlusModelsReleaseLookupResult* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsReleaseLookupResult_private_offset);
}

static ProtonPlusModelsReleaseLookupResult*
proton_plus_models_release_lookup_result_construct (GType object_type,
                                                    ProtonPlusReturnCode code,
                                                    ProtonPlusModelsRelease* release)
{
	ProtonPlusModelsReleaseLookupResult * self = NULL;
	self = (ProtonPlusModelsReleaseLookupResult*) g_object_new (object_type, "code", code, "release", release, NULL);
	return self;
}

static ProtonPlusModelsReleaseLookupResult*
proton_plus_models_release_lookup_result_new (ProtonPlusReturnCode code,
                                              ProtonPlusModelsRelease* release)
{
	return proton_plus_models_release_lookup_result_construct (PROTON_PLUS_MODELS_TYPE_RELEASE_LOOKUP_RESULT, code, release);
}

ProtonPlusModelsReleaseLookupResult*
proton_plus_models_release_lookup_result_found (ProtonPlusModelsRelease* release)
{
	ProtonPlusModelsReleaseLookupResult* _tmp0_;
	ProtonPlusModelsReleaseLookupResult* result;
	g_return_val_if_fail (release != NULL, NULL);
	_tmp0_ = proton_plus_models_release_lookup_result_new (PROTON_PLUS_RETURN_CODE_RELEASES_LOADED, release);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsReleaseLookupResult*
proton_plus_models_release_lookup_result_empty (void)
{
	ProtonPlusModelsReleaseLookupResult* _tmp0_;
	ProtonPlusModelsReleaseLookupResult* result;
	_tmp0_ = proton_plus_models_release_lookup_result_new (PROTON_PLUS_RETURN_CODE_RELEASES_LOADED, NULL);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsReleaseLookupResult*
proton_plus_models_release_lookup_result_failure (ProtonPlusReturnCode code)
{
	ProtonPlusModelsReleaseLookupResult* _tmp0_;
	ProtonPlusModelsReleaseLookupResult* result;
	_vala_assert (code != PROTON_PLUS_RETURN_CODE_RELEASES_LOADED, "code != ReturnCode.RELEASES_LOADED");
	_tmp0_ = proton_plus_models_release_lookup_result_new (code, NULL);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsRelease*
proton_plus_models_release_lookup_result_require_release (ProtonPlusModelsReleaseLookupResult* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ProtonPlusModelsRelease* _tmp4_;
	ProtonPlusModelsRelease* _tmp5_;
	ProtonPlusModelsRelease* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = proton_plus_models_release_lookup_result_get_succeeded (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		ProtonPlusModelsRelease* _tmp3_;
		_tmp3_ = self->priv->_release;
		_tmp0_ = _tmp3_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	_vala_assert (_tmp0_, "succeeded && release != null");
	_tmp4_ = self->priv->_release;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsRelease));
	result = _tmp5_;
	return result;
}

ProtonPlusReturnCode
proton_plus_models_release_lookup_result_get_code (ProtonPlusModelsReleaseLookupResult* self)
{
	ProtonPlusReturnCode result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_code;
	return result;
}

static void
proton_plus_models_release_lookup_result_set_code (ProtonPlusModelsReleaseLookupResult* self,
                                                   ProtonPlusReturnCode value)
{
	ProtonPlusReturnCode old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_lookup_result_get_code (self);
	if (old_value != value) {
		self->priv->_code = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_lookup_result_properties[PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_CODE_PROPERTY]);
	}
}

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

static void
proton_plus_models_release_lookup_result_set_release (ProtonPlusModelsReleaseLookupResult* self,
                                                      ProtonPlusModelsRelease* value)
{
	ProtonPlusModelsRelease* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_release_lookup_result_get_release (self);
	if (old_value != value) {
		ProtonPlusModelsRelease* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_release);
		self->priv->_release = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_release_lookup_result_properties[PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_RELEASE_PROPERTY]);
	}
}

gboolean
proton_plus_models_release_lookup_result_get_succeeded (ProtonPlusModelsReleaseLookupResult* self)
{
	gboolean result;
	ProtonPlusReturnCode _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_code;
	result = _tmp0_ == PROTON_PLUS_RETURN_CODE_RELEASES_LOADED;
	return result;
}

gboolean
proton_plus_models_release_lookup_result_get_has_release (ProtonPlusModelsReleaseLookupResult* self)
{
	gboolean result;
	ProtonPlusModelsRelease* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_release;
	result = _tmp0_ != NULL;
	return result;
}

static void
proton_plus_models_release_lookup_result_class_init (ProtonPlusModelsReleaseLookupResultClass * klass,
                                                     gpointer klass_data)
{
	proton_plus_models_release_lookup_result_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsReleaseLookupResult_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_release_lookup_result_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_release_lookup_result_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_release_lookup_result_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_CODE_PROPERTY, proton_plus_models_release_lookup_result_properties[PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_CODE_PROPERTY] = g_param_spec_enum ("code", "code", "code", PROTON_PLUS_TYPE_RETURN_CODE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_RELEASE_PROPERTY, proton_plus_models_release_lookup_result_properties[PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_RELEASE_PROPERTY] = g_param_spec_object ("release", "release", "release", PROTON_PLUS_MODELS_TYPE_RELEASE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_SUCCEEDED_PROPERTY, proton_plus_models_release_lookup_result_properties[PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_SUCCEEDED_PROPERTY] = g_param_spec_boolean ("succeeded", "succeeded", "succeeded", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_HAS_RELEASE_PROPERTY, proton_plus_models_release_lookup_result_properties[PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_HAS_RELEASE_PROPERTY] = g_param_spec_boolean ("has-release", "has-release", "has-release", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_release_lookup_result_instance_init (ProtonPlusModelsReleaseLookupResult * self,
                                                        gpointer klass)
{
	self->priv = proton_plus_models_release_lookup_result_get_instance_private (self);
}

static void
proton_plus_models_release_lookup_result_finalize (GObject * obj)
{
	ProtonPlusModelsReleaseLookupResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_RELEASE_LOOKUP_RESULT, ProtonPlusModelsReleaseLookupResult);
	_g_object_unref0 (self->priv->_release);
	G_OBJECT_CLASS (proton_plus_models_release_lookup_result_parent_class)->finalize (obj);
}

static GType
proton_plus_models_release_lookup_result_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsReleaseLookupResultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_release_lookup_result_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsReleaseLookupResult), 0, (GInstanceInitFunc) proton_plus_models_release_lookup_result_instance_init, NULL };
	GType proton_plus_models_release_lookup_result_type_id;
	proton_plus_models_release_lookup_result_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsReleaseLookupResult", &g_define_type_info, 0);
	ProtonPlusModelsReleaseLookupResult_private_offset = g_type_add_instance_private (proton_plus_models_release_lookup_result_type_id, sizeof (ProtonPlusModelsReleaseLookupResultPrivate));
	return proton_plus_models_release_lookup_result_type_id;
}

GType
proton_plus_models_release_lookup_result_get_type (void)
{
	static volatile gsize proton_plus_models_release_lookup_result_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_release_lookup_result_type_id__once)) {
		GType proton_plus_models_release_lookup_result_type_id;
		proton_plus_models_release_lookup_result_type_id = proton_plus_models_release_lookup_result_get_type_once ();
		g_once_init_leave (&proton_plus_models_release_lookup_result_type_id__once, proton_plus_models_release_lookup_result_type_id);
	}
	return proton_plus_models_release_lookup_result_type_id__once;
}

static void
_vala_proton_plus_models_release_lookup_result_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec)
{
	ProtonPlusModelsReleaseLookupResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_RELEASE_LOOKUP_RESULT, ProtonPlusModelsReleaseLookupResult);
	switch (property_id) {
		case PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_CODE_PROPERTY:
		g_value_set_enum (value, proton_plus_models_release_lookup_result_get_code (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_RELEASE_PROPERTY:
		g_value_set_object (value, proton_plus_models_release_lookup_result_get_release (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_SUCCEEDED_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_release_lookup_result_get_succeeded (self));
		break;
		case PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_HAS_RELEASE_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_release_lookup_result_get_has_release (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_release_lookup_result_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec)
{
	ProtonPlusModelsReleaseLookupResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_RELEASE_LOOKUP_RESULT, ProtonPlusModelsReleaseLookupResult);
	switch (property_id) {
		case PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_CODE_PROPERTY:
		proton_plus_models_release_lookup_result_set_code (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_RELEASE_LOOKUP_RESULT_RELEASE_PROPERTY:
		proton_plus_models_release_lookup_result_set_release (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;
}

