/* individual.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from individual.vala, do not modify */

/*
 * Copyright (C) 2010, 2015 Collabora Ltd.
 * Copyright (C) 2011, 2013 Philip Withnall
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *       Travis Reitter <travis.reitter@collabora.co.uk>
 *       Philip Withnall <philip@tecnocode.co.uk>
 */

#include "folks/folks.h"
#include "folks/small-set.h"
#include <glib-object.h>
#include <gee.h>
#include <glib.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include "folks/small-set-internal.h"
#include <glib/gi18n-lib.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  {
	FOLKS_INDIVIDUAL_0_PROPERTY,
	FOLKS_INDIVIDUAL_TRUST_LEVEL_PROPERTY,
	FOLKS_INDIVIDUAL_AVATAR_PROPERTY,
	FOLKS_INDIVIDUAL_PRESENCE_TYPE_PROPERTY,
	FOLKS_INDIVIDUAL_PRESENCE_STATUS_PROPERTY,
	FOLKS_INDIVIDUAL_PRESENCE_MESSAGE_PROPERTY,
	FOLKS_INDIVIDUAL_CLIENT_TYPES_PROPERTY,
	FOLKS_INDIVIDUAL_IS_USER_PROPERTY,
	FOLKS_INDIVIDUAL_ID_PROPERTY,
	FOLKS_INDIVIDUAL_DISPLAY_NAME_PROPERTY,
	FOLKS_INDIVIDUAL_ALIAS_PROPERTY,
	FOLKS_INDIVIDUAL_STRUCTURED_NAME_PROPERTY,
	FOLKS_INDIVIDUAL_FULL_NAME_PROPERTY,
	FOLKS_INDIVIDUAL_NICKNAME_PROPERTY,
	FOLKS_INDIVIDUAL_GENDER_PROPERTY,
	FOLKS_INDIVIDUAL_URLS_PROPERTY,
	FOLKS_INDIVIDUAL_PHONE_NUMBERS_PROPERTY,
	FOLKS_INDIVIDUAL_EMAIL_ADDRESSES_PROPERTY,
	FOLKS_INDIVIDUAL_ROLES_PROPERTY,
	FOLKS_INDIVIDUAL_LOCAL_IDS_PROPERTY,
	FOLKS_INDIVIDUAL_LOCATION_PROPERTY,
	FOLKS_INDIVIDUAL_BIRTHDAY_PROPERTY,
	FOLKS_INDIVIDUAL_CALENDAR_EVENT_ID_PROPERTY,
	FOLKS_INDIVIDUAL_NOTES_PROPERTY,
	FOLKS_INDIVIDUAL_POSTAL_ADDRESSES_PROPERTY,
	FOLKS_INDIVIDUAL_IS_FAVOURITE_PROPERTY,
	FOLKS_INDIVIDUAL_GROUPS_PROPERTY,
	FOLKS_INDIVIDUAL_IM_ADDRESSES_PROPERTY,
	FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES_PROPERTY,
	FOLKS_INDIVIDUAL_IM_INTERACTION_COUNT_PROPERTY,
	FOLKS_INDIVIDUAL_LAST_IM_INTERACTION_DATETIME_PROPERTY,
	FOLKS_INDIVIDUAL_CALL_INTERACTION_COUNT_PROPERTY,
	FOLKS_INDIVIDUAL_LAST_CALL_INTERACTION_DATETIME_PROPERTY,
	FOLKS_INDIVIDUAL_PERSONAS_PROPERTY,
	FOLKS_INDIVIDUAL_NUM_PROPERTIES
};
static GParamSpec* folks_individual_properties[FOLKS_INDIVIDUAL_NUM_PROPERTIES];

#define FOLKS_INDIVIDUAL_TYPE__NOTIFIER (folks_individual__notifier_get_type ())
typedef struct _FolksIndividual_Notifier FolksIndividual_Notifier;
typedef void (*FolksIndividual_UnboundNotifier) (FolksIndividual* _self_, FolksPersona* persona, GParamSpec* ps);
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _FolksIndividualChangeAvatarData FolksIndividualChangeAvatarData;
typedef struct _FolksIndividualChangeAliasData FolksIndividualChangeAliasData;
typedef struct _FolksIndividualChangeNicknameData FolksIndividualChangeNicknameData;
typedef struct _FolksIndividualChangeIsFavouriteData FolksIndividualChangeIsFavouriteData;
typedef struct _FolksIndividualChangeGroupsData FolksIndividualChangeGroupsData;
typedef struct _FolksIndividualChangeExtendedFieldData FolksIndividualChangeExtendedFieldData;
typedef struct _FolksIndividualRemoveExtendedFieldData FolksIndividualRemoveExtendedFieldData;
typedef struct _FolksIndividualChangeGroupData FolksIndividualChangeGroupData;
typedef gboolean (*FolksIndividualPropertyFilter) (FolksPersona* persona, gpointer user_data);
typedef void (*FolksIndividualSingleValuedPropertySetter) (FolksPersona* chosen_persona, gpointer user_data);
typedef struct _Block7Data Block7Data;
typedef gboolean (*FolksIndividualPropertyIsNull) (gpointer user_data);
typedef void (*FolksIndividualCollectionCreator) (gpointer user_data);
typedef gboolean (*FolksIndividualMultiValuedPropertySetter) (gpointer user_data);
typedef struct _Block8Data Block8Data;
enum  {
	FOLKS_INDIVIDUAL_REMOVED_SIGNAL,
	FOLKS_INDIVIDUAL_PERSONAS_CHANGED_SIGNAL,
	FOLKS_INDIVIDUAL_NUM_SIGNALS
};
static guint folks_individual_signals[FOLKS_INDIVIDUAL_NUM_SIGNALS] = {0};
#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 _FolksIndividualPrivate {
	FolksSmallSet* _persona_set;
	GeeSet* _persona_set_ro;
	GeeHashMap* _stores;
	guint _persona_user_count;
	FolksTrustLevel _trust_level;
	GLoadableIcon* _avatar;
	FolksPresenceType _presence_type;
	gchar* _presence_status;
	gchar* _presence_message;
	gchar** _client_types;
	gint _client_types_length1;
	gint __client_types_size_;
	gboolean _is_user;
	gchar* _id;
	gchar* _display_name;
	gchar* _alias;
	FolksStructuredName* _structured_name;
	gchar* _full_name;
	gchar* _nickname;
	FolksGender _gender;
	FolksSmallSet* _urls;
	GeeSet* _urls_ro;
	FolksSmallSet* _phone_numbers;
	GeeSet* _phone_numbers_ro;
	FolksSmallSet* _email_addresses;
	GeeSet* _email_addresses_ro;
	FolksSmallSet* _roles;
	GeeSet* _roles_ro;
	FolksSmallSet* _local_ids;
	GeeSet* _local_ids_ro;
	FolksLocation* _location;
	GDateTime* _birthday;
	gchar* _calendar_event_id;
	FolksSmallSet* _notes;
	GeeSet* _notes_ro;
	FolksSmallSet* _postal_addresses;
	GeeSet* _postal_addresses_ro;
	gboolean _is_favourite;
	FolksSmallSet* _groups;
	GeeSet* _groups_ro;
	GeeHashMultiMap* _im_addresses;
	GeeHashMultiMap* _web_service_addresses;
	GDateTime* _last_im_interaction_datetime;
	GDateTime* _last_call_interaction_datetime;
};

struct _FolksIndividual_Notifier {
	const gchar* property;
	FolksIndividual_UnboundNotifier notify;
};

struct _FolksIndividualChangeAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FolksIndividual* self;
	GLoadableIcon* avatar;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GLoadableIcon* _tmp2_;
	GLoadableIcon* _tmp3_;
	gboolean _tmp4_;
	GLoadableIcon* _tmp5_;
	const gchar* _tmp6_;
	GError* persona_error;
	gboolean prop_changed;
	FolksSmallSet* _p_list;
	FolksSmallSet* _tmp7_;
	gint _p_size;
	FolksSmallSet* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	gint _p_index;
	gint _tmp11_;
	gint _tmp12_;
	FolksPersona* p;
	FolksSmallSet* _tmp13_;
	gconstpointer _tmp14_;
	FolksPersona* _tmp15_;
	FolksAvatarDetails* _a;
	FolksPersona* _tmp16_;
	FolksAvatarDetails* _tmp17_;
	FolksAvatarDetails* a;
	FolksAvatarDetails* _tmp18_;
	FolksPersona* _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length1;
	gint _tmp21_;
	gchar** _tmp22_;
	gint _tmp22__length1;
	FolksAvatarDetails* _tmp23_;
	FolksPersona* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	GError* e;
	GError* _tmp27_;
	GError* _tmp28_;
	GError* _tmp29_;
	GError* _tmp30_;
	GError* _tmp31_;
	GError* _tmp32_;
	GError* _tmp33_;
	GError* _inner_error0_;
};

struct _FolksIndividualChangeAliasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FolksIndividual* self;
	gchar* alias;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GError* persona_error;
	gboolean prop_changed;
	FolksSmallSet* _p_list;
	FolksSmallSet* _tmp2_;
	gint _p_size;
	FolksSmallSet* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gint _p_index;
	gint _tmp6_;
	gint _tmp7_;
	FolksPersona* p;
	FolksSmallSet* _tmp8_;
	gconstpointer _tmp9_;
	FolksPersona* _tmp10_;
	FolksAliasDetails* _a;
	FolksPersona* _tmp11_;
	FolksAliasDetails* _tmp12_;
	FolksAliasDetails* a;
	FolksAliasDetails* _tmp13_;
	FolksPersona* _tmp14_;
	gchar** _tmp15_;
	gint _tmp15__length1;
	gint _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	FolksAliasDetails* _tmp18_;
	FolksPersona* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	GError* e;
	GError* _tmp22_;
	GError* _tmp23_;
	GError* _tmp24_;
	GError* _tmp25_;
	GError* _tmp26_;
	GError* _tmp27_;
	GError* _tmp28_;
	GError* _inner_error0_;
};

struct _FolksIndividualChangeNicknameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FolksIndividual* self;
	gchar* nickname;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GError* persona_error;
	gboolean prop_changed;
	FolksSmallSet* _p_list;
	FolksSmallSet* _tmp3_;
	gint _p_size;
	FolksSmallSet* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gint _p_index;
	gint _tmp7_;
	gint _tmp8_;
	FolksPersona* p;
	FolksSmallSet* _tmp9_;
	gconstpointer _tmp10_;
	FolksPersona* _tmp11_;
	FolksNameDetails* _n;
	FolksPersona* _tmp12_;
	FolksNameDetails* _tmp13_;
	FolksNameDetails* n;
	FolksNameDetails* _tmp14_;
	FolksPersona* _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	gint _tmp17_;
	gchar** _tmp18_;
	gint _tmp18__length1;
	FolksNameDetails* _tmp19_;
	FolksPersona* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	GError* e;
	GError* _tmp23_;
	GError* _tmp24_;
	GError* _tmp25_;
	GError* _tmp26_;
	GError* _tmp27_;
	GError* _tmp28_;
	GError* _tmp29_;
	GError* _inner_error0_;
};

struct _FolksIndividualChangeIsFavouriteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FolksIndividual* self;
	gboolean is_favourite;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GError* persona_error;
	gboolean prop_changed;
	FolksSmallSet* _p_list;
	FolksSmallSet* _tmp2_;
	gint _p_size;
	FolksSmallSet* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gint _p_index;
	gint _tmp6_;
	gint _tmp7_;
	FolksPersona* p;
	FolksSmallSet* _tmp8_;
	gconstpointer _tmp9_;
	FolksPersona* _tmp10_;
	FolksFavouriteDetails* _a;
	FolksPersona* _tmp11_;
	FolksFavouriteDetails* _tmp12_;
	FolksFavouriteDetails* a;
	FolksFavouriteDetails* _tmp13_;
	FolksPersona* _tmp14_;
	gchar** _tmp15_;
	gint _tmp15__length1;
	gint _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	FolksFavouriteDetails* _tmp18_;
	FolksPersona* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	GError* e;
	GError* _tmp22_;
	GError* _tmp23_;
	GError* _tmp24_;
	GError* _tmp25_;
	GError* _tmp26_;
	GError* _tmp27_;
	GError* _tmp28_;
	GError* _inner_error0_;
};

struct _FolksIndividualChangeGroupsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FolksIndividual* self;
	GeeSet* groups;
	const gchar* _tmp0_;
	GError* persona_error;
	gboolean prop_changed;
	FolksSmallSet* _p_list;
	FolksSmallSet* _tmp1_;
	gint _p_size;
	FolksSmallSet* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint _p_index;
	gint _tmp5_;
	gint _tmp6_;
	FolksPersona* p;
	FolksSmallSet* _tmp7_;
	gconstpointer _tmp8_;
	FolksPersona* _tmp9_;
	FolksGroupDetails* _g;
	FolksPersona* _tmp10_;
	FolksGroupDetails* _tmp11_;
	FolksGroupDetails* g;
	FolksGroupDetails* _tmp12_;
	FolksPersona* _tmp13_;
	gchar** _tmp14_;
	gint _tmp14__length1;
	gint _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	FolksGroupDetails* _tmp17_;
	FolksPersona* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	GError* e;
	GError* _tmp21_;
	GError* _tmp22_;
	GError* _tmp23_;
	GError* _tmp24_;
	GError* _tmp25_;
	GError* _tmp26_;
	GError* _tmp27_;
	GError* _inner_error0_;
};

struct _FolksIndividualChangeExtendedFieldData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FolksIndividual* self;
	gchar* name;
	FolksExtendedFieldDetails* value;
	const gchar* _tmp0_;
	GError* persona_error;
	gboolean prop_changed;
	FolksSmallSet* _p_list;
	FolksSmallSet* _tmp1_;
	gint _p_size;
	FolksSmallSet* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint _p_index;
	gint _tmp5_;
	gint _tmp6_;
	FolksPersona* p;
	FolksSmallSet* _tmp7_;
	gconstpointer _tmp8_;
	FolksPersona* _tmp9_;
	FolksPersona* _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	gint _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	FolksExtendedInfo* e;
	FolksPersona* _tmp14_;
	FolksExtendedInfo* _tmp15_;
	FolksPersona* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	GError* _vala1_e;
	GError* _tmp19_;
	GError* _tmp20_;
	GError* _tmp21_;
	GError* _tmp22_;
	GError* _tmp23_;
	GError* _tmp24_;
	GError* _tmp25_;
	GError* _inner_error0_;
};

struct _FolksIndividualRemoveExtendedFieldData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FolksIndividual* self;
	gchar* name;
	const gchar* _tmp0_;
	GError* persona_error;
	FolksSmallSet* _p_list;
	FolksSmallSet* _tmp1_;
	gint _p_size;
	FolksSmallSet* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint _p_index;
	gint _tmp5_;
	gint _tmp6_;
	FolksPersona* p;
	FolksSmallSet* _tmp7_;
	gconstpointer _tmp8_;
	FolksPersona* _tmp9_;
	FolksPersona* _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	gint _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	FolksExtendedInfo* e;
	FolksPersona* _tmp14_;
	FolksExtendedInfo* _tmp15_;
	FolksPersona* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	GError* _vala1_e;
	GError* _tmp19_;
	GError* _tmp20_;
	GError* _tmp21_;
	GError* _tmp22_;
	GError* _tmp23_;
	GError* _tmp24_;
	GError* _inner_error0_;
};

struct _FolksIndividualChangeGroupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FolksIndividual* self;
	gchar* group;
	gboolean is_member;
	FolksSmallSet* _p_list;
	FolksSmallSet* _tmp0_;
	gint _p_size;
	FolksSmallSet* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint _p_index;
	gint _tmp4_;
	gint _tmp5_;
	FolksPersona* p;
	FolksSmallSet* _tmp6_;
	gconstpointer _tmp7_;
	FolksPersona* _tmp8_;
	FolksPersona* _tmp9_;
	FolksPersona* _tmp10_;
};

struct _Block7Data {
	int _ref_count_;
	FolksIndividual* self;
	FolksIndividualPropertyFilter filter_func;
	gpointer filter_func_target;
	GCompareFunc compare_func;
	gchar* prop_name;
};

struct _Block8Data {
	int _ref_count_;
	FolksIndividual* self;
	gboolean emit_notification;
};

static gint FolksIndividual_private_offset;
static gpointer folks_individual_parent_class = NULL;
static FolksAliasDetailsIface * folks_individual_folks_alias_details_parent_iface = NULL;
static FolksAvatarDetailsIface * folks_individual_folks_avatar_details_parent_iface = NULL;
static FolksBirthdayDetailsIface * folks_individual_folks_birthday_details_parent_iface = NULL;
static FolksEmailDetailsIface * folks_individual_folks_email_details_parent_iface = NULL;
static FolksExtendedInfoIface * folks_individual_folks_extended_info_parent_iface = NULL;
static FolksFavouriteDetailsIface * folks_individual_folks_favourite_details_parent_iface = NULL;
static FolksGenderDetailsIface * folks_individual_folks_gender_details_parent_iface = NULL;
static FolksGroupDetailsIface * folks_individual_folks_group_details_parent_iface = NULL;
static FolksImDetailsIface * folks_individual_folks_im_details_parent_iface = NULL;
static FolksInteractionDetailsIface * folks_individual_folks_interaction_details_parent_iface = NULL;
static FolksLocalIdDetailsIface * folks_individual_folks_local_id_details_parent_iface = NULL;
static FolksLocationDetailsIface * folks_individual_folks_location_details_parent_iface = NULL;
static FolksNameDetailsIface * folks_individual_folks_name_details_parent_iface = NULL;
static FolksNoteDetailsIface * folks_individual_folks_note_details_parent_iface = NULL;
static FolksPresenceDetailsIface * folks_individual_folks_presence_details_parent_iface = NULL;
static FolksPhoneDetailsIface * folks_individual_folks_phone_details_parent_iface = NULL;
static FolksPostalAddressDetailsIface * folks_individual_folks_postal_address_details_parent_iface = NULL;
static FolksRoleDetailsIface * folks_individual_folks_role_details_parent_iface = NULL;
static FolksUrlDetailsIface * folks_individual_folks_url_details_parent_iface = NULL;
static FolksWebServiceDetailsIface * folks_individual_folks_web_service_details_parent_iface = NULL;

static GType folks_individual__notifier_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static FolksIndividual_Notifier* folks_individual__notifier_dup (const FolksIndividual_Notifier* self);
static void folks_individual__notifier_free (FolksIndividual_Notifier* self);
static void _folks_individual_notify_alias_cb (FolksIndividual* _self_,
                                        FolksPersona* p,
                                        GParamSpec* ps);
static void __folks_individual_notify_alias_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                         FolksPersona* persona,
                                                                         GParamSpec* ps);
static void _folks_individual_notify_avatar_cb (FolksIndividual* _self_,
                                         FolksPersona* p,
                                         GParamSpec* ps);
static void __folks_individual_notify_avatar_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                          FolksPersona* persona,
                                                                          GParamSpec* ps);
static void _folks_individual_notify_presence_cb (FolksIndividual* _self_,
                                           FolksPersona* p,
                                           GParamSpec* ps);
static void __folks_individual_notify_presence_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                            FolksPersona* persona,
                                                                            GParamSpec* ps);
static void _folks_individual_notify_im_addresses_cb (FolksIndividual* _self_,
                                               FolksPersona* p,
                                               GParamSpec* ps);
static void __folks_individual_notify_im_addresses_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                FolksPersona* persona,
                                                                                GParamSpec* ps);
static void _folks_individual_notify_web_service_addresses_cb (FolksIndividual* _self_,
                                                        FolksPersona* p,
                                                        GParamSpec* ps);
static void __folks_individual_notify_web_service_addresses_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                         FolksPersona* persona,
                                                                                         GParamSpec* ps);
static void _folks_individual_notify_is_favourite_cb (FolksIndividual* _self_,
                                               FolksPersona* p,
                                               GParamSpec* ps);
static void __folks_individual_notify_is_favourite_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                FolksPersona* persona,
                                                                                GParamSpec* ps);
static void _folks_individual_notify_structured_name_cb (FolksIndividual* _self_,
                                                  FolksPersona* p,
                                                  GParamSpec* ps);
static void __folks_individual_notify_structured_name_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                   FolksPersona* persona,
                                                                                   GParamSpec* ps);
static void _folks_individual_notify_full_name_cb (FolksIndividual* _self_,
                                            FolksPersona* p,
                                            GParamSpec* ps);
static void __folks_individual_notify_full_name_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                             FolksPersona* persona,
                                                                             GParamSpec* ps);
static void _folks_individual_notify_nickname_cb (FolksIndividual* _self_,
                                           FolksPersona* p,
                                           GParamSpec* ps);
static void __folks_individual_notify_nickname_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                            FolksPersona* persona,
                                                                            GParamSpec* ps);
static void _folks_individual_notify_gender_cb (FolksIndividual* _self_,
                                         FolksPersona* p,
                                         GParamSpec* ps);
static void __folks_individual_notify_gender_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                          FolksPersona* persona,
                                                                          GParamSpec* ps);
static void _folks_individual_notify_urls_cb (FolksIndividual* _self_,
                                       FolksPersona* p,
                                       GParamSpec* ps);
static void __folks_individual_notify_urls_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                        FolksPersona* persona,
                                                                        GParamSpec* ps);
static void _folks_individual_notify_phone_numbers_cb (FolksIndividual* _self_,
                                                FolksPersona* p,
                                                GParamSpec* ps);
static void __folks_individual_notify_phone_numbers_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                 FolksPersona* persona,
                                                                                 GParamSpec* ps);
static void _folks_individual_notify_email_addresses_cb (FolksIndividual* _self_,
                                                  FolksPersona* p,
                                                  GParamSpec* ps);
static void __folks_individual_notify_email_addresses_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                   FolksPersona* persona,
                                                                                   GParamSpec* ps);
static void _folks_individual_notify_roles_cb (FolksIndividual* _self_,
                                        FolksPersona* p,
                                        GParamSpec* ps);
static void __folks_individual_notify_roles_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                         FolksPersona* persona,
                                                                         GParamSpec* ps);
static void _folks_individual_notify_birthday_cb (FolksIndividual* _self_,
                                           FolksPersona* p,
                                           GParamSpec* ps);
static void __folks_individual_notify_birthday_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                            FolksPersona* persona,
                                                                            GParamSpec* ps);
static void _folks_individual_notify_notes_cb (FolksIndividual* _self_,
                                        FolksPersona* p,
                                        GParamSpec* ps);
static void __folks_individual_notify_notes_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                         FolksPersona* persona,
                                                                         GParamSpec* ps);
static void _folks_individual_notify_postal_addresses_cb (FolksIndividual* _self_,
                                                   FolksPersona* p,
                                                   GParamSpec* ps);
static void __folks_individual_notify_postal_addresses_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                    FolksPersona* persona,
                                                                                    GParamSpec* ps);
static void _folks_individual_notify_local_ids_cb (FolksIndividual* _self_,
                                            FolksPersona* p,
                                            GParamSpec* ps);
static void __folks_individual_notify_local_ids_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                             FolksPersona* persona,
                                                                             GParamSpec* ps);
static void _folks_individual_notify_location_cb (FolksIndividual* _self_,
                                           FolksPersona* p,
                                           GParamSpec* ps);
static void __folks_individual_notify_location_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                            FolksPersona* persona,
                                                                            GParamSpec* ps);
static void _folks_individual_notify_im_interaction_count_cb (FolksIndividual* _self_,
                                                       FolksPersona* p,
                                                       GParamSpec* ps);
static void __folks_individual_notify_im_interaction_count_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                        FolksPersona* persona,
                                                                                        GParamSpec* ps);
static void _folks_individual_notify_call_interaction_count_cb (FolksIndividual* _self_,
                                                         FolksPersona* p,
                                                         GParamSpec* ps);
static void __folks_individual_notify_call_interaction_count_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                          FolksPersona* persona,
                                                                                          GParamSpec* ps);
static void _folks_individual_notify_last_im_interaction_datetime_cb (FolksIndividual* _self_,
                                                               FolksPersona* p,
                                                               GParamSpec* ps);
static void __folks_individual_notify_last_im_interaction_datetime_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                                FolksPersona* persona,
                                                                                                GParamSpec* ps);
static void _folks_individual_notify_last_call_interaction_datetime_cb (FolksIndividual* _self_,
                                                                 FolksPersona* p,
                                                                 GParamSpec* ps);
static void __folks_individual_notify_last_call_interaction_datetime_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                                  FolksPersona* persona,
                                                                                                  GParamSpec* ps);
static void folks_individual_real_change_avatar_data_free (gpointer _data);
static void folks_individual_real_change_avatar (FolksAvatarDetails* base,
                                          GLoadableIcon* avatar,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static gboolean folks_individual_real_change_avatar_co (FolksIndividualChangeAvatarData* _data_);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static void folks_individual_change_avatar_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
static void folks_individual_real_change_alias_data_free (gpointer _data);
static void folks_individual_real_change_alias (FolksAliasDetails* base,
                                         const gchar* alias,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
static gboolean folks_individual_real_change_alias_co (FolksIndividualChangeAliasData* _data_);
static void folks_individual_change_alias_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_);
static void folks_individual_real_change_nickname_data_free (gpointer _data);
static void folks_individual_real_change_nickname (FolksNameDetails* base,
                                            const gchar* nickname,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static gboolean folks_individual_real_change_nickname_co (FolksIndividualChangeNicknameData* _data_);
static void folks_individual_change_nickname_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
static void folks_individual_real_change_is_favourite_data_free (gpointer _data);
static void folks_individual_real_change_is_favourite (FolksFavouriteDetails* base,
                                                gboolean is_favourite,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static gboolean folks_individual_real_change_is_favourite_co (FolksIndividualChangeIsFavouriteData* _data_);
static void folks_individual_change_is_favourite_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_);
static void folks_individual_real_change_groups_data_free (gpointer _data);
static void folks_individual_real_change_groups (FolksGroupDetails* base,
                                          GeeSet* groups,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static gboolean folks_individual_real_change_groups_co (FolksIndividualChangeGroupsData* _data_);
static void folks_individual_change_groups_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
static FolksExtendedFieldDetails* folks_individual_real_get_extended_field (FolksExtendedInfo* base,
                                                                     const gchar* name);
static void folks_individual_real_change_extended_field_data_free (gpointer _data);
static void folks_individual_real_change_extended_field (FolksExtendedInfo* base,
                                                  const gchar* name,
                                                  FolksExtendedFieldDetails* value,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static gboolean folks_individual_real_change_extended_field_co (FolksIndividualChangeExtendedFieldData* _data_);
static void folks_individual_change_extended_field_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void folks_individual_real_remove_extended_field_data_free (gpointer _data);
static void folks_individual_real_remove_extended_field (FolksExtendedInfo* base,
                                                  const gchar* name,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static gboolean folks_individual_real_remove_extended_field_co (FolksIndividualRemoveExtendedFieldData* _data_);
static void folks_individual_remove_extended_field_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void _folks_individual_update_alias (FolksIndividual* self);
static void _folks_individual_update_avatar (FolksIndividual* self);
static void _folks_individual_update_full_name (FolksIndividual* self);
static void _folks_individual_update_structured_name (FolksIndividual* self);
static void _folks_individual_update_nickname (FolksIndividual* self);
static void _folks_individual_persona_group_changed_cb (FolksIndividual* self,
                                                 const gchar* group,
                                                 gboolean is_member);
static void _folks_individual_update_groups (FolksIndividual* self,
                                      gboolean create_if_not_exist,
                                      gboolean emit_notification,
                                      gboolean force_update);
static void _folks_individual_update_gender (FolksIndividual* self);
static void _folks_individual_update_urls (FolksIndividual* self,
                                    gboolean create_if_not_exist,
                                    gboolean emit_notification,
                                    gboolean force_update);
static void _folks_individual_update_phone_numbers (FolksIndividual* self,
                                             gboolean create_if_not_exist,
                                             gboolean emit_notification,
                                             gboolean force_update);
static void _folks_individual_update_postal_addresses (FolksIndividual* self,
                                                gboolean create_if_not_exist,
                                                gboolean emit_notification,
                                                gboolean force_update);
static void _folks_individual_update_email_addresses (FolksIndividual* self,
                                               gboolean create_if_not_exist,
                                               gboolean emit_notification,
                                               gboolean force_update);
static void _folks_individual_update_roles (FolksIndividual* self,
                                     gboolean create_if_not_exist,
                                     gboolean emit_notification,
                                     gboolean force_update);
static void _folks_individual_update_birthday (FolksIndividual* self);
static void _folks_individual_update_notes (FolksIndividual* self,
                                     gboolean create_if_not_exist,
                                     gboolean emit_notification,
                                     gboolean force_update);
static void _folks_individual_update_local_ids (FolksIndividual* self,
                                         gboolean create_if_not_exist,
                                         gboolean emit_notification,
                                         gboolean force_update);
static void _folks_individual_update_location (FolksIndividual* self);
static void folks_individual_real_change_group_data_free (gpointer _data);
static void folks_individual_real_change_group (FolksGroupDetails* base,
                                         const gchar* group,
                                         gboolean is_member,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
static gboolean folks_individual_real_change_group_co (FolksIndividualChangeGroupData* _data_);
static void _folks_individual_update_presence (FolksIndividual* self);
static void _folks_individual_update_im_addresses (FolksIndividual* self,
                                            gboolean create_if_not_exist,
                                            gboolean emit_notification,
                                            gboolean force_update);
static void _folks_individual_update_web_service_addresses (FolksIndividual* self,
                                                     gboolean create_if_not_exist,
                                                     gboolean emit_notification,
                                                     gboolean force_update);
static void _folks_individual_update_is_favourite (FolksIndividual* self);
static void _folks_individual_persona_notify_cb (FolksIndividual* self,
                                          GObject* obj,
                                          GParamSpec* ps);
static void _folks_individual_set_personas (FolksIndividual* self,
                                     GeeSet* personas,
                                     FolksIndividual* replacement_individual);
static void _folks_individual_emit_personas_changed (FolksIndividual* self,
                                              GeeSet* added,
                                              GeeSet* removed);
static void _folks_individual_store_removed_cb (FolksIndividual* self,
                                         FolksPersonaStore* store);
static void _folks_individual_store_personas_changed_cb (FolksIndividual* self,
                                                  FolksPersonaStore* store,
                                                  GeeSet* added,
                                                  GeeSet* removed,
                                                  const gchar* message,
                                                  FolksPersona* actor,
                                                  FolksGroupDetailsChangeReason reason);
static void _folks_individual_update_fields (FolksIndividual* self);
static void _folks_individual_update_trust_level (FolksIndividual* self);
static void _folks_individual_update_display_name (FolksIndividual* self);
static void _folks_individual_update_single_valued_property (FolksIndividual* self,
                                                      GType interface_type,
                                                      FolksIndividualPropertyFilter filter_func,
                                                      gpointer filter_func_target,
                                                      GCompareFunc compare_func,
                                                      const gchar* prop_name,
                                                      FolksIndividualSingleValuedPropertySetter setter,
                                                      gpointer setter_target);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static gint __lambda6_ (Block7Data* _data7_,
                 FolksPersona* a,
                 FolksPersona* b);
static gint ___lambda6__gcompare_data_func (gconstpointer a,
                                     gconstpointer b,
                                     gpointer self);
static void _folks_individual_update_multi_valued_property (FolksIndividual* self,
                                                     const gchar* prop_name,
                                                     gboolean create_if_not_exist,
                                                     FolksIndividualPropertyIsNull prop_is_null,
                                                     gpointer prop_is_null_target,
                                                     FolksIndividualCollectionCreator create_collection,
                                                     gpointer create_collection_target,
                                                     FolksIndividualMultiValuedPropertySetter setter,
                                                     gpointer setter_target,
                                                     gboolean emit_notification,
                                                     gboolean force_update);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static void __lambda64_ (Block8Data* _data8_,
                  const gchar* l);
static void ___lambda64__gfunc (gconstpointer data,
                         gpointer self);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);
static gboolean __lambda13_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda13__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda14_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda14__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda15_ (FolksIndividual* self,
                  FolksPersona* p);
static gchar** _vala_array_dup1 (gchar** self,
                          gssize length);
static void ___lambda15__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static gboolean __lambda22_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda22__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda23_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda23__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda24_ (FolksIndividual* self,
                  FolksPersona* p);
static void ___lambda24__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static const gchar* _folks_individual_look_up_alias_for_display_name (FolksIndividual* self,
                                                               FolksPersona* p);
static gchar* _folks_individual_look_up_name_details_for_display_name (FolksIndividual* self,
                                                                FolksPersona* p);
static const gchar* _folks_individual_look_up_email_address_for_display_name (FolksIndividual* self,
                                                                       FolksPersona* p);
static const gchar* _folks_individual_look_up_phone_number_for_display_name (FolksIndividual* self,
                                                                      FolksPersona* p);
static const gchar* _folks_individual_look_up_display_id_for_display_name (FolksIndividual* self,
                                                                    FolksPersona* p);
static gchar* _folks_individual_look_up_postal_address_for_display_name (FolksIndividual* self,
                                                                  FolksPersona* p);
static gboolean __lambda7_ (FolksIndividual* self,
                     FolksPersona* p);
static gboolean ___lambda7__folks_individual_property_filter (FolksPersona* persona,
                                                       gpointer self);
static gint __lambda8_ (FolksPersona* a,
                 FolksPersona* b);
static gint ___lambda8__gcompare_func (gconstpointer a,
                                gconstpointer b);
static void __lambda9_ (FolksIndividual* self,
                 FolksPersona* p);
static void ___lambda9__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                 gpointer self);
static gboolean __lambda10_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda10__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda11_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda11__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda12_ (FolksIndividual* self,
                  FolksPersona* p);
static void ___lambda12__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static void folks_individual_set_trust_level (FolksIndividual* self,
                                       FolksTrustLevel value);
static gboolean __lambda16_ (FolksIndividual* self);
static gboolean ___lambda16__folks_individual_property_is_null (gpointer self);
static void __lambda17_ (FolksIndividual* self);
static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v,
                                                                    gpointer self);
static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a,
                                                                         gconstpointer b,
                                                                         gpointer self);
static void ___lambda17__folks_individual_collection_creator (gpointer self);
static gboolean __lambda18_ (FolksIndividual* self);
static gboolean ___lambda18__folks_individual_multi_valued_property_setter (gpointer self);
static gboolean __lambda19_ (FolksIndividual* self);
static gboolean ___lambda19__folks_individual_property_is_null (gpointer self);
static void __lambda20_ (FolksIndividual* self);
static void ___lambda20__folks_individual_collection_creator (gpointer self);
static gboolean __lambda21_ (FolksIndividual* self);
static gboolean ___lambda21__folks_individual_multi_valued_property_setter (gpointer self);
static void _folks_individual_connect_to_persona (FolksIndividual* self,
                                           FolksPersona* persona);
static void _folks_individual_disconnect_from_persona (FolksIndividual* self,
                                                FolksPersona* persona,
                                                FolksIndividual* replacement_individual);
VALA_EXTERN void folks_persona_set_individual (FolksPersona* self,
                                   FolksIndividual* value);
static void __folks_individual_persona_notify_cb_g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self);
static void __folks_individual_persona_group_changed_cb_folks_group_details_group_changed (FolksGroupDetails* _sender,
                                                                                    const gchar* group,
                                                                                    gboolean is_member,
                                                                                    gpointer self);
static gboolean __lambda25_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda25__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda26_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda26__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda27_ (FolksIndividual* self,
                  FolksPersona* p);
static void ___lambda27__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static gboolean __lambda28_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda28__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda29_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda29__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda30_ (FolksIndividual* self,
                  FolksPersona* p);
static void ___lambda30__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static gboolean __lambda31_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda31__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda32_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda32__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda33_ (FolksIndividual* self,
                  FolksPersona* p);
static void ___lambda33__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static gboolean __lambda34_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda34__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda35_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda35__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda36_ (FolksIndividual* self,
                  FolksPersona* p);
static void ___lambda36__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static gboolean __lambda37_ (FolksIndividual* self);
static gboolean ___lambda37__folks_individual_property_is_null (gpointer self);
static void __lambda38_ (FolksIndividual* self);
static void ___lambda38__folks_individual_collection_creator (gpointer self);
static gboolean __lambda39_ (FolksIndividual* self);
static gboolean ___lambda39__folks_individual_multi_valued_property_setter (gpointer self);
static gboolean __lambda40_ (FolksIndividual* self);
static gboolean ___lambda40__folks_individual_property_is_null (gpointer self);
static void __lambda41_ (FolksIndividual* self);
static void ___lambda41__folks_individual_collection_creator (gpointer self);
static gboolean __lambda42_ (FolksIndividual* self);
static gboolean ___lambda42__folks_individual_multi_valued_property_setter (gpointer self);
static gboolean __lambda43_ (FolksIndividual* self);
static gboolean ___lambda43__folks_individual_property_is_null (gpointer self);
static void __lambda44_ (FolksIndividual* self);
static void ___lambda44__folks_individual_collection_creator (gpointer self);
static gboolean __lambda45_ (FolksIndividual* self);
static gboolean ___lambda45__folks_individual_multi_valued_property_setter (gpointer self);
static gboolean __lambda46_ (FolksIndividual* self);
static gboolean ___lambda46__folks_individual_property_is_null (gpointer self);
static void __lambda47_ (FolksIndividual* self);
static void ___lambda47__folks_individual_collection_creator (gpointer self);
static gboolean __lambda48_ (FolksIndividual* self);
static gboolean ___lambda48__folks_individual_multi_valued_property_setter (gpointer self);
static gboolean __lambda58_ (FolksIndividual* self);
static gboolean ___lambda58__folks_individual_property_is_null (gpointer self);
static void __lambda59_ (FolksIndividual* self);
static void ___lambda59__folks_individual_collection_creator (gpointer self);
static gboolean __lambda60_ (FolksIndividual* self);
static gboolean ___lambda60__folks_individual_multi_valued_property_setter (gpointer self);
static gboolean __lambda61_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda61__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda62_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda62__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda63_ (FolksIndividual* self,
                  FolksPersona* p);
static void ___lambda63__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static gboolean __lambda55_ (FolksIndividual* self);
static gboolean ___lambda55__folks_individual_property_is_null (gpointer self);
static void __lambda56_ (FolksIndividual* self);
static void ___lambda56__folks_individual_collection_creator (gpointer self);
static gboolean __lambda57_ (FolksIndividual* self);
static gboolean ___lambda57__folks_individual_multi_valued_property_setter (gpointer self);
static gboolean __lambda49_ (FolksIndividual* self,
                      FolksPersona* p);
static gboolean ___lambda49__folks_individual_property_filter (FolksPersona* persona,
                                                        gpointer self);
static gint __lambda50_ (FolksPersona* a,
                  FolksPersona* b);
static gint ___lambda50__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void __lambda51_ (FolksIndividual* self,
                  FolksPersona* p);
static void ___lambda51__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                                  gpointer self);
static gboolean __lambda52_ (FolksIndividual* self);
static gboolean ___lambda52__folks_individual_property_is_null (gpointer self);
static void __lambda53_ (FolksIndividual* self);
static void ___lambda53__folks_individual_collection_creator (gpointer self);
static gboolean __lambda54_ (FolksIndividual* self);
static gboolean ___lambda54__folks_individual_multi_valued_property_setter (gpointer self);
static void __folks_individual_store_removed_cb_folks_persona_store_removed (FolksPersonaStore* _sender,
                                                                      gpointer self);
static void __folks_individual_store_personas_changed_cb_folks_persona_store_personas_changed (FolksPersonaStore* _sender,
                                                                                        GeeSet* added,
                                                                                        GeeSet* removed,
                                                                                        const gchar* message,
                                                                                        FolksPersona* actor,
                                                                                        FolksGroupDetailsChangeReason reason,
                                                                                        gpointer self);
static void folks_individual_set_is_user (FolksIndividual* self,
                                   gboolean value);
static void folks_individual_set_id (FolksIndividual* self,
                              const gchar* value);
VALA_EXTERN void folks_individual_replace (FolksIndividual* self,
                               FolksIndividual* replacement_individual);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static GObject * folks_individual_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
static void folks_individual_finalize (GObject * obj);
static GType folks_individual_get_type_once (void);
static void _vala_folks_individual_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_folks_individual_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 const FolksIndividual_Notifier FOLKS_INDIVIDUAL__notifiers[25] = {{"alias", __folks_individual_notify_alias_cb_folksindividual_unboundnotifier}, {"avatar", __folks_individual_notify_avatar_cb_folksindividual_unboundnotifier}, {"presence-message", __folks_individual_notify_presence_cb_folksindividual_unboundnotifier}, {"client-types", __folks_individual_notify_presence_cb_folksindividual_unboundnotifier}, {"presence-type", __folks_individual_notify_presence_cb_folksindividual_unboundnotifier}, {"im-addresses", __folks_individual_notify_im_addresses_cb_folksindividual_unboundnotifier}, {"web-service-addresses", __folks_individual_notify_web_service_addresses_cb_folksindividual_unboundnotifier}, {"is-favourite", __folks_individual_notify_is_favourite_cb_folksindividual_unboundnotifier}, {"structured-name", __folks_individual_notify_structured_name_cb_folksindividual_unboundnotifier}, {"full-name", __folks_individual_notify_full_name_cb_folksindividual_unboundnotifier}, {"nickname", __folks_individual_notify_nickname_cb_folksindividual_unboundnotifier}, {"gender", __folks_individual_notify_gender_cb_folksindividual_unboundnotifier}, {"urls", __folks_individual_notify_urls_cb_folksindividual_unboundnotifier}, {"phone-numbers", __folks_individual_notify_phone_numbers_cb_folksindividual_unboundnotifier}, {"email-addresses", __folks_individual_notify_email_addresses_cb_folksindividual_unboundnotifier}, {"roles", __folks_individual_notify_roles_cb_folksindividual_unboundnotifier}, {"birthday", __folks_individual_notify_birthday_cb_folksindividual_unboundnotifier}, {"notes", __folks_individual_notify_notes_cb_folksindividual_unboundnotifier}, {"postal-addresses", __folks_individual_notify_postal_addresses_cb_folksindividual_unboundnotifier}, {"local-ids", __folks_individual_notify_local_ids_cb_folksindividual_unboundnotifier}, {"location", __folks_individual_notify_location_cb_folksindividual_unboundnotifier}, {"im-interaction-count", __folks_individual_notify_im_interaction_count_cb_folksindividual_unboundnotifier}, {"call-interaction-count", __folks_individual_notify_call_interaction_count_cb_folksindividual_unboundnotifier}, {"last-im-interaction-datetime", __folks_individual_notify_last_im_interaction_datetime_cb_folksindividual_unboundnotifier}, {"last-call-interaction-datetime", __folks_individual_notify_last_call_interaction_datetime_cb_folksindividual_unboundnotifier}};

/**
 * Trust level for an {@link Individual} for use in the UI.
 *
 * @since 0.1.15
 */
static GType
folks_trust_level_get_type_once (void)
{
	static const GEnumValue values[] = {{FOLKS_TRUST_LEVEL_NONE, "FOLKS_TRUST_LEVEL_NONE", "none"}, {FOLKS_TRUST_LEVEL_PERSONAS, "FOLKS_TRUST_LEVEL_PERSONAS", "personas"}, {0, NULL, NULL}};
	GType folks_trust_level_type_id;
	folks_trust_level_type_id = g_enum_register_static ("FolksTrustLevel", values);
	return folks_trust_level_type_id;
}

GType
folks_trust_level_get_type (void)
{
	static volatile gsize folks_trust_level_type_id__once = 0;
	if (g_once_init_enter (&folks_trust_level_type_id__once)) {
		GType folks_trust_level_type_id;
		folks_trust_level_type_id = folks_trust_level_get_type_once ();
		g_once_init_leave (&folks_trust_level_type_id__once, folks_trust_level_type_id);
	}
	return folks_trust_level_type_id__once;
}

static inline gpointer
folks_individual_get_instance_private (FolksIndividual* self)
{
	return G_STRUCT_MEMBER_P (self, FolksIndividual_private_offset);
}

static void
__folks_individual_notify_alias_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                    FolksPersona* persona,
                                                                    GParamSpec* ps)
{
	_folks_individual_notify_alias_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_avatar_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                     FolksPersona* persona,
                                                                     GParamSpec* ps)
{
	_folks_individual_notify_avatar_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_presence_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                       FolksPersona* persona,
                                                                       GParamSpec* ps)
{
	_folks_individual_notify_presence_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_im_addresses_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                           FolksPersona* persona,
                                                                           GParamSpec* ps)
{
	_folks_individual_notify_im_addresses_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_web_service_addresses_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                    FolksPersona* persona,
                                                                                    GParamSpec* ps)
{
	_folks_individual_notify_web_service_addresses_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_is_favourite_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                           FolksPersona* persona,
                                                                           GParamSpec* ps)
{
	_folks_individual_notify_is_favourite_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_structured_name_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                              FolksPersona* persona,
                                                                              GParamSpec* ps)
{
	_folks_individual_notify_structured_name_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_full_name_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                        FolksPersona* persona,
                                                                        GParamSpec* ps)
{
	_folks_individual_notify_full_name_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_nickname_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                       FolksPersona* persona,
                                                                       GParamSpec* ps)
{
	_folks_individual_notify_nickname_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_gender_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                     FolksPersona* persona,
                                                                     GParamSpec* ps)
{
	_folks_individual_notify_gender_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_urls_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                   FolksPersona* persona,
                                                                   GParamSpec* ps)
{
	_folks_individual_notify_urls_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_phone_numbers_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                            FolksPersona* persona,
                                                                            GParamSpec* ps)
{
	_folks_individual_notify_phone_numbers_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_email_addresses_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                              FolksPersona* persona,
                                                                              GParamSpec* ps)
{
	_folks_individual_notify_email_addresses_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_roles_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                    FolksPersona* persona,
                                                                    GParamSpec* ps)
{
	_folks_individual_notify_roles_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_birthday_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                       FolksPersona* persona,
                                                                       GParamSpec* ps)
{
	_folks_individual_notify_birthday_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_notes_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                    FolksPersona* persona,
                                                                    GParamSpec* ps)
{
	_folks_individual_notify_notes_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_postal_addresses_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                               FolksPersona* persona,
                                                                               GParamSpec* ps)
{
	_folks_individual_notify_postal_addresses_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_local_ids_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                        FolksPersona* persona,
                                                                        GParamSpec* ps)
{
	_folks_individual_notify_local_ids_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_location_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                       FolksPersona* persona,
                                                                       GParamSpec* ps)
{
	_folks_individual_notify_location_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_im_interaction_count_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                   FolksPersona* persona,
                                                                                   GParamSpec* ps)
{
	_folks_individual_notify_im_interaction_count_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_call_interaction_count_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                     FolksPersona* persona,
                                                                                     GParamSpec* ps)
{
	_folks_individual_notify_call_interaction_count_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_last_im_interaction_datetime_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                           FolksPersona* persona,
                                                                                           GParamSpec* ps)
{
	_folks_individual_notify_last_im_interaction_datetime_cb (_self_, persona, ps);
}

static void
__folks_individual_notify_last_call_interaction_datetime_cb_folksindividual_unboundnotifier (FolksIndividual* _self_,
                                                                                             FolksPersona* persona,
                                                                                             GParamSpec* ps)
{
	_folks_individual_notify_last_call_interaction_datetime_cb (_self_, persona, ps);
}

static void
folks_individual_real_change_avatar_data_free (gpointer _data)
{
	FolksIndividualChangeAvatarData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->avatar);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeAvatarData, _data_);
}

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

static void
folks_individual_real_change_avatar (FolksAvatarDetails* base,
                                     GLoadableIcon* avatar,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	FolksIndividual * self;
	FolksIndividualChangeAvatarData* _data_;
	FolksIndividual* _tmp0_;
	GLoadableIcon* _tmp1_;
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeAvatarData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, folks_individual_real_change_avatar_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (avatar);
	_g_object_unref0 (_data_->avatar);
	_data_->avatar = _tmp1_;
	folks_individual_real_change_avatar_co (_data_);
}

static void
folks_individual_change_avatar_finish (FolksAvatarDetails* base,
                                       GAsyncResult* _res_,
                                       GError** error)
{
	FolksIndividualChangeAvatarData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
_vala_string_array_contains (gchar* * stack,
                             gssize stack_length,
                             const gchar* needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}

static void
folks_individual_change_avatar_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	FolksIndividualChangeAvatarData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_individual_real_change_avatar_co (_data_);
}

static gpointer
_g_error_copy0 (gpointer self)
{
	return self ? g_error_copy (self) : NULL;
}

static gboolean
folks_individual_real_change_avatar_co (FolksIndividualChangeAvatarData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp2_ = _data_->self->priv->_avatar;
	if (_data_->_tmp2_ != NULL) {
		_data_->_tmp3_ = _data_->self->priv->_avatar;
		_data_->_tmp1_ = g_icon_equal ((GIcon*) G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp3_, g_loadable_icon_get_type (), GLoadableIcon), (GIcon*) _data_->avatar);
	} else {
		_data_->_tmp1_ = FALSE;
	}
	if (_data_->_tmp1_) {
		_data_->_tmp0_ = TRUE;
	} else {
		_data_->_tmp5_ = _data_->self->priv->_avatar;
		if (_data_->_tmp5_ == NULL) {
			_data_->_tmp4_ = _data_->avatar == NULL;
		} else {
			_data_->_tmp4_ = FALSE;
		}
		_data_->_tmp0_ = _data_->_tmp4_;
	}
	if (_data_->_tmp0_) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = _data_->self->priv->_id;
	g_debug ("individual.vala:174: Setting avatar of individual '%s' to '%p'…", _data_->_tmp6_, _data_->avatar);
	_data_->persona_error = NULL;
	_data_->prop_changed = FALSE;
	{
		_data_->_tmp7_ = _data_->self->priv->_persona_set;
		_data_->_p_list = _data_->_tmp7_;
		_data_->_tmp8_ = _data_->_p_list;
		_data_->_tmp9_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp8_);
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_p_size = _data_->_tmp10_;
		_data_->_p_index = -1;
		while (TRUE) {
			_data_->_p_index = _data_->_p_index + 1;
			_data_->_tmp11_ = _data_->_p_index;
			_data_->_tmp12_ = _data_->_p_size;
			if (!(_data_->_tmp11_ < _data_->_tmp12_)) {
				break;
			}
			_data_->_tmp13_ = _data_->_p_list;
			_data_->_tmp14_ = folks_small_set_get (_data_->_tmp13_, _data_->_p_index);
			_data_->_tmp15_ = _g_object_ref0 ((FolksPersona*) _data_->_tmp14_);
			_data_->p = _data_->_tmp15_;
			_data_->_tmp16_ = _data_->p;
			_data_->_a = FOLKS_IS_AVATAR_DETAILS (_data_->_tmp16_) ? ((FolksAvatarDetails*) _data_->_tmp16_) : NULL;
			_data_->_tmp17_ = _data_->_a;
			if (_data_->_tmp17_ == NULL) {
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp18_ = _data_->_a;
			_data_->a = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp18_, FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetails);
			_data_->_tmp19_ = _data_->p;
			_data_->_tmp21_ = 0;
			_data_->_tmp20_ = folks_persona_get_writeable_properties (_data_->_tmp19_, &_data_->_tmp21_);
			_data_->_tmp20__length1 = _data_->_tmp21_;
			_data_->_tmp22_ = _data_->_tmp20_;
			_data_->_tmp22__length1 = _data_->_tmp20__length1;
			if (_vala_string_array_contains (_data_->_tmp22_, _data_->_tmp22__length1, "avatar")) {
				{
					_data_->_tmp23_ = _data_->a;
					_data_->_state_ = 1;
					folks_avatar_details_change_avatar (_data_->_tmp23_, _data_->avatar, folks_individual_change_avatar_ready, _data_);
					return FALSE;
					_state_1:
					folks_avatar_details_change_avatar_finish (_data_->_tmp23_, _data_->_res_, &_data_->_inner_error0_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch0_folks_property_error;
						}
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp24_ = _data_->p;
					_data_->_tmp25_ = folks_persona_get_uid (_data_->_tmp24_);
					_data_->_tmp26_ = _data_->_tmp25_;
					g_debug ("individual.vala:195:     written to writeable persona '%s'", _data_->_tmp26_);
					_data_->prop_changed = TRUE;
				}
				goto __finally0;
				__catch0_folks_property_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp27_ = _data_->persona_error;
					if (_data_->_tmp27_ == NULL) {
						_data_->_tmp28_ = _data_->e;
						_data_->_tmp29_ = _g_error_copy0 (_data_->_tmp28_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp29_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
						g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_object_unref (_data_->_async_result);
						return FALSE;
					} else {
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
			}
			_g_object_unref0 (_data_->p);
		}
	}
	if (_data_->prop_changed == FALSE) {
		_data_->_tmp30_ = _data_->persona_error;
		if (_data_->_tmp30_ == NULL) {
			_data_->_tmp31_ = g_error_new (FOLKS_PROPERTY_ERROR, FOLKS_PROPERTY_ERROR_NOT_WRITEABLE, _ ("Failed to change property ‘%s’: No suitable personas were found."), "avatar");
			_g_error_free0 (_data_->persona_error);
			_data_->persona_error = _data_->_tmp31_;
		}
		_data_->_tmp32_ = _data_->persona_error;
		_data_->_tmp33_ = _g_error_copy0 (_data_->_tmp32_);
		_data_->_inner_error0_ = _data_->_tmp33_;
		if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_error_free0 (_data_->persona_error);
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_error_free0 (_data_->persona_error);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
folks_individual_real_change_alias_data_free (gpointer _data)
{
	FolksIndividualChangeAliasData* _data_;
	_data_ = _data;
	_g_free0 (_data_->alias);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeAliasData, _data_);
}

static void
folks_individual_real_change_alias (FolksAliasDetails* base,
                                    const gchar* alias,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	FolksIndividual * self;
	FolksIndividualChangeAliasData* _data_;
	FolksIndividual* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (alias != NULL);
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeAliasData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, folks_individual_real_change_alias_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (alias);
	_g_free0 (_data_->alias);
	_data_->alias = _tmp1_;
	folks_individual_real_change_alias_co (_data_);
}

static void
folks_individual_change_alias_finish (FolksAliasDetails* base,
                                      GAsyncResult* _res_,
                                      GError** error)
{
	FolksIndividualChangeAliasData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

/**
   * {@inheritDoc}
   *
   * @since 0.6.2
   */
static void
folks_individual_change_alias_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_)
{
	FolksIndividualChangeAliasData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_individual_real_change_alias_co (_data_);
}

static gboolean
folks_individual_real_change_alias_co (FolksIndividualChangeAliasData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_alias;
	if (g_strcmp0 (_data_->_tmp0_, _data_->alias) == 0) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = _data_->self->priv->_id;
	g_debug ("individual.vala:361: Setting alias of individual '%s' to '%s'…", _data_->_tmp1_, _data_->alias);
	_data_->persona_error = NULL;
	_data_->prop_changed = FALSE;
	{
		_data_->_tmp2_ = _data_->self->priv->_persona_set;
		_data_->_p_list = _data_->_tmp2_;
		_data_->_tmp3_ = _data_->_p_list;
		_data_->_tmp4_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp3_);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_p_size = _data_->_tmp5_;
		_data_->_p_index = -1;
		while (TRUE) {
			_data_->_p_index = _data_->_p_index + 1;
			_data_->_tmp6_ = _data_->_p_index;
			_data_->_tmp7_ = _data_->_p_size;
			if (!(_data_->_tmp6_ < _data_->_tmp7_)) {
				break;
			}
			_data_->_tmp8_ = _data_->_p_list;
			_data_->_tmp9_ = folks_small_set_get (_data_->_tmp8_, _data_->_p_index);
			_data_->_tmp10_ = _g_object_ref0 ((FolksPersona*) _data_->_tmp9_);
			_data_->p = _data_->_tmp10_;
			_data_->_tmp11_ = _data_->p;
			_data_->_a = FOLKS_IS_ALIAS_DETAILS (_data_->_tmp11_) ? ((FolksAliasDetails*) _data_->_tmp11_) : NULL;
			_data_->_tmp12_ = _data_->_a;
			if (_data_->_tmp12_ == NULL) {
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp13_ = _data_->_a;
			_data_->a = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp13_, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails);
			_data_->_tmp14_ = _data_->p;
			_data_->_tmp16_ = 0;
			_data_->_tmp15_ = folks_persona_get_writeable_properties (_data_->_tmp14_, &_data_->_tmp16_);
			_data_->_tmp15__length1 = _data_->_tmp16_;
			_data_->_tmp17_ = _data_->_tmp15_;
			_data_->_tmp17__length1 = _data_->_tmp15__length1;
			if (_vala_string_array_contains (_data_->_tmp17_, _data_->_tmp17__length1, "alias")) {
				{
					_data_->_tmp18_ = _data_->a;
					_data_->_state_ = 1;
					folks_alias_details_change_alias (_data_->_tmp18_, _data_->alias, folks_individual_change_alias_ready, _data_);
					return FALSE;
					_state_1:
					folks_alias_details_change_alias_finish (_data_->_tmp18_, _data_->_res_, &_data_->_inner_error0_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch0_folks_property_error;
						}
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp19_ = _data_->p;
					_data_->_tmp20_ = folks_persona_get_uid (_data_->_tmp19_);
					_data_->_tmp21_ = _data_->_tmp20_;
					g_debug ("individual.vala:382:     written to writeable persona '%s'", _data_->_tmp21_);
					_data_->prop_changed = TRUE;
				}
				goto __finally0;
				__catch0_folks_property_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp22_ = _data_->persona_error;
					if (_data_->_tmp22_ == NULL) {
						_data_->_tmp23_ = _data_->e;
						_data_->_tmp24_ = _g_error_copy0 (_data_->_tmp23_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp24_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
						g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_object_unref (_data_->_async_result);
						return FALSE;
					} else {
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
			}
			_g_object_unref0 (_data_->p);
		}
	}
	if (_data_->prop_changed == FALSE) {
		_data_->_tmp25_ = _data_->persona_error;
		if (_data_->_tmp25_ == NULL) {
			_data_->_tmp26_ = g_error_new (FOLKS_PROPERTY_ERROR, FOLKS_PROPERTY_ERROR_NOT_WRITEABLE, _ ("Failed to change property ‘%s’: No suitable personas were found."), "alias");
			_g_error_free0 (_data_->persona_error);
			_data_->persona_error = _data_->_tmp26_;
		}
		_data_->_tmp27_ = _data_->persona_error;
		_data_->_tmp28_ = _g_error_copy0 (_data_->_tmp27_);
		_data_->_inner_error0_ = _data_->_tmp28_;
		if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_error_free0 (_data_->persona_error);
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_error_free0 (_data_->persona_error);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
folks_individual_real_change_nickname_data_free (gpointer _data)
{
	FolksIndividualChangeNicknameData* _data_;
	_data_ = _data;
	_g_free0 (_data_->nickname);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeNicknameData, _data_);
}

static void
folks_individual_real_change_nickname (FolksNameDetails* base,
                                       const gchar* nickname,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	FolksIndividual * self;
	FolksIndividualChangeNicknameData* _data_;
	FolksIndividual* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (nickname != NULL);
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeNicknameData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, folks_individual_real_change_nickname_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (nickname);
	_g_free0 (_data_->nickname);
	_data_->nickname = _tmp1_;
	folks_individual_real_change_nickname_co (_data_);
}

static void
folks_individual_change_nickname_finish (FolksNameDetails* base,
                                         GAsyncResult* _res_,
                                         GError** error)
{
	FolksIndividualChangeNicknameData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

/**
   * {@inheritDoc}
   *
   * @since 0.6.2
   */
static void
folks_individual_change_nickname_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	FolksIndividualChangeNicknameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_individual_real_change_nickname_co (_data_);
}

static gboolean
folks_individual_real_change_nickname_co (FolksIndividualChangeNicknameData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->nickname == NULL) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("");
		_g_free0 (_data_->nickname);
		_data_->nickname = _tmp0_;
	}
	_data_->_tmp1_ = _data_->self->priv->_nickname;
	if (g_strcmp0 (_data_->_tmp1_, _data_->nickname) == 0) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp2_ = _data_->self->priv->_id;
	g_debug ("individual.vala:470: Setting nickname of individual '%s' to '%s'…", _data_->_tmp2_, _data_->nickname);
	_data_->persona_error = NULL;
	_data_->prop_changed = FALSE;
	{
		_data_->_tmp3_ = _data_->self->priv->_persona_set;
		_data_->_p_list = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->_p_list;
		_data_->_tmp5_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp4_);
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_p_size = _data_->_tmp6_;
		_data_->_p_index = -1;
		while (TRUE) {
			_data_->_p_index = _data_->_p_index + 1;
			_data_->_tmp7_ = _data_->_p_index;
			_data_->_tmp8_ = _data_->_p_size;
			if (!(_data_->_tmp7_ < _data_->_tmp8_)) {
				break;
			}
			_data_->_tmp9_ = _data_->_p_list;
			_data_->_tmp10_ = folks_small_set_get (_data_->_tmp9_, _data_->_p_index);
			_data_->_tmp11_ = _g_object_ref0 ((FolksPersona*) _data_->_tmp10_);
			_data_->p = _data_->_tmp11_;
			_data_->_tmp12_ = _data_->p;
			_data_->_n = FOLKS_IS_NAME_DETAILS (_data_->_tmp12_) ? ((FolksNameDetails*) _data_->_tmp12_) : NULL;
			_data_->_tmp13_ = _data_->_n;
			if (_data_->_tmp13_ == NULL) {
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp14_ = _data_->_n;
			_data_->n = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp14_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails);
			_data_->_tmp15_ = _data_->p;
			_data_->_tmp17_ = 0;
			_data_->_tmp16_ = folks_persona_get_writeable_properties (_data_->_tmp15_, &_data_->_tmp17_);
			_data_->_tmp16__length1 = _data_->_tmp17_;
			_data_->_tmp18_ = _data_->_tmp16_;
			_data_->_tmp18__length1 = _data_->_tmp16__length1;
			if (_vala_string_array_contains (_data_->_tmp18_, _data_->_tmp18__length1, "nickname")) {
				{
					_data_->_tmp19_ = _data_->n;
					_data_->_state_ = 1;
					folks_name_details_change_nickname (_data_->_tmp19_, _data_->nickname, folks_individual_change_nickname_ready, _data_);
					return FALSE;
					_state_1:
					folks_name_details_change_nickname_finish (_data_->_tmp19_, _data_->_res_, &_data_->_inner_error0_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch0_folks_property_error;
						}
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp20_ = _data_->p;
					_data_->_tmp21_ = folks_persona_get_uid (_data_->_tmp20_);
					_data_->_tmp22_ = _data_->_tmp21_;
					g_debug ("individual.vala:491:     written to writeable persona '%s'", _data_->_tmp22_);
					_data_->prop_changed = TRUE;
				}
				goto __finally0;
				__catch0_folks_property_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp23_ = _data_->persona_error;
					if (_data_->_tmp23_ == NULL) {
						_data_->_tmp24_ = _data_->e;
						_data_->_tmp25_ = _g_error_copy0 (_data_->_tmp24_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp25_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
						g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_object_unref (_data_->_async_result);
						return FALSE;
					} else {
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
			}
			_g_object_unref0 (_data_->p);
		}
	}
	if (_data_->prop_changed == FALSE) {
		_data_->_tmp26_ = _data_->persona_error;
		if (_data_->_tmp26_ == NULL) {
			_data_->_tmp27_ = g_error_new (FOLKS_PROPERTY_ERROR, FOLKS_PROPERTY_ERROR_NOT_WRITEABLE, _ ("Failed to change property ‘%s’: No suitable personas were found."), "nickname");
			_g_error_free0 (_data_->persona_error);
			_data_->persona_error = _data_->_tmp27_;
		}
		_data_->_tmp28_ = _data_->persona_error;
		_data_->_tmp29_ = _g_error_copy0 (_data_->_tmp28_);
		_data_->_inner_error0_ = _data_->_tmp29_;
		if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_error_free0 (_data_->persona_error);
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_error_free0 (_data_->persona_error);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
folks_individual_real_change_is_favourite (FolksFavouriteDetails* base,
                                           gboolean is_favourite,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	FolksIndividual * self;
	FolksIndividualChangeIsFavouriteData* _data_;
	FolksIndividual* _tmp0_;
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeIsFavouriteData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, folks_individual_real_change_is_favourite_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->is_favourite = is_favourite;
	folks_individual_real_change_is_favourite_co (_data_);
}

static void
folks_individual_change_is_favourite_finish (FolksFavouriteDetails* base,
                                             GAsyncResult* _res_,
                                             GError** error)
{
	FolksIndividualChangeIsFavouriteData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

/**
   * {@inheritDoc}
   *
   * @since 0.6.2
   */
static void
folks_individual_change_is_favourite_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_)
{
	FolksIndividualChangeIsFavouriteData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_individual_real_change_is_favourite_co (_data_);
}

static gboolean
folks_individual_real_change_is_favourite_co (FolksIndividualChangeIsFavouriteData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->self->priv->_is_favourite == _data_->is_favourite) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	if (_data_->is_favourite) {
		_data_->_tmp0_ = "TRUE";
	} else {
		_data_->_tmp0_ = "FALSE";
	}
	_data_->_tmp1_ = _data_->self->priv->_id;
	g_debug ("individual.vala:716: Setting '%s' favourite status to %s…", _data_->_tmp1_, _data_->_tmp0_);
	_data_->persona_error = NULL;
	_data_->prop_changed = FALSE;
	{
		_data_->_tmp2_ = _data_->self->priv->_persona_set;
		_data_->_p_list = _data_->_tmp2_;
		_data_->_tmp3_ = _data_->_p_list;
		_data_->_tmp4_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp3_);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_p_size = _data_->_tmp5_;
		_data_->_p_index = -1;
		while (TRUE) {
			_data_->_p_index = _data_->_p_index + 1;
			_data_->_tmp6_ = _data_->_p_index;
			_data_->_tmp7_ = _data_->_p_size;
			if (!(_data_->_tmp6_ < _data_->_tmp7_)) {
				break;
			}
			_data_->_tmp8_ = _data_->_p_list;
			_data_->_tmp9_ = folks_small_set_get (_data_->_tmp8_, _data_->_p_index);
			_data_->_tmp10_ = _g_object_ref0 ((FolksPersona*) _data_->_tmp9_);
			_data_->p = _data_->_tmp10_;
			_data_->_tmp11_ = _data_->p;
			_data_->_a = FOLKS_IS_FAVOURITE_DETAILS (_data_->_tmp11_) ? ((FolksFavouriteDetails*) _data_->_tmp11_) : NULL;
			_data_->_tmp12_ = _data_->_a;
			if (_data_->_tmp12_ == NULL) {
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp13_ = _data_->_a;
			_data_->a = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp13_, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails);
			_data_->_tmp14_ = _data_->p;
			_data_->_tmp16_ = 0;
			_data_->_tmp15_ = folks_persona_get_writeable_properties (_data_->_tmp14_, &_data_->_tmp16_);
			_data_->_tmp15__length1 = _data_->_tmp16_;
			_data_->_tmp17_ = _data_->_tmp15_;
			_data_->_tmp17__length1 = _data_->_tmp15__length1;
			if (_vala_string_array_contains (_data_->_tmp17_, _data_->_tmp17__length1, "is-favourite")) {
				{
					_data_->_tmp18_ = _data_->a;
					_data_->_state_ = 1;
					folks_favourite_details_change_is_favourite (_data_->_tmp18_, _data_->is_favourite, folks_individual_change_is_favourite_ready, _data_);
					return FALSE;
					_state_1:
					folks_favourite_details_change_is_favourite_finish (_data_->_tmp18_, _data_->_res_, &_data_->_inner_error0_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch0_folks_property_error;
						}
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp19_ = _data_->p;
					_data_->_tmp20_ = folks_persona_get_uid (_data_->_tmp19_);
					_data_->_tmp21_ = _data_->_tmp20_;
					g_debug ("individual.vala:742:     written to persona '%s'", _data_->_tmp21_);
					_data_->prop_changed = TRUE;
				}
				goto __finally0;
				__catch0_folks_property_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp22_ = _data_->persona_error;
					if (_data_->_tmp22_ == NULL) {
						_data_->_tmp23_ = _data_->e;
						_data_->_tmp24_ = _g_error_copy0 (_data_->_tmp23_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp24_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
						g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_object_unref (_data_->_async_result);
						return FALSE;
					} else {
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
			}
			_g_object_unref0 (_data_->p);
		}
	}
	if (_data_->prop_changed == FALSE) {
		_data_->_tmp25_ = _data_->persona_error;
		if (_data_->_tmp25_ == NULL) {
			_data_->_tmp26_ = g_error_new (FOLKS_PROPERTY_ERROR, FOLKS_PROPERTY_ERROR_NOT_WRITEABLE, _ ("Failed to change property ‘%s’: No suitable personas were found."), "is-favourite");
			_g_error_free0 (_data_->persona_error);
			_data_->persona_error = _data_->_tmp26_;
		}
		_data_->_tmp27_ = _data_->persona_error;
		_data_->_tmp28_ = _g_error_copy0 (_data_->_tmp27_);
		_data_->_inner_error0_ = _data_->_tmp28_;
		if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_error_free0 (_data_->persona_error);
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_error_free0 (_data_->persona_error);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
folks_individual_real_change_groups_data_free (gpointer _data)
{
	FolksIndividualChangeGroupsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->groups);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeGroupsData, _data_);
}

static void
folks_individual_real_change_groups (FolksGroupDetails* base,
                                     GeeSet* groups,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	FolksIndividual * self;
	FolksIndividualChangeGroupsData* _data_;
	FolksIndividual* _tmp0_;
	GeeSet* _tmp1_;
	g_return_if_fail (groups != NULL);
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeGroupsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, folks_individual_real_change_groups_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (groups);
	_g_object_unref0 (_data_->groups);
	_data_->groups = _tmp1_;
	folks_individual_real_change_groups_co (_data_);
}

static void
folks_individual_change_groups_finish (FolksGroupDetails* base,
                                       GAsyncResult* _res_,
                                       GError** error)
{
	FolksIndividualChangeGroupsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

/**
   * {@inheritDoc}
   *
   * @since 0.6.2
   */
static void
folks_individual_change_groups_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	FolksIndividualChangeGroupsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_individual_real_change_groups_co (_data_);
}

static gboolean
folks_individual_real_change_groups_co (FolksIndividualChangeGroupsData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_id;
	g_debug ("individual.vala:799: Setting '%s' groups…", _data_->_tmp0_);
	_data_->persona_error = NULL;
	_data_->prop_changed = FALSE;
	{
		_data_->_tmp1_ = _data_->self->priv->_persona_set;
		_data_->_p_list = _data_->_tmp1_;
		_data_->_tmp2_ = _data_->_p_list;
		_data_->_tmp3_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp2_);
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_p_size = _data_->_tmp4_;
		_data_->_p_index = -1;
		while (TRUE) {
			_data_->_p_index = _data_->_p_index + 1;
			_data_->_tmp5_ = _data_->_p_index;
			_data_->_tmp6_ = _data_->_p_size;
			if (!(_data_->_tmp5_ < _data_->_tmp6_)) {
				break;
			}
			_data_->_tmp7_ = _data_->_p_list;
			_data_->_tmp8_ = folks_small_set_get (_data_->_tmp7_, _data_->_p_index);
			_data_->_tmp9_ = _g_object_ref0 ((FolksPersona*) _data_->_tmp8_);
			_data_->p = _data_->_tmp9_;
			_data_->_tmp10_ = _data_->p;
			_data_->_g = FOLKS_IS_GROUP_DETAILS (_data_->_tmp10_) ? ((FolksGroupDetails*) _data_->_tmp10_) : NULL;
			_data_->_tmp11_ = _data_->_g;
			if (_data_->_tmp11_ == NULL) {
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp12_ = _data_->_g;
			_data_->g = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp12_, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails);
			_data_->_tmp13_ = _data_->p;
			_data_->_tmp15_ = 0;
			_data_->_tmp14_ = folks_persona_get_writeable_properties (_data_->_tmp13_, &_data_->_tmp15_);
			_data_->_tmp14__length1 = _data_->_tmp15_;
			_data_->_tmp16_ = _data_->_tmp14_;
			_data_->_tmp16__length1 = _data_->_tmp14__length1;
			if (_vala_string_array_contains (_data_->_tmp16_, _data_->_tmp16__length1, "groups")) {
				{
					_data_->_tmp17_ = _data_->g;
					_data_->_state_ = 1;
					folks_group_details_change_groups (_data_->_tmp17_, _data_->groups, folks_individual_change_groups_ready, _data_);
					return FALSE;
					_state_1:
					folks_group_details_change_groups_finish (_data_->_tmp17_, _data_->_res_, &_data_->_inner_error0_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch0_folks_property_error;
						}
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp18_ = _data_->p;
					_data_->_tmp19_ = folks_persona_get_uid (_data_->_tmp18_);
					_data_->_tmp20_ = _data_->_tmp19_;
					g_debug ("individual.vala:820:     written to persona '%s'", _data_->_tmp20_);
					_data_->prop_changed = TRUE;
				}
				goto __finally0;
				__catch0_folks_property_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp21_ = _data_->persona_error;
					if (_data_->_tmp21_ == NULL) {
						_data_->_tmp22_ = _data_->e;
						_data_->_tmp23_ = _g_error_copy0 (_data_->_tmp22_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp23_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
						g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_object_unref (_data_->_async_result);
						return FALSE;
					} else {
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
			}
			_g_object_unref0 (_data_->p);
		}
	}
	if (_data_->prop_changed == FALSE) {
		_data_->_tmp24_ = _data_->persona_error;
		if (_data_->_tmp24_ == NULL) {
			_data_->_tmp25_ = g_error_new (FOLKS_PROPERTY_ERROR, FOLKS_PROPERTY_ERROR_NOT_WRITEABLE, _ ("Failed to change property ‘%s’: No suitable personas were found."), "groups");
			_g_error_free0 (_data_->persona_error);
			_data_->persona_error = _data_->_tmp25_;
		}
		_data_->_tmp26_ = _data_->persona_error;
		_data_->_tmp27_ = _g_error_copy0 (_data_->_tmp26_);
		_data_->_inner_error0_ = _data_->_tmp27_;
		if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_error_free0 (_data_->persona_error);
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_error_free0 (_data_->persona_error);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

/**
   * {@inheritDoc}
   *
   * @since 0.11.0
   */
static FolksExtendedFieldDetails*
folks_individual_real_get_extended_field (FolksExtendedInfo* base,
                                          const gchar* name)
{
	FolksIndividual * self;
	const gchar* _tmp0_;
	FolksExtendedFieldDetails* result;
	self = (FolksIndividual*) base;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = self->priv->_id;
	g_debug ("individual.vala:995: Getting extended field '%s' on '%s'…", name, _tmp0_);
	{
		FolksSmallSet* _p_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _p_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _p_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_p_list = _tmp1_;
		_tmp2_ = _p_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_p_size = _tmp4_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* p = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksPersona* _tmp10_;
			gchar** _tmp11_;
			gint _tmp11__length1;
			gint _tmp12_ = 0;
			gchar** _tmp13_;
			gint _tmp13__length1;
			_p_index = _p_index + 1;
			_tmp5_ = _p_index;
			_tmp6_ = _p_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _p_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _p_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			p = _tmp9_;
			_tmp10_ = p;
			_tmp11_ = folks_persona_get_writeable_properties (_tmp10_, &_tmp12_);
			_tmp11__length1 = _tmp12_;
			_tmp13_ = _tmp11_;
			_tmp13__length1 = _tmp11__length1;
			if (_vala_string_array_contains (_tmp13_, _tmp13__length1, "extended-info")) {
				FolksExtendedInfo* e = NULL;
				FolksPersona* _tmp14_;
				FolksExtendedFieldDetails* details = NULL;
				FolksExtendedInfo* _tmp15_;
				FolksExtendedFieldDetails* _tmp16_;
				FolksExtendedFieldDetails* _tmp17_;
				_tmp14_ = p;
				e = FOLKS_IS_EXTENDED_INFO (_tmp14_) ? ((FolksExtendedInfo*) _tmp14_) : NULL;
				_tmp15_ = e;
				_tmp16_ = folks_extended_info_get_extended_field (_tmp15_, name);
				details = _tmp16_;
				_tmp17_ = details;
				if (_tmp17_ != NULL) {
					result = details;
					_g_object_unref0 (p);
					return result;
				}
				_g_object_unref0 (details);
			}
			_g_object_unref0 (p);
		}
	}
	result = NULL;
	return result;
}

static void
folks_individual_real_change_extended_field_data_free (gpointer _data)
{
	FolksIndividualChangeExtendedFieldData* _data_;
	_data_ = _data;
	_g_free0 (_data_->name);
	_g_object_unref0 (_data_->value);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeExtendedFieldData, _data_);
}

static void
folks_individual_real_change_extended_field (FolksExtendedInfo* base,
                                             const gchar* name,
                                             FolksExtendedFieldDetails* value,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	FolksIndividual * self;
	FolksIndividualChangeExtendedFieldData* _data_;
	FolksIndividual* _tmp0_;
	gchar* _tmp1_;
	FolksExtendedFieldDetails* _tmp2_;
	g_return_if_fail (name != NULL);
	g_return_if_fail (value != NULL);
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeExtendedFieldData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, folks_individual_real_change_extended_field_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (name);
	_g_free0 (_data_->name);
	_data_->name = _tmp1_;
	_tmp2_ = _g_object_ref0 (value);
	_g_object_unref0 (_data_->value);
	_data_->value = _tmp2_;
	folks_individual_real_change_extended_field_co (_data_);
}

static void
folks_individual_change_extended_field_finish (FolksExtendedInfo* base,
                                               GAsyncResult* _res_,
                                               GError** error)
{
	FolksIndividualChangeExtendedFieldData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

/**
   * {@inheritDoc}
   *
   * @since 0.11.0
   */
static void
folks_individual_change_extended_field_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	FolksIndividualChangeExtendedFieldData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_individual_real_change_extended_field_co (_data_);
}

static gboolean
folks_individual_real_change_extended_field_co (FolksIndividualChangeExtendedFieldData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_id;
	g_debug ("individual.vala:1023: Setting extended field '%s' on '%s'…", _data_->name, _data_->_tmp0_);
	_data_->persona_error = NULL;
	_data_->prop_changed = FALSE;
	{
		_data_->_tmp1_ = _data_->self->priv->_persona_set;
		_data_->_p_list = _data_->_tmp1_;
		_data_->_tmp2_ = _data_->_p_list;
		_data_->_tmp3_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp2_);
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_p_size = _data_->_tmp4_;
		_data_->_p_index = -1;
		while (TRUE) {
			_data_->_p_index = _data_->_p_index + 1;
			_data_->_tmp5_ = _data_->_p_index;
			_data_->_tmp6_ = _data_->_p_size;
			if (!(_data_->_tmp5_ < _data_->_tmp6_)) {
				break;
			}
			_data_->_tmp7_ = _data_->_p_list;
			_data_->_tmp8_ = folks_small_set_get (_data_->_tmp7_, _data_->_p_index);
			_data_->_tmp9_ = _g_object_ref0 ((FolksPersona*) _data_->_tmp8_);
			_data_->p = _data_->_tmp9_;
			_data_->_tmp10_ = _data_->p;
			_data_->_tmp12_ = 0;
			_data_->_tmp11_ = folks_persona_get_writeable_properties (_data_->_tmp10_, &_data_->_tmp12_);
			_data_->_tmp11__length1 = _data_->_tmp12_;
			_data_->_tmp13_ = _data_->_tmp11_;
			_data_->_tmp13__length1 = _data_->_tmp11__length1;
			if (_vala_string_array_contains (_data_->_tmp13_, _data_->_tmp13__length1, "extended-info")) {
				_data_->_tmp14_ = _data_->p;
				_data_->e = FOLKS_IS_EXTENDED_INFO (_data_->_tmp14_) ? ((FolksExtendedInfo*) _data_->_tmp14_) : NULL;
				{
					_data_->_tmp15_ = _data_->e;
					_data_->_state_ = 1;
					folks_extended_info_change_extended_field (_data_->_tmp15_, _data_->name, _data_->value, folks_individual_change_extended_field_ready, _data_);
					return FALSE;
					_state_1:
					folks_extended_info_change_extended_field_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error0_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch0_folks_property_error;
						}
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp16_ = _data_->p;
					_data_->_tmp17_ = folks_persona_get_uid (_data_->_tmp16_);
					_data_->_tmp18_ = _data_->_tmp17_;
					g_debug ("individual.vala:1038:     written to writeable persona '%s'", _data_->_tmp18_);
					_data_->prop_changed = TRUE;
				}
				goto __finally0;
				__catch0_folks_property_error:
				{
					_data_->_vala1_e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp19_ = _data_->persona_error;
					if (_data_->_tmp19_ == NULL) {
						_data_->_tmp20_ = _data_->_vala1_e;
						_data_->_tmp21_ = _g_error_copy0 (_data_->_tmp20_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp21_;
					}
					_g_error_free0 (_data_->_vala1_e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
						g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_object_unref (_data_->_async_result);
						return FALSE;
					} else {
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
			}
			_g_object_unref0 (_data_->p);
		}
	}
	if (_data_->prop_changed == FALSE) {
		_data_->_tmp22_ = _data_->persona_error;
		if (_data_->_tmp22_ == NULL) {
			_data_->_tmp23_ = g_error_new (FOLKS_PROPERTY_ERROR, FOLKS_PROPERTY_ERROR_NOT_WRITEABLE, _ ("Failed to change property ‘%s’: No suitable personas were found."), "extended-info");
			_g_error_free0 (_data_->persona_error);
			_data_->persona_error = _data_->_tmp23_;
		}
		_data_->_tmp24_ = _data_->persona_error;
		_data_->_tmp25_ = _g_error_copy0 (_data_->_tmp24_);
		_data_->_inner_error0_ = _data_->_tmp25_;
		if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_error_free0 (_data_->persona_error);
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_error_free0 (_data_->persona_error);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
folks_individual_real_remove_extended_field_data_free (gpointer _data)
{
	FolksIndividualRemoveExtendedFieldData* _data_;
	_data_ = _data;
	_g_free0 (_data_->name);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualRemoveExtendedFieldData, _data_);
}

static void
folks_individual_real_remove_extended_field (FolksExtendedInfo* base,
                                             const gchar* name,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	FolksIndividual * self;
	FolksIndividualRemoveExtendedFieldData* _data_;
	FolksIndividual* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (name != NULL);
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualRemoveExtendedFieldData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, folks_individual_real_remove_extended_field_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (name);
	_g_free0 (_data_->name);
	_data_->name = _tmp1_;
	folks_individual_real_remove_extended_field_co (_data_);
}

static void
folks_individual_remove_extended_field_finish (FolksExtendedInfo* base,
                                               GAsyncResult* _res_,
                                               GError** error)
{
	FolksIndividualRemoveExtendedFieldData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

/**
   * {@inheritDoc}
   *
   * @since 0.11.0
   */
static void
folks_individual_remove_extended_field_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	FolksIndividualRemoveExtendedFieldData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_individual_real_remove_extended_field_co (_data_);
}

static gboolean
folks_individual_real_remove_extended_field_co (FolksIndividualRemoveExtendedFieldData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_id;
	g_debug ("individual.vala:1075: Removing extended field '%s' on '%s'…", _data_->name, _data_->_tmp0_);
	_data_->persona_error = NULL;
	{
		_data_->_tmp1_ = _data_->self->priv->_persona_set;
		_data_->_p_list = _data_->_tmp1_;
		_data_->_tmp2_ = _data_->_p_list;
		_data_->_tmp3_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp2_);
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_p_size = _data_->_tmp4_;
		_data_->_p_index = -1;
		while (TRUE) {
			_data_->_p_index = _data_->_p_index + 1;
			_data_->_tmp5_ = _data_->_p_index;
			_data_->_tmp6_ = _data_->_p_size;
			if (!(_data_->_tmp5_ < _data_->_tmp6_)) {
				break;
			}
			_data_->_tmp7_ = _data_->_p_list;
			_data_->_tmp8_ = folks_small_set_get (_data_->_tmp7_, _data_->_p_index);
			_data_->_tmp9_ = _g_object_ref0 ((FolksPersona*) _data_->_tmp8_);
			_data_->p = _data_->_tmp9_;
			_data_->_tmp10_ = _data_->p;
			_data_->_tmp12_ = 0;
			_data_->_tmp11_ = folks_persona_get_writeable_properties (_data_->_tmp10_, &_data_->_tmp12_);
			_data_->_tmp11__length1 = _data_->_tmp12_;
			_data_->_tmp13_ = _data_->_tmp11_;
			_data_->_tmp13__length1 = _data_->_tmp11__length1;
			if (_vala_string_array_contains (_data_->_tmp13_, _data_->_tmp13__length1, "extended-info")) {
				_data_->_tmp14_ = _data_->p;
				_data_->e = FOLKS_IS_EXTENDED_INFO (_data_->_tmp14_) ? ((FolksExtendedInfo*) _data_->_tmp14_) : NULL;
				{
					_data_->_tmp15_ = _data_->e;
					_data_->_state_ = 1;
					folks_extended_info_remove_extended_field (_data_->_tmp15_, _data_->name, folks_individual_remove_extended_field_ready, _data_);
					return FALSE;
					_state_1:
					folks_extended_info_remove_extended_field_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error0_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch0_folks_property_error;
						}
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp16_ = _data_->p;
					_data_->_tmp17_ = folks_persona_get_uid (_data_->_tmp16_);
					_data_->_tmp18_ = _data_->_tmp17_;
					g_debug ("individual.vala:1088:     removed from writeable persona '%s'", _data_->_tmp18_);
				}
				goto __finally0;
				__catch0_folks_property_error:
				{
					_data_->_vala1_e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp19_ = _data_->persona_error;
					if (_data_->_tmp19_ == NULL) {
						_data_->_tmp20_ = _data_->_vala1_e;
						_data_->_tmp21_ = _g_error_copy0 (_data_->_tmp20_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp21_;
					}
					_g_error_free0 (_data_->_vala1_e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
						g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_object_unref (_data_->_async_result);
						return FALSE;
					} else {
						_g_object_unref0 (_data_->p);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
			}
			_g_object_unref0 (_data_->p);
		}
	}
	_data_->_tmp22_ = _data_->persona_error;
	if (_data_->_tmp22_ != NULL) {
		_data_->_tmp23_ = _data_->persona_error;
		_data_->_tmp24_ = _g_error_copy0 (_data_->_tmp23_);
		_data_->_inner_error0_ = _data_->_tmp24_;
		if (_data_->_inner_error0_->domain == FOLKS_PROPERTY_ERROR) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_error_free0 (_data_->persona_error);
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_error_free0 (_data_->persona_error);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_folks_individual_notify_alias_cb (FolksIndividual* _self_,
                                   FolksPersona* p,
                                   GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_alias (_self_);
}

static void
_folks_individual_notify_avatar_cb (FolksIndividual* _self_,
                                    FolksPersona* p,
                                    GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_avatar (_self_);
}

static void
_folks_individual_notify_full_name_cb (FolksIndividual* _self_,
                                       FolksPersona* p,
                                       GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_full_name (_self_);
}

static void
_folks_individual_notify_structured_name_cb (FolksIndividual* _self_,
                                             FolksPersona* p,
                                             GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_structured_name (_self_);
}

static void
_folks_individual_notify_nickname_cb (FolksIndividual* _self_,
                                      FolksPersona* p,
                                      GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_nickname (_self_);
}

static void
_folks_individual_persona_group_changed_cb (FolksIndividual* self,
                                            const gchar* group,
                                            gboolean is_member)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (group != NULL);
	_folks_individual_update_groups (self, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_gender_cb (FolksIndividual* _self_,
                                    FolksPersona* p,
                                    GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_gender (_self_);
}

static void
_folks_individual_notify_urls_cb (FolksIndividual* _self_,
                                  FolksPersona* p,
                                  GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_urls (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_phone_numbers_cb (FolksIndividual* _self_,
                                           FolksPersona* p,
                                           GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_phone_numbers (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_postal_addresses_cb (FolksIndividual* _self_,
                                              FolksPersona* p,
                                              GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_postal_addresses (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_email_addresses_cb (FolksIndividual* _self_,
                                             FolksPersona* p,
                                             GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_email_addresses (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_roles_cb (FolksIndividual* _self_,
                                   FolksPersona* p,
                                   GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_roles (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_birthday_cb (FolksIndividual* _self_,
                                      FolksPersona* p,
                                      GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_birthday (_self_);
}

static void
_folks_individual_notify_notes_cb (FolksIndividual* _self_,
                                   FolksPersona* p,
                                   GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_notes (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_local_ids_cb (FolksIndividual* _self_,
                                       FolksPersona* p,
                                       GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_local_ids (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_location_cb (FolksIndividual* _self_,
                                      FolksPersona* p,
                                      GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_location (_self_);
}

static void
folks_individual_real_change_group_data_free (gpointer _data)
{
	FolksIndividualChangeGroupData* _data_;
	_data_ = _data;
	_g_free0 (_data_->group);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeGroupData, _data_);
}

static void
folks_individual_real_change_group (FolksGroupDetails* base,
                                    const gchar* group,
                                    gboolean is_member,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	FolksIndividual * self;
	FolksIndividualChangeGroupData* _data_;
	FolksIndividual* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (group != NULL);
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeGroupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, folks_individual_real_change_group_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (group);
	_g_free0 (_data_->group);
	_data_->group = _tmp1_;
	_data_->is_member = is_member;
	folks_individual_real_change_group_co (_data_);
}

static void
folks_individual_change_group_finish (FolksGroupDetails* base,
                                      GAsyncResult* _res_,
                                      GError** error)
{
	FolksIndividualChangeGroupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

/**
   * Add or remove the Individual from the specified group.
   *
   * If ``is_member`` is ``true``, the Individual will be added to the
   * ``group``. If it is ``false``, they will be removed from the ``group``.
   *
   * The group membership change will propagate to every {@link Persona} in
   * the Individual.
   *
   * @param group a freeform group identifier
   * @param is_member whether the Individual should be a member of the group
   * @since 0.1.11
   */
static gboolean
folks_individual_real_change_group_co (FolksIndividualChangeGroupData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->_persona_set;
		_data_->_p_list = _data_->_tmp0_;
		_data_->_tmp1_ = _data_->_p_list;
		_data_->_tmp2_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp1_);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_p_size = _data_->_tmp3_;
		_data_->_p_index = -1;
		while (TRUE) {
			_data_->_p_index = _data_->_p_index + 1;
			_data_->_tmp4_ = _data_->_p_index;
			_data_->_tmp5_ = _data_->_p_size;
			if (!(_data_->_tmp4_ < _data_->_tmp5_)) {
				break;
			}
			_data_->_tmp6_ = _data_->_p_list;
			_data_->_tmp7_ = folks_small_set_get (_data_->_tmp6_, _data_->_p_index);
			_data_->_tmp8_ = _g_object_ref0 ((FolksPersona*) _data_->_tmp7_);
			_data_->p = _data_->_tmp8_;
			_data_->_tmp9_ = _data_->p;
			if (FOLKS_IS_GROUP_DETAILS (_data_->_tmp9_)) {
				_data_->_tmp10_ = _data_->p;
				folks_group_details_change_group (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp10_, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails), _data_->group, _data_->is_member, NULL, NULL);
			}
			_g_object_unref0 (_data_->p);
		}
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_folks_individual_notify_presence_cb (FolksIndividual* _self_,
                                      FolksPersona* p,
                                      GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_presence (_self_);
}

static void
_folks_individual_notify_im_addresses_cb (FolksIndividual* _self_,
                                          FolksPersona* p,
                                          GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_im_addresses (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_web_service_addresses_cb (FolksIndividual* _self_,
                                                   FolksPersona* p,
                                                   GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_web_service_addresses (_self_, FALSE, TRUE, TRUE);
}

static void
_folks_individual_notify_is_favourite_cb (FolksIndividual* _self_,
                                          FolksPersona* p,
                                          GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_is_favourite (_self_);
}

static void
_folks_individual_notify_im_interaction_count_cb (FolksIndividual* _self_,
                                                  FolksPersona* p,
                                                  GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	g_object_notify ((GObject*) _self_, "im-interaction-count");
}

static void
_folks_individual_notify_call_interaction_count_cb (FolksIndividual* _self_,
                                                    FolksPersona* p,
                                                    GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	g_object_notify ((GObject*) _self_, "call-interaction-count");
}

static void
_folks_individual_notify_last_im_interaction_datetime_cb (FolksIndividual* _self_,
                                                          FolksPersona* p,
                                                          GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_g_date_time_unref0 (_self_->priv->_last_im_interaction_datetime);
	_self_->priv->_last_im_interaction_datetime = NULL;
	g_object_notify ((GObject*) _self_, "last-im-interaction-datetime");
}

static void
_folks_individual_notify_last_call_interaction_datetime_cb (FolksIndividual* _self_,
                                                            FolksPersona* p,
                                                            GParamSpec* ps)
{
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (ps != NULL);
	_g_date_time_unref0 (_self_->priv->_last_call_interaction_datetime);
	_self_->priv->_last_call_interaction_datetime = NULL;
	g_object_notify ((GObject*) _self_, "last-call-interaction-datetime");
}

static void
_folks_individual_persona_notify_cb (FolksIndividual* self,
                                     GObject* obj,
                                     GParamSpec* ps)
{
	FolksPersona* persona = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	persona = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_TYPE_PERSONA, FolksPersona);
	_tmp2_ = ps->name;
	if (g_strcmp0 (_tmp2_, "individual") != 0) {
		FolksPersona* _tmp3_;
		FolksIndividual* _tmp4_;
		FolksIndividual* _tmp5_;
		_tmp3_ = persona;
		_tmp4_ = folks_persona_get_individual (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ != self;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		FolksPersona* _tmp6_;
		FolksIndividual* _tmp7_;
		FolksIndividual* _tmp8_;
		_tmp6_ = persona;
		_tmp7_ = folks_persona_get_individual (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = _tmp8_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		const gchar* _tmp9_;
		FolksPersona* _tmp10_;
		FolksPersona* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		FolksPersona* _tmp14_;
		FolksIndividual* _tmp15_;
		FolksIndividual* _tmp16_;
		_tmp9_ = ps->name;
		_tmp10_ = persona;
		_tmp11_ = persona;
		_tmp12_ = folks_persona_get_uid (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = persona;
		_tmp15_ = folks_persona_get_individual (_tmp14_);
		_tmp16_ = _tmp15_;
		g_warning ("Notification on property ‘%s’ of Persona %p (‘%s’) where " "Persona.individual is %p but was expected to be %p.", _tmp9_, _tmp10_, _tmp13_, _tmp16_, self);
		return;
	} else {
		const gchar* _tmp17_;
		_tmp17_ = ps->name;
		if (g_strcmp0 (_tmp17_, "individual") == 0) {
			FolksPersona* _tmp18_;
			FolksIndividual* _tmp19_;
			FolksIndividual* _tmp20_;
			_tmp18_ = persona;
			_tmp19_ = folks_persona_get_individual (_tmp18_);
			_tmp20_ = _tmp19_;
			if (_tmp20_ != self) {
				FolksSmallSet* remaining_personas = NULL;
				FolksSmallSet* _tmp21_;
				FolksSmallSet* _tmp22_;
				FolksSmallSet* _tmp23_;
				FolksSmallSet* _tmp24_;
				FolksPersona* _tmp25_;
				FolksSmallSet* _tmp26_;
				_tmp21_ = folks_small_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
				remaining_personas = _tmp21_;
				_tmp22_ = remaining_personas;
				_tmp23_ = self->priv->_persona_set;
				gee_collection_add_all ((GeeCollection*) _tmp22_, (GeeCollection*) _tmp23_);
				_tmp24_ = remaining_personas;
				_tmp25_ = persona;
				gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp24_, _tmp25_);
				_tmp26_ = remaining_personas;
				_folks_individual_set_personas (self, (GeeSet*) _tmp26_, NULL);
				_g_object_unref0 (remaining_personas);
			}
			return;
		}
	}
	{
		FolksIndividual_Notifier* notifier_collection = NULL;
		gint notifier_collection_length1 = 0;
		gint _notifier_collection_size_ = 0;
		gint notifier_it = 0;
		notifier_collection = FOLKS_INDIVIDUAL__notifiers;
		notifier_collection_length1 = G_N_ELEMENTS (FOLKS_INDIVIDUAL__notifiers);
		for (notifier_it = 0; notifier_it < notifier_collection_length1; notifier_it = notifier_it + 1) {
			FolksIndividual_Notifier notifier = {0};
			notifier = notifier_collection[notifier_it];
			{
				const gchar* _tmp27_;
				FolksIndividual_Notifier _tmp28_;
				const gchar* _tmp29_;
				_tmp27_ = ps->name;
				_tmp28_ = notifier;
				_tmp29_ = _tmp28_.property;
				if (g_strcmp0 (_tmp27_, _tmp29_) == 0) {
					FolksIndividual_Notifier _tmp30_;
					FolksIndividual_UnboundNotifier _tmp31_;
					FolksPersona* _tmp32_;
					_tmp30_ = notifier;
					_tmp31_ = _tmp30_.notify;
					_tmp32_ = persona;
					_tmp31_ (self, _tmp32_, ps);
					break;
				}
			}
		}
	}
}

/**
   * Create a new Individual.
   *
   * The Individual can optionally be seeded with the {@link Persona}s in
   * ``personas``. Otherwise, it will have to have personas added using the
   * {@link Folks.Individual.personas} property after construction.
   *
   * @param personas a list of {@link Persona}s to initialise the
   * {@link Folks.Individual} with, or ``null``
   * @return a new Individual
   *
   * @since 0.5.1
   */
FolksIndividual*
folks_individual_construct (GType object_type,
                            GeeSet* personas)
{
	FolksIndividual * self = NULL;
	FolksSmallSet* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	self = (FolksIndividual*) g_object_new (object_type, "personas", personas, NULL);
	_tmp0_ = self->priv->_persona_set;
	_tmp1_ = gee_collection_get_size ((GeeCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	g_debug ("individual.vala:1413: Creating new Individual with %u Personas: %p", (guint) _tmp2_, self);
	return self;
}

FolksIndividual*
folks_individual_new (GeeSet* personas)
{
	return folks_individual_construct (FOLKS_TYPE_INDIVIDUAL, personas);
}

static void
_folks_individual_emit_personas_changed (FolksIndividual* self,
                                         GeeSet* added,
                                         GeeSet* removed)
{
	GeeSet* _added = NULL;
	GeeSet* _tmp0_;
	GeeSet* _removed = NULL;
	GeeSet* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	GeeSet* _tmp11_;
	GeeSet* _tmp12_;
	GeeSet* _tmp13_;
	GeeSet* _tmp14_;
	GeeSet* _tmp15_;
	GeeSet* _tmp16_;
	GeeSet* _tmp17_;
	GeeSet* _tmp18_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (added);
	_added = _tmp0_;
	_tmp1_ = _g_object_ref0 (removed);
	_removed = _tmp1_;
	if (added == NULL) {
		_tmp3_ = TRUE;
	} else {
		gint _tmp4_;
		gint _tmp5_;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) G_TYPE_CHECK_INSTANCE_CAST (added, GEE_TYPE_SET, GeeSet));
		_tmp5_ = _tmp4_;
		_tmp3_ = _tmp5_ == 0;
	}
	if (_tmp3_) {
		gboolean _tmp6_ = FALSE;
		if (removed == NULL) {
			_tmp6_ = TRUE;
		} else {
			gint _tmp7_;
			gint _tmp8_;
			_tmp7_ = gee_collection_get_size ((GeeCollection*) G_TYPE_CHECK_INSTANCE_CAST (removed, GEE_TYPE_SET, GeeSet));
			_tmp8_ = _tmp7_;
			_tmp6_ = _tmp8_ == 0;
		}
		_tmp2_ = _tmp6_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_g_object_unref0 (_removed);
		_g_object_unref0 (_added);
		return;
	} else {
		if (added == NULL) {
			FolksSmallSet* _tmp9_;
			_tmp9_ = folks_small_set_empty (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref);
			_g_object_unref0 (_added);
			_added = (GeeSet*) _tmp9_;
		} else {
			if (removed == NULL) {
				FolksSmallSet* _tmp10_;
				_tmp10_ = folks_small_set_empty (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref);
				_g_object_unref0 (_removed);
				_removed = (GeeSet*) _tmp10_;
			}
		}
	}
	_tmp11_ = _added;
	_tmp12_ = gee_set_get_read_only_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_SET, GeeSet));
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_;
	_tmp15_ = _removed;
	_tmp16_ = gee_set_get_read_only_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_SET, GeeSet));
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_;
	g_signal_emit (self, folks_individual_signals[FOLKS_INDIVIDUAL_PERSONAS_CHANGED_SIGNAL], 0, _tmp14_, _tmp18_);
	_g_object_unref0 (_tmp18_);
	_g_object_unref0 (_tmp14_);
	_g_object_unref0 (_removed);
	_g_object_unref0 (_added);
}

static void
_folks_individual_store_removed_cb (FolksIndividual* self,
                                    FolksPersonaStore* store)
{
	FolksSmallSet* remaining_personas = NULL;
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (store != NULL);
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	remaining_personas = _tmp0_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _persona_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_persona_list = _tmp1_;
		_tmp2_ = _persona_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_persona_size = _tmp4_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksPersona* _tmp10_;
			FolksPersonaStore* _tmp11_;
			FolksPersonaStore* _tmp12_;
			_persona_index = _persona_index + 1;
			_tmp5_ = _persona_index;
			_tmp6_ = _persona_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _persona_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			persona = _tmp9_;
			_tmp10_ = persona;
			_tmp11_ = folks_persona_get_store (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_ != store) {
				FolksSmallSet* _tmp13_;
				FolksPersona* _tmp14_;
				_tmp13_ = remaining_personas;
				_tmp14_ = persona;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, _tmp14_);
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp15_ = remaining_personas;
	_folks_individual_set_personas (self, (GeeSet*) _tmp15_, NULL);
	_g_object_unref0 (remaining_personas);
}

static void
_folks_individual_store_personas_changed_cb (FolksIndividual* self,
                                             FolksPersonaStore* store,
                                             GeeSet* added,
                                             GeeSet* removed,
                                             const gchar* message,
                                             FolksPersona* actor,
                                             FolksGroupDetailsChangeReason reason)
{
	FolksSmallSet* remaining_personas = NULL;
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp13_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (store != NULL);
	g_return_if_fail (added != NULL);
	g_return_if_fail (removed != NULL);
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	remaining_personas = _tmp0_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _persona_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_persona_list = _tmp1_;
		_tmp2_ = _persona_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_persona_size = _tmp4_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksPersona* _tmp10_;
			_persona_index = _persona_index + 1;
			_tmp5_ = _persona_index;
			_tmp6_ = _persona_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _persona_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			persona = _tmp9_;
			_tmp10_ = persona;
			if (!gee_collection_contains ((GeeCollection*) removed, _tmp10_)) {
				FolksSmallSet* _tmp11_;
				FolksPersona* _tmp12_;
				_tmp11_ = remaining_personas;
				_tmp12_ = persona;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, _tmp12_);
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp13_ = remaining_personas;
	_folks_individual_set_personas (self, (GeeSet*) _tmp13_, NULL);
	_g_object_unref0 (remaining_personas);
}

static void
_folks_individual_update_fields (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_groups (self, FALSE, TRUE, TRUE);
	_folks_individual_update_presence (self);
	_folks_individual_update_is_favourite (self);
	_folks_individual_update_avatar (self);
	_folks_individual_update_alias (self);
	_folks_individual_update_trust_level (self);
	_folks_individual_update_im_addresses (self, FALSE, TRUE, TRUE);
	_folks_individual_update_web_service_addresses (self, FALSE, TRUE, TRUE);
	_folks_individual_update_structured_name (self);
	_folks_individual_update_full_name (self);
	_folks_individual_update_nickname (self);
	_folks_individual_update_gender (self);
	_folks_individual_update_urls (self, FALSE, TRUE, TRUE);
	_folks_individual_update_phone_numbers (self, FALSE, TRUE, TRUE);
	_folks_individual_update_email_addresses (self, FALSE, TRUE, TRUE);
	_folks_individual_update_roles (self, FALSE, TRUE, TRUE);
	_folks_individual_update_birthday (self);
	_folks_individual_update_notes (self, FALSE, TRUE, TRUE);
	_folks_individual_update_postal_addresses (self, FALSE, TRUE, TRUE);
	_folks_individual_update_local_ids (self, FALSE, TRUE, TRUE);
	_folks_individual_update_location (self);
	_folks_individual_update_display_name (self);
}

static Block7Data*
block7_data_ref (Block7Data* _data7_)
{
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}

static void
block7_data_unref (void * _userdata_)
{
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		FolksIndividual* self;
		self = _data7_->self;
		_g_free0 (_data7_->prop_name);
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}

static gint
__lambda6_ (Block7Data* _data7_,
            FolksPersona* a,
            FolksPersona* b)
{
	FolksIndividual* self;
	gboolean a_is_set = FALSE;
	gboolean b_is_set = FALSE;
	gboolean a_is_primary = FALSE;
	FolksPersonaStore* _tmp2_;
	FolksPersonaStore* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gboolean b_is_primary = FALSE;
	FolksPersonaStore* _tmp6_;
	FolksPersonaStore* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	gboolean a_is_writeable = FALSE;
	gchar** _tmp12_;
	gint _tmp12__length1;
	gint _tmp13_ = 0;
	gchar** _tmp14_;
	gint _tmp14__length1;
	gboolean b_is_writeable = FALSE;
	gchar** _tmp15_;
	gint _tmp15__length1;
	gint _tmp16_ = 0;
	gchar** _tmp17_;
	gint _tmp17__length1;
	gint order = 0;
	gint result;
	self = _data7_->self;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	a_is_set = _data7_->filter_func (a, _data7_->filter_func_target);
	b_is_set = _data7_->filter_func (b, _data7_->filter_func_target);
	if (a_is_set != b_is_set) {
		gint _tmp0_ = 0;
		gint _tmp1_ = 0;
		if (a_is_set) {
			_tmp0_ = 1;
		} else {
			_tmp0_ = 0;
		}
		if (b_is_set) {
			_tmp1_ = 1;
		} else {
			_tmp1_ = 0;
		}
		result = _tmp0_ - _tmp1_;
		return result;
	}
	_tmp2_ = folks_persona_get_store (a);
	_tmp3_ = _tmp2_;
	_tmp4_ = folks_persona_store_get_is_primary_store (_tmp3_);
	_tmp5_ = _tmp4_;
	a_is_primary = _tmp5_;
	_tmp6_ = folks_persona_get_store (b);
	_tmp7_ = _tmp6_;
	_tmp8_ = folks_persona_store_get_is_primary_store (_tmp7_);
	_tmp9_ = _tmp8_;
	b_is_primary = _tmp9_;
	if (a_is_primary != b_is_primary) {
		gint _tmp10_ = 0;
		gint _tmp11_ = 0;
		if (a_is_primary) {
			_tmp10_ = 1;
		} else {
			_tmp10_ = 0;
		}
		if (b_is_primary) {
			_tmp11_ = 1;
		} else {
			_tmp11_ = 0;
		}
		result = _tmp10_ - _tmp11_;
		return result;
	}
	_tmp12_ = folks_persona_get_writeable_properties (a, &_tmp13_);
	_tmp12__length1 = _tmp13_;
	_tmp14_ = _tmp12_;
	_tmp14__length1 = _tmp12__length1;
	a_is_writeable = _vala_string_array_contains (_tmp14_, _tmp14__length1, _data7_->prop_name);
	_tmp15_ = folks_persona_get_writeable_properties (b, &_tmp16_);
	_tmp15__length1 = _tmp16_;
	_tmp17_ = _tmp15_;
	_tmp17__length1 = _tmp15__length1;
	b_is_writeable = _vala_string_array_contains (_tmp17_, _tmp17__length1, _data7_->prop_name);
	if (a_is_writeable != b_is_writeable) {
		gint _tmp18_ = 0;
		gint _tmp19_ = 0;
		if (a_is_writeable) {
			_tmp18_ = 1;
		} else {
			_tmp18_ = 0;
		}
		if (b_is_writeable) {
			_tmp19_ = 1;
		} else {
			_tmp19_ = 0;
		}
		result = _tmp18_ - _tmp19_;
		return result;
	}
	order = _data7_->compare_func (a, b);
	if (order == 0) {
		GCompareFunc _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		_tmp20_ = ((GCompareFunc) g_strcmp0);
		_tmp21_ = folks_persona_get_uid (a);
		_tmp22_ = _tmp21_;
		_tmp23_ = folks_persona_get_uid (b);
		_tmp24_ = _tmp23_;
		order = _tmp20_ (_tmp22_, _tmp24_);
	}
	result = order;
	return result;
}

static gint
___lambda6__gcompare_data_func (gconstpointer a,
                                gconstpointer b,
                                gpointer self)
{
	gint result;
	result = __lambda6_ (self, (FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
_folks_individual_update_single_valued_property (FolksIndividual* self,
                                                 GType interface_type,
                                                 FolksIndividualPropertyFilter filter_func,
                                                 gpointer filter_func_target,
                                                 GCompareFunc compare_func,
                                                 const gchar* prop_name,
                                                 FolksIndividualSingleValuedPropertySetter setter,
                                                 gpointer setter_target)
{
	Block7Data* _data7_;
	gchar* _tmp0_;
	GCompareDataFunc primary_compare_func = NULL;
	gpointer primary_compare_func_target;
	GDestroyNotify primary_compare_func_target_destroy_notify;
	FolksPersona* candidate_p = NULL;
	FolksPersona* _tmp17_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (prop_name != NULL);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	_data7_->self = g_object_ref (self);
	_data7_->filter_func = filter_func;
	_data7_->filter_func_target = filter_func_target;
	_data7_->compare_func = compare_func;
	_tmp0_ = g_strdup (prop_name);
	_g_free0 (_data7_->prop_name);
	_data7_->prop_name = _tmp0_;
	primary_compare_func = ___lambda6__gcompare_data_func;
	primary_compare_func_target = block7_data_ref (_data7_);
	primary_compare_func_target_destroy_notify = block7_data_unref;
	candidate_p = NULL;
	{
		FolksSmallSet* _p_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _p_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _p_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_p_list = _tmp1_;
		_tmp2_ = _p_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_p_size = _tmp4_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* p = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksPersona* _tmp10_;
			_p_index = _p_index + 1;
			_tmp5_ = _p_index;
			_tmp6_ = _p_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _p_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _p_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			p = _tmp9_;
			_tmp10_ = p;
			if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp10_), interface_type)) {
				gboolean _tmp11_ = FALSE;
				FolksPersona* _tmp12_;
				_tmp12_ = candidate_p;
				if (_tmp12_ == NULL) {
					_tmp11_ = TRUE;
				} else {
					GCompareDataFunc _tmp13_;
					gpointer _tmp13__target;
					FolksPersona* _tmp14_;
					FolksPersona* _tmp15_;
					_tmp13_ = primary_compare_func;
					_tmp13__target = primary_compare_func_target;
					_tmp14_ = p;
					_tmp15_ = candidate_p;
					_tmp11_ = _tmp13_ (_tmp14_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, FOLKS_TYPE_PERSONA, FolksPersona), _tmp13__target) > 0;
				}
				if (_tmp11_) {
					FolksPersona* _tmp16_;
					_tmp16_ = p;
					candidate_p = _tmp16_;
				}
			}
			_g_object_unref0 (p);
		}
	}
	_tmp17_ = candidate_p;
	setter (_tmp17_, setter_target);
	(primary_compare_func_target_destroy_notify == NULL) ? NULL : (primary_compare_func_target_destroy_notify (primary_compare_func_target), NULL);
	primary_compare_func = NULL;
	primary_compare_func_target = NULL;
	primary_compare_func_target_destroy_notify = NULL;
	block7_data_unref (_data7_);
	_data7_ = NULL;
}

static void
_folks_individual_update_multi_valued_property (FolksIndividual* self,
                                                const gchar* prop_name,
                                                gboolean create_if_not_exist,
                                                FolksIndividualPropertyIsNull prop_is_null,
                                                gpointer prop_is_null_target,
                                                FolksIndividualCollectionCreator create_collection,
                                                gpointer create_collection_target,
                                                FolksIndividualMultiValuedPropertySetter setter,
                                                gpointer setter_target,
                                                gboolean emit_notification,
                                                gboolean force_update)
{
	gboolean created = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (prop_name != NULL);
	created = FALSE;
	if (prop_is_null (prop_is_null_target)) {
		if (create_if_not_exist == FALSE) {
			if (emit_notification) {
				g_object_notify ((GObject*) self, prop_name);
			}
			return;
		}
		create_collection (create_collection_target);
		created = TRUE;
	}
	if (created) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = force_update;
	}
	if (_tmp2_) {
		_tmp1_ = setter (setter_target) == TRUE;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = emit_notification;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		g_object_notify ((GObject*) self, prop_name);
	}
}

static Block8Data*
block8_data_ref (Block8Data* _data8_)
{
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}

static void
block8_data_unref (void * _userdata_)
{
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		FolksIndividual* self;
		self = _data8_->self;
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static void
__lambda64_ (Block8Data* _data8_,
             const gchar* l)
{
	FolksIndividual* self;
	const gchar* group = NULL;
	FolksSmallSet* _tmp0_;
	const gchar* _tmp1_;
	self = _data8_->self;
	g_return_if_fail (l != NULL);
	group = (const gchar*) l;
	_tmp0_ = self->priv->_groups;
	_tmp1_ = group;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp0_, _tmp1_);
	if (_data8_->emit_notification) {
		const gchar* _tmp2_;
		_tmp2_ = group;
		g_signal_emit_by_name ((FolksGroupDetails*) self, "group-changed", _tmp2_, FALSE);
	}
}

static void
___lambda64__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda64_ (self, (const gchar*) data);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static inline void
_g_list_free__g_free0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_free0_);
}

static void
_folks_individual_update_groups (FolksIndividual* self,
                                 gboolean create_if_not_exist,
                                 gboolean emit_notification,
                                 gboolean force_update)
{
	Block8Data* _data8_;
	gboolean created = FALSE;
	gboolean _tmp0_ = FALSE;
	FolksSmallSet* _tmp1_;
	gboolean _tmp7_ = FALSE;
	FolksSmallSet* new_groups = NULL;
	FolksSmallSet* _tmp8_;
	GList* removes = NULL;
	GList* _tmp55_;
	g_return_if_fail (self != NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	_data8_->emit_notification = emit_notification;
	created = FALSE;
	_tmp1_ = self->priv->_groups;
	if (_tmp1_ == NULL) {
		_tmp0_ = create_if_not_exist == FALSE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		if (_data8_->emit_notification) {
			g_object_notify ((GObject*) self, "groups");
		}
		block8_data_unref (_data8_);
		_data8_ = NULL;
		return;
	} else {
		FolksSmallSet* _tmp2_;
		_tmp2_ = self->priv->_groups;
		if (_tmp2_ == NULL) {
			FolksSmallSet* _tmp3_;
			FolksSmallSet* _tmp4_;
			GeeSet* _tmp5_;
			GeeSet* _tmp6_;
			_tmp3_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
			_g_object_unref0 (self->priv->_groups);
			self->priv->_groups = _tmp3_;
			_tmp4_ = self->priv->_groups;
			_tmp5_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp4_);
			_tmp6_ = _tmp5_;
			_g_object_unref0 (self->priv->_groups_ro);
			self->priv->_groups_ro = _tmp6_;
			created = TRUE;
		}
	}
	if (!created) {
		_tmp7_ = !force_update;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		block8_data_unref (_data8_);
		_data8_ = NULL;
		return;
	}
	_tmp8_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	new_groups = _tmp8_;
	{
		FolksSmallSet* _p_list = NULL;
		FolksSmallSet* _tmp9_;
		gint _p_size = 0;
		FolksSmallSet* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		gint _p_index = 0;
		_tmp9_ = self->priv->_persona_set;
		_p_list = _tmp9_;
		_tmp10_ = _p_list;
		_tmp11_ = gee_collection_get_size ((GeeCollection*) _tmp10_);
		_tmp12_ = _tmp11_;
		_p_size = _tmp12_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp13_;
			gint _tmp14_;
			FolksPersona* p = NULL;
			FolksSmallSet* _tmp15_;
			gconstpointer _tmp16_;
			FolksPersona* _tmp17_;
			FolksPersona* _tmp18_;
			_p_index = _p_index + 1;
			_tmp13_ = _p_index;
			_tmp14_ = _p_size;
			if (!(_tmp13_ < _tmp14_)) {
				break;
			}
			_tmp15_ = _p_list;
			_tmp16_ = folks_small_set_get (_tmp15_, _p_index);
			_tmp17_ = _g_object_ref0 ((FolksPersona*) _tmp16_);
			p = _tmp17_;
			_tmp18_ = p;
			if (FOLKS_IS_GROUP_DETAILS (_tmp18_)) {
				FolksGroupDetails* persona = NULL;
				FolksPersona* _tmp19_;
				_tmp19_ = p;
				persona = G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails);
				{
					GeeIterator* _group_it = NULL;
					FolksGroupDetails* _tmp20_;
					GeeSet* _tmp21_;
					GeeSet* _tmp22_;
					GeeIterator* _tmp23_;
					_tmp20_ = persona;
					_tmp21_ = folks_group_details_get_groups (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = gee_iterable_iterator ((GeeIterable*) _tmp22_);
					_group_it = _tmp23_;
					while (TRUE) {
						GeeIterator* _tmp24_;
						gchar* group = NULL;
						GeeIterator* _tmp25_;
						gpointer _tmp26_;
						FolksSmallSet* _tmp27_;
						const gchar* _tmp28_;
						_tmp24_ = _group_it;
						if (!gee_iterator_next (_tmp24_)) {
							break;
						}
						_tmp25_ = _group_it;
						_tmp26_ = gee_iterator_get (_tmp25_);
						group = (gchar*) _tmp26_;
						_tmp27_ = new_groups;
						_tmp28_ = group;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp27_, _tmp28_);
						_g_free0 (group);
					}
					_g_object_unref0 (_group_it);
				}
			}
			_g_object_unref0 (p);
		}
	}
	{
		FolksSmallSet* _group_list = NULL;
		FolksSmallSet* _tmp29_;
		gint _group_size = 0;
		FolksSmallSet* _tmp30_;
		gint _tmp31_;
		gint _tmp32_;
		gint _group_index = 0;
		_tmp29_ = new_groups;
		_group_list = _tmp29_;
		_tmp30_ = _group_list;
		_tmp31_ = gee_collection_get_size ((GeeCollection*) _tmp30_);
		_tmp32_ = _tmp31_;
		_group_size = _tmp32_;
		_group_index = -1;
		while (TRUE) {
			gint _tmp33_;
			gint _tmp34_;
			gchar* group = NULL;
			FolksSmallSet* _tmp35_;
			gconstpointer _tmp36_;
			gchar* _tmp37_;
			gboolean _tmp38_ = FALSE;
			FolksSmallSet* _tmp39_;
			const gchar* _tmp40_;
			_group_index = _group_index + 1;
			_tmp33_ = _group_index;
			_tmp34_ = _group_size;
			if (!(_tmp33_ < _tmp34_)) {
				break;
			}
			_tmp35_ = _group_list;
			_tmp36_ = folks_small_set_get (_tmp35_, _group_index);
			_tmp37_ = g_strdup ((const gchar*) _tmp36_);
			group = _tmp37_;
			_tmp39_ = self->priv->_groups;
			_tmp40_ = group;
			if (gee_abstract_collection_add ((GeeAbstractCollection*) _tmp39_, _tmp40_)) {
				_tmp38_ = _data8_->emit_notification;
			} else {
				_tmp38_ = FALSE;
			}
			if (_tmp38_) {
				const gchar* _tmp41_;
				_tmp41_ = group;
				g_signal_emit_by_name ((FolksGroupDetails*) self, "group-changed", _tmp41_, TRUE);
			}
			_g_free0 (group);
		}
	}
	removes = NULL;
	{
		FolksSmallSet* _group_list = NULL;
		FolksSmallSet* _tmp42_;
		gint _group_size = 0;
		FolksSmallSet* _tmp43_;
		gint _tmp44_;
		gint _tmp45_;
		gint _group_index = 0;
		_tmp42_ = self->priv->_groups;
		_group_list = _tmp42_;
		_tmp43_ = _group_list;
		_tmp44_ = gee_collection_get_size ((GeeCollection*) _tmp43_);
		_tmp45_ = _tmp44_;
		_group_size = _tmp45_;
		_group_index = -1;
		while (TRUE) {
			gint _tmp46_;
			gint _tmp47_;
			gchar* group = NULL;
			FolksSmallSet* _tmp48_;
			gconstpointer _tmp49_;
			gchar* _tmp50_;
			FolksSmallSet* _tmp51_;
			const gchar* _tmp52_;
			_group_index = _group_index + 1;
			_tmp46_ = _group_index;
			_tmp47_ = _group_size;
			if (!(_tmp46_ < _tmp47_)) {
				break;
			}
			_tmp48_ = _group_list;
			_tmp49_ = folks_small_set_get (_tmp48_, _group_index);
			_tmp50_ = g_strdup ((const gchar*) _tmp49_);
			group = _tmp50_;
			_tmp51_ = new_groups;
			_tmp52_ = group;
			if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp51_, _tmp52_)) {
				const gchar* _tmp53_;
				gchar* _tmp54_;
				_tmp53_ = group;
				_tmp54_ = g_strdup (_tmp53_);
				removes = g_list_prepend (removes, _tmp54_);
			}
			_g_free0 (group);
		}
	}
	_tmp55_ = removes;
	g_list_foreach (_tmp55_, ___lambda64__gfunc, _data8_);
	(removes == NULL) ? NULL : (removes = (_g_list_free__g_free0_ (removes), NULL));
	_g_object_unref0 (new_groups);
	block8_data_unref (_data8_);
	_data8_ = NULL;
}

static gboolean
__lambda13_ (FolksIndividual* self,
             FolksPersona* p)
{
	FolksPresenceType _tmp0_;
	FolksPresenceType _tmp1_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_presence_details_get_presence_type (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
	_tmp1_ = _tmp0_;
	result = _tmp1_ != FOLKS_PRESENCE_TYPE_UNSET;
	return result;
}

static gboolean
___lambda13__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda13_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda14_ (FolksPersona* a,
             FolksPersona* b)
{
	FolksPresenceType a_presence = 0;
	FolksPresenceType _tmp0_;
	FolksPresenceType _tmp1_;
	FolksPresenceType b_presence = 0;
	FolksPresenceType _tmp2_;
	FolksPresenceType _tmp3_;
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = folks_presence_details_get_presence_type (G_TYPE_CHECK_INSTANCE_CAST (a, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
	_tmp1_ = _tmp0_;
	a_presence = _tmp1_;
	_tmp2_ = folks_presence_details_get_presence_type (G_TYPE_CHECK_INSTANCE_CAST (b, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
	_tmp3_ = _tmp2_;
	b_presence = _tmp3_;
	result = folks_presence_details_typecmp (a_presence, b_presence);
	return result;
}

static gint
___lambda14__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda14_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static gchar**
_vala_array_dup1 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static void
__lambda15_ (FolksIndividual* self,
             FolksPersona* p)
{
	const gchar* presence_message = NULL;
	const gchar* presence_status = NULL;
	gchar** client_types = NULL;
	gchar** _tmp0_;
	gint client_types_length1;
	gint _client_types_size_;
	FolksPresenceType presence_type = 0;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	FolksPresenceType _tmp14_;
	FolksPresenceType _tmp15_;
	presence_message = "";
	presence_status = "";
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	client_types = _tmp0_;
	client_types_length1 = 0;
	_client_types_size_ = client_types_length1;
	presence_type = FOLKS_PRESENCE_TYPE_UNSET;
	if (p != NULL) {
		FolksPresenceType _tmp1_;
		FolksPresenceType _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		gint _tmp8_ = 0;
		gchar** _tmp9_;
		gint _tmp9__length1;
		gchar** _tmp10_;
		gint _tmp10__length1;
		_tmp1_ = folks_presence_details_get_presence_type (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
		_tmp2_ = _tmp1_;
		presence_type = _tmp2_;
		_tmp3_ = folks_presence_details_get_presence_message (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
		_tmp4_ = _tmp3_;
		presence_message = _tmp4_;
		_tmp5_ = folks_presence_details_get_presence_status (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
		_tmp6_ = _tmp5_;
		presence_status = _tmp6_;
		_tmp7_ = folks_presence_details_get_client_types (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails), &_tmp8_);
		_tmp7__length1 = _tmp8_;
		_tmp9_ = _tmp7_;
		_tmp9__length1 = _tmp7__length1;
		_tmp10_ = (_tmp9_ != NULL) ? _vala_array_dup1 (_tmp9_, _tmp9__length1) : _tmp9_;
		_tmp10__length1 = _tmp9__length1;
		client_types = (_vala_array_free (client_types, client_types_length1, (GDestroyNotify) g_free), NULL);
		client_types = _tmp10_;
		client_types_length1 = _tmp10__length1;
		_client_types_size_ = client_types_length1;
	}
	_tmp14_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) self);
	_tmp15_ = _tmp14_;
	if (_tmp15_ != presence_type) {
		_tmp13_ = TRUE;
	} else {
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		_tmp16_ = folks_presence_details_get_presence_message ((FolksPresenceDetails*) self);
		_tmp17_ = _tmp16_;
		_tmp18_ = presence_message;
		_tmp13_ = g_strcmp0 (_tmp17_, _tmp18_) != 0;
	}
	if (_tmp13_) {
		_tmp12_ = TRUE;
	} else {
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		_tmp19_ = folks_presence_details_get_presence_status ((FolksPresenceDetails*) self);
		_tmp20_ = _tmp19_;
		_tmp21_ = presence_status;
		_tmp12_ = g_strcmp0 (_tmp20_, _tmp21_) != 0;
	}
	if (_tmp12_) {
		_tmp11_ = TRUE;
	} else {
		gchar** _tmp22_;
		gint _tmp22__length1;
		gint _tmp23_ = 0;
		gchar** _tmp24_;
		gint _tmp24__length1;
		gchar** _tmp25_;
		gint _tmp25__length1;
		_tmp22_ = folks_presence_details_get_client_types ((FolksPresenceDetails*) self, &_tmp23_);
		_tmp22__length1 = _tmp23_;
		_tmp24_ = _tmp22_;
		_tmp24__length1 = _tmp22__length1;
		_tmp25_ = client_types;
		_tmp25__length1 = client_types_length1;
		_tmp11_ = _tmp24_ != _tmp25_;
	}
	if (_tmp11_) {
		const gchar* _tmp26_;
		const gchar* _tmp27_;
		gchar** _tmp28_;
		gint _tmp28__length1;
		g_object_freeze_notify ((GObject*) self);
		_tmp26_ = presence_message;
		folks_presence_details_set_presence_message ((FolksPresenceDetails*) self, _tmp26_);
		folks_presence_details_set_presence_type ((FolksPresenceDetails*) self, presence_type);
		_tmp27_ = presence_status;
		folks_presence_details_set_presence_status ((FolksPresenceDetails*) self, _tmp27_);
		_tmp28_ = client_types;
		_tmp28__length1 = client_types_length1;
		folks_presence_details_set_client_types ((FolksPresenceDetails*) self, _tmp28_, _tmp28__length1);
		g_object_thaw_notify ((GObject*) self);
	}
	client_types = (_vala_array_free (client_types, client_types_length1, (GDestroyNotify) g_free), NULL);
}

static void
___lambda15__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda15_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_presence (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_PRESENCE_DETAILS, ___lambda13__folks_individual_property_filter, self, ___lambda14__gcompare_func, "presence", ___lambda15__folks_individual_single_valued_property_setter, self);
}

static gboolean
__lambda22_ (FolksIndividual* self,
             FolksPersona* p)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_favourite_details_get_is_favourite (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails));
	_tmp1_ = _tmp0_;
	result = _tmp1_;
	return result;
}

static gboolean
___lambda22__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda22_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda23_ (FolksPersona* a,
             FolksPersona* b)
{
	gboolean a_is_favourite = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean b_is_favourite = FALSE;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = folks_favourite_details_get_is_favourite (G_TYPE_CHECK_INSTANCE_CAST (a, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails));
	_tmp1_ = _tmp0_;
	a_is_favourite = _tmp1_;
	_tmp2_ = folks_favourite_details_get_is_favourite (G_TYPE_CHECK_INSTANCE_CAST (b, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails));
	_tmp3_ = _tmp2_;
	b_is_favourite = _tmp3_;
	if (a_is_favourite == TRUE) {
		_tmp4_ = 1;
	} else {
		_tmp4_ = 0;
	}
	if (b_is_favourite == TRUE) {
		_tmp5_ = 1;
	} else {
		_tmp5_ = 0;
	}
	result = _tmp4_ - _tmp5_;
	return result;
}

static gint
___lambda23__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda23_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
__lambda24_ (FolksIndividual* self,
             FolksPersona* p)
{
	gboolean favourite = FALSE;
	favourite = FALSE;
	if (p != NULL) {
		gboolean _tmp0_;
		gboolean _tmp1_;
		_tmp0_ = folks_favourite_details_get_is_favourite (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails));
		_tmp1_ = _tmp0_;
		favourite = _tmp1_;
	}
	if (self->priv->_is_favourite != favourite) {
		self->priv->_is_favourite = favourite;
		g_object_notify ((GObject*) self, "is-favourite");
	}
}

static void
___lambda24__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda24_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_is_favourite (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_FAVOURITE_DETAILS, ___lambda22__folks_individual_property_filter, self, ___lambda23__gcompare_func, "is-favourite", ___lambda24__folks_individual_single_valued_property_setter, self);
}

static const gchar*
_folks_individual_look_up_alias_for_display_name (FolksIndividual* self,
                                                  FolksPersona* p)
{
	FolksAliasDetails* a = NULL;
	gboolean _tmp0_ = FALSE;
	FolksAliasDetails* _tmp1_;
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	a = FOLKS_IS_ALIAS_DETAILS (p) ? ((FolksAliasDetails*) p) : NULL;
	_tmp1_ = a;
	if (_tmp1_ != NULL) {
		FolksAliasDetails* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp2_ = a;
		_tmp3_ = folks_alias_details_get_alias (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		FolksAliasDetails* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = a;
		_tmp6_ = folks_alias_details_get_alias (_tmp5_);
		_tmp7_ = _tmp6_;
		result = _tmp7_;
		return result;
	}
	result = "";
	return result;
}

static gchar*
_folks_individual_look_up_name_details_for_display_name (FolksIndividual* self,
                                                         FolksPersona* p)
{
	FolksNameDetails* n = NULL;
	FolksNameDetails* _tmp0_;
	gchar* _tmp22_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	n = FOLKS_IS_NAME_DETAILS (p) ? ((FolksNameDetails*) p) : NULL;
	_tmp0_ = n;
	if (_tmp0_ != NULL) {
		FolksNameDetails* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp1_ = n;
		_tmp2_ = folks_name_details_get_full_name (_tmp1_);
		_tmp3_ = _tmp2_;
		if (g_strcmp0 (_tmp3_, "") != 0) {
			FolksNameDetails* _tmp4_;
			const gchar* _tmp5_;
			const gchar* _tmp6_;
			gchar* _tmp7_;
			_tmp4_ = n;
			_tmp5_ = folks_name_details_get_full_name (_tmp4_);
			_tmp6_ = _tmp5_;
			_tmp7_ = g_strdup (_tmp6_);
			result = _tmp7_;
			return result;
		} else {
			FolksNameDetails* _tmp8_;
			FolksStructuredName* _tmp9_;
			FolksStructuredName* _tmp10_;
			_tmp8_ = n;
			_tmp9_ = folks_name_details_get_structured_name (_tmp8_);
			_tmp10_ = _tmp9_;
			if (_tmp10_ != NULL) {
				FolksNameDetails* _tmp11_;
				FolksStructuredName* _tmp12_;
				FolksStructuredName* _tmp13_;
				gchar* _tmp14_;
				_tmp11_ = n;
				_tmp12_ = folks_name_details_get_structured_name (_tmp11_);
				_tmp13_ = _tmp12_;
				_tmp14_ = folks_structured_name_to_string (_tmp13_);
				result = _tmp14_;
				return result;
			} else {
				FolksNameDetails* _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				_tmp15_ = n;
				_tmp16_ = folks_name_details_get_nickname (_tmp15_);
				_tmp17_ = _tmp16_;
				if (g_strcmp0 (_tmp17_, "") != 0) {
					FolksNameDetails* _tmp18_;
					const gchar* _tmp19_;
					const gchar* _tmp20_;
					gchar* _tmp21_;
					_tmp18_ = n;
					_tmp19_ = folks_name_details_get_nickname (_tmp18_);
					_tmp20_ = _tmp19_;
					_tmp21_ = g_strdup (_tmp20_);
					result = _tmp21_;
					return result;
				}
			}
		}
	}
	_tmp22_ = g_strdup ("");
	result = _tmp22_;
	return result;
}

static const gchar*
_folks_individual_look_up_email_address_for_display_name (FolksIndividual* self,
                                                          FolksPersona* p)
{
	FolksEmailDetails* e = NULL;
	FolksEmailDetails* _tmp0_;
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	e = FOLKS_IS_EMAIL_DETAILS (p) ? ((FolksEmailDetails*) p) : NULL;
	_tmp0_ = e;
	if (_tmp0_ != NULL) {
		{
			GeeIterator* _email_fd_it = NULL;
			FolksEmailDetails* _tmp1_;
			GeeSet* _tmp2_;
			GeeSet* _tmp3_;
			GeeIterator* _tmp4_;
			_tmp1_ = e;
			_tmp2_ = folks_email_details_get_email_addresses (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FOLKS_TYPE_EMAIL_DETAILS, FolksEmailDetails));
			_tmp3_ = _tmp2_;
			_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
			_email_fd_it = _tmp4_;
			while (TRUE) {
				GeeIterator* _tmp5_;
				FolksEmailFieldDetails* email_fd = NULL;
				GeeIterator* _tmp6_;
				gpointer _tmp7_;
				FolksEmailFieldDetails* _tmp8_;
				gconstpointer _tmp9_;
				gconstpointer _tmp10_;
				_tmp5_ = _email_fd_it;
				if (!gee_iterator_next (_tmp5_)) {
					break;
				}
				_tmp6_ = _email_fd_it;
				_tmp7_ = gee_iterator_get (_tmp6_);
				email_fd = (FolksEmailFieldDetails*) _tmp7_;
				_tmp8_ = email_fd;
				_tmp9_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp8_);
				_tmp10_ = _tmp9_;
				if (((const gchar*) _tmp10_) != NULL) {
					FolksEmailFieldDetails* _tmp11_;
					gconstpointer _tmp12_;
					gconstpointer _tmp13_;
					_tmp11_ = email_fd;
					_tmp12_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp11_);
					_tmp13_ = _tmp12_;
					result = (const gchar*) _tmp13_;
					_g_object_unref0 (email_fd);
					_g_object_unref0 (_email_fd_it);
					return result;
				}
				_g_object_unref0 (email_fd);
			}
			_g_object_unref0 (_email_fd_it);
		}
	}
	result = "";
	return result;
}

static const gchar*
_folks_individual_look_up_phone_number_for_display_name (FolksIndividual* self,
                                                         FolksPersona* p)
{
	FolksPhoneDetails* e = NULL;
	FolksPhoneDetails* _tmp0_;
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	e = FOLKS_IS_PHONE_DETAILS (p) ? ((FolksPhoneDetails*) p) : NULL;
	_tmp0_ = e;
	if (_tmp0_ != NULL) {
		{
			GeeIterator* _phone_fd_it = NULL;
			FolksPhoneDetails* _tmp1_;
			GeeSet* _tmp2_;
			GeeSet* _tmp3_;
			GeeIterator* _tmp4_;
			_tmp1_ = e;
			_tmp2_ = folks_phone_details_get_phone_numbers (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FOLKS_TYPE_PHONE_DETAILS, FolksPhoneDetails));
			_tmp3_ = _tmp2_;
			_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
			_phone_fd_it = _tmp4_;
			while (TRUE) {
				GeeIterator* _tmp5_;
				FolksPhoneFieldDetails* phone_fd = NULL;
				GeeIterator* _tmp6_;
				gpointer _tmp7_;
				FolksPhoneFieldDetails* _tmp8_;
				gconstpointer _tmp9_;
				gconstpointer _tmp10_;
				_tmp5_ = _phone_fd_it;
				if (!gee_iterator_next (_tmp5_)) {
					break;
				}
				_tmp6_ = _phone_fd_it;
				_tmp7_ = gee_iterator_get (_tmp6_);
				phone_fd = (FolksPhoneFieldDetails*) _tmp7_;
				_tmp8_ = phone_fd;
				_tmp9_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp8_);
				_tmp10_ = _tmp9_;
				if (((const gchar*) _tmp10_) != NULL) {
					FolksPhoneFieldDetails* _tmp11_;
					gconstpointer _tmp12_;
					gconstpointer _tmp13_;
					_tmp11_ = phone_fd;
					_tmp12_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp11_);
					_tmp13_ = _tmp12_;
					result = (const gchar*) _tmp13_;
					_g_object_unref0 (phone_fd);
					_g_object_unref0 (_phone_fd_it);
					return result;
				}
				_g_object_unref0 (phone_fd);
			}
			_g_object_unref0 (_phone_fd_it);
		}
	}
	result = "";
	return result;
}

static const gchar*
_folks_individual_look_up_display_id_for_display_name (FolksIndividual* self,
                                                       FolksPersona* p)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (p != NULL) {
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp2_ = folks_persona_get_display_id (p);
		_tmp3_ = _tmp2_;
		_tmp1_ = _tmp3_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp4_ = folks_persona_get_display_id (p);
		_tmp5_ = _tmp4_;
		_tmp6_ = folks_persona_get_iid (p);
		_tmp7_ = _tmp6_;
		_tmp0_ = g_strcmp0 (_tmp5_, _tmp7_) != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp8_ = folks_persona_get_display_id (p);
		_tmp9_ = _tmp8_;
		result = _tmp9_;
		return result;
	}
	result = "";
	return result;
}

static gchar*
_folks_individual_look_up_postal_address_for_display_name (FolksIndividual* self,
                                                           FolksPersona* p)
{
	FolksPostalAddressDetails* address_details = NULL;
	FolksPostalAddressDetails* _tmp0_;
	gchar* _tmp15_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	address_details = FOLKS_IS_POSTAL_ADDRESS_DETAILS (p) ? ((FolksPostalAddressDetails*) p) : NULL;
	_tmp0_ = address_details;
	if (_tmp0_ != NULL) {
		{
			GeeIterator* _pa_fd_it = NULL;
			FolksPostalAddressDetails* _tmp1_;
			GeeSet* _tmp2_;
			GeeSet* _tmp3_;
			GeeIterator* _tmp4_;
			_tmp1_ = address_details;
			_tmp2_ = folks_postal_address_details_get_postal_addresses (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, FolksPostalAddressDetails));
			_tmp3_ = _tmp2_;
			_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
			_pa_fd_it = _tmp4_;
			while (TRUE) {
				GeeIterator* _tmp5_;
				FolksPostalAddressFieldDetails* pa_fd = NULL;
				GeeIterator* _tmp6_;
				gpointer _tmp7_;
				FolksPostalAddress* pa = NULL;
				FolksPostalAddressFieldDetails* _tmp8_;
				gconstpointer _tmp9_;
				gconstpointer _tmp10_;
				FolksPostalAddress* _tmp11_;
				FolksPostalAddress* _tmp12_;
				_tmp5_ = _pa_fd_it;
				if (!gee_iterator_next (_tmp5_)) {
					break;
				}
				_tmp6_ = _pa_fd_it;
				_tmp7_ = gee_iterator_get (_tmp6_);
				pa_fd = (FolksPostalAddressFieldDetails*) _tmp7_;
				_tmp8_ = pa_fd;
				_tmp9_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp8_);
				_tmp10_ = _tmp9_;
				_tmp11_ = _g_object_ref0 ((FolksPostalAddress*) _tmp10_);
				pa = _tmp11_;
				_tmp12_ = pa;
				if (_tmp12_ != NULL) {
					FolksPostalAddress* _tmp13_;
					gchar* _tmp14_;
					_tmp13_ = pa;
					_tmp14_ = folks_postal_address_to_string (_tmp13_);
					result = _tmp14_;
					_g_object_unref0 (pa);
					_g_object_unref0 (pa_fd);
					_g_object_unref0 (_pa_fd_it);
					return result;
				}
				_g_object_unref0 (pa);
				_g_object_unref0 (pa_fd);
			}
			_g_object_unref0 (_pa_fd_it);
		}
	}
	_tmp15_ = g_strdup ("");
	result = _tmp15_;
	return result;
}

static void
_folks_individual_update_display_name (FolksIndividual* self)
{
	FolksPersona* primary_persona = NULL;
	gchar* new_display_name = NULL;
	gchar* _tmp0_;
	FolksPersona* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp32_;
	const gchar* _tmp47_;
	const gchar* _tmp64_;
	const gchar* _tmp81_;
	const gchar* _tmp98_;
	const gchar* _tmp113_;
	const gchar* _tmp115_;
	const gchar* _tmp116_;
	g_return_if_fail (self != NULL);
	primary_persona = NULL;
	_tmp0_ = g_strdup ("");
	new_display_name = _tmp0_;
	{
		FolksSmallSet* _p_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _p_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _p_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_p_list = _tmp1_;
		_tmp2_ = _p_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_p_size = _tmp4_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* p = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksPersona* _tmp10_;
			FolksPersonaStore* _tmp11_;
			FolksPersonaStore* _tmp12_;
			gboolean _tmp13_;
			gboolean _tmp14_;
			_p_index = _p_index + 1;
			_tmp5_ = _p_index;
			_tmp6_ = _p_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _p_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _p_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			p = _tmp9_;
			_tmp10_ = p;
			_tmp11_ = folks_persona_get_store (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = folks_persona_store_get_is_primary_store (_tmp12_);
			_tmp14_ = _tmp13_;
			if (_tmp14_) {
				FolksPersona* _tmp15_;
				_tmp15_ = p;
				primary_persona = _tmp15_;
				_g_object_unref0 (p);
				break;
			}
			_g_object_unref0 (p);
		}
	}
	_tmp16_ = primary_persona;
	_tmp17_ = _folks_individual_look_up_alias_for_display_name (self, _tmp16_);
	_tmp18_ = g_strdup (_tmp17_);
	_g_free0 (new_display_name);
	new_display_name = _tmp18_;
	{
		FolksSmallSet* _p_list = NULL;
		FolksSmallSet* _tmp19_;
		gint _p_size = 0;
		FolksSmallSet* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		gint _p_index = 0;
		_tmp19_ = self->priv->_persona_set;
		_p_list = _tmp19_;
		_tmp20_ = _p_list;
		_tmp21_ = gee_collection_get_size ((GeeCollection*) _tmp20_);
		_tmp22_ = _tmp21_;
		_p_size = _tmp22_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp23_;
			gint _tmp24_;
			FolksPersona* p = NULL;
			FolksSmallSet* _tmp25_;
			gconstpointer _tmp26_;
			FolksPersona* _tmp27_;
			const gchar* _tmp28_;
			FolksPersona* _tmp29_;
			const gchar* _tmp30_;
			gchar* _tmp31_;
			_p_index = _p_index + 1;
			_tmp23_ = _p_index;
			_tmp24_ = _p_size;
			if (!(_tmp23_ < _tmp24_)) {
				break;
			}
			_tmp25_ = _p_list;
			_tmp26_ = folks_small_set_get (_tmp25_, _p_index);
			_tmp27_ = _g_object_ref0 ((FolksPersona*) _tmp26_);
			p = _tmp27_;
			_tmp28_ = new_display_name;
			if (g_strcmp0 (_tmp28_, "") != 0) {
				_g_object_unref0 (p);
				break;
			}
			_tmp29_ = p;
			_tmp30_ = _folks_individual_look_up_alias_for_display_name (self, _tmp29_);
			_tmp31_ = g_strdup (_tmp30_);
			_g_free0 (new_display_name);
			new_display_name = _tmp31_;
			_g_object_unref0 (p);
		}
	}
	_tmp32_ = new_display_name;
	if (g_strcmp0 (_tmp32_, "") == 0) {
		FolksPersona* _tmp33_;
		gchar* _tmp34_;
		_tmp33_ = primary_persona;
		_tmp34_ = _folks_individual_look_up_name_details_for_display_name (self, _tmp33_);
		_g_free0 (new_display_name);
		new_display_name = _tmp34_;
		{
			FolksSmallSet* _p_list = NULL;
			FolksSmallSet* _tmp35_;
			gint _p_size = 0;
			FolksSmallSet* _tmp36_;
			gint _tmp37_;
			gint _tmp38_;
			gint _p_index = 0;
			_tmp35_ = self->priv->_persona_set;
			_p_list = _tmp35_;
			_tmp36_ = _p_list;
			_tmp37_ = gee_collection_get_size ((GeeCollection*) _tmp36_);
			_tmp38_ = _tmp37_;
			_p_size = _tmp38_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp39_;
				gint _tmp40_;
				FolksPersona* p = NULL;
				FolksSmallSet* _tmp41_;
				gconstpointer _tmp42_;
				FolksPersona* _tmp43_;
				const gchar* _tmp44_;
				FolksPersona* _tmp45_;
				gchar* _tmp46_;
				_p_index = _p_index + 1;
				_tmp39_ = _p_index;
				_tmp40_ = _p_size;
				if (!(_tmp39_ < _tmp40_)) {
					break;
				}
				_tmp41_ = _p_list;
				_tmp42_ = folks_small_set_get (_tmp41_, _p_index);
				_tmp43_ = _g_object_ref0 ((FolksPersona*) _tmp42_);
				p = _tmp43_;
				_tmp44_ = new_display_name;
				if (g_strcmp0 (_tmp44_, "") != 0) {
					_g_object_unref0 (p);
					break;
				}
				_tmp45_ = p;
				_tmp46_ = _folks_individual_look_up_name_details_for_display_name (self, _tmp45_);
				_g_free0 (new_display_name);
				new_display_name = _tmp46_;
				_g_object_unref0 (p);
			}
		}
	}
	_tmp47_ = new_display_name;
	if (g_strcmp0 (_tmp47_, "") == 0) {
		FolksPersona* _tmp48_;
		const gchar* _tmp49_;
		gchar* _tmp50_;
		_tmp48_ = primary_persona;
		_tmp49_ = _folks_individual_look_up_email_address_for_display_name (self, _tmp48_);
		_tmp50_ = g_strdup (_tmp49_);
		_g_free0 (new_display_name);
		new_display_name = _tmp50_;
		{
			FolksSmallSet* _p_list = NULL;
			FolksSmallSet* _tmp51_;
			gint _p_size = 0;
			FolksSmallSet* _tmp52_;
			gint _tmp53_;
			gint _tmp54_;
			gint _p_index = 0;
			_tmp51_ = self->priv->_persona_set;
			_p_list = _tmp51_;
			_tmp52_ = _p_list;
			_tmp53_ = gee_collection_get_size ((GeeCollection*) _tmp52_);
			_tmp54_ = _tmp53_;
			_p_size = _tmp54_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp55_;
				gint _tmp56_;
				FolksPersona* p = NULL;
				FolksSmallSet* _tmp57_;
				gconstpointer _tmp58_;
				FolksPersona* _tmp59_;
				const gchar* _tmp60_;
				FolksPersona* _tmp61_;
				const gchar* _tmp62_;
				gchar* _tmp63_;
				_p_index = _p_index + 1;
				_tmp55_ = _p_index;
				_tmp56_ = _p_size;
				if (!(_tmp55_ < _tmp56_)) {
					break;
				}
				_tmp57_ = _p_list;
				_tmp58_ = folks_small_set_get (_tmp57_, _p_index);
				_tmp59_ = _g_object_ref0 ((FolksPersona*) _tmp58_);
				p = _tmp59_;
				_tmp60_ = new_display_name;
				if (g_strcmp0 (_tmp60_, "") != 0) {
					_g_object_unref0 (p);
					break;
				}
				_tmp61_ = p;
				_tmp62_ = _folks_individual_look_up_email_address_for_display_name (self, _tmp61_);
				_tmp63_ = g_strdup (_tmp62_);
				_g_free0 (new_display_name);
				new_display_name = _tmp63_;
				_g_object_unref0 (p);
			}
		}
	}
	_tmp64_ = new_display_name;
	if (g_strcmp0 (_tmp64_, "") == 0) {
		FolksPersona* _tmp65_;
		const gchar* _tmp66_;
		gchar* _tmp67_;
		_tmp65_ = primary_persona;
		_tmp66_ = _folks_individual_look_up_phone_number_for_display_name (self, _tmp65_);
		_tmp67_ = g_strdup (_tmp66_);
		_g_free0 (new_display_name);
		new_display_name = _tmp67_;
		{
			FolksSmallSet* _p_list = NULL;
			FolksSmallSet* _tmp68_;
			gint _p_size = 0;
			FolksSmallSet* _tmp69_;
			gint _tmp70_;
			gint _tmp71_;
			gint _p_index = 0;
			_tmp68_ = self->priv->_persona_set;
			_p_list = _tmp68_;
			_tmp69_ = _p_list;
			_tmp70_ = gee_collection_get_size ((GeeCollection*) _tmp69_);
			_tmp71_ = _tmp70_;
			_p_size = _tmp71_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp72_;
				gint _tmp73_;
				FolksPersona* p = NULL;
				FolksSmallSet* _tmp74_;
				gconstpointer _tmp75_;
				FolksPersona* _tmp76_;
				const gchar* _tmp77_;
				FolksPersona* _tmp78_;
				const gchar* _tmp79_;
				gchar* _tmp80_;
				_p_index = _p_index + 1;
				_tmp72_ = _p_index;
				_tmp73_ = _p_size;
				if (!(_tmp72_ < _tmp73_)) {
					break;
				}
				_tmp74_ = _p_list;
				_tmp75_ = folks_small_set_get (_tmp74_, _p_index);
				_tmp76_ = _g_object_ref0 ((FolksPersona*) _tmp75_);
				p = _tmp76_;
				_tmp77_ = new_display_name;
				if (g_strcmp0 (_tmp77_, "") != 0) {
					_g_object_unref0 (p);
					break;
				}
				_tmp78_ = p;
				_tmp79_ = _folks_individual_look_up_phone_number_for_display_name (self, _tmp78_);
				_tmp80_ = g_strdup (_tmp79_);
				_g_free0 (new_display_name);
				new_display_name = _tmp80_;
				_g_object_unref0 (p);
			}
		}
	}
	_tmp81_ = new_display_name;
	if (g_strcmp0 (_tmp81_, "") == 0) {
		FolksPersona* _tmp82_;
		const gchar* _tmp83_;
		gchar* _tmp84_;
		_tmp82_ = primary_persona;
		_tmp83_ = _folks_individual_look_up_display_id_for_display_name (self, _tmp82_);
		_tmp84_ = g_strdup (_tmp83_);
		_g_free0 (new_display_name);
		new_display_name = _tmp84_;
		{
			FolksSmallSet* _p_list = NULL;
			FolksSmallSet* _tmp85_;
			gint _p_size = 0;
			FolksSmallSet* _tmp86_;
			gint _tmp87_;
			gint _tmp88_;
			gint _p_index = 0;
			_tmp85_ = self->priv->_persona_set;
			_p_list = _tmp85_;
			_tmp86_ = _p_list;
			_tmp87_ = gee_collection_get_size ((GeeCollection*) _tmp86_);
			_tmp88_ = _tmp87_;
			_p_size = _tmp88_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp89_;
				gint _tmp90_;
				FolksPersona* p = NULL;
				FolksSmallSet* _tmp91_;
				gconstpointer _tmp92_;
				FolksPersona* _tmp93_;
				const gchar* _tmp94_;
				FolksPersona* _tmp95_;
				const gchar* _tmp96_;
				gchar* _tmp97_;
				_p_index = _p_index + 1;
				_tmp89_ = _p_index;
				_tmp90_ = _p_size;
				if (!(_tmp89_ < _tmp90_)) {
					break;
				}
				_tmp91_ = _p_list;
				_tmp92_ = folks_small_set_get (_tmp91_, _p_index);
				_tmp93_ = _g_object_ref0 ((FolksPersona*) _tmp92_);
				p = _tmp93_;
				_tmp94_ = new_display_name;
				if (g_strcmp0 (_tmp94_, "") != 0) {
					_g_object_unref0 (p);
					break;
				}
				_tmp95_ = p;
				_tmp96_ = _folks_individual_look_up_display_id_for_display_name (self, _tmp95_);
				_tmp97_ = g_strdup (_tmp96_);
				_g_free0 (new_display_name);
				new_display_name = _tmp97_;
				_g_object_unref0 (p);
			}
		}
	}
	_tmp98_ = new_display_name;
	if (g_strcmp0 (_tmp98_, "") == 0) {
		FolksPersona* _tmp99_;
		gchar* _tmp100_;
		_tmp99_ = primary_persona;
		_tmp100_ = _folks_individual_look_up_postal_address_for_display_name (self, _tmp99_);
		_g_free0 (new_display_name);
		new_display_name = _tmp100_;
		{
			FolksSmallSet* _p_list = NULL;
			FolksSmallSet* _tmp101_;
			gint _p_size = 0;
			FolksSmallSet* _tmp102_;
			gint _tmp103_;
			gint _tmp104_;
			gint _p_index = 0;
			_tmp101_ = self->priv->_persona_set;
			_p_list = _tmp101_;
			_tmp102_ = _p_list;
			_tmp103_ = gee_collection_get_size ((GeeCollection*) _tmp102_);
			_tmp104_ = _tmp103_;
			_p_size = _tmp104_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp105_;
				gint _tmp106_;
				FolksPersona* p = NULL;
				FolksSmallSet* _tmp107_;
				gconstpointer _tmp108_;
				FolksPersona* _tmp109_;
				const gchar* _tmp110_;
				FolksPersona* _tmp111_;
				gchar* _tmp112_;
				_p_index = _p_index + 1;
				_tmp105_ = _p_index;
				_tmp106_ = _p_size;
				if (!(_tmp105_ < _tmp106_)) {
					break;
				}
				_tmp107_ = _p_list;
				_tmp108_ = folks_small_set_get (_tmp107_, _p_index);
				_tmp109_ = _g_object_ref0 ((FolksPersona*) _tmp108_);
				p = _tmp109_;
				_tmp110_ = new_display_name;
				if (g_strcmp0 (_tmp110_, "") != 0) {
					_g_object_unref0 (p);
					break;
				}
				_tmp111_ = p;
				_tmp112_ = _folks_individual_look_up_postal_address_for_display_name (self, _tmp111_);
				_g_free0 (new_display_name);
				new_display_name = _tmp112_;
				_g_object_unref0 (p);
			}
		}
	}
	_tmp113_ = new_display_name;
	if (g_strcmp0 (_tmp113_, "") == 0) {
		gchar* _tmp114_;
		_tmp114_ = g_strdup (_ ("Unnamed Person"));
		_g_free0 (new_display_name);
		new_display_name = _tmp114_;
	}
	_tmp115_ = new_display_name;
	_tmp116_ = self->priv->_display_name;
	if (g_strcmp0 (_tmp115_, _tmp116_) != 0) {
		const gchar* _tmp117_;
		gchar* _tmp118_;
		const gchar* _tmp119_;
		_tmp117_ = new_display_name;
		_tmp118_ = g_strdup (_tmp117_);
		_g_free0 (self->priv->_display_name);
		self->priv->_display_name = _tmp118_;
		_tmp119_ = new_display_name;
		g_debug ("individual.vala:2116: Setting display name ‘%s’", _tmp119_);
		g_object_notify ((GObject*) self, "display-name");
	}
	_g_free0 (new_display_name);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static gboolean
__lambda7_ (FolksIndividual* self,
            FolksPersona* p)
{
	const gchar* alias = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_alias_details_get_alias (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
	_tmp1_ = _tmp0_;
	alias = _tmp1_;
	g_return_val_if_fail (alias != NULL, FALSE);
	_tmp2_ = string_strip (alias);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strcmp0 (_tmp3_, "") != 0;
	_g_free0 (_tmp3_);
	result = _tmp4_;
	return result;
}

static gboolean
___lambda7__folks_individual_property_filter (FolksPersona* persona,
                                              gpointer self)
{
	gboolean result;
	result = __lambda7_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda8_ (FolksPersona* a,
            FolksPersona* b)
{
	const gchar* a_alias = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* b_alias = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gint _tmp6_ = 0;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gboolean _tmp10_;
	gint a_is_empty = 0;
	gint _tmp11_ = 0;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gboolean _tmp15_;
	gint b_is_empty = 0;
	gint _tmp16_ = 0;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gint a_is_display_id = 0;
	gint _tmp20_ = 0;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	gint b_is_display_id = 0;
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = folks_alias_details_get_alias (G_TYPE_CHECK_INSTANCE_CAST (a, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
	_tmp1_ = _tmp0_;
	a_alias = _tmp1_;
	_tmp2_ = folks_alias_details_get_alias (G_TYPE_CHECK_INSTANCE_CAST (b, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
	_tmp3_ = _tmp2_;
	b_alias = _tmp3_;
	_tmp4_ = a_alias;
	g_return_val_if_fail (_tmp4_ != NULL, 0);
	_tmp5_ = b_alias;
	g_return_val_if_fail (_tmp5_ != NULL, 0);
	_tmp7_ = a_alias;
	_tmp8_ = string_strip (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_strcmp0 (_tmp9_, "") == 0;
	_g_free0 (_tmp9_);
	if (_tmp10_) {
		_tmp6_ = 1;
	} else {
		_tmp6_ = 0;
	}
	a_is_empty = _tmp6_;
	_tmp12_ = b_alias;
	_tmp13_ = string_strip (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_strcmp0 (_tmp14_, "") == 0;
	_g_free0 (_tmp14_);
	if (_tmp15_) {
		_tmp11_ = 1;
	} else {
		_tmp11_ = 0;
	}
	b_is_empty = _tmp11_;
	_tmp17_ = a_alias;
	_tmp18_ = folks_persona_get_display_id (a);
	_tmp19_ = _tmp18_;
	if (g_strcmp0 (_tmp17_, _tmp19_) == 0) {
		_tmp16_ = 1;
	} else {
		_tmp16_ = 0;
	}
	a_is_display_id = _tmp16_;
	_tmp21_ = b_alias;
	_tmp22_ = folks_persona_get_display_id (b);
	_tmp23_ = _tmp22_;
	if (g_strcmp0 (_tmp21_, _tmp23_) == 0) {
		_tmp20_ = 1;
	} else {
		_tmp20_ = 0;
	}
	b_is_display_id = _tmp20_;
	result = (b_is_empty + b_is_display_id) - (a_is_empty + a_is_display_id);
	return result;
}

static gint
___lambda8__gcompare_func (gconstpointer a,
                           gconstpointer b)
{
	gint result;
	result = __lambda8_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
__lambda9_ (FolksIndividual* self,
            FolksPersona* p)
{
	gchar* alias = NULL;
	gchar* _tmp0_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	_tmp0_ = g_strdup ("");
	alias = _tmp0_;
	if (p != NULL) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp1_ = folks_alias_details_get_alias (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
		_tmp2_ = _tmp1_;
		_tmp3_ = string_strip (_tmp2_);
		_g_free0 (alias);
		alias = _tmp3_;
	}
	_tmp4_ = self->priv->_alias;
	_tmp5_ = alias;
	if (g_strcmp0 (_tmp4_, _tmp5_) != 0) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = alias;
		g_debug ("individual.vala:2164: Setting alias ‘%s’", _tmp6_);
		_tmp7_ = alias;
		alias = NULL;
		_g_free0 (self->priv->_alias);
		self->priv->_alias = _tmp7_;
		g_object_notify ((GObject*) self, "alias");
		_folks_individual_update_display_name (self);
	}
	_g_free0 (alias);
}

static void
___lambda9__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                            gpointer self)
{
	__lambda9_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_alias (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_ALIAS_DETAILS, ___lambda7__folks_individual_property_filter, self, ___lambda8__gcompare_func, "alias", ___lambda9__folks_individual_single_valued_property_setter, self);
}

static gboolean
__lambda10_ (FolksIndividual* self,
             FolksPersona* p)
{
	GLoadableIcon* _tmp0_;
	GLoadableIcon* _tmp1_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_avatar_details_get_avatar (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetails));
	_tmp1_ = _tmp0_;
	result = _tmp1_ != NULL;
	return result;
}

static gboolean
___lambda10__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda10_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda11_ (FolksPersona* a,
             FolksPersona* b)
{
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}

static gint
___lambda11__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda11_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
__lambda12_ (FolksIndividual* self,
             FolksPersona* p)
{
	GLoadableIcon* avatar = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	GLoadableIcon* _tmp4_;
	avatar = NULL;
	if (p != NULL) {
		GLoadableIcon* _tmp0_;
		GLoadableIcon* _tmp1_;
		_tmp0_ = folks_avatar_details_get_avatar (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetails));
		_tmp1_ = _tmp0_;
		avatar = _tmp1_;
	}
	_tmp4_ = self->priv->_avatar;
	if (_tmp4_ == NULL) {
		GLoadableIcon* _tmp5_;
		_tmp5_ = avatar;
		_tmp3_ = _tmp5_ != NULL;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		gboolean _tmp6_ = FALSE;
		GLoadableIcon* _tmp7_;
		_tmp7_ = self->priv->_avatar;
		if (_tmp7_ != NULL) {
			gboolean _tmp8_ = FALSE;
			GLoadableIcon* _tmp9_;
			_tmp9_ = avatar;
			if (_tmp9_ == NULL) {
				_tmp8_ = TRUE;
			} else {
				GLoadableIcon* _tmp10_;
				GLoadableIcon* _tmp11_;
				_tmp10_ = self->priv->_avatar;
				_tmp11_ = avatar;
				_tmp8_ = !g_icon_equal ((GIcon*) G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, g_loadable_icon_get_type (), GLoadableIcon), (GIcon*) _tmp11_);
			}
			_tmp6_ = _tmp8_;
		} else {
			_tmp6_ = FALSE;
		}
		_tmp2_ = _tmp6_;
	}
	if (_tmp2_) {
		GLoadableIcon* _tmp12_;
		GLoadableIcon* _tmp13_;
		_tmp12_ = avatar;
		_tmp13_ = _g_object_ref0 (_tmp12_);
		_g_object_unref0 (self->priv->_avatar);
		self->priv->_avatar = _tmp13_;
		g_object_notify ((GObject*) self, "avatar");
	}
}

static void
___lambda12__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda12_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_avatar (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_AVATAR_DETAILS, ___lambda10__folks_individual_property_filter, self, ___lambda11__gcompare_func, "avatar", ___lambda12__folks_individual_single_valued_property_setter, self);
}

static void
_folks_individual_update_trust_level (FolksIndividual* self)
{
	FolksTrustLevel trust_level = 0;
	FolksTrustLevel _tmp18_;
	g_return_if_fail (self != NULL);
	trust_level = FOLKS_TRUST_LEVEL_PERSONAS;
	{
		FolksSmallSet* _p_list = NULL;
		FolksSmallSet* _tmp0_;
		gint _p_size = 0;
		FolksSmallSet* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _p_index = 0;
		_tmp0_ = self->priv->_persona_set;
		_p_list = _tmp0_;
		_tmp1_ = _p_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_p_size = _tmp3_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			FolksPersona* p = NULL;
			FolksSmallSet* _tmp6_;
			gconstpointer _tmp7_;
			FolksPersona* _tmp8_;
			gboolean _tmp9_ = FALSE;
			FolksPersona* _tmp10_;
			gboolean _tmp11_;
			gboolean _tmp12_;
			_p_index = _p_index + 1;
			_tmp4_ = _p_index;
			_tmp5_ = _p_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _p_list;
			_tmp7_ = folks_small_set_get (_tmp6_, _p_index);
			_tmp8_ = _g_object_ref0 ((FolksPersona*) _tmp7_);
			p = _tmp8_;
			_tmp10_ = p;
			_tmp11_ = folks_persona_get_is_user (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_ == FALSE) {
				FolksPersona* _tmp13_;
				FolksPersonaStore* _tmp14_;
				FolksPersonaStore* _tmp15_;
				FolksPersonaStoreTrust _tmp16_;
				FolksPersonaStoreTrust _tmp17_;
				_tmp13_ = p;
				_tmp14_ = folks_persona_get_store (_tmp13_);
				_tmp15_ = _tmp14_;
				_tmp16_ = folks_persona_store_get_trust_level (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp9_ = _tmp17_ == FOLKS_PERSONA_STORE_TRUST_NONE;
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				trust_level = FOLKS_TRUST_LEVEL_NONE;
			}
			_g_object_unref0 (p);
		}
	}
	_tmp18_ = self->priv->_trust_level;
	if (_tmp18_ != trust_level) {
		folks_individual_set_trust_level (self, trust_level);
	}
}

static gboolean
__lambda16_ (FolksIndividual* self)
{
	GeeHashMultiMap* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_im_addresses;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda16__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda16_ ((FolksIndividual*) self);
	return result;
}

static guint
_folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v,
                                                              gpointer self)
{
	guint result;
	result = folks_abstract_field_details_hash_static ((FolksAbstractFieldDetails*) v);
	return result;
}

static gboolean
_folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a,
                                                                gconstpointer b,
                                                                gpointer self)
{
	gboolean result;
	result = folks_abstract_field_details_equal_static ((FolksAbstractFieldDetails*) a, (FolksAbstractFieldDetails*) b);
	return result;
}

static void
__lambda17_ (FolksIndividual* self)
{
	GeeHashMultiMap* _tmp0_;
	_tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_im_addresses);
	self->priv->_im_addresses = _tmp0_;
}

static void
___lambda17__folks_individual_collection_creator (gpointer self)
{
	__lambda17_ ((FolksIndividual*) self);
}

static gboolean
__lambda18_ (FolksIndividual* self)
{
	GeeHashMultiMap* new_im_addresses = NULL;
	GeeHashMultiMap* _tmp0_;
	GeeHashMultiMap* _tmp24_;
	GeeHashMultiMap* _tmp25_;
	gboolean result;
	_tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_im_addresses = _tmp0_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _persona_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_persona_list = _tmp1_;
		_tmp2_ = _persona_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_persona_size = _tmp4_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksImDetails* im_details = NULL;
			FolksPersona* _tmp10_;
			FolksImDetails* _tmp11_;
			_persona_index = _persona_index + 1;
			_tmp5_ = _persona_index;
			_tmp6_ = _persona_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _persona_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			persona = _tmp9_;
			_tmp10_ = persona;
			im_details = FOLKS_IS_IM_DETAILS (_tmp10_) ? ((FolksImDetails*) _tmp10_) : NULL;
			_tmp11_ = im_details;
			if (_tmp11_ != NULL) {
				GeeMapIterator* iter = NULL;
				FolksImDetails* _tmp12_;
				GeeMultiMap* _tmp13_;
				GeeMultiMap* _tmp14_;
				GeeMapIterator* _tmp15_;
				_tmp12_ = im_details;
				_tmp13_ = folks_im_details_get_im_addresses (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = gee_multi_map_map_iterator (_tmp14_);
				iter = _tmp15_;
				while (TRUE) {
					GeeMapIterator* _tmp16_;
					GeeHashMultiMap* _tmp17_;
					GeeMapIterator* _tmp18_;
					gpointer _tmp19_;
					gchar* _tmp20_;
					GeeMapIterator* _tmp21_;
					gpointer _tmp22_;
					FolksImFieldDetails* _tmp23_;
					_tmp16_ = iter;
					if (!gee_map_iterator_next (_tmp16_)) {
						break;
					}
					_tmp17_ = new_im_addresses;
					_tmp18_ = iter;
					_tmp19_ = gee_map_iterator_get_key (_tmp18_);
					_tmp20_ = (gchar*) _tmp19_;
					_tmp21_ = iter;
					_tmp22_ = gee_map_iterator_get_value (_tmp21_);
					_tmp23_ = (FolksImFieldDetails*) _tmp22_;
					gee_multi_map_set ((GeeMultiMap*) _tmp17_, _tmp20_, _tmp23_);
					_g_object_unref0 (_tmp23_);
					_g_free0 (_tmp20_);
				}
				_g_object_unref0 (iter);
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp24_ = new_im_addresses;
	_tmp25_ = self->priv->_im_addresses;
	if (!folks_utils_multi_map_str_afd_equal ((GeeMultiMap*) _tmp24_, (GeeMultiMap*) _tmp25_)) {
		GeeHashMultiMap* _tmp26_;
		GeeHashMultiMap* _tmp27_;
		_tmp26_ = new_im_addresses;
		_tmp27_ = _g_object_ref0 (_tmp26_);
		_g_object_unref0 (self->priv->_im_addresses);
		self->priv->_im_addresses = _tmp27_;
		result = TRUE;
		_g_object_unref0 (new_im_addresses);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (new_im_addresses);
	return result;
}

static gboolean
___lambda18__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda18_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_im_addresses (FolksIndividual* self,
                                       gboolean create_if_not_exist,
                                       gboolean emit_notification,
                                       gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "im-addresses", create_if_not_exist, ___lambda16__folks_individual_property_is_null, self, ___lambda17__folks_individual_collection_creator, self, ___lambda18__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static gboolean
__lambda19_ (FolksIndividual* self)
{
	GeeHashMultiMap* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_web_service_addresses;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda19__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda19_ ((FolksIndividual*) self);
	return result;
}

static void
__lambda20_ (FolksIndividual* self)
{
	GeeHashMultiMap* _tmp0_;
	_tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_web_service_addresses);
	self->priv->_web_service_addresses = _tmp0_;
}

static void
___lambda20__folks_individual_collection_creator (gpointer self)
{
	__lambda20_ ((FolksIndividual*) self);
}

static gboolean
__lambda21_ (FolksIndividual* self)
{
	GeeHashMultiMap* new_web_service_addresses = NULL;
	GeeHashMultiMap* _tmp0_;
	GeeHashMultiMap* _tmp24_;
	GeeHashMultiMap* _tmp25_;
	gboolean result;
	_tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_web_service_addresses = _tmp0_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _persona_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_persona_list = _tmp1_;
		_tmp2_ = _persona_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_persona_size = _tmp4_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksWebServiceDetails* web_service_details = NULL;
			FolksPersona* _tmp10_;
			FolksWebServiceDetails* _tmp11_;
			_persona_index = _persona_index + 1;
			_tmp5_ = _persona_index;
			_tmp6_ = _persona_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _persona_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			persona = _tmp9_;
			_tmp10_ = persona;
			web_service_details = FOLKS_IS_WEB_SERVICE_DETAILS (_tmp10_) ? ((FolksWebServiceDetails*) _tmp10_) : NULL;
			_tmp11_ = web_service_details;
			if (_tmp11_ != NULL) {
				GeeMapIterator* iter = NULL;
				FolksWebServiceDetails* _tmp12_;
				GeeMultiMap* _tmp13_;
				GeeMultiMap* _tmp14_;
				GeeMapIterator* _tmp15_;
				_tmp12_ = web_service_details;
				_tmp13_ = folks_web_service_details_get_web_service_addresses (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = gee_multi_map_map_iterator (_tmp14_);
				iter = _tmp15_;
				while (TRUE) {
					GeeMapIterator* _tmp16_;
					GeeHashMultiMap* _tmp17_;
					GeeMapIterator* _tmp18_;
					gpointer _tmp19_;
					gchar* _tmp20_;
					GeeMapIterator* _tmp21_;
					gpointer _tmp22_;
					FolksWebServiceFieldDetails* _tmp23_;
					_tmp16_ = iter;
					if (!gee_map_iterator_next (_tmp16_)) {
						break;
					}
					_tmp17_ = new_web_service_addresses;
					_tmp18_ = iter;
					_tmp19_ = gee_map_iterator_get_key (_tmp18_);
					_tmp20_ = (gchar*) _tmp19_;
					_tmp21_ = iter;
					_tmp22_ = gee_map_iterator_get_value (_tmp21_);
					_tmp23_ = (FolksWebServiceFieldDetails*) _tmp22_;
					gee_multi_map_set ((GeeMultiMap*) _tmp17_, _tmp20_, _tmp23_);
					_g_object_unref0 (_tmp23_);
					_g_free0 (_tmp20_);
				}
				_g_object_unref0 (iter);
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp24_ = new_web_service_addresses;
	_tmp25_ = self->priv->_web_service_addresses;
	if (!folks_utils_multi_map_str_afd_equal ((GeeMultiMap*) _tmp24_, (GeeMultiMap*) _tmp25_)) {
		GeeHashMultiMap* _tmp26_;
		GeeHashMultiMap* _tmp27_;
		_tmp26_ = new_web_service_addresses;
		_tmp27_ = _g_object_ref0 (_tmp26_);
		_g_object_unref0 (self->priv->_web_service_addresses);
		self->priv->_web_service_addresses = _tmp27_;
		result = TRUE;
		_g_object_unref0 (new_web_service_addresses);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (new_web_service_addresses);
	return result;
}

static gboolean
___lambda21__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda21_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_web_service_addresses (FolksIndividual* self,
                                                gboolean create_if_not_exist,
                                                gboolean emit_notification,
                                                gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "web-service-addresses", create_if_not_exist, ___lambda19__folks_individual_property_is_null, self, ___lambda20__folks_individual_collection_creator, self, ___lambda21__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static void
__folks_individual_persona_notify_cb_g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self)
{
	_folks_individual_persona_notify_cb ((FolksIndividual*) self, _sender, pspec);
}

static void
__folks_individual_persona_group_changed_cb_folks_group_details_group_changed (FolksGroupDetails* _sender,
                                                                               const gchar* group,
                                                                               gboolean is_member,
                                                                               gpointer self)
{
	_folks_individual_persona_group_changed_cb ((FolksIndividual*) self, group, is_member);
}

static void
_folks_individual_connect_to_persona (FolksIndividual* self,
                                      FolksPersona* persona)
{
	gboolean _tmp0_ = FALSE;
	FolksIndividual* _tmp1_;
	FolksIndividual* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (persona != NULL);
	_tmp1_ = folks_persona_get_individual (persona);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		FolksIndividual* _tmp3_;
		FolksIndividual* _tmp4_;
		_tmp3_ = folks_persona_get_individual (persona);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ != self;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		FolksIndividual* _tmp5_;
		FolksIndividual* _tmp6_;
		_tmp5_ = folks_persona_get_individual (persona);
		_tmp6_ = _tmp5_;
		_folks_individual_disconnect_from_persona (_tmp6_, persona, self);
	}
	folks_persona_set_individual (persona, self);
	g_signal_connect_object ((GObject*) persona, "notify", (GCallback) __folks_individual_persona_notify_cb_g_object_notify, self, 0);
	if (FOLKS_IS_GROUP_DETAILS (persona)) {
		g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (persona, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails), "group-changed", (GCallback) __folks_individual_persona_group_changed_cb_folks_group_details_group_changed, self, 0);
	}
}

static gboolean
__lambda25_ (FolksIndividual* self,
             FolksPersona* p)
{
	FolksStructuredName* name = NULL;
	FolksStructuredName* _tmp0_;
	FolksStructuredName* _tmp1_;
	gboolean _tmp2_ = FALSE;
	FolksStructuredName* _tmp3_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_name_details_get_structured_name (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
	_tmp1_ = _tmp0_;
	name = _tmp1_;
	_tmp3_ = name;
	if (_tmp3_ != NULL) {
		FolksStructuredName* _tmp4_;
		_tmp4_ = name;
		_tmp2_ = !folks_structured_name_is_empty (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
	} else {
		_tmp2_ = FALSE;
	}
	result = _tmp2_;
	return result;
}

static gboolean
___lambda25__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda25_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda26_ (FolksPersona* a,
             FolksPersona* b)
{
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}

static gint
___lambda26__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda26_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
__lambda27_ (FolksIndividual* self,
             FolksPersona* p)
{
	FolksStructuredName* name = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	FolksStructuredName* _tmp7_;
	name = NULL;
	if (p != NULL) {
		FolksStructuredName* _tmp0_;
		FolksStructuredName* _tmp1_;
		gboolean _tmp2_ = FALSE;
		FolksStructuredName* _tmp3_;
		_tmp0_ = folks_name_details_get_structured_name (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
		_tmp1_ = _tmp0_;
		name = _tmp1_;
		_tmp3_ = name;
		if (_tmp3_ != NULL) {
			FolksStructuredName* _tmp4_;
			_tmp4_ = name;
			_tmp2_ = folks_structured_name_is_empty (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			name = NULL;
		}
	}
	_tmp7_ = self->priv->_structured_name;
	if (_tmp7_ == NULL) {
		FolksStructuredName* _tmp8_;
		_tmp8_ = name;
		_tmp6_ = _tmp8_ != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		gboolean _tmp9_ = FALSE;
		FolksStructuredName* _tmp10_;
		_tmp10_ = self->priv->_structured_name;
		if (_tmp10_ != NULL) {
			gboolean _tmp11_ = FALSE;
			FolksStructuredName* _tmp12_;
			_tmp12_ = name;
			if (_tmp12_ == NULL) {
				_tmp11_ = TRUE;
			} else {
				FolksStructuredName* _tmp13_;
				FolksStructuredName* _tmp14_;
				_tmp13_ = self->priv->_structured_name;
				_tmp14_ = name;
				_tmp11_ = !folks_structured_name_equal (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName), G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
			}
			_tmp9_ = _tmp11_;
		} else {
			_tmp9_ = FALSE;
		}
		_tmp5_ = _tmp9_;
	}
	if (_tmp5_) {
		FolksStructuredName* _tmp15_;
		FolksStructuredName* _tmp16_;
		_tmp15_ = name;
		_tmp16_ = _g_object_ref0 (_tmp15_);
		_g_object_unref0 (self->priv->_structured_name);
		self->priv->_structured_name = _tmp16_;
		g_object_notify ((GObject*) self, "structured-name");
		_folks_individual_update_display_name (self);
	}
}

static void
___lambda27__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda27_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_structured_name (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_NAME_DETAILS, ___lambda25__folks_individual_property_filter, self, ___lambda26__gcompare_func, "structured-name", ___lambda27__folks_individual_single_valued_property_setter, self);
}

static gboolean
__lambda28_ (FolksIndividual* self,
             FolksPersona* p)
{
	const gchar* name = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_name_details_get_full_name (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
	_tmp1_ = _tmp0_;
	name = _tmp1_;
	g_return_val_if_fail (name != NULL, FALSE);
	_tmp2_ = string_strip (name);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strcmp0 (_tmp3_, "") != 0;
	_g_free0 (_tmp3_);
	result = _tmp4_;
	return result;
}

static gboolean
___lambda28__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda28_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda29_ (FolksPersona* a,
             FolksPersona* b)
{
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}

static gint
___lambda29__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda29_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
__lambda30_ (FolksIndividual* self,
             FolksPersona* p)
{
	gchar* new_full_name = NULL;
	gchar* _tmp0_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	_tmp0_ = g_strdup ("");
	new_full_name = _tmp0_;
	if (p != NULL) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp1_ = folks_name_details_get_full_name (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
		_tmp2_ = _tmp1_;
		_tmp3_ = string_strip (_tmp2_);
		_g_free0 (new_full_name);
		new_full_name = _tmp3_;
	}
	_tmp4_ = new_full_name;
	_tmp5_ = self->priv->_full_name;
	if (g_strcmp0 (_tmp4_, _tmp5_) != 0) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = new_full_name;
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (self->priv->_full_name);
		self->priv->_full_name = _tmp7_;
		g_object_notify ((GObject*) self, "full-name");
		_folks_individual_update_display_name (self);
	}
	_g_free0 (new_full_name);
}

static void
___lambda30__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda30_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_full_name (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_NAME_DETAILS, ___lambda28__folks_individual_property_filter, self, ___lambda29__gcompare_func, "full-name", ___lambda30__folks_individual_single_valued_property_setter, self);
}

static gboolean
__lambda31_ (FolksIndividual* self,
             FolksPersona* p)
{
	const gchar* nickname = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_name_details_get_nickname (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
	_tmp1_ = _tmp0_;
	nickname = _tmp1_;
	g_return_val_if_fail (nickname != NULL, FALSE);
	_tmp2_ = string_strip (nickname);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strcmp0 (_tmp3_, "") != 0;
	_g_free0 (_tmp3_);
	result = _tmp4_;
	return result;
}

static gboolean
___lambda31__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda31_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda32_ (FolksPersona* a,
             FolksPersona* b)
{
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}

static gint
___lambda32__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda32_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
__lambda33_ (FolksIndividual* self,
             FolksPersona* p)
{
	gchar* new_nickname = NULL;
	gchar* _tmp0_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	_tmp0_ = g_strdup ("");
	new_nickname = _tmp0_;
	if (p != NULL) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp1_ = folks_name_details_get_nickname (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
		_tmp2_ = _tmp1_;
		_tmp3_ = string_strip (_tmp2_);
		_g_free0 (new_nickname);
		new_nickname = _tmp3_;
	}
	_tmp4_ = new_nickname;
	_tmp5_ = self->priv->_nickname;
	if (g_strcmp0 (_tmp4_, _tmp5_) != 0) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = new_nickname;
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (self->priv->_nickname);
		self->priv->_nickname = _tmp7_;
		g_object_notify ((GObject*) self, "nickname");
		_folks_individual_update_display_name (self);
	}
	_g_free0 (new_nickname);
}

static void
___lambda33__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda33_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_nickname (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_NAME_DETAILS, ___lambda31__folks_individual_property_filter, self, ___lambda32__gcompare_func, "nickname", ___lambda33__folks_individual_single_valued_property_setter, self);
}

static void
_folks_individual_disconnect_from_persona (FolksIndividual* self,
                                           FolksPersona* persona,
                                           FolksIndividual* replacement_individual)
{
	guint _tmp0_;
	FolksIndividual* _tmp2_;
	FolksIndividual* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (persona != NULL);
	g_signal_parse_name ("notify", G_TYPE_OBJECT, &_tmp0_, NULL, FALSE);
	g_signal_handlers_disconnect_matched ((GObject*) persona, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) __folks_individual_persona_notify_cb_g_object_notify, self);
	if (FOLKS_IS_GROUP_DETAILS (persona)) {
		guint _tmp1_;
		g_signal_parse_name ("group-changed", FOLKS_TYPE_GROUP_DETAILS, &_tmp1_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (persona, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) __folks_individual_persona_group_changed_cb_folks_group_details_group_changed, self);
	}
	_tmp2_ = folks_persona_get_individual (persona);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == self) {
		gboolean _tmp4_ = FALSE;
		if (replacement_individual != NULL) {
			GeeSet* _tmp5_;
			GeeSet* _tmp6_;
			_tmp5_ = folks_individual_get_personas (G_TYPE_CHECK_INSTANCE_CAST (replacement_individual, FOLKS_TYPE_INDIVIDUAL, FolksIndividual));
			_tmp6_ = _tmp5_;
			_tmp4_ = gee_collection_contains ((GeeCollection*) _tmp6_, persona);
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			folks_persona_set_individual (persona, replacement_individual);
		} else {
			folks_persona_set_individual (persona, NULL);
		}
	}
}

static gboolean
__lambda34_ (FolksIndividual* self,
             FolksPersona* p)
{
	FolksGender _tmp0_;
	FolksGender _tmp1_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_gender_details_get_gender (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_GENDER_DETAILS, FolksGenderDetails));
	_tmp1_ = _tmp0_;
	result = _tmp1_ != FOLKS_GENDER_UNSPECIFIED;
	return result;
}

static gboolean
___lambda34__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda34_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda35_ (FolksPersona* a,
             FolksPersona* b)
{
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}

static gint
___lambda35__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda35_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
__lambda36_ (FolksIndividual* self,
             FolksPersona* p)
{
	FolksGender new_gender = 0;
	FolksGender _tmp2_;
	FolksGender _tmp3_;
	new_gender = FOLKS_GENDER_UNSPECIFIED;
	if (p != NULL) {
		FolksGender _tmp0_;
		FolksGender _tmp1_;
		_tmp0_ = folks_gender_details_get_gender (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_GENDER_DETAILS, FolksGenderDetails));
		_tmp1_ = _tmp0_;
		new_gender = _tmp1_;
	}
	_tmp2_ = folks_gender_details_get_gender ((FolksGenderDetails*) self);
	_tmp3_ = _tmp2_;
	if (new_gender != _tmp3_) {
		self->priv->_gender = new_gender;
		g_object_notify ((GObject*) self, "gender");
	}
}

static void
___lambda36__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda36_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_gender (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_GENDER_DETAILS, ___lambda34__folks_individual_property_filter, self, ___lambda35__gcompare_func, "gender", ___lambda36__folks_individual_single_valued_property_setter, self);
}

static gboolean
__lambda37_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_urls;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda37__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda37_ ((FolksIndividual*) self);
	return result;
}

static void
__lambda38_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_urls);
	self->priv->_urls = _tmp0_;
	_tmp1_ = self->priv->_urls;
	_tmp2_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->priv->_urls_ro);
	self->priv->_urls_ro = _tmp3_;
}

static void
___lambda38__folks_individual_collection_creator (gpointer self)
{
	__lambda38_ ((FolksIndividual*) self);
}

static gboolean
__lambda39_ (FolksIndividual* self)
{
	FolksSmallSet* new_urls = NULL;
	FolksSmallSet* _tmp0_;
	GeeHashMap* urls_set = NULL;
	GeeHashMap* _tmp1_;
	FolksSmallSet* _tmp46_;
	FolksSmallSet* _tmp47_;
	gboolean result;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_urls = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, NULL, NULL, FOLKS_TYPE_URL_FIELD_DETAILS, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	urls_set = _tmp1_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp2_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _persona_index = 0;
		_tmp2_ = self->priv->_persona_set;
		_persona_list = _tmp2_;
		_tmp3_ = _persona_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_persona_size = _tmp5_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp8_;
			gconstpointer _tmp9_;
			FolksPersona* _tmp10_;
			FolksUrlDetails* url_details = NULL;
			FolksPersona* _tmp11_;
			FolksUrlDetails* _tmp12_;
			_persona_index = _persona_index + 1;
			_tmp6_ = _persona_index;
			_tmp7_ = _persona_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _persona_list;
			_tmp9_ = folks_small_set_get (_tmp8_, _persona_index);
			_tmp10_ = _g_object_ref0 ((FolksPersona*) _tmp9_);
			persona = _tmp10_;
			_tmp11_ = persona;
			url_details = FOLKS_IS_URL_DETAILS (_tmp11_) ? ((FolksUrlDetails*) _tmp11_) : NULL;
			_tmp12_ = url_details;
			if (_tmp12_ != NULL) {
				{
					GeeIterator* _url_fd_it = NULL;
					FolksUrlDetails* _tmp13_;
					GeeSet* _tmp14_;
					GeeSet* _tmp15_;
					GeeIterator* _tmp16_;
					_tmp13_ = url_details;
					_tmp14_ = folks_url_details_get_urls (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FOLKS_TYPE_URL_DETAILS, FolksUrlDetails));
					_tmp15_ = _tmp14_;
					_tmp16_ = gee_iterable_iterator ((GeeIterable*) _tmp15_);
					_url_fd_it = _tmp16_;
					while (TRUE) {
						GeeIterator* _tmp17_;
						FolksUrlFieldDetails* url_fd = NULL;
						GeeIterator* _tmp18_;
						gpointer _tmp19_;
						FolksUrlFieldDetails* existing = NULL;
						GeeHashMap* _tmp20_;
						FolksUrlFieldDetails* _tmp21_;
						gconstpointer _tmp22_;
						gconstpointer _tmp23_;
						gpointer _tmp24_;
						FolksUrlFieldDetails* _tmp25_;
						FolksUrlFieldDetails* _tmp26_;
						_tmp17_ = _url_fd_it;
						if (!gee_iterator_next (_tmp17_)) {
							break;
						}
						_tmp18_ = _url_fd_it;
						_tmp19_ = gee_iterator_get (_tmp18_);
						url_fd = (FolksUrlFieldDetails*) _tmp19_;
						_tmp20_ = urls_set;
						_tmp21_ = url_fd;
						_tmp22_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp21_);
						_tmp23_ = _tmp22_;
						_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp20_, (const gchar*) _tmp23_);
						_tmp25_ = _g_object_ref0 ((FolksUrlFieldDetails*) _tmp24_);
						existing = _tmp25_;
						_tmp26_ = existing;
						if (_tmp26_ != NULL) {
							FolksUrlFieldDetails* _tmp27_;
							FolksUrlFieldDetails* _tmp28_;
							GeeMultiMap* _tmp29_;
							GeeMultiMap* _tmp30_;
							_tmp27_ = existing;
							_tmp28_ = url_fd;
							_tmp29_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp28_);
							_tmp30_ = _tmp29_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp27_, _tmp30_);
						} else {
							FolksUrlFieldDetails* new_url_fd = NULL;
							FolksUrlFieldDetails* _tmp31_;
							gconstpointer _tmp32_;
							gconstpointer _tmp33_;
							FolksUrlFieldDetails* _tmp34_;
							FolksUrlFieldDetails* _tmp35_;
							FolksUrlFieldDetails* _tmp36_;
							GeeMultiMap* _tmp37_;
							GeeMultiMap* _tmp38_;
							GeeHashMap* _tmp39_;
							FolksUrlFieldDetails* _tmp40_;
							gconstpointer _tmp41_;
							gconstpointer _tmp42_;
							FolksUrlFieldDetails* _tmp43_;
							FolksSmallSet* _tmp44_;
							FolksUrlFieldDetails* _tmp45_;
							_tmp31_ = url_fd;
							_tmp32_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp31_);
							_tmp33_ = _tmp32_;
							_tmp34_ = folks_url_field_details_new ((const gchar*) _tmp33_, NULL);
							new_url_fd = _tmp34_;
							_tmp35_ = new_url_fd;
							_tmp36_ = url_fd;
							_tmp37_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp36_);
							_tmp38_ = _tmp37_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp35_, _tmp38_);
							_tmp39_ = urls_set;
							_tmp40_ = new_url_fd;
							_tmp41_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp40_);
							_tmp42_ = _tmp41_;
							_tmp43_ = new_url_fd;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp39_, (const gchar*) _tmp42_, _tmp43_);
							_tmp44_ = new_urls;
							_tmp45_ = new_url_fd;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp44_, _tmp45_);
							_g_object_unref0 (new_url_fd);
						}
						_g_object_unref0 (existing);
						_g_object_unref0 (url_fd);
					}
					_g_object_unref0 (_url_fd_it);
				}
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp46_ = new_urls;
	_tmp47_ = self->priv->_urls;
	if (!folks_utils_set_afd_equal ((GeeSet*) _tmp46_, (GeeSet*) _tmp47_)) {
		FolksSmallSet* _tmp48_;
		FolksSmallSet* _tmp49_;
		FolksSmallSet* _tmp50_;
		GeeSet* _tmp51_;
		GeeSet* _tmp52_;
		_tmp48_ = new_urls;
		_tmp49_ = _g_object_ref0 (_tmp48_);
		_g_object_unref0 (self->priv->_urls);
		self->priv->_urls = _tmp49_;
		_tmp50_ = new_urls;
		_tmp51_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp50_);
		_tmp52_ = _tmp51_;
		_g_object_unref0 (self->priv->_urls_ro);
		self->priv->_urls_ro = _tmp52_;
		result = TRUE;
		_g_object_unref0 (urls_set);
		_g_object_unref0 (new_urls);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (urls_set);
	_g_object_unref0 (new_urls);
	return result;
}

static gboolean
___lambda39__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda39_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_urls (FolksIndividual* self,
                               gboolean create_if_not_exist,
                               gboolean emit_notification,
                               gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "urls", create_if_not_exist, ___lambda37__folks_individual_property_is_null, self, ___lambda38__folks_individual_collection_creator, self, ___lambda39__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static gboolean
__lambda40_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_phone_numbers;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda40__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda40_ ((FolksIndividual*) self);
	return result;
}

static void
__lambda41_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_phone_numbers);
	self->priv->_phone_numbers = _tmp0_;
	_tmp1_ = self->priv->_phone_numbers;
	_tmp2_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->priv->_phone_numbers_ro);
	self->priv->_phone_numbers_ro = _tmp3_;
}

static void
___lambda41__folks_individual_collection_creator (gpointer self)
{
	__lambda41_ ((FolksIndividual*) self);
}

static gboolean
__lambda42_ (FolksIndividual* self)
{
	FolksSmallSet* new_phone_numbers = NULL;
	FolksSmallSet* _tmp0_;
	GeeHashMap* phone_numbers_set = NULL;
	GeeHashMap* _tmp1_;
	FolksSmallSet* _tmp45_;
	FolksSmallSet* _tmp46_;
	gboolean result;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_phone_numbers = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	phone_numbers_set = _tmp1_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp2_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _persona_index = 0;
		_tmp2_ = self->priv->_persona_set;
		_persona_list = _tmp2_;
		_tmp3_ = _persona_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_persona_size = _tmp5_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp8_;
			gconstpointer _tmp9_;
			FolksPersona* _tmp10_;
			FolksPhoneDetails* phone_details = NULL;
			FolksPersona* _tmp11_;
			FolksPhoneDetails* _tmp12_;
			_persona_index = _persona_index + 1;
			_tmp6_ = _persona_index;
			_tmp7_ = _persona_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _persona_list;
			_tmp9_ = folks_small_set_get (_tmp8_, _persona_index);
			_tmp10_ = _g_object_ref0 ((FolksPersona*) _tmp9_);
			persona = _tmp10_;
			_tmp11_ = persona;
			phone_details = FOLKS_IS_PHONE_DETAILS (_tmp11_) ? ((FolksPhoneDetails*) _tmp11_) : NULL;
			_tmp12_ = phone_details;
			if (_tmp12_ != NULL) {
				{
					GeeIterator* _phone_fd_it = NULL;
					FolksPhoneDetails* _tmp13_;
					GeeSet* _tmp14_;
					GeeSet* _tmp15_;
					GeeIterator* _tmp16_;
					_tmp13_ = phone_details;
					_tmp14_ = folks_phone_details_get_phone_numbers (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FOLKS_TYPE_PHONE_DETAILS, FolksPhoneDetails));
					_tmp15_ = _tmp14_;
					_tmp16_ = gee_iterable_iterator ((GeeIterable*) _tmp15_);
					_phone_fd_it = _tmp16_;
					while (TRUE) {
						GeeIterator* _tmp17_;
						FolksPhoneFieldDetails* phone_fd = NULL;
						GeeIterator* _tmp18_;
						gpointer _tmp19_;
						FolksPhoneFieldDetails* existing = NULL;
						GeeHashMap* _tmp20_;
						FolksPhoneFieldDetails* _tmp21_;
						gconstpointer _tmp22_;
						gconstpointer _tmp23_;
						gpointer _tmp24_;
						FolksPhoneFieldDetails* _tmp25_;
						_tmp17_ = _phone_fd_it;
						if (!gee_iterator_next (_tmp17_)) {
							break;
						}
						_tmp18_ = _phone_fd_it;
						_tmp19_ = gee_iterator_get (_tmp18_);
						phone_fd = (FolksPhoneFieldDetails*) _tmp19_;
						_tmp20_ = phone_numbers_set;
						_tmp21_ = phone_fd;
						_tmp22_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp21_);
						_tmp23_ = _tmp22_;
						_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp20_, (const gchar*) _tmp23_);
						existing = (FolksPhoneFieldDetails*) _tmp24_;
						_tmp25_ = existing;
						if (_tmp25_ != NULL) {
							FolksPhoneFieldDetails* _tmp26_;
							FolksPhoneFieldDetails* _tmp27_;
							GeeMultiMap* _tmp28_;
							GeeMultiMap* _tmp29_;
							_tmp26_ = existing;
							_tmp27_ = phone_fd;
							_tmp28_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp27_);
							_tmp29_ = _tmp28_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp26_, _tmp29_);
						} else {
							FolksPhoneFieldDetails* new_fd = NULL;
							FolksPhoneFieldDetails* _tmp30_;
							gconstpointer _tmp31_;
							gconstpointer _tmp32_;
							FolksPhoneFieldDetails* _tmp33_;
							FolksPhoneFieldDetails* _tmp34_;
							FolksPhoneFieldDetails* _tmp35_;
							GeeMultiMap* _tmp36_;
							GeeMultiMap* _tmp37_;
							GeeHashMap* _tmp38_;
							FolksPhoneFieldDetails* _tmp39_;
							gconstpointer _tmp40_;
							gconstpointer _tmp41_;
							FolksPhoneFieldDetails* _tmp42_;
							FolksSmallSet* _tmp43_;
							FolksPhoneFieldDetails* _tmp44_;
							_tmp30_ = phone_fd;
							_tmp31_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp30_);
							_tmp32_ = _tmp31_;
							_tmp33_ = folks_phone_field_details_new ((const gchar*) _tmp32_, NULL);
							new_fd = _tmp33_;
							_tmp34_ = new_fd;
							_tmp35_ = phone_fd;
							_tmp36_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp35_);
							_tmp37_ = _tmp36_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp34_, _tmp37_);
							_tmp38_ = phone_numbers_set;
							_tmp39_ = new_fd;
							_tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
							_tmp41_ = _tmp40_;
							_tmp42_ = new_fd;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp38_, (const gchar*) _tmp41_, _tmp42_);
							_tmp43_ = new_phone_numbers;
							_tmp44_ = new_fd;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp43_, _tmp44_);
							_g_object_unref0 (new_fd);
						}
						_g_object_unref0 (existing);
						_g_object_unref0 (phone_fd);
					}
					_g_object_unref0 (_phone_fd_it);
				}
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp45_ = new_phone_numbers;
	_tmp46_ = self->priv->_phone_numbers;
	if (!folks_utils_set_string_afd_equal ((GeeSet*) _tmp45_, (GeeSet*) _tmp46_)) {
		FolksSmallSet* _tmp47_;
		FolksSmallSet* _tmp48_;
		FolksSmallSet* _tmp49_;
		GeeSet* _tmp50_;
		GeeSet* _tmp51_;
		_tmp47_ = new_phone_numbers;
		_tmp48_ = _g_object_ref0 (_tmp47_);
		_g_object_unref0 (self->priv->_phone_numbers);
		self->priv->_phone_numbers = _tmp48_;
		_tmp49_ = new_phone_numbers;
		_tmp50_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp49_);
		_tmp51_ = _tmp50_;
		_g_object_unref0 (self->priv->_phone_numbers_ro);
		self->priv->_phone_numbers_ro = _tmp51_;
		result = TRUE;
		_g_object_unref0 (phone_numbers_set);
		_g_object_unref0 (new_phone_numbers);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (phone_numbers_set);
	_g_object_unref0 (new_phone_numbers);
	return result;
}

static gboolean
___lambda42__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda42_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_phone_numbers (FolksIndividual* self,
                                        gboolean create_if_not_exist,
                                        gboolean emit_notification,
                                        gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "phone-numbers", create_if_not_exist, ___lambda40__folks_individual_property_is_null, self, ___lambda41__folks_individual_collection_creator, self, ___lambda42__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static gboolean
__lambda43_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_email_addresses;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda43__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda43_ ((FolksIndividual*) self);
	return result;
}

static void
__lambda44_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_email_addresses);
	self->priv->_email_addresses = _tmp0_;
	_tmp1_ = self->priv->_email_addresses;
	_tmp2_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->priv->_email_addresses_ro);
	self->priv->_email_addresses_ro = _tmp3_;
}

static void
___lambda44__folks_individual_collection_creator (gpointer self)
{
	__lambda44_ ((FolksIndividual*) self);
}

static gboolean
__lambda45_ (FolksIndividual* self)
{
	FolksSmallSet* new_email_addresses = NULL;
	FolksSmallSet* _tmp0_;
	GeeHashMap* emails_set = NULL;
	GeeHashMap* _tmp1_;
	FolksSmallSet* _tmp44_;
	FolksSmallSet* _tmp45_;
	gboolean result;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_email_addresses = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	emails_set = _tmp1_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp2_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _persona_index = 0;
		_tmp2_ = self->priv->_persona_set;
		_persona_list = _tmp2_;
		_tmp3_ = _persona_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_persona_size = _tmp5_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp8_;
			gconstpointer _tmp9_;
			FolksPersona* _tmp10_;
			FolksEmailDetails* email_details = NULL;
			FolksPersona* _tmp11_;
			FolksEmailDetails* _tmp12_;
			_persona_index = _persona_index + 1;
			_tmp6_ = _persona_index;
			_tmp7_ = _persona_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _persona_list;
			_tmp9_ = folks_small_set_get (_tmp8_, _persona_index);
			_tmp10_ = _g_object_ref0 ((FolksPersona*) _tmp9_);
			persona = _tmp10_;
			_tmp11_ = persona;
			email_details = FOLKS_IS_EMAIL_DETAILS (_tmp11_) ? ((FolksEmailDetails*) _tmp11_) : NULL;
			_tmp12_ = email_details;
			if (_tmp12_ != NULL) {
				{
					GeeIterator* _email_fd_it = NULL;
					FolksEmailDetails* _tmp13_;
					GeeSet* _tmp14_;
					GeeSet* _tmp15_;
					GeeIterator* _tmp16_;
					_tmp13_ = email_details;
					_tmp14_ = folks_email_details_get_email_addresses (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FOLKS_TYPE_EMAIL_DETAILS, FolksEmailDetails));
					_tmp15_ = _tmp14_;
					_tmp16_ = gee_iterable_iterator ((GeeIterable*) _tmp15_);
					_email_fd_it = _tmp16_;
					while (TRUE) {
						GeeIterator* _tmp17_;
						FolksEmailFieldDetails* email_fd = NULL;
						GeeIterator* _tmp18_;
						gpointer _tmp19_;
						FolksEmailFieldDetails* existing = NULL;
						GeeHashMap* _tmp20_;
						FolksEmailFieldDetails* _tmp21_;
						gconstpointer _tmp22_;
						gconstpointer _tmp23_;
						gpointer _tmp24_;
						FolksEmailFieldDetails* _tmp25_;
						_tmp17_ = _email_fd_it;
						if (!gee_iterator_next (_tmp17_)) {
							break;
						}
						_tmp18_ = _email_fd_it;
						_tmp19_ = gee_iterator_get (_tmp18_);
						email_fd = (FolksEmailFieldDetails*) _tmp19_;
						_tmp20_ = emails_set;
						_tmp21_ = email_fd;
						_tmp22_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp21_);
						_tmp23_ = _tmp22_;
						_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp20_, (const gchar*) _tmp23_);
						existing = (FolksEmailFieldDetails*) _tmp24_;
						_tmp25_ = existing;
						if (_tmp25_ != NULL) {
							FolksEmailFieldDetails* _tmp26_;
							FolksEmailFieldDetails* _tmp27_;
							GeeMultiMap* _tmp28_;
							GeeMultiMap* _tmp29_;
							_tmp26_ = existing;
							_tmp27_ = email_fd;
							_tmp28_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp27_);
							_tmp29_ = _tmp28_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp26_, _tmp29_);
						} else {
							FolksEmailFieldDetails* new_email_fd = NULL;
							FolksEmailFieldDetails* _tmp30_;
							gconstpointer _tmp31_;
							gconstpointer _tmp32_;
							FolksEmailFieldDetails* _tmp33_;
							GeeMultiMap* _tmp34_;
							GeeMultiMap* _tmp35_;
							FolksEmailFieldDetails* _tmp36_;
							GeeHashMap* _tmp37_;
							FolksEmailFieldDetails* _tmp38_;
							gconstpointer _tmp39_;
							gconstpointer _tmp40_;
							FolksEmailFieldDetails* _tmp41_;
							FolksSmallSet* _tmp42_;
							FolksEmailFieldDetails* _tmp43_;
							_tmp30_ = email_fd;
							_tmp31_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp30_);
							_tmp32_ = _tmp31_;
							_tmp33_ = email_fd;
							_tmp34_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp33_);
							_tmp35_ = _tmp34_;
							_tmp36_ = folks_email_field_details_new ((const gchar*) _tmp32_, _tmp35_);
							new_email_fd = _tmp36_;
							_tmp37_ = emails_set;
							_tmp38_ = new_email_fd;
							_tmp39_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp38_);
							_tmp40_ = _tmp39_;
							_tmp41_ = new_email_fd;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp37_, (const gchar*) _tmp40_, _tmp41_);
							_tmp42_ = new_email_addresses;
							_tmp43_ = new_email_fd;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp42_, _tmp43_);
							_g_object_unref0 (new_email_fd);
						}
						_g_object_unref0 (existing);
						_g_object_unref0 (email_fd);
					}
					_g_object_unref0 (_email_fd_it);
				}
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp44_ = new_email_addresses;
	_tmp45_ = self->priv->_email_addresses;
	if (!folks_utils_set_afd_equal ((GeeSet*) _tmp44_, (GeeSet*) _tmp45_)) {
		FolksSmallSet* _tmp46_;
		FolksSmallSet* _tmp47_;
		FolksSmallSet* _tmp48_;
		GeeSet* _tmp49_;
		GeeSet* _tmp50_;
		_tmp46_ = new_email_addresses;
		_tmp47_ = _g_object_ref0 (_tmp46_);
		_g_object_unref0 (self->priv->_email_addresses);
		self->priv->_email_addresses = _tmp47_;
		_tmp48_ = new_email_addresses;
		_tmp49_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp48_);
		_tmp50_ = _tmp49_;
		_g_object_unref0 (self->priv->_email_addresses_ro);
		self->priv->_email_addresses_ro = _tmp50_;
		result = TRUE;
		_g_object_unref0 (emails_set);
		_g_object_unref0 (new_email_addresses);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (emails_set);
	_g_object_unref0 (new_email_addresses);
	return result;
}

static gboolean
___lambda45__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda45_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_email_addresses (FolksIndividual* self,
                                          gboolean create_if_not_exist,
                                          gboolean emit_notification,
                                          gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "email-addresses", create_if_not_exist, ___lambda43__folks_individual_property_is_null, self, ___lambda44__folks_individual_collection_creator, self, ___lambda45__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static gboolean
__lambda46_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_roles;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda46__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda46_ ((FolksIndividual*) self);
	return result;
}

static void
__lambda47_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_ROLE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_roles);
	self->priv->_roles = _tmp0_;
	_tmp1_ = self->priv->_roles;
	_tmp2_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->priv->_roles_ro);
	self->priv->_roles_ro = _tmp3_;
}

static void
___lambda47__folks_individual_collection_creator (gpointer self)
{
	__lambda47_ ((FolksIndividual*) self);
}

static gboolean
__lambda48_ (FolksIndividual* self)
{
	FolksSmallSet* new_roles = NULL;
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp22_;
	FolksSmallSet* _tmp23_;
	gboolean result;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_ROLE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_roles = _tmp0_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _persona_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_persona_list = _tmp1_;
		_tmp2_ = _persona_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_persona_size = _tmp4_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksRoleDetails* role_details = NULL;
			FolksPersona* _tmp10_;
			FolksRoleDetails* _tmp11_;
			FolksRoleDetails* _tmp12_;
			_persona_index = _persona_index + 1;
			_tmp5_ = _persona_index;
			_tmp6_ = _persona_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _persona_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			persona = _tmp9_;
			_tmp10_ = persona;
			_tmp11_ = _g_object_ref0 (FOLKS_IS_ROLE_DETAILS (_tmp10_) ? ((FolksRoleDetails*) _tmp10_) : NULL);
			role_details = _tmp11_;
			_tmp12_ = role_details;
			if (_tmp12_ != NULL) {
				{
					GeeIterator* _role_fd_it = NULL;
					FolksRoleDetails* _tmp13_;
					GeeSet* _tmp14_;
					GeeSet* _tmp15_;
					GeeIterator* _tmp16_;
					_tmp13_ = role_details;
					_tmp14_ = folks_role_details_get_roles (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FOLKS_TYPE_ROLE_DETAILS, FolksRoleDetails));
					_tmp15_ = _tmp14_;
					_tmp16_ = gee_iterable_iterator ((GeeIterable*) _tmp15_);
					_role_fd_it = _tmp16_;
					while (TRUE) {
						GeeIterator* _tmp17_;
						FolksRoleFieldDetails* role_fd = NULL;
						GeeIterator* _tmp18_;
						gpointer _tmp19_;
						FolksSmallSet* _tmp20_;
						FolksRoleFieldDetails* _tmp21_;
						_tmp17_ = _role_fd_it;
						if (!gee_iterator_next (_tmp17_)) {
							break;
						}
						_tmp18_ = _role_fd_it;
						_tmp19_ = gee_iterator_get (_tmp18_);
						role_fd = (FolksRoleFieldDetails*) _tmp19_;
						_tmp20_ = new_roles;
						_tmp21_ = role_fd;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp20_, _tmp21_);
						_g_object_unref0 (role_fd);
					}
					_g_object_unref0 (_role_fd_it);
				}
			}
			_g_object_unref0 (role_details);
			_g_object_unref0 (persona);
		}
	}
	_tmp22_ = new_roles;
	_tmp23_ = self->priv->_roles;
	if (!folks_utils_set_afd_equal ((GeeSet*) _tmp22_, (GeeSet*) _tmp23_)) {
		FolksSmallSet* _tmp24_;
		FolksSmallSet* _tmp25_;
		FolksSmallSet* _tmp26_;
		GeeSet* _tmp27_;
		GeeSet* _tmp28_;
		_tmp24_ = new_roles;
		_tmp25_ = _g_object_ref0 (_tmp24_);
		_g_object_unref0 (self->priv->_roles);
		self->priv->_roles = _tmp25_;
		_tmp26_ = new_roles;
		_tmp27_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp26_);
		_tmp28_ = _tmp27_;
		_g_object_unref0 (self->priv->_roles_ro);
		self->priv->_roles_ro = _tmp28_;
		result = TRUE;
		_g_object_unref0 (new_roles);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (new_roles);
	return result;
}

static gboolean
___lambda48__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda48_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_roles (FolksIndividual* self,
                                gboolean create_if_not_exist,
                                gboolean emit_notification,
                                gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "roles", create_if_not_exist, ___lambda46__folks_individual_property_is_null, self, ___lambda47__folks_individual_collection_creator, self, ___lambda48__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static gboolean
__lambda58_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_local_ids;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda58__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda58_ ((FolksIndividual*) self);
	return result;
}

static void
__lambda59_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	_tmp0_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->_local_ids);
	self->priv->_local_ids = _tmp0_;
	_tmp1_ = self->priv->_local_ids;
	_tmp2_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->priv->_local_ids_ro);
	self->priv->_local_ids_ro = _tmp3_;
}

static void
___lambda59__folks_individual_collection_creator (gpointer self)
{
	__lambda59_ ((FolksIndividual*) self);
}

static gboolean
__lambda60_ (FolksIndividual* self)
{
	FolksSmallSet* new_local_ids = NULL;
	FolksSmallSet* _tmp0_;
	gboolean _tmp21_ = FALSE;
	FolksSmallSet* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	FolksSmallSet* _tmp25_;
	gint _tmp26_;
	gint _tmp27_;
	gboolean result;
	_tmp0_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	new_local_ids = _tmp0_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _persona_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_persona_list = _tmp1_;
		_tmp2_ = _persona_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_persona_size = _tmp4_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksLocalIdDetails* local_id_details = NULL;
			FolksPersona* _tmp10_;
			FolksLocalIdDetails* _tmp11_;
			_persona_index = _persona_index + 1;
			_tmp5_ = _persona_index;
			_tmp6_ = _persona_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _persona_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			persona = _tmp9_;
			_tmp10_ = persona;
			local_id_details = FOLKS_IS_LOCAL_ID_DETAILS (_tmp10_) ? ((FolksLocalIdDetails*) _tmp10_) : NULL;
			_tmp11_ = local_id_details;
			if (_tmp11_ != NULL) {
				{
					GeeIterator* _id_it = NULL;
					FolksLocalIdDetails* _tmp12_;
					GeeSet* _tmp13_;
					GeeSet* _tmp14_;
					GeeIterator* _tmp15_;
					_tmp12_ = local_id_details;
					_tmp13_ = folks_local_id_details_get_local_ids (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, FOLKS_TYPE_LOCAL_ID_DETAILS, FolksLocalIdDetails));
					_tmp14_ = _tmp13_;
					_tmp15_ = gee_iterable_iterator ((GeeIterable*) _tmp14_);
					_id_it = _tmp15_;
					while (TRUE) {
						GeeIterator* _tmp16_;
						gchar* id = NULL;
						GeeIterator* _tmp17_;
						gpointer _tmp18_;
						FolksSmallSet* _tmp19_;
						const gchar* _tmp20_;
						_tmp16_ = _id_it;
						if (!gee_iterator_next (_tmp16_)) {
							break;
						}
						_tmp17_ = _id_it;
						_tmp18_ = gee_iterator_get (_tmp17_);
						id = (gchar*) _tmp18_;
						_tmp19_ = new_local_ids;
						_tmp20_ = id;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, _tmp20_);
						_g_free0 (id);
					}
					_g_object_unref0 (_id_it);
				}
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp22_ = new_local_ids;
	_tmp23_ = gee_collection_get_size ((GeeCollection*) _tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = self->priv->_local_ids;
	_tmp26_ = gee_collection_get_size ((GeeCollection*) _tmp25_);
	_tmp27_ = _tmp26_;
	if (_tmp24_ != _tmp27_) {
		_tmp21_ = TRUE;
	} else {
		FolksSmallSet* _tmp28_;
		FolksSmallSet* _tmp29_;
		_tmp28_ = new_local_ids;
		_tmp29_ = self->priv->_local_ids;
		_tmp21_ = !gee_collection_contains_all ((GeeCollection*) _tmp28_, (GeeCollection*) _tmp29_);
	}
	if (_tmp21_) {
		FolksSmallSet* _tmp30_;
		FolksSmallSet* _tmp31_;
		FolksSmallSet* _tmp32_;
		GeeSet* _tmp33_;
		GeeSet* _tmp34_;
		_tmp30_ = new_local_ids;
		_tmp31_ = _g_object_ref0 (_tmp30_);
		_g_object_unref0 (self->priv->_local_ids);
		self->priv->_local_ids = _tmp31_;
		_tmp32_ = new_local_ids;
		_tmp33_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp32_);
		_tmp34_ = _tmp33_;
		_g_object_unref0 (self->priv->_local_ids_ro);
		self->priv->_local_ids_ro = _tmp34_;
		result = TRUE;
		_g_object_unref0 (new_local_ids);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (new_local_ids);
	return result;
}

static gboolean
___lambda60__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda60_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_local_ids (FolksIndividual* self,
                                    gboolean create_if_not_exist,
                                    gboolean emit_notification,
                                    gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "local-ids", create_if_not_exist, ___lambda58__folks_individual_property_is_null, self, ___lambda59__folks_individual_collection_creator, self, ___lambda60__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static gboolean
__lambda61_ (FolksIndividual* self,
             FolksPersona* p)
{
	FolksLocation* _tmp0_;
	FolksLocation* _tmp1_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = folks_location_details_get_location (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_LOCATION_DETAILS, FolksLocationDetails));
	_tmp1_ = _tmp0_;
	result = _tmp1_ != NULL;
	return result;
}

static gboolean
___lambda61__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda61_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda62_ (FolksPersona* a,
             FolksPersona* b)
{
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}

static gint
___lambda62__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda62_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static void
__lambda63_ (FolksIndividual* self,
             FolksPersona* p)
{
	FolksLocation* new_location = NULL;
	gboolean _tmp2_ = FALSE;
	FolksLocation* _tmp3_;
	FolksLocation* _tmp4_;
	FolksLocation* _tmp5_;
	new_location = NULL;
	if (p != NULL) {
		FolksLocation* _tmp0_;
		FolksLocation* _tmp1_;
		_tmp0_ = folks_location_details_get_location (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_LOCATION_DETAILS, FolksLocationDetails));
		_tmp1_ = _tmp0_;
		new_location = _tmp1_;
	}
	_tmp3_ = new_location;
	_tmp4_ = folks_location_details_get_location ((FolksLocationDetails*) self);
	_tmp5_ = _tmp4_;
	if ((_tmp3_ == NULL) != (_tmp5_ == NULL)) {
		_tmp2_ = TRUE;
	} else {
		gboolean _tmp6_ = FALSE;
		FolksLocation* _tmp7_;
		_tmp7_ = new_location;
		if (_tmp7_ != NULL) {
			FolksLocation* _tmp8_;
			FolksLocation* _tmp9_;
			FolksLocation* _tmp10_;
			_tmp8_ = new_location;
			_tmp9_ = folks_location_details_get_location ((FolksLocationDetails*) self);
			_tmp10_ = _tmp9_;
			_tmp6_ = !folks_location_equal (_tmp8_, _tmp10_);
		} else {
			_tmp6_ = FALSE;
		}
		_tmp2_ = _tmp6_;
	}
	if (_tmp2_) {
		FolksLocation* _tmp11_;
		FolksLocation* _tmp12_;
		_tmp11_ = new_location;
		_tmp12_ = _g_object_ref0 (_tmp11_);
		_g_object_unref0 (self->priv->_location);
		self->priv->_location = _tmp12_;
		g_object_notify ((GObject*) self, "location");
	}
}

static void
___lambda63__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda63_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_location (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_LOCATION_DETAILS, ___lambda61__folks_individual_property_filter, self, ___lambda62__gcompare_func, "location", ___lambda63__folks_individual_single_valued_property_setter, self);
}

static gboolean
__lambda55_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_postal_addresses;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda55__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda55_ ((FolksIndividual*) self);
	return result;
}

static void
__lambda56_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_postal_addresses);
	self->priv->_postal_addresses = _tmp0_;
	_tmp1_ = self->priv->_postal_addresses;
	_tmp2_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->priv->_postal_addresses_ro);
	self->priv->_postal_addresses_ro = _tmp3_;
}

static void
___lambda56__folks_individual_collection_creator (gpointer self)
{
	__lambda56_ ((FolksIndividual*) self);
}

static gboolean
__lambda57_ (FolksIndividual* self)
{
	FolksSmallSet* new_postal_addresses = NULL;
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp21_;
	FolksSmallSet* _tmp22_;
	gboolean result;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_postal_addresses = _tmp0_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _persona_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_persona_list = _tmp1_;
		_tmp2_ = _persona_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_persona_size = _tmp4_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksPostalAddressDetails* postal_address_details = NULL;
			FolksPersona* _tmp10_;
			FolksPostalAddressDetails* _tmp11_;
			_persona_index = _persona_index + 1;
			_tmp5_ = _persona_index;
			_tmp6_ = _persona_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _persona_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			persona = _tmp9_;
			_tmp10_ = persona;
			postal_address_details = FOLKS_IS_POSTAL_ADDRESS_DETAILS (_tmp10_) ? ((FolksPostalAddressDetails*) _tmp10_) : NULL;
			_tmp11_ = postal_address_details;
			if (_tmp11_ != NULL) {
				{
					GeeIterator* _pafd_it = NULL;
					FolksPostalAddressDetails* _tmp12_;
					GeeSet* _tmp13_;
					GeeSet* _tmp14_;
					GeeIterator* _tmp15_;
					_tmp12_ = postal_address_details;
					_tmp13_ = folks_postal_address_details_get_postal_addresses (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, FolksPostalAddressDetails));
					_tmp14_ = _tmp13_;
					_tmp15_ = gee_iterable_iterator ((GeeIterable*) _tmp14_);
					_pafd_it = _tmp15_;
					while (TRUE) {
						GeeIterator* _tmp16_;
						FolksPostalAddressFieldDetails* pafd = NULL;
						GeeIterator* _tmp17_;
						gpointer _tmp18_;
						FolksSmallSet* _tmp19_;
						FolksPostalAddressFieldDetails* _tmp20_;
						_tmp16_ = _pafd_it;
						if (!gee_iterator_next (_tmp16_)) {
							break;
						}
						_tmp17_ = _pafd_it;
						_tmp18_ = gee_iterator_get (_tmp17_);
						pafd = (FolksPostalAddressFieldDetails*) _tmp18_;
						_tmp19_ = new_postal_addresses;
						_tmp20_ = pafd;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, _tmp20_);
						_g_object_unref0 (pafd);
					}
					_g_object_unref0 (_pafd_it);
				}
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp21_ = new_postal_addresses;
	_tmp22_ = self->priv->_postal_addresses;
	if (!folks_utils_set_afd_equal ((GeeSet*) _tmp21_, (GeeSet*) _tmp22_)) {
		FolksSmallSet* _tmp23_;
		FolksSmallSet* _tmp24_;
		FolksSmallSet* _tmp25_;
		GeeSet* _tmp26_;
		GeeSet* _tmp27_;
		_tmp23_ = new_postal_addresses;
		_tmp24_ = _g_object_ref0 (_tmp23_);
		_g_object_unref0 (self->priv->_postal_addresses);
		self->priv->_postal_addresses = _tmp24_;
		_tmp25_ = new_postal_addresses;
		_tmp26_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp25_);
		_tmp27_ = _tmp26_;
		_g_object_unref0 (self->priv->_postal_addresses_ro);
		self->priv->_postal_addresses_ro = _tmp27_;
		result = TRUE;
		_g_object_unref0 (new_postal_addresses);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (new_postal_addresses);
	return result;
}

static gboolean
___lambda57__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda57_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_postal_addresses (FolksIndividual* self,
                                           gboolean create_if_not_exist,
                                           gboolean emit_notification,
                                           gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "postal-addresses", create_if_not_exist, ___lambda55__folks_individual_property_is_null, self, ___lambda56__folks_individual_collection_creator, self, ___lambda57__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static gboolean
__lambda49_ (FolksIndividual* self,
             FolksPersona* p)
{
	FolksBirthdayDetails* details = NULL;
	gboolean _tmp0_ = FALSE;
	FolksBirthdayDetails* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	gboolean result;
	g_return_val_if_fail (p != NULL, FALSE);
	details = G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails);
	_tmp1_ = details;
	_tmp2_ = folks_birthday_details_get_birthday (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		FolksBirthdayDetails* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp4_ = details;
		_tmp5_ = folks_birthday_details_get_calendar_event_id (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
___lambda49__folks_individual_property_filter (FolksPersona* persona,
                                               gpointer self)
{
	gboolean result;
	result = __lambda49_ ((FolksIndividual*) self, persona);
	return result;
}

static gint
__lambda50_ (FolksPersona* a,
             FolksPersona* b)
{
	GDateTime* a_birthday = NULL;
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* b_birthday = NULL;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	const gchar* a_event_id = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* b_event_id = NULL;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gint _tmp8_ = 0;
	GDateTime* _tmp9_;
	gint a_birthday_is_set = 0;
	gint _tmp10_ = 0;
	GDateTime* _tmp11_;
	gint b_birthday_is_set = 0;
	gint _tmp12_ = 0;
	const gchar* _tmp13_;
	gint a_event_id_is_set = 0;
	gint _tmp14_ = 0;
	const gchar* _tmp15_;
	gint b_event_id_is_set = 0;
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = folks_birthday_details_get_birthday (G_TYPE_CHECK_INSTANCE_CAST (a, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	_tmp1_ = _tmp0_;
	a_birthday = _tmp1_;
	_tmp2_ = folks_birthday_details_get_birthday (G_TYPE_CHECK_INSTANCE_CAST (b, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	_tmp3_ = _tmp2_;
	b_birthday = _tmp3_;
	_tmp4_ = folks_birthday_details_get_calendar_event_id (G_TYPE_CHECK_INSTANCE_CAST (a, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	_tmp5_ = _tmp4_;
	a_event_id = _tmp5_;
	_tmp6_ = folks_birthday_details_get_calendar_event_id (G_TYPE_CHECK_INSTANCE_CAST (b, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	_tmp7_ = _tmp6_;
	b_event_id = _tmp7_;
	_tmp9_ = a_birthday;
	if (_tmp9_ != NULL) {
		_tmp8_ = 1;
	} else {
		_tmp8_ = 0;
	}
	a_birthday_is_set = _tmp8_;
	_tmp11_ = b_birthday;
	if (_tmp11_ != NULL) {
		_tmp10_ = 1;
	} else {
		_tmp10_ = 0;
	}
	b_birthday_is_set = _tmp10_;
	_tmp13_ = a_event_id;
	if (_tmp13_ != NULL) {
		_tmp12_ = 1;
	} else {
		_tmp12_ = 0;
	}
	a_event_id_is_set = _tmp12_;
	_tmp15_ = b_event_id;
	if (_tmp15_ != NULL) {
		_tmp14_ = 1;
	} else {
		_tmp14_ = 0;
	}
	b_event_id_is_set = _tmp14_;
	result = (a_birthday_is_set + a_event_id_is_set) - (b_birthday_is_set + b_event_id_is_set);
	return result;
}

static gint
___lambda50__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda50_ ((FolksPersona*) a, (FolksPersona*) b);
	return result;
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

static void
__lambda51_ (FolksIndividual* self,
             FolksPersona* p)
{
	GDateTime* bday = NULL;
	const gchar* calendar_event_id = NULL;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	GDateTime* _tmp7_;
	bday = NULL;
	calendar_event_id = NULL;
	if (p != NULL) {
		GDateTime* _tmp0_;
		GDateTime* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp0_ = folks_birthday_details_get_birthday (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
		_tmp1_ = _tmp0_;
		bday = _tmp1_;
		_tmp2_ = folks_birthday_details_get_calendar_event_id (G_TYPE_CHECK_INSTANCE_CAST (p, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
		_tmp3_ = _tmp2_;
		calendar_event_id = _tmp3_;
	}
	_tmp7_ = self->priv->_birthday;
	if (_tmp7_ == NULL) {
		GDateTime* _tmp8_;
		_tmp8_ = bday;
		_tmp6_ = _tmp8_ != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		gboolean _tmp9_ = FALSE;
		GDateTime* _tmp10_;
		_tmp10_ = self->priv->_birthday;
		if (_tmp10_ != NULL) {
			gboolean _tmp11_ = FALSE;
			GDateTime* _tmp12_;
			_tmp12_ = bday;
			if (_tmp12_ == NULL) {
				_tmp11_ = TRUE;
			} else {
				GDateTime* _tmp13_;
				GDateTime* _tmp14_;
				_tmp13_ = self->priv->_birthday;
				_tmp14_ = bday;
				_tmp11_ = !g_date_time_equal ((GDateTime*) _tmp13_, (GDateTime*) _tmp14_);
			}
			_tmp9_ = _tmp11_;
		} else {
			_tmp9_ = FALSE;
		}
		_tmp5_ = _tmp9_;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		_tmp15_ = self->priv->_calendar_event_id;
		_tmp16_ = calendar_event_id;
		_tmp4_ = g_strcmp0 (_tmp15_, _tmp16_) != 0;
	}
	if (_tmp4_) {
		GDateTime* _tmp17_;
		GDateTime* _tmp18_;
		const gchar* _tmp19_;
		gchar* _tmp20_;
		_tmp17_ = bday;
		_tmp18_ = _g_date_time_ref0 (_tmp17_);
		_g_date_time_unref0 (self->priv->_birthday);
		self->priv->_birthday = _tmp18_;
		_tmp19_ = calendar_event_id;
		_tmp20_ = g_strdup (_tmp19_);
		_g_free0 (self->priv->_calendar_event_id);
		self->priv->_calendar_event_id = _tmp20_;
		g_object_freeze_notify ((GObject*) self);
		g_object_notify ((GObject*) self, "birthday");
		g_object_notify ((GObject*) self, "calendar-event-id");
		g_object_thaw_notify ((GObject*) self);
	}
}

static void
___lambda51__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona,
                                                             gpointer self)
{
	__lambda51_ ((FolksIndividual*) self, chosen_persona);
}

static void
_folks_individual_update_birthday (FolksIndividual* self)
{
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_BIRTHDAY_DETAILS, ___lambda49__folks_individual_property_filter, self, ___lambda50__gcompare_func, "birthday", ___lambda51__folks_individual_single_valued_property_setter, self);
}

static gboolean
__lambda52_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_notes;
	result = _tmp0_ == NULL;
	return result;
}

static gboolean
___lambda52__folks_individual_property_is_null (gpointer self)
{
	gboolean result;
	result = __lambda52_ ((FolksIndividual*) self);
	return result;
}

static void
__lambda53_ (FolksIndividual* self)
{
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_notes);
	self->priv->_notes = _tmp0_;
	_tmp1_ = self->priv->_notes;
	_tmp2_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->priv->_notes_ro);
	self->priv->_notes_ro = _tmp3_;
}

static void
___lambda53__folks_individual_collection_creator (gpointer self)
{
	__lambda53_ ((FolksIndividual*) self);
}

static gboolean
__lambda54_ (FolksIndividual* self)
{
	FolksSmallSet* new_notes = NULL;
	FolksSmallSet* _tmp0_;
	FolksSmallSet* _tmp21_;
	FolksSmallSet* _tmp22_;
	gboolean result;
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_notes = _tmp0_;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp1_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _persona_index = 0;
		_tmp1_ = self->priv->_persona_set;
		_persona_list = _tmp1_;
		_tmp2_ = _persona_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_persona_size = _tmp4_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp7_;
			gconstpointer _tmp8_;
			FolksPersona* _tmp9_;
			FolksNoteDetails* note_details = NULL;
			FolksPersona* _tmp10_;
			FolksNoteDetails* _tmp11_;
			_persona_index = _persona_index + 1;
			_tmp5_ = _persona_index;
			_tmp6_ = _persona_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _persona_list;
			_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
			_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
			persona = _tmp9_;
			_tmp10_ = persona;
			note_details = FOLKS_IS_NOTE_DETAILS (_tmp10_) ? ((FolksNoteDetails*) _tmp10_) : NULL;
			_tmp11_ = note_details;
			if (_tmp11_ != NULL) {
				{
					GeeIterator* _n_it = NULL;
					FolksNoteDetails* _tmp12_;
					GeeSet* _tmp13_;
					GeeSet* _tmp14_;
					GeeIterator* _tmp15_;
					_tmp12_ = note_details;
					_tmp13_ = folks_note_details_get_notes (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, FOLKS_TYPE_NOTE_DETAILS, FolksNoteDetails));
					_tmp14_ = _tmp13_;
					_tmp15_ = gee_iterable_iterator ((GeeIterable*) _tmp14_);
					_n_it = _tmp15_;
					while (TRUE) {
						GeeIterator* _tmp16_;
						FolksNoteFieldDetails* n = NULL;
						GeeIterator* _tmp17_;
						gpointer _tmp18_;
						FolksSmallSet* _tmp19_;
						FolksNoteFieldDetails* _tmp20_;
						_tmp16_ = _n_it;
						if (!gee_iterator_next (_tmp16_)) {
							break;
						}
						_tmp17_ = _n_it;
						_tmp18_ = gee_iterator_get (_tmp17_);
						n = (FolksNoteFieldDetails*) _tmp18_;
						_tmp19_ = new_notes;
						_tmp20_ = n;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, _tmp20_);
						_g_object_unref0 (n);
					}
					_g_object_unref0 (_n_it);
				}
			}
			_g_object_unref0 (persona);
		}
	}
	_tmp21_ = new_notes;
	_tmp22_ = self->priv->_notes;
	if (!folks_utils_set_afd_equal ((GeeSet*) _tmp21_, (GeeSet*) _tmp22_)) {
		FolksSmallSet* _tmp23_;
		FolksSmallSet* _tmp24_;
		FolksSmallSet* _tmp25_;
		GeeSet* _tmp26_;
		GeeSet* _tmp27_;
		_tmp23_ = new_notes;
		_tmp24_ = _g_object_ref0 (_tmp23_);
		_g_object_unref0 (self->priv->_notes);
		self->priv->_notes = _tmp24_;
		_tmp25_ = new_notes;
		_tmp26_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp25_);
		_tmp27_ = _tmp26_;
		_g_object_unref0 (self->priv->_notes_ro);
		self->priv->_notes_ro = _tmp27_;
		result = TRUE;
		_g_object_unref0 (new_notes);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (new_notes);
	return result;
}

static gboolean
___lambda54__folks_individual_multi_valued_property_setter (gpointer self)
{
	gboolean result;
	result = __lambda54_ ((FolksIndividual*) self);
	return result;
}

static void
_folks_individual_update_notes (FolksIndividual* self,
                                gboolean create_if_not_exist,
                                gboolean emit_notification,
                                gboolean force_update)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = emit_notification;
	_tmp1_ = force_update;
	_folks_individual_update_multi_valued_property (self, "notes", create_if_not_exist, ___lambda52__folks_individual_property_is_null, self, ___lambda53__folks_individual_collection_creator, self, ___lambda54__folks_individual_multi_valued_property_setter, self, _tmp0_, _tmp1_);
}

static void
__folks_individual_store_removed_cb_folks_persona_store_removed (FolksPersonaStore* _sender,
                                                                 gpointer self)
{
	_folks_individual_store_removed_cb ((FolksIndividual*) self, _sender);
}

static void
__folks_individual_store_personas_changed_cb_folks_persona_store_personas_changed (FolksPersonaStore* _sender,
                                                                                   GeeSet* added,
                                                                                   GeeSet* removed,
                                                                                   const gchar* message,
                                                                                   FolksPersona* actor,
                                                                                   FolksGroupDetailsChangeReason reason,
                                                                                   gpointer self)
{
	_folks_individual_store_personas_changed_cb ((FolksIndividual*) self, _sender, added, removed, message, actor, reason);
}

static void
_folks_individual_set_personas (FolksIndividual* self,
                                GeeSet* personas,
                                FolksIndividual* replacement_individual)
{
	gboolean _tmp0_ = FALSE;
	FolksSmallSet* added = NULL;
	FolksSmallSet* _tmp1_;
	FolksSmallSet* removed = NULL;
	FolksSmallSet* _tmp2_;
	FolksSmallSet* _tmp75_;
	FolksSmallSet* _tmp76_;
	gboolean _tmp77_ = FALSE;
	gboolean new_is_user = FALSE;
	gboolean _tmp78_;
	FolksSmallSet* _tmp79_;
	gint _tmp80_;
	gint _tmp81_;
	FolksSmallSet* _tmp82_;
	gint _tmp83_;
	gint _tmp84_;
	g_return_if_fail (self != NULL);
	if (replacement_individual == NULL) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = replacement_individual != self;
	}
	_vala_assert (_tmp0_, "replacement_individual == null || replacement_individual != this");
	_tmp1_ = folks_small_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	added = _tmp1_;
	_tmp2_ = folks_small_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	removed = _tmp2_;
	if (personas != NULL) {
		{
			GeeIterator* _p_it = NULL;
			GeeIterator* _tmp3_;
			_tmp3_ = gee_iterable_iterator ((GeeIterable*) G_TYPE_CHECK_INSTANCE_CAST (personas, GEE_TYPE_SET, GeeSet));
			_p_it = _tmp3_;
			while (TRUE) {
				GeeIterator* _tmp4_;
				FolksPersona* p = NULL;
				GeeIterator* _tmp5_;
				gpointer _tmp6_;
				FolksSmallSet* _tmp7_;
				FolksPersona* _tmp8_;
				_tmp4_ = _p_it;
				if (!gee_iterator_next (_tmp4_)) {
					break;
				}
				_tmp5_ = _p_it;
				_tmp6_ = gee_iterator_get (_tmp5_);
				p = (FolksPersona*) _tmp6_;
				_tmp7_ = self->priv->_persona_set;
				_tmp8_ = p;
				if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp7_, _tmp8_)) {
					FolksPersona* _tmp9_;
					gboolean _tmp10_;
					gboolean _tmp11_;
					FolksSmallSet* _tmp13_;
					FolksPersona* _tmp14_;
					FolksSmallSet* _tmp15_;
					FolksPersona* _tmp16_;
					FolksPersona* _tmp17_;
					FolksPersonaStore* store = NULL;
					FolksPersona* _tmp18_;
					FolksPersonaStore* _tmp19_;
					FolksPersonaStore* _tmp20_;
					FolksPersonaStore* _tmp21_;
					guint num_from_store = 0U;
					GeeHashMap* _tmp22_;
					FolksPersonaStore* _tmp23_;
					gpointer _tmp24_;
					_tmp9_ = p;
					_tmp10_ = folks_persona_get_is_user (_tmp9_);
					_tmp11_ = _tmp10_;
					if (_tmp11_) {
						guint _tmp12_;
						_tmp12_ = self->priv->_persona_user_count;
						self->priv->_persona_user_count = _tmp12_ + 1;
					}
					_tmp13_ = added;
					_tmp14_ = p;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, _tmp14_);
					_tmp15_ = self->priv->_persona_set;
					_tmp16_ = p;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _tmp16_);
					_tmp17_ = p;
					_folks_individual_connect_to_persona (self, _tmp17_);
					_tmp18_ = p;
					_tmp19_ = folks_persona_get_store (_tmp18_);
					_tmp20_ = _tmp19_;
					_tmp21_ = _g_object_ref0 (_tmp20_);
					store = _tmp21_;
					_tmp22_ = self->priv->_stores;
					_tmp23_ = store;
					_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp22_, _tmp23_);
					num_from_store = (guint) ((guintptr) _tmp24_);
					if (num_from_store == ((guint) 0)) {
						GeeHashMap* _tmp25_;
						FolksPersonaStore* _tmp26_;
						_tmp25_ = self->priv->_stores;
						_tmp26_ = store;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, _tmp26_, (gpointer) ((guintptr) (num_from_store + 1)));
					} else {
						GeeHashMap* _tmp27_;
						FolksPersonaStore* _tmp28_;
						FolksPersonaStore* _tmp29_;
						FolksPersonaStore* _tmp30_;
						_tmp27_ = self->priv->_stores;
						_tmp28_ = store;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp27_, _tmp28_, (gpointer) ((guintptr) 1));
						_tmp29_ = store;
						g_signal_connect_object (_tmp29_, "removed", (GCallback) __folks_individual_store_removed_cb_folks_persona_store_removed, self, 0);
						_tmp30_ = store;
						g_signal_connect_object (_tmp30_, "personas-changed", (GCallback) __folks_individual_store_personas_changed_cb_folks_persona_store_personas_changed, self, 0);
					}
					_g_object_unref0 (store);
				}
				_g_object_unref0 (p);
			}
			_g_object_unref0 (_p_it);
		}
	}
	{
		FolksSmallSet* _p_list = NULL;
		FolksSmallSet* _tmp31_;
		gint _p_size = 0;
		FolksSmallSet* _tmp32_;
		gint _tmp33_;
		gint _tmp34_;
		gint _p_index = 0;
		_tmp31_ = self->priv->_persona_set;
		_p_list = _tmp31_;
		_tmp32_ = _p_list;
		_tmp33_ = gee_collection_get_size ((GeeCollection*) _tmp32_);
		_tmp34_ = _tmp33_;
		_p_size = _tmp34_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp35_;
			gint _tmp36_;
			FolksPersona* p = NULL;
			FolksSmallSet* _tmp37_;
			gconstpointer _tmp38_;
			FolksPersona* _tmp39_;
			gboolean _tmp40_ = FALSE;
			_p_index = _p_index + 1;
			_tmp35_ = _p_index;
			_tmp36_ = _p_size;
			if (!(_tmp35_ < _tmp36_)) {
				break;
			}
			_tmp37_ = _p_list;
			_tmp38_ = folks_small_set_get (_tmp37_, _p_index);
			_tmp39_ = _g_object_ref0 ((FolksPersona*) _tmp38_);
			p = _tmp39_;
			if (personas == NULL) {
				_tmp40_ = TRUE;
			} else {
				FolksPersona* _tmp41_;
				_tmp41_ = p;
				_tmp40_ = !gee_collection_contains ((GeeCollection*) G_TYPE_CHECK_INSTANCE_CAST (personas, GEE_TYPE_SET, GeeSet), _tmp41_);
			}
			if (_tmp40_) {
				FolksPersona* _tmp42_;
				gboolean _tmp43_;
				gboolean _tmp44_;
				FolksSmallSet* _tmp46_;
				FolksPersona* _tmp47_;
				FolksPersonaStore* store = NULL;
				FolksPersona* _tmp48_;
				FolksPersonaStore* _tmp49_;
				FolksPersonaStore* _tmp50_;
				FolksPersonaStore* _tmp51_;
				guint num_from_store = 0U;
				GeeHashMap* _tmp52_;
				FolksPersonaStore* _tmp53_;
				gpointer _tmp54_;
				FolksPersona* _tmp63_;
				_tmp42_ = p;
				_tmp43_ = folks_persona_get_is_user (_tmp42_);
				_tmp44_ = _tmp43_;
				if (_tmp44_) {
					guint _tmp45_;
					_tmp45_ = self->priv->_persona_user_count;
					self->priv->_persona_user_count = _tmp45_ - 1;
				}
				_tmp46_ = removed;
				_tmp47_ = p;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp46_, _tmp47_);
				_tmp48_ = p;
				_tmp49_ = folks_persona_get_store (_tmp48_);
				_tmp50_ = _tmp49_;
				_tmp51_ = _g_object_ref0 (_tmp50_);
				store = _tmp51_;
				_tmp52_ = self->priv->_stores;
				_tmp53_ = store;
				_tmp54_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp52_, _tmp53_);
				num_from_store = (guint) ((guintptr) _tmp54_);
				if (num_from_store > ((guint) 1)) {
					GeeHashMap* _tmp55_;
					FolksPersonaStore* _tmp56_;
					_tmp55_ = self->priv->_stores;
					_tmp56_ = store;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp55_, _tmp56_, (gpointer) ((guintptr) (num_from_store - 1)));
				} else {
					FolksPersonaStore* _tmp57_;
					guint _tmp58_;
					FolksPersonaStore* _tmp59_;
					guint _tmp60_;
					GeeHashMap* _tmp61_;
					FolksPersonaStore* _tmp62_;
					_tmp57_ = store;
					g_signal_parse_name ("removed", FOLKS_TYPE_PERSONA_STORE, &_tmp58_, NULL, FALSE);
					g_signal_handlers_disconnect_matched (_tmp57_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp58_, 0, NULL, (GCallback) __folks_individual_store_removed_cb_folks_persona_store_removed, self);
					_tmp59_ = store;
					g_signal_parse_name ("personas-changed", FOLKS_TYPE_PERSONA_STORE, &_tmp60_, NULL, FALSE);
					g_signal_handlers_disconnect_matched (_tmp59_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp60_, 0, NULL, (GCallback) __folks_individual_store_personas_changed_cb_folks_persona_store_personas_changed, self);
					_tmp61_ = self->priv->_stores;
					_tmp62_ = store;
					gee_abstract_map_unset ((GeeAbstractMap*) _tmp61_, _tmp62_, NULL);
				}
				_tmp63_ = p;
				_folks_individual_disconnect_from_persona (self, _tmp63_, replacement_individual);
				_g_object_unref0 (store);
			}
			_g_object_unref0 (p);
		}
	}
	{
		FolksSmallSet* _p_list = NULL;
		FolksSmallSet* _tmp64_;
		gint _p_size = 0;
		FolksSmallSet* _tmp65_;
		gint _tmp66_;
		gint _tmp67_;
		gint _p_index = 0;
		_tmp64_ = removed;
		_p_list = _tmp64_;
		_tmp65_ = _p_list;
		_tmp66_ = gee_collection_get_size ((GeeCollection*) _tmp65_);
		_tmp67_ = _tmp66_;
		_p_size = _tmp67_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp68_;
			gint _tmp69_;
			FolksPersona* p = NULL;
			FolksSmallSet* _tmp70_;
			gconstpointer _tmp71_;
			FolksPersona* _tmp72_;
			FolksSmallSet* _tmp73_;
			FolksPersona* _tmp74_;
			_p_index = _p_index + 1;
			_tmp68_ = _p_index;
			_tmp69_ = _p_size;
			if (!(_tmp68_ < _tmp69_)) {
				break;
			}
			_tmp70_ = _p_list;
			_tmp71_ = folks_small_set_get (_tmp70_, _p_index);
			_tmp72_ = _g_object_ref0 ((FolksPersona*) _tmp71_);
			p = _tmp72_;
			_tmp73_ = self->priv->_persona_set;
			_tmp74_ = p;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp73_, _tmp74_);
			_g_object_unref0 (p);
		}
	}
	_tmp75_ = added;
	_tmp76_ = removed;
	_folks_individual_emit_personas_changed (self, (GeeSet*) _tmp75_, (GeeSet*) _tmp76_);
	if (self->priv->_persona_user_count > ((guint) 0)) {
		_tmp77_ = TRUE;
	} else {
		_tmp77_ = FALSE;
	}
	new_is_user = _tmp77_;
	_tmp78_ = self->priv->_is_user;
	if (new_is_user != _tmp78_) {
		folks_individual_set_is_user (self, new_is_user);
	}
	_tmp79_ = self->priv->_persona_set;
	_tmp80_ = gee_collection_get_size ((GeeCollection*) _tmp79_);
	_tmp81_ = _tmp80_;
	if (_tmp81_ < 1) {
		g_signal_emit (self, folks_individual_signals[FOLKS_INDIVIDUAL_REMOVED_SIGNAL], 0, replacement_individual);
		_g_object_unref0 (removed);
		_g_object_unref0 (added);
		return;
	}
	_tmp82_ = self->priv->_persona_set;
	_tmp83_ = gee_collection_get_size ((GeeCollection*) _tmp82_);
	_tmp84_ = _tmp83_;
	if (_tmp84_ > 0) {
		FolksPersona* chosen_persona = NULL;
		FolksPersona* _tmp204_;
		const gchar* _tmp205_;
		const gchar* _tmp206_;
		gchar* _tmp207_;
		gchar* _tmp208_;
		chosen_persona = NULL;
		{
			FolksSmallSet* _persona_list = NULL;
			FolksSmallSet* _tmp85_;
			gint _persona_size = 0;
			FolksSmallSet* _tmp86_;
			gint _tmp87_;
			gint _tmp88_;
			gint _persona_index = 0;
			_tmp85_ = self->priv->_persona_set;
			_persona_list = _tmp85_;
			_tmp86_ = _persona_list;
			_tmp87_ = gee_collection_get_size ((GeeCollection*) _tmp86_);
			_tmp88_ = _tmp87_;
			_persona_size = _tmp88_;
			_persona_index = -1;
			while (TRUE) {
				gint _tmp89_;
				gint _tmp90_;
				FolksPersona* persona = NULL;
				FolksSmallSet* _tmp91_;
				gconstpointer _tmp92_;
				FolksPersona* _tmp93_;
				FolksPersona* _tmp94_;
				FolksPersona* _chosen_persona = NULL;
				FolksPersona* _tmp96_;
				gboolean _tmp97_ = FALSE;
				gboolean _tmp98_ = FALSE;
				gboolean _tmp99_ = FALSE;
				gboolean _tmp100_ = FALSE;
				FolksPersona* _tmp101_;
				FolksPersonaStore* _tmp102_;
				FolksPersonaStore* _tmp103_;
				gboolean _tmp104_;
				gboolean _tmp105_;
				_persona_index = _persona_index + 1;
				_tmp89_ = _persona_index;
				_tmp90_ = _persona_size;
				if (!(_tmp89_ < _tmp90_)) {
					break;
				}
				_tmp91_ = _persona_list;
				_tmp92_ = folks_small_set_get (_tmp91_, _persona_index);
				_tmp93_ = _g_object_ref0 ((FolksPersona*) _tmp92_);
				persona = _tmp93_;
				_tmp94_ = chosen_persona;
				if (_tmp94_ == NULL) {
					FolksPersona* _tmp95_;
					_tmp95_ = persona;
					chosen_persona = _tmp95_;
					_g_object_unref0 (persona);
					continue;
				}
				_tmp96_ = chosen_persona;
				_chosen_persona = G_TYPE_CHECK_INSTANCE_CAST (_tmp96_, FOLKS_TYPE_PERSONA, FolksPersona);
				_tmp101_ = _chosen_persona;
				_tmp102_ = folks_persona_get_store (_tmp101_);
				_tmp103_ = _tmp102_;
				_tmp104_ = folks_persona_store_get_is_primary_store (_tmp103_);
				_tmp105_ = _tmp104_;
				if (_tmp105_ == FALSE) {
					FolksPersona* _tmp106_;
					FolksPersonaStore* _tmp107_;
					FolksPersonaStore* _tmp108_;
					gboolean _tmp109_;
					gboolean _tmp110_;
					_tmp106_ = persona;
					_tmp107_ = folks_persona_get_store (_tmp106_);
					_tmp108_ = _tmp107_;
					_tmp109_ = folks_persona_store_get_is_primary_store (_tmp108_);
					_tmp110_ = _tmp109_;
					_tmp100_ = _tmp110_ == TRUE;
				} else {
					_tmp100_ = FALSE;
				}
				if (_tmp100_) {
					_tmp99_ = TRUE;
				} else {
					gboolean _tmp111_ = FALSE;
					FolksPersona* _tmp112_;
					FolksPersonaStore* _tmp113_;
					FolksPersonaStore* _tmp114_;
					gboolean _tmp115_;
					gboolean _tmp116_;
					FolksPersona* _tmp117_;
					FolksPersonaStore* _tmp118_;
					FolksPersonaStore* _tmp119_;
					gboolean _tmp120_;
					gboolean _tmp121_;
					_tmp112_ = _chosen_persona;
					_tmp113_ = folks_persona_get_store (_tmp112_);
					_tmp114_ = _tmp113_;
					_tmp115_ = folks_persona_store_get_is_primary_store (_tmp114_);
					_tmp116_ = _tmp115_;
					_tmp117_ = persona;
					_tmp118_ = folks_persona_get_store (_tmp117_);
					_tmp119_ = _tmp118_;
					_tmp120_ = folks_persona_store_get_is_primary_store (_tmp119_);
					_tmp121_ = _tmp120_;
					if (_tmp116_ == _tmp121_) {
						FolksPersona* _tmp122_;
						FolksPersonaStore* _tmp123_;
						FolksPersonaStore* _tmp124_;
						FolksPersonaStoreTrust _tmp125_;
						FolksPersonaStoreTrust _tmp126_;
						FolksPersona* _tmp127_;
						FolksPersonaStore* _tmp128_;
						FolksPersonaStore* _tmp129_;
						FolksPersonaStoreTrust _tmp130_;
						FolksPersonaStoreTrust _tmp131_;
						_tmp122_ = _chosen_persona;
						_tmp123_ = folks_persona_get_store (_tmp122_);
						_tmp124_ = _tmp123_;
						_tmp125_ = folks_persona_store_get_trust_level (_tmp124_);
						_tmp126_ = _tmp125_;
						_tmp127_ = persona;
						_tmp128_ = folks_persona_get_store (_tmp127_);
						_tmp129_ = _tmp128_;
						_tmp130_ = folks_persona_store_get_trust_level (_tmp129_);
						_tmp131_ = _tmp130_;
						_tmp111_ = _tmp126_ > _tmp131_;
					} else {
						_tmp111_ = FALSE;
					}
					_tmp99_ = _tmp111_;
				}
				if (_tmp99_) {
					_tmp98_ = TRUE;
				} else {
					gboolean _tmp132_ = FALSE;
					gboolean _tmp133_ = FALSE;
					FolksPersona* _tmp134_;
					FolksPersonaStore* _tmp135_;
					FolksPersonaStore* _tmp136_;
					gboolean _tmp137_;
					gboolean _tmp138_;
					FolksPersona* _tmp139_;
					FolksPersonaStore* _tmp140_;
					FolksPersonaStore* _tmp141_;
					gboolean _tmp142_;
					gboolean _tmp143_;
					_tmp134_ = _chosen_persona;
					_tmp135_ = folks_persona_get_store (_tmp134_);
					_tmp136_ = _tmp135_;
					_tmp137_ = folks_persona_store_get_is_primary_store (_tmp136_);
					_tmp138_ = _tmp137_;
					_tmp139_ = persona;
					_tmp140_ = folks_persona_get_store (_tmp139_);
					_tmp141_ = _tmp140_;
					_tmp142_ = folks_persona_store_get_is_primary_store (_tmp141_);
					_tmp143_ = _tmp142_;
					if (_tmp138_ == _tmp143_) {
						FolksPersona* _tmp144_;
						FolksPersonaStore* _tmp145_;
						FolksPersonaStore* _tmp146_;
						FolksPersonaStoreTrust _tmp147_;
						FolksPersonaStoreTrust _tmp148_;
						FolksPersona* _tmp149_;
						FolksPersonaStore* _tmp150_;
						FolksPersonaStore* _tmp151_;
						FolksPersonaStoreTrust _tmp152_;
						FolksPersonaStoreTrust _tmp153_;
						_tmp144_ = _chosen_persona;
						_tmp145_ = folks_persona_get_store (_tmp144_);
						_tmp146_ = _tmp145_;
						_tmp147_ = folks_persona_store_get_trust_level (_tmp146_);
						_tmp148_ = _tmp147_;
						_tmp149_ = persona;
						_tmp150_ = folks_persona_get_store (_tmp149_);
						_tmp151_ = _tmp150_;
						_tmp152_ = folks_persona_store_get_trust_level (_tmp151_);
						_tmp153_ = _tmp152_;
						_tmp133_ = _tmp148_ == _tmp153_;
					} else {
						_tmp133_ = FALSE;
					}
					if (_tmp133_) {
						FolksPersona* _tmp154_;
						FolksPersonaStore* _tmp155_;
						FolksPersonaStore* _tmp156_;
						const gchar* _tmp157_;
						const gchar* _tmp158_;
						FolksPersona* _tmp159_;
						FolksPersonaStore* _tmp160_;
						FolksPersonaStore* _tmp161_;
						const gchar* _tmp162_;
						const gchar* _tmp163_;
						_tmp154_ = _chosen_persona;
						_tmp155_ = folks_persona_get_store (_tmp154_);
						_tmp156_ = _tmp155_;
						_tmp157_ = folks_persona_store_get_id (_tmp156_);
						_tmp158_ = _tmp157_;
						_tmp159_ = persona;
						_tmp160_ = folks_persona_get_store (_tmp159_);
						_tmp161_ = _tmp160_;
						_tmp162_ = folks_persona_store_get_id (_tmp161_);
						_tmp163_ = _tmp162_;
						_tmp132_ = g_strcmp0 (_tmp158_, _tmp163_) > 0;
					} else {
						_tmp132_ = FALSE;
					}
					_tmp98_ = _tmp132_;
				}
				if (_tmp98_) {
					_tmp97_ = TRUE;
				} else {
					gboolean _tmp164_ = FALSE;
					gboolean _tmp165_ = FALSE;
					gboolean _tmp166_ = FALSE;
					FolksPersona* _tmp167_;
					FolksPersonaStore* _tmp168_;
					FolksPersonaStore* _tmp169_;
					gboolean _tmp170_;
					gboolean _tmp171_;
					FolksPersona* _tmp172_;
					FolksPersonaStore* _tmp173_;
					FolksPersonaStore* _tmp174_;
					gboolean _tmp175_;
					gboolean _tmp176_;
					_tmp167_ = _chosen_persona;
					_tmp168_ = folks_persona_get_store (_tmp167_);
					_tmp169_ = _tmp168_;
					_tmp170_ = folks_persona_store_get_is_primary_store (_tmp169_);
					_tmp171_ = _tmp170_;
					_tmp172_ = persona;
					_tmp173_ = folks_persona_get_store (_tmp172_);
					_tmp174_ = _tmp173_;
					_tmp175_ = folks_persona_store_get_is_primary_store (_tmp174_);
					_tmp176_ = _tmp175_;
					if (_tmp171_ == _tmp176_) {
						FolksPersona* _tmp177_;
						FolksPersonaStore* _tmp178_;
						FolksPersonaStore* _tmp179_;
						FolksPersonaStoreTrust _tmp180_;
						FolksPersonaStoreTrust _tmp181_;
						FolksPersona* _tmp182_;
						FolksPersonaStore* _tmp183_;
						FolksPersonaStore* _tmp184_;
						FolksPersonaStoreTrust _tmp185_;
						FolksPersonaStoreTrust _tmp186_;
						_tmp177_ = _chosen_persona;
						_tmp178_ = folks_persona_get_store (_tmp177_);
						_tmp179_ = _tmp178_;
						_tmp180_ = folks_persona_store_get_trust_level (_tmp179_);
						_tmp181_ = _tmp180_;
						_tmp182_ = persona;
						_tmp183_ = folks_persona_get_store (_tmp182_);
						_tmp184_ = _tmp183_;
						_tmp185_ = folks_persona_store_get_trust_level (_tmp184_);
						_tmp186_ = _tmp185_;
						_tmp166_ = _tmp181_ == _tmp186_;
					} else {
						_tmp166_ = FALSE;
					}
					if (_tmp166_) {
						FolksPersona* _tmp187_;
						FolksPersonaStore* _tmp188_;
						FolksPersonaStore* _tmp189_;
						const gchar* _tmp190_;
						const gchar* _tmp191_;
						FolksPersona* _tmp192_;
						FolksPersonaStore* _tmp193_;
						FolksPersonaStore* _tmp194_;
						const gchar* _tmp195_;
						const gchar* _tmp196_;
						_tmp187_ = _chosen_persona;
						_tmp188_ = folks_persona_get_store (_tmp187_);
						_tmp189_ = _tmp188_;
						_tmp190_ = folks_persona_store_get_id (_tmp189_);
						_tmp191_ = _tmp190_;
						_tmp192_ = persona;
						_tmp193_ = folks_persona_get_store (_tmp192_);
						_tmp194_ = _tmp193_;
						_tmp195_ = folks_persona_store_get_id (_tmp194_);
						_tmp196_ = _tmp195_;
						_tmp165_ = g_strcmp0 (_tmp191_, _tmp196_) == 0;
					} else {
						_tmp165_ = FALSE;
					}
					if (_tmp165_) {
						FolksPersona* _tmp197_;
						const gchar* _tmp198_;
						const gchar* _tmp199_;
						FolksPersona* _tmp200_;
						const gchar* _tmp201_;
						const gchar* _tmp202_;
						_tmp197_ = _chosen_persona;
						_tmp198_ = folks_persona_get_uid (_tmp197_);
						_tmp199_ = _tmp198_;
						_tmp200_ = persona;
						_tmp201_ = folks_persona_get_uid (_tmp200_);
						_tmp202_ = _tmp201_;
						_tmp164_ = g_strcmp0 (_tmp199_, _tmp202_) > 0;
					} else {
						_tmp164_ = FALSE;
					}
					_tmp97_ = _tmp164_;
				}
				if (_tmp97_) {
					FolksPersona* _tmp203_;
					_tmp203_ = persona;
					chosen_persona = _tmp203_;
				}
				_g_object_unref0 (persona);
			}
		}
		_tmp204_ = chosen_persona;
		_tmp205_ = folks_persona_get_uid (G_TYPE_CHECK_INSTANCE_CAST (_tmp204_, FOLKS_TYPE_PERSONA, FolksPersona));
		_tmp206_ = _tmp205_;
		_tmp207_ = g_compute_checksum_for_string (G_CHECKSUM_SHA1, _tmp206_, (gsize) -1);
		_tmp208_ = _tmp207_;
		folks_individual_set_id (self, _tmp208_);
		_g_free0 (_tmp208_);
	} else {
		folks_individual_set_id (self, "");
	}
	_folks_individual_update_fields (self);
	_g_object_unref0 (removed);
	_g_object_unref0 (added);
}

void
folks_individual_replace (FolksIndividual* self,
                          FolksIndividual* replacement_individual)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (replacement_individual != NULL);
	_folks_individual_set_personas (self, NULL, replacement_individual);
}

/**
   * Anti-linked with a persona?
   *
   * Check whether this individual is anti-linked to {@link Persona} ``p`` at
   * all. If so, ``true`` will be returned — ``false`` will be returned
   * otherwise.
   *
   * Note that this will check for anti-links in either direction, since
   * anti-links are not necessarily symmetric.
   *
   * @param p persona to check for anti-links with
   * @return ``true`` if this individual is anti-linked with persona ``p``;
   * ``false``
   * otherwise
   * @since 0.7.3
   */
gboolean
folks_individual_has_anti_link_with_persona (FolksIndividual* self,
                                             FolksPersona* p)
{
	FolksAntiLinkable* al = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (p != NULL, FALSE);
	al = FOLKS_IS_ANTI_LINKABLE (p) ? ((FolksAntiLinkable*) p) : NULL;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp0_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _persona_index = 0;
		_tmp0_ = self->priv->_persona_set;
		_persona_list = _tmp0_;
		_tmp1_ = _persona_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_persona_size = _tmp3_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp6_;
			gconstpointer _tmp7_;
			FolksPersona* _tmp8_;
			FolksAntiLinkable* pl = NULL;
			FolksPersona* _tmp9_;
			gboolean _tmp10_ = FALSE;
			gboolean _tmp11_ = FALSE;
			FolksAntiLinkable* _tmp12_;
			_persona_index = _persona_index + 1;
			_tmp4_ = _persona_index;
			_tmp5_ = _persona_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _persona_list;
			_tmp7_ = folks_small_set_get (_tmp6_, _persona_index);
			_tmp8_ = _g_object_ref0 ((FolksPersona*) _tmp7_);
			persona = _tmp8_;
			_tmp9_ = persona;
			pl = FOLKS_IS_ANTI_LINKABLE (_tmp9_) ? ((FolksAntiLinkable*) _tmp9_) : NULL;
			_tmp12_ = al;
			if (_tmp12_ != NULL) {
				FolksAntiLinkable* _tmp13_;
				FolksPersona* _tmp14_;
				_tmp13_ = al;
				_tmp14_ = persona;
				_tmp11_ = folks_anti_linkable_has_anti_link_with_persona (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FOLKS_TYPE_ANTI_LINKABLE, FolksAntiLinkable), _tmp14_);
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				_tmp10_ = TRUE;
			} else {
				gboolean _tmp15_ = FALSE;
				FolksAntiLinkable* _tmp16_;
				_tmp16_ = pl;
				if (_tmp16_ != NULL) {
					FolksAntiLinkable* _tmp17_;
					_tmp17_ = pl;
					_tmp15_ = folks_anti_linkable_has_anti_link_with_persona (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, FOLKS_TYPE_ANTI_LINKABLE, FolksAntiLinkable), p);
				} else {
					_tmp15_ = FALSE;
				}
				_tmp10_ = _tmp15_;
			}
			if (_tmp10_) {
				result = TRUE;
				_g_object_unref0 (persona);
				return result;
			}
			_g_object_unref0 (persona);
		}
	}
	result = FALSE;
	return result;
}

/**
   * Anti-linked with an individual?
   *
   * Check whether this individual is anti-linked to any of the {@link Persona}s
   * in {@link Folks.Individual} ``i``. If so, ``true`` will be returned —
   * ``false`` will be returned otherwise.
   *
   * Note that this will check for anti-links in either direction, since
   * anti-links are not necessarily symmetric.
   *
   * @param i individual to check for anti-links with
   * @return ``true`` if this individual is anti-linked with individual ``i``;
   * ``false`` otherwise
   * @since 0.7.3
   */
gboolean
folks_individual_has_anti_link_with_individual (FolksIndividual* self,
                                                FolksIndividual* i)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (i != NULL, FALSE);
	{
		GeeIterator* _p_it = NULL;
		GeeSet* _tmp0_;
		GeeSet* _tmp1_;
		GeeIterator* _tmp2_;
		_tmp0_ = folks_individual_get_personas (i);
		_tmp1_ = _tmp0_;
		_tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_);
		_p_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			FolksPersona* p = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			FolksPersona* _tmp6_;
			_tmp3_ = _p_it;
			if (!gee_iterator_next (_tmp3_)) {
				break;
			}
			_tmp4_ = _p_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			p = (FolksPersona*) _tmp5_;
			_tmp6_ = p;
			if (folks_individual_has_anti_link_with_persona (self, _tmp6_) == TRUE) {
				result = TRUE;
				_g_object_unref0 (p);
				_g_object_unref0 (_p_it);
				return result;
			}
			_g_object_unref0 (p);
		}
		_g_object_unref0 (_p_it);
	}
	result = FALSE;
	return result;
}

FolksTrustLevel
folks_individual_get_trust_level (FolksIndividual* self)
{
	FolksTrustLevel result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_trust_level;
	return result;
}

static void
folks_individual_set_trust_level (FolksIndividual* self,
                                  FolksTrustLevel value)
{
	FolksTrustLevel old_value;
	g_return_if_fail (self != NULL);
	old_value = folks_individual_get_trust_level (self);
	if (old_value != value) {
		self->priv->_trust_level = value;
		g_object_notify_by_pspec ((GObject *) self, folks_individual_properties[FOLKS_INDIVIDUAL_TRUST_LEVEL_PROPERTY]);
	}
}

static GLoadableIcon*
folks_individual_real_get_avatar (FolksAvatarDetails* base)
{
	GLoadableIcon* result;
	FolksIndividual* self;
	GLoadableIcon* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_avatar;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_avatar (FolksAvatarDetails* base,
                                  GLoadableIcon* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_avatar_details_change_avatar ((FolksAvatarDetails*) self, value, NULL, NULL);
}

static FolksPresenceType
folks_individual_real_get_presence_type (FolksPresenceDetails* base)
{
	FolksPresenceType result;
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	result = self->priv->_presence_type;
	return result;
}

static void
folks_individual_real_set_presence_type (FolksPresenceDetails* base,
                                         FolksPresenceType value)
{
	FolksIndividual* self;
	FolksPresenceType old_value;
	self = (FolksIndividual*) base;
	old_value = folks_individual_real_get_presence_type (base);
	if (old_value != value) {
		self->priv->_presence_type = value;
		g_object_notify_by_pspec ((GObject *) self, folks_individual_properties[FOLKS_INDIVIDUAL_PRESENCE_TYPE_PROPERTY]);
	}
}

static const gchar*
folks_individual_real_get_presence_status (FolksPresenceDetails* base)
{
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_presence_status;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_presence_status (FolksPresenceDetails* base,
                                           const gchar* value)
{
	FolksIndividual* self;
	gchar* old_value;
	self = (FolksIndividual*) base;
	old_value = folks_individual_real_get_presence_status (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_presence_status);
		self->priv->_presence_status = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, folks_individual_properties[FOLKS_INDIVIDUAL_PRESENCE_STATUS_PROPERTY]);
	}
}

static const gchar*
folks_individual_real_get_presence_message (FolksPresenceDetails* base)
{
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_presence_message;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_presence_message (FolksPresenceDetails* base,
                                            const gchar* value)
{
	FolksIndividual* self;
	gchar* old_value;
	self = (FolksIndividual*) base;
	old_value = folks_individual_real_get_presence_message (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_presence_message);
		self->priv->_presence_message = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, folks_individual_properties[FOLKS_INDIVIDUAL_PRESENCE_MESSAGE_PROPERTY]);
	}
}

static gchar**
folks_individual_real_get_client_types (FolksPresenceDetails* base,
                                        gint* result_length1)
{
	gchar** result;
	FolksIndividual* self;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_client_types;
	_tmp0__length1 = self->priv->_client_types_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup2 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static void
folks_individual_real_set_client_types (FolksPresenceDetails* base,
                                        gchar** value,
                                        gint value_length1)
{
	FolksIndividual* self;
	gchar** old_value;
	gint old_value_length;
	self = (FolksIndividual*) base;
	old_value = folks_individual_real_get_client_types (base, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup2 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_client_types = (_vala_array_free (self->priv->_client_types, self->priv->_client_types_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_client_types = _tmp0_;
		self->priv->_client_types_length1 = _tmp0__length1;
		self->priv->__client_types_size_ = self->priv->_client_types_length1;
		g_object_notify_by_pspec ((GObject *) self, folks_individual_properties[FOLKS_INDIVIDUAL_CLIENT_TYPES_PROPERTY]);
	}
}

gboolean
folks_individual_get_is_user (FolksIndividual* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_user;
	return result;
}

static void
folks_individual_set_is_user (FolksIndividual* self,
                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = folks_individual_get_is_user (self);
	if (old_value != value) {
		self->priv->_is_user = value;
		g_object_notify_by_pspec ((GObject *) self, folks_individual_properties[FOLKS_INDIVIDUAL_IS_USER_PROPERTY]);
	}
}

const gchar*
folks_individual_get_id (FolksIndividual* 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
folks_individual_set_id (FolksIndividual* self,
                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = folks_individual_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, folks_individual_properties[FOLKS_INDIVIDUAL_ID_PROPERTY]);
	}
}

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

static const gchar*
folks_individual_real_get_alias (FolksAliasDetails* base)
{
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_alias;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_alias (FolksAliasDetails* base,
                                 const gchar* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_alias_details_change_alias ((FolksAliasDetails*) self, value, NULL, NULL);
}

static FolksStructuredName*
folks_individual_real_get_structured_name (FolksNameDetails* base)
{
	FolksStructuredName* result;
	FolksIndividual* self;
	FolksStructuredName* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_structured_name;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_structured_name (FolksNameDetails* base,
                                           FolksStructuredName* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_name_details_change_structured_name ((FolksNameDetails*) self, value, NULL, NULL);
}

static const gchar*
folks_individual_real_get_full_name (FolksNameDetails* base)
{
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_full_name;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_full_name (FolksNameDetails* base,
                                     const gchar* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_name_details_change_full_name ((FolksNameDetails*) self, value, NULL, NULL);
}

static const gchar*
folks_individual_real_get_nickname (FolksNameDetails* base)
{
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_nickname;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_nickname (FolksNameDetails* base,
                                    const gchar* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_name_details_change_nickname ((FolksNameDetails*) self, value, NULL, NULL);
}

static FolksGender
folks_individual_real_get_gender (FolksGenderDetails* base)
{
	FolksGender result;
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	result = self->priv->_gender;
	return result;
}

static void
folks_individual_real_set_gender (FolksGenderDetails* base,
                                  FolksGender value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_gender_details_change_gender ((FolksGenderDetails*) self, value, NULL, NULL);
}

static GeeSet*
folks_individual_real_get_urls (FolksUrlDetails* base)
{
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_urls (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_urls_ro;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_urls (FolksUrlDetails* base,
                                GeeSet* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_url_details_change_urls ((FolksUrlDetails*) self, value, NULL, NULL);
}

static GeeSet*
folks_individual_real_get_phone_numbers (FolksPhoneDetails* base)
{
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_phone_numbers (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_phone_numbers_ro;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_phone_numbers (FolksPhoneDetails* base,
                                         GeeSet* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_phone_details_change_phone_numbers ((FolksPhoneDetails*) self, value, NULL, NULL);
}

static GeeSet*
folks_individual_real_get_email_addresses (FolksEmailDetails* base)
{
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_email_addresses (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_email_addresses_ro;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_email_addresses (FolksEmailDetails* base,
                                           GeeSet* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_email_details_change_email_addresses ((FolksEmailDetails*) self, value, NULL, NULL);
}

static GeeSet*
folks_individual_real_get_roles (FolksRoleDetails* base)
{
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_roles (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_roles_ro;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_roles (FolksRoleDetails* base,
                                 GeeSet* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_role_details_change_roles ((FolksRoleDetails*) self, value, NULL, NULL);
}

static GeeSet*
folks_individual_real_get_local_ids (FolksLocalIdDetails* base)
{
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_local_ids (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_local_ids_ro;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_local_ids (FolksLocalIdDetails* base,
                                     GeeSet* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_local_id_details_change_local_ids ((FolksLocalIdDetails*) self, value, NULL, NULL);
}

static FolksLocation*
folks_individual_real_get_location (FolksLocationDetails* base)
{
	FolksLocation* result;
	FolksIndividual* self;
	FolksLocation* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_location;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_location (FolksLocationDetails* base,
                                    FolksLocation* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_location_details_change_location ((FolksLocationDetails*) self, value, NULL, NULL);
}

static GDateTime*
folks_individual_real_get_birthday (FolksBirthdayDetails* base)
{
	GDateTime* result;
	FolksIndividual* self;
	GDateTime* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_birthday;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_birthday (FolksBirthdayDetails* base,
                                    GDateTime* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_birthday_details_change_birthday ((FolksBirthdayDetails*) self, value, NULL, NULL);
}

static const gchar*
folks_individual_real_get_calendar_event_id (FolksBirthdayDetails* base)
{
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_calendar_event_id;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_calendar_event_id (FolksBirthdayDetails* base,
                                             const gchar* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_birthday_details_change_calendar_event_id ((FolksBirthdayDetails*) self, value, NULL, NULL);
}

static GeeSet*
folks_individual_real_get_notes (FolksNoteDetails* base)
{
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_notes (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_notes_ro;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_notes (FolksNoteDetails* base,
                                 GeeSet* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_note_details_change_notes ((FolksNoteDetails*) self, value, NULL, NULL);
}

static GeeSet*
folks_individual_real_get_postal_addresses (FolksPostalAddressDetails* base)
{
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_postal_addresses (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_postal_addresses_ro;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_postal_addresses (FolksPostalAddressDetails* base,
                                            GeeSet* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_postal_address_details_change_postal_addresses ((FolksPostalAddressDetails*) self, value, NULL, NULL);
}

static gboolean
folks_individual_real_get_is_favourite (FolksFavouriteDetails* base)
{
	gboolean result;
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	result = self->priv->_is_favourite;
	return result;
}

static void
folks_individual_real_set_is_favourite (FolksFavouriteDetails* base,
                                        gboolean value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_favourite_details_change_is_favourite ((FolksFavouriteDetails*) self, value, NULL, NULL);
}

static GeeSet*
folks_individual_real_get_groups (FolksGroupDetails* base)
{
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_groups (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_groups_ro;
	result = _tmp0_;
	return result;
}

static void
folks_individual_real_set_groups (FolksGroupDetails* base,
                                  GeeSet* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_group_details_change_groups ((FolksGroupDetails*) self, value, NULL, NULL);
}

static GeeMultiMap*
folks_individual_real_get_im_addresses (FolksImDetails* base)
{
	GeeMultiMap* result;
	FolksIndividual* self;
	GeeHashMultiMap* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_im_addresses (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_im_addresses;
	result = (GeeMultiMap*) _tmp0_;
	return result;
}

static void
folks_individual_real_set_im_addresses (FolksImDetails* base,
                                        GeeMultiMap* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_im_details_change_im_addresses ((FolksImDetails*) self, value, NULL, NULL);
}

static GeeMultiMap*
folks_individual_real_get_web_service_addresses (FolksWebServiceDetails* base)
{
	GeeMultiMap* result;
	FolksIndividual* self;
	GeeHashMultiMap* _tmp0_;
	self = (FolksIndividual*) base;
	_folks_individual_update_web_service_addresses (self, TRUE, FALSE, FALSE);
	_tmp0_ = self->priv->_web_service_addresses;
	result = (GeeMultiMap*) _tmp0_;
	return result;
}

static void
folks_individual_real_set_web_service_addresses (FolksWebServiceDetails* base,
                                                 GeeMultiMap* value)
{
	FolksIndividual* self;
	self = (FolksIndividual*) base;
	folks_web_service_details_change_web_service_addresses ((FolksWebServiceDetails*) self, value, NULL, NULL);
}

static guint
folks_individual_real_get_im_interaction_count (FolksInteractionDetails* base)
{
	guint result;
	FolksIndividual* self;
	guint counter = 0U;
	self = (FolksIndividual*) base;
	counter = (guint) 0;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp0_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _persona_index = 0;
		_tmp0_ = self->priv->_persona_set;
		_persona_list = _tmp0_;
		_tmp1_ = _persona_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_persona_size = _tmp3_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp6_;
			gconstpointer _tmp7_;
			FolksPersona* _tmp8_;
			FolksInteractionDetails* my_interaction_details = NULL;
			FolksPersona* _tmp9_;
			FolksInteractionDetails* _tmp10_;
			_persona_index = _persona_index + 1;
			_tmp4_ = _persona_index;
			_tmp5_ = _persona_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _persona_list;
			_tmp7_ = folks_small_set_get (_tmp6_, _persona_index);
			_tmp8_ = _g_object_ref0 ((FolksPersona*) _tmp7_);
			persona = _tmp8_;
			_tmp9_ = persona;
			my_interaction_details = FOLKS_IS_INTERACTION_DETAILS (_tmp9_) ? ((FolksInteractionDetails*) _tmp9_) : NULL;
			_tmp10_ = my_interaction_details;
			if (_tmp10_ != NULL) {
				FolksInteractionDetails* _tmp11_;
				guint _tmp12_;
				guint _tmp13_;
				_tmp11_ = my_interaction_details;
				_tmp12_ = folks_interaction_details_get_im_interaction_count (_tmp11_);
				_tmp13_ = _tmp12_;
				counter = counter + _tmp13_;
			}
			_g_object_unref0 (persona);
		}
	}
	result = counter;
	return result;
}

static GDateTime*
folks_individual_real_get_last_im_interaction_datetime (FolksInteractionDetails* base)
{
	GDateTime* result;
	FolksIndividual* self;
	GDateTime* _tmp0_;
	GDateTime* _tmp28_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_last_im_interaction_datetime;
	if (_tmp0_ == NULL) {
		{
			FolksSmallSet* _persona_list = NULL;
			FolksSmallSet* _tmp1_;
			gint _persona_size = 0;
			FolksSmallSet* _tmp2_;
			gint _tmp3_;
			gint _tmp4_;
			gint _persona_index = 0;
			_tmp1_ = self->priv->_persona_set;
			_persona_list = _tmp1_;
			_tmp2_ = _persona_list;
			_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
			_tmp4_ = _tmp3_;
			_persona_size = _tmp4_;
			_persona_index = -1;
			while (TRUE) {
				gint _tmp5_;
				gint _tmp6_;
				FolksPersona* persona = NULL;
				FolksSmallSet* _tmp7_;
				gconstpointer _tmp8_;
				FolksPersona* _tmp9_;
				FolksInteractionDetails* my_interaction_details = NULL;
				FolksPersona* _tmp10_;
				gboolean _tmp11_ = FALSE;
				FolksInteractionDetails* _tmp12_;
				_persona_index = _persona_index + 1;
				_tmp5_ = _persona_index;
				_tmp6_ = _persona_size;
				if (!(_tmp5_ < _tmp6_)) {
					break;
				}
				_tmp7_ = _persona_list;
				_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
				_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
				persona = _tmp9_;
				_tmp10_ = persona;
				my_interaction_details = FOLKS_IS_INTERACTION_DETAILS (_tmp10_) ? ((FolksInteractionDetails*) _tmp10_) : NULL;
				_tmp12_ = my_interaction_details;
				if (_tmp12_ != NULL) {
					FolksInteractionDetails* _tmp13_;
					GDateTime* _tmp14_;
					GDateTime* _tmp15_;
					_tmp13_ = my_interaction_details;
					_tmp14_ = folks_interaction_details_get_last_im_interaction_datetime (_tmp13_);
					_tmp15_ = _tmp14_;
					_tmp11_ = _tmp15_ != NULL;
				} else {
					_tmp11_ = FALSE;
				}
				if (_tmp11_) {
					GDateTime* interaction_datetime = NULL;
					FolksInteractionDetails* _tmp16_;
					GDateTime* _tmp17_;
					GDateTime* _tmp18_;
					GDateTime* _tmp19_;
					gboolean _tmp20_ = FALSE;
					GDateTime* _tmp21_;
					_tmp16_ = my_interaction_details;
					_tmp17_ = folks_interaction_details_get_last_im_interaction_datetime (_tmp16_);
					_tmp18_ = _tmp17_;
					_tmp19_ = _g_date_time_ref0 (_tmp18_);
					interaction_datetime = _tmp19_;
					_tmp21_ = self->priv->_last_im_interaction_datetime;
					if (_tmp21_ == NULL) {
						_tmp20_ = TRUE;
					} else {
						GDateTime* _tmp22_;
						GDateTime* _tmp23_;
						_tmp22_ = interaction_datetime;
						_tmp23_ = self->priv->_last_im_interaction_datetime;
						_tmp20_ = g_date_time_compare (_tmp22_, _tmp23_) == 1;
					}
					if (_tmp20_) {
						FolksInteractionDetails* _tmp24_;
						GDateTime* _tmp25_;
						GDateTime* _tmp26_;
						GDateTime* _tmp27_;
						_tmp24_ = my_interaction_details;
						_tmp25_ = folks_interaction_details_get_last_im_interaction_datetime (_tmp24_);
						_tmp26_ = _tmp25_;
						_tmp27_ = _g_date_time_ref0 (_tmp26_);
						_g_date_time_unref0 (self->priv->_last_im_interaction_datetime);
						self->priv->_last_im_interaction_datetime = _tmp27_;
					}
					_g_date_time_unref0 (interaction_datetime);
				}
				_g_object_unref0 (persona);
			}
		}
	}
	_tmp28_ = self->priv->_last_im_interaction_datetime;
	result = _tmp28_;
	return result;
}

static guint
folks_individual_real_get_call_interaction_count (FolksInteractionDetails* base)
{
	guint result;
	FolksIndividual* self;
	guint counter = 0U;
	self = (FolksIndividual*) base;
	counter = (guint) 0;
	{
		FolksSmallSet* _persona_list = NULL;
		FolksSmallSet* _tmp0_;
		gint _persona_size = 0;
		FolksSmallSet* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _persona_index = 0;
		_tmp0_ = self->priv->_persona_set;
		_persona_list = _tmp0_;
		_tmp1_ = _persona_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_persona_size = _tmp3_;
		_persona_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			FolksPersona* persona = NULL;
			FolksSmallSet* _tmp6_;
			gconstpointer _tmp7_;
			FolksPersona* _tmp8_;
			FolksInteractionDetails* my_interaction_details = NULL;
			FolksPersona* _tmp9_;
			FolksInteractionDetails* _tmp10_;
			_persona_index = _persona_index + 1;
			_tmp4_ = _persona_index;
			_tmp5_ = _persona_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _persona_list;
			_tmp7_ = folks_small_set_get (_tmp6_, _persona_index);
			_tmp8_ = _g_object_ref0 ((FolksPersona*) _tmp7_);
			persona = _tmp8_;
			_tmp9_ = persona;
			my_interaction_details = FOLKS_IS_INTERACTION_DETAILS (_tmp9_) ? ((FolksInteractionDetails*) _tmp9_) : NULL;
			_tmp10_ = my_interaction_details;
			if (_tmp10_ != NULL) {
				FolksInteractionDetails* _tmp11_;
				guint _tmp12_;
				guint _tmp13_;
				_tmp11_ = my_interaction_details;
				_tmp12_ = folks_interaction_details_get_call_interaction_count (_tmp11_);
				_tmp13_ = _tmp12_;
				counter = counter + _tmp13_;
			}
			_g_object_unref0 (persona);
		}
	}
	result = counter;
	return result;
}

static GDateTime*
folks_individual_real_get_last_call_interaction_datetime (FolksInteractionDetails* base)
{
	GDateTime* result;
	FolksIndividual* self;
	GDateTime* _tmp0_;
	GDateTime* _tmp29_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_last_call_interaction_datetime;
	if (_tmp0_ == NULL) {
		{
			FolksSmallSet* _persona_list = NULL;
			FolksSmallSet* _tmp1_;
			gint _persona_size = 0;
			FolksSmallSet* _tmp2_;
			gint _tmp3_;
			gint _tmp4_;
			gint _persona_index = 0;
			_tmp1_ = self->priv->_persona_set;
			_persona_list = _tmp1_;
			_tmp2_ = _persona_list;
			_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
			_tmp4_ = _tmp3_;
			_persona_size = _tmp4_;
			_persona_index = -1;
			while (TRUE) {
				gint _tmp5_;
				gint _tmp6_;
				FolksPersona* persona = NULL;
				FolksSmallSet* _tmp7_;
				gconstpointer _tmp8_;
				FolksPersona* _tmp9_;
				FolksInteractionDetails* my_interaction_details = NULL;
				FolksPersona* _tmp10_;
				FolksInteractionDetails* _tmp11_;
				gboolean _tmp12_ = FALSE;
				FolksInteractionDetails* _tmp13_;
				_persona_index = _persona_index + 1;
				_tmp5_ = _persona_index;
				_tmp6_ = _persona_size;
				if (!(_tmp5_ < _tmp6_)) {
					break;
				}
				_tmp7_ = _persona_list;
				_tmp8_ = folks_small_set_get (_tmp7_, _persona_index);
				_tmp9_ = _g_object_ref0 ((FolksPersona*) _tmp8_);
				persona = _tmp9_;
				_tmp10_ = persona;
				_tmp11_ = _g_object_ref0 (FOLKS_IS_INTERACTION_DETAILS (_tmp10_) ? ((FolksInteractionDetails*) _tmp10_) : NULL);
				my_interaction_details = _tmp11_;
				_tmp13_ = my_interaction_details;
				if (_tmp13_ != NULL) {
					FolksInteractionDetails* _tmp14_;
					GDateTime* _tmp15_;
					GDateTime* _tmp16_;
					_tmp14_ = my_interaction_details;
					_tmp15_ = folks_interaction_details_get_last_call_interaction_datetime (_tmp14_);
					_tmp16_ = _tmp15_;
					_tmp12_ = _tmp16_ != NULL;
				} else {
					_tmp12_ = FALSE;
				}
				if (_tmp12_) {
					GDateTime* interaction_datetime = NULL;
					FolksInteractionDetails* _tmp17_;
					GDateTime* _tmp18_;
					GDateTime* _tmp19_;
					GDateTime* _tmp20_;
					gboolean _tmp21_ = FALSE;
					GDateTime* _tmp22_;
					_tmp17_ = my_interaction_details;
					_tmp18_ = folks_interaction_details_get_last_call_interaction_datetime (_tmp17_);
					_tmp19_ = _tmp18_;
					_tmp20_ = _g_date_time_ref0 (_tmp19_);
					interaction_datetime = _tmp20_;
					_tmp22_ = self->priv->_last_call_interaction_datetime;
					if (_tmp22_ == NULL) {
						_tmp21_ = TRUE;
					} else {
						GDateTime* _tmp23_;
						GDateTime* _tmp24_;
						_tmp23_ = interaction_datetime;
						_tmp24_ = self->priv->_last_call_interaction_datetime;
						_tmp21_ = g_date_time_compare (_tmp23_, _tmp24_) > 1;
					}
					if (_tmp21_) {
						FolksInteractionDetails* _tmp25_;
						GDateTime* _tmp26_;
						GDateTime* _tmp27_;
						GDateTime* _tmp28_;
						_tmp25_ = my_interaction_details;
						_tmp26_ = folks_interaction_details_get_last_call_interaction_datetime (_tmp25_);
						_tmp27_ = _tmp26_;
						_tmp28_ = _g_date_time_ref0 (_tmp27_);
						_g_date_time_unref0 (self->priv->_last_call_interaction_datetime);
						self->priv->_last_call_interaction_datetime = _tmp28_;
					}
					_g_date_time_unref0 (interaction_datetime);
				}
				_g_object_unref0 (my_interaction_details);
				_g_object_unref0 (persona);
			}
		}
	}
	_tmp29_ = self->priv->_last_call_interaction_datetime;
	result = _tmp29_;
	return result;
}

GeeSet*
folks_individual_get_personas (FolksIndividual* self)
{
	GeeSet* result;
	GeeSet* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_persona_set_ro;
	result = _tmp0_;
	return result;
}

void
folks_individual_set_personas (FolksIndividual* self,
                               GeeSet* value)
{
	g_return_if_fail (self != NULL);
	_folks_individual_set_personas (self, value, NULL);
	g_object_notify_by_pspec ((GObject *) self, folks_individual_properties[FOLKS_INDIVIDUAL_PERSONAS_PROPERTY]);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
}

static FolksIndividual_Notifier*
folks_individual__notifier_dup (const FolksIndividual_Notifier* self)
{
	FolksIndividual_Notifier* dup;
	dup = g_new0 (FolksIndividual_Notifier, 1);
	memcpy (dup, self, sizeof (FolksIndividual_Notifier));
	return dup;
}

static void
folks_individual__notifier_free (FolksIndividual_Notifier* self)
{
	g_free (self);
}

static GType
folks_individual__notifier_get_type_once (void)
{
	GType folks_individual__notifier_type_id;
	folks_individual__notifier_type_id = g_boxed_type_register_static ("FolksIndividual_Notifier", (GBoxedCopyFunc) folks_individual__notifier_dup, (GBoxedFreeFunc) folks_individual__notifier_free);
	return folks_individual__notifier_type_id;
}

static GType
folks_individual__notifier_get_type (void)
{
	static volatile gsize folks_individual__notifier_type_id__once = 0;
	if (g_once_init_enter (&folks_individual__notifier_type_id__once)) {
		GType folks_individual__notifier_type_id;
		folks_individual__notifier_type_id = folks_individual__notifier_get_type_once ();
		g_once_init_leave (&folks_individual__notifier_type_id__once, folks_individual__notifier_type_id);
	}
	return folks_individual__notifier_type_id__once;
}

static GObject *
folks_individual_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FolksIndividual * self;
	FolksSmallSet* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
	parent_class = G_OBJECT_CLASS (folks_individual_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_TYPE_INDIVIDUAL, FolksIndividual);
	_tmp0_ = self->priv->_persona_set;
	_tmp1_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp0_);
	_tmp2_ = _tmp1_;
	_g_object_unref0 (self->priv->_persona_set_ro);
	self->priv->_persona_set_ro = _tmp2_;
	return obj;
}

static void
folks_individual_class_init (FolksIndividualClass * klass,
                             gpointer klass_data)
{
	folks_individual_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FolksIndividual_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_folks_individual_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_folks_individual_set_property;
	G_OBJECT_CLASS (klass)->constructor = folks_individual_constructor;
	G_OBJECT_CLASS (klass)->finalize = folks_individual_finalize;
	/**
	   * The trust level of the Individual.
	   *
	   * This specifies how far the Individual can be trusted to be who it claims
	   * to be. See the descriptions for the elements of {@link TrustLevel}.
	   *
	   * Clients should ''not'' allow linking of Individuals who have a trust level
	   * of {@link TrustLevel.NONE}.
	   *
	   * @since 0.1.15
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_TRUST_LEVEL_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_TRUST_LEVEL_PROPERTY] = g_param_spec_enum ("trust-level", "trust-level", "trust-level", FOLKS_TYPE_TRUST_LEVEL, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_AVATAR_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_AVATAR_PROPERTY] = g_param_spec_object ("avatar", "avatar", "avatar", g_loadable_icon_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_PRESENCE_TYPE_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_PRESENCE_TYPE_PROPERTY] = g_param_spec_enum ("presence-type", "presence-type", "presence-type", FOLKS_TYPE_PRESENCE_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_PRESENCE_STATUS_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_PRESENCE_STATUS_PROPERTY] = g_param_spec_string ("presence-status", "presence-status", "presence-status", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_PRESENCE_MESSAGE_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_PRESENCE_MESSAGE_PROPERTY] = g_param_spec_string ("presence-message", "presence-message", "presence-message", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.9.5
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_CLIENT_TYPES_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_CLIENT_TYPES_PROPERTY] = g_param_spec_boxed ("client-types", "client-types", "client-types", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * Whether the Individual is the user.
	   *
	   * Iff the Individual represents the user – the person who owns the
	   * account in the backend for each {@link Persona} in the Individual –
	   * this is ``true``.
	   *
	   * It is //not// guaranteed that every {@link Persona} in the Individual has
	   * its {@link Persona.is_user} set to the same value as the Individual. For
	   * example, the user could own two Telepathy accounts, and have added the
	   * other account as a contact in each account. The accounts will expose a
	   * {@link Persona} for the user (which will have {@link Persona.is_user} set
	   * to ``true``) //and// a {@link Persona} for the contact for the other
	   * account (which will have {@link Persona.is_user} set to ``false``).
	   *
	   * It is guaranteed that iff this property is set to ``true`` on an
	   * Individual, there will be at least one {@link Persona} in the Individual
	   * with its {@link Persona.is_user} set to ``true``.
	   *
	   * It is guaranteed that there will only ever be one Individual with this
	   * property set to ``true``.
	   *
	   * @since 0.3.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_IS_USER_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_IS_USER_PROPERTY] = g_param_spec_boolean ("is-user", "is-user", "is-user", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * A unique identifier for the Individual.
	   *
	   * This uniquely identifies the Individual, and persists across
	   * {@link IndividualAggregator} instances. It may not persist across linking
	   * the Individual with other Individuals.
	   *
	   * This is an opaque string and has no structure.
	   *
	   * If an identifier is required which will be used for a long-lived link
	   * between different stored data, it may be more desirable to use the
	   * {@link Persona.uid} of the most relevant {@link Persona} in the Individual
	   * instead. For example, if storing references to Individuals who are tagged
	   * in a photo, it may be safer to store the UID of the Persona whose backend
	   * provided the photo (e.g. Facebook).
	   *
	   * As a special case, the ID defaults to an empty string when the individual
	   * has no personas (i.e. if it’s just been constructed).
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_ID_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * The name of this Individual to display in the UI.
	   *
	   * This value is set according to the following list of possibilities, each
	   * one being tried first on the primary persona, then on all other personas in
	   * the Individual, before falling back to the next item on the list:
	   * # Alias
	   * # Full name, structured name or nickname
	   * # E-mail address
	   * # Phone number
	   * # Display ID (e.g. foo@example.org)
	   * # Postal address
	   * # _("Unnamed Person")
	   *
	   * @since 0.9.7
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_DISPLAY_NAME_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_DISPLAY_NAME_PROPERTY] = g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_ALIAS_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_ALIAS_PROPERTY] = g_param_spec_string ("alias", "alias", "alias", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_STRUCTURED_NAME_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_STRUCTURED_NAME_PROPERTY] = g_param_spec_object ("structured-name", "structured-name", "structured-name", FOLKS_TYPE_STRUCTURED_NAME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_FULL_NAME_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_FULL_NAME_PROPERTY] = g_param_spec_string ("full-name", "full-name", "full-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_NICKNAME_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_NICKNAME_PROPERTY] = g_param_spec_string ("nickname", "nickname", "nickname", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_GENDER_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_GENDER_PROPERTY] = g_param_spec_enum ("gender", "gender", "gender", FOLKS_TYPE_GENDER, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_URLS_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_URLS_PROPERTY] = g_param_spec_object ("urls", "urls", "urls", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_PHONE_NUMBERS_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_PHONE_NUMBERS_PROPERTY] = g_param_spec_object ("phone-numbers", "phone-numbers", "phone-numbers", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_EMAIL_ADDRESSES_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_EMAIL_ADDRESSES_PROPERTY] = g_param_spec_object ("email-addresses", "email-addresses", "email-addresses", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_ROLES_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_ROLES_PROPERTY] = g_param_spec_object ("roles", "roles", "roles", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_LOCAL_IDS_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_LOCAL_IDS_PROPERTY] = g_param_spec_object ("local-ids", "local-ids", "local-ids", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_LOCATION_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_LOCATION_PROPERTY] = g_param_spec_object ("location", "location", "location", FOLKS_TYPE_LOCATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_BIRTHDAY_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_BIRTHDAY_PROPERTY] = g_param_spec_boxed ("birthday", "birthday", "birthday", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_CALENDAR_EVENT_ID_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_CALENDAR_EVENT_ID_PROPERTY] = g_param_spec_string ("calendar-event-id", "calendar-event-id", "calendar-event-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_NOTES_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_NOTES_PROPERTY] = g_param_spec_object ("notes", "notes", "notes", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_POSTAL_ADDRESSES_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_POSTAL_ADDRESSES_PROPERTY] = g_param_spec_object ("postal-addresses", "postal-addresses", "postal-addresses", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * Whether this Individual is a user-defined favourite.
	   *
	   * This property is ``true`` if any of this Individual's {@link Persona}s are
	   * favourites).
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_IS_FAVOURITE_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_IS_FAVOURITE_PROPERTY] = g_param_spec_boolean ("is-favourite", "is-favourite", "is-favourite", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_GROUPS_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_GROUPS_PROPERTY] = g_param_spec_object ("groups", "groups", "groups", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_IM_ADDRESSES_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_IM_ADDRESSES_PROPERTY] = g_param_spec_object ("im-addresses", "im-addresses", "im-addresses", GEE_TYPE_MULTI_MAP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES_PROPERTY] = g_param_spec_object ("web-service-addresses", "web-service-addresses", "web-service-addresses", GEE_TYPE_MULTI_MAP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_IM_INTERACTION_COUNT_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_IM_INTERACTION_COUNT_PROPERTY] = g_param_spec_uint ("im-interaction-count", "im-interaction-count", "im-interaction-count", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_LAST_IM_INTERACTION_DATETIME_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_LAST_IM_INTERACTION_DATETIME_PROPERTY] = g_param_spec_boxed ("last-im-interaction-datetime", "last-im-interaction-datetime", "last-im-interaction-datetime", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_CALL_INTERACTION_COUNT_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_CALL_INTERACTION_COUNT_PROPERTY] = g_param_spec_uint ("call-interaction-count", "call-interaction-count", "call-interaction-count", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_LAST_CALL_INTERACTION_DATETIME_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_LAST_CALL_INTERACTION_DATETIME_PROPERTY] = g_param_spec_boxed ("last-call-interaction-datetime", "last-call-interaction-datetime", "last-call-interaction-datetime", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * The set of {@link Persona}s encapsulated by this Individual.
	   *
	   * There must always be at least one Persona in this set.
	   *
	   * No order is specified over the set of personas, as such an order may be
	   * different across each of the properties implemented by the personas (e.g.
	   * should they be ordered by presence, name, star sign, etc.?).
	   *
	   * Changing the set of personas may cause updates to the aggregated properties
	   * provided by the Individual, resulting in property notifications for them.
	   *
	   * Changing the set of personas will not cause permanent linking/unlinking of
	   * the added/removed personas to/from this Individual. To do that, call
	   * {@link IndividualAggregator.link_personas} or
	   * {@link IndividualAggregator.unlink_individual}, which will ensure the link
	   * changes are written to the appropriate backend.
	   *
	   * @since 0.5.1
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_PERSONAS_PROPERTY, folks_individual_properties[FOLKS_INDIVIDUAL_PERSONAS_PROPERTY] = g_param_spec_object ("personas", "personas", "personas", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * Emitted when the last of the Individual's {@link Persona}s has been
	   * removed.
	   *
	   * At this point, the Individual is invalid, so any client referencing it
	   * should unreference it and remove it from their UI.
	   *
	   * @param replacement_individual the individual which has replaced this one
	   * due to linking, or ``null`` if this individual was removed for another
	   * reason
	   * @since 0.1.13
	   */
	folks_individual_signals[FOLKS_INDIVIDUAL_REMOVED_SIGNAL] = g_signal_new ("removed", FOLKS_TYPE_INDIVIDUAL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, FOLKS_TYPE_INDIVIDUAL);
	/**
	   * Emitted when one or more {@link Persona}s are added to or removed from
	   * the Individual. As the parameters are (unordered) sets, the orders of their
	   * elements are undefined.
	   *
	   * @param added a set of {@link Persona}s which have been added
	   * @param removed a set of {@link Persona}s which have been removed
	   *
	   * @since 0.5.1
	   */
	folks_individual_signals[FOLKS_INDIVIDUAL_PERSONAS_CHANGED_SIGNAL] = g_signal_new ("personas-changed", FOLKS_TYPE_INDIVIDUAL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, GEE_TYPE_SET, GEE_TYPE_SET);
}

static void
folks_individual_folks_alias_details_interface_init (FolksAliasDetailsIface * iface,
                                                     gpointer iface_data)
{
	folks_individual_folks_alias_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_alias = (void (*) (FolksAliasDetails*, const gchar*, GAsyncReadyCallback, gpointer)) folks_individual_real_change_alias;
	iface->change_alias_finish = (void (*) (FolksAliasDetails*, GAsyncResult*, GError**)) folks_individual_change_alias_finish;
	iface->get_alias = folks_individual_real_get_alias;
	iface->set_alias = folks_individual_real_set_alias;
}

static void
folks_individual_folks_avatar_details_interface_init (FolksAvatarDetailsIface * iface,
                                                      gpointer iface_data)
{
	folks_individual_folks_avatar_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_avatar = (void (*) (FolksAvatarDetails*, GLoadableIcon*, GAsyncReadyCallback, gpointer)) folks_individual_real_change_avatar;
	iface->change_avatar_finish = (void (*) (FolksAvatarDetails*, GAsyncResult*, GError**)) folks_individual_change_avatar_finish;
	iface->get_avatar = folks_individual_real_get_avatar;
	iface->set_avatar = folks_individual_real_set_avatar;
}

static void
folks_individual_folks_birthday_details_interface_init (FolksBirthdayDetailsIface * iface,
                                                        gpointer iface_data)
{
	folks_individual_folks_birthday_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_birthday = folks_individual_real_get_birthday;
	iface->set_birthday = folks_individual_real_set_birthday;
	iface->get_calendar_event_id = folks_individual_real_get_calendar_event_id;
	iface->set_calendar_event_id = folks_individual_real_set_calendar_event_id;
}

static void
folks_individual_folks_email_details_interface_init (FolksEmailDetailsIface * iface,
                                                     gpointer iface_data)
{
	folks_individual_folks_email_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_email_addresses = folks_individual_real_get_email_addresses;
	iface->set_email_addresses = folks_individual_real_set_email_addresses;
}

static void
folks_individual_folks_extended_info_interface_init (FolksExtendedInfoIface * iface,
                                                     gpointer iface_data)
{
	folks_individual_folks_extended_info_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_extended_field = (FolksExtendedFieldDetails* (*) (FolksExtendedInfo*, const gchar*)) folks_individual_real_get_extended_field;
	iface->change_extended_field = (void (*) (FolksExtendedInfo*, const gchar*, FolksExtendedFieldDetails*, GAsyncReadyCallback, gpointer)) folks_individual_real_change_extended_field;
	iface->change_extended_field_finish = (void (*) (FolksExtendedInfo*, GAsyncResult*, GError**)) folks_individual_change_extended_field_finish;
	iface->remove_extended_field = (void (*) (FolksExtendedInfo*, const gchar*, GAsyncReadyCallback, gpointer)) folks_individual_real_remove_extended_field;
	iface->remove_extended_field_finish = (void (*) (FolksExtendedInfo*, GAsyncResult*, GError**)) folks_individual_remove_extended_field_finish;
}

static void
folks_individual_folks_favourite_details_interface_init (FolksFavouriteDetailsIface * iface,
                                                         gpointer iface_data)
{
	folks_individual_folks_favourite_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_is_favourite = (void (*) (FolksFavouriteDetails*, gboolean, GAsyncReadyCallback, gpointer)) folks_individual_real_change_is_favourite;
	iface->change_is_favourite_finish = (void (*) (FolksFavouriteDetails*, GAsyncResult*, GError**)) folks_individual_change_is_favourite_finish;
	iface->get_is_favourite = folks_individual_real_get_is_favourite;
	iface->set_is_favourite = folks_individual_real_set_is_favourite;
}

static void
folks_individual_folks_gender_details_interface_init (FolksGenderDetailsIface * iface,
                                                      gpointer iface_data)
{
	folks_individual_folks_gender_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_gender = folks_individual_real_get_gender;
	iface->set_gender = folks_individual_real_set_gender;
}

static void
folks_individual_folks_group_details_interface_init (FolksGroupDetailsIface * iface,
                                                     gpointer iface_data)
{
	folks_individual_folks_group_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_groups = (void (*) (FolksGroupDetails*, GeeSet*, GAsyncReadyCallback, gpointer)) folks_individual_real_change_groups;
	iface->change_groups_finish = (void (*) (FolksGroupDetails*, GAsyncResult*, GError**)) folks_individual_change_groups_finish;
	iface->change_group = (void (*) (FolksGroupDetails*, const gchar*, gboolean, GAsyncReadyCallback, gpointer)) folks_individual_real_change_group;
	iface->change_group_finish = (void (*) (FolksGroupDetails*, GAsyncResult*, GError**)) folks_individual_change_group_finish;
	iface->get_groups = folks_individual_real_get_groups;
	iface->set_groups = folks_individual_real_set_groups;
}

static void
folks_individual_folks_im_details_interface_init (FolksImDetailsIface * iface,
                                                  gpointer iface_data)
{
	folks_individual_folks_im_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_im_addresses = folks_individual_real_get_im_addresses;
	iface->set_im_addresses = folks_individual_real_set_im_addresses;
}

static void
folks_individual_folks_interaction_details_interface_init (FolksInteractionDetailsIface * iface,
                                                           gpointer iface_data)
{
	folks_individual_folks_interaction_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_im_interaction_count = folks_individual_real_get_im_interaction_count;
	iface->get_last_im_interaction_datetime = folks_individual_real_get_last_im_interaction_datetime;
	iface->get_call_interaction_count = folks_individual_real_get_call_interaction_count;
	iface->get_last_call_interaction_datetime = folks_individual_real_get_last_call_interaction_datetime;
}

static void
folks_individual_folks_local_id_details_interface_init (FolksLocalIdDetailsIface * iface,
                                                        gpointer iface_data)
{
	folks_individual_folks_local_id_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_local_ids = folks_individual_real_get_local_ids;
	iface->set_local_ids = folks_individual_real_set_local_ids;
}

static void
folks_individual_folks_location_details_interface_init (FolksLocationDetailsIface * iface,
                                                        gpointer iface_data)
{
	folks_individual_folks_location_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_location = folks_individual_real_get_location;
	iface->set_location = folks_individual_real_set_location;
}

static void
folks_individual_folks_name_details_interface_init (FolksNameDetailsIface * iface,
                                                    gpointer iface_data)
{
	folks_individual_folks_name_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_nickname = (void (*) (FolksNameDetails*, const gchar*, GAsyncReadyCallback, gpointer)) folks_individual_real_change_nickname;
	iface->change_nickname_finish = (void (*) (FolksNameDetails*, GAsyncResult*, GError**)) folks_individual_change_nickname_finish;
	iface->get_structured_name = folks_individual_real_get_structured_name;
	iface->set_structured_name = folks_individual_real_set_structured_name;
	iface->get_full_name = folks_individual_real_get_full_name;
	iface->set_full_name = folks_individual_real_set_full_name;
	iface->get_nickname = folks_individual_real_get_nickname;
	iface->set_nickname = folks_individual_real_set_nickname;
}

static void
folks_individual_folks_note_details_interface_init (FolksNoteDetailsIface * iface,
                                                    gpointer iface_data)
{
	folks_individual_folks_note_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_notes = folks_individual_real_get_notes;
	iface->set_notes = folks_individual_real_set_notes;
}

static void
folks_individual_folks_presence_details_interface_init (FolksPresenceDetailsIface * iface,
                                                        gpointer iface_data)
{
	folks_individual_folks_presence_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_presence_type = folks_individual_real_get_presence_type;
	iface->set_presence_type = folks_individual_real_set_presence_type;
	iface->get_presence_status = folks_individual_real_get_presence_status;
	iface->set_presence_status = folks_individual_real_set_presence_status;
	iface->get_presence_message = folks_individual_real_get_presence_message;
	iface->set_presence_message = folks_individual_real_set_presence_message;
	iface->get_client_types = folks_individual_real_get_client_types;
	iface->set_client_types = folks_individual_real_set_client_types;
}

static void
folks_individual_folks_phone_details_interface_init (FolksPhoneDetailsIface * iface,
                                                     gpointer iface_data)
{
	folks_individual_folks_phone_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_phone_numbers = folks_individual_real_get_phone_numbers;
	iface->set_phone_numbers = folks_individual_real_set_phone_numbers;
}

static void
folks_individual_folks_postal_address_details_interface_init (FolksPostalAddressDetailsIface * iface,
                                                              gpointer iface_data)
{
	folks_individual_folks_postal_address_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_postal_addresses = folks_individual_real_get_postal_addresses;
	iface->set_postal_addresses = folks_individual_real_set_postal_addresses;
}

static void
folks_individual_folks_role_details_interface_init (FolksRoleDetailsIface * iface,
                                                    gpointer iface_data)
{
	folks_individual_folks_role_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_roles = folks_individual_real_get_roles;
	iface->set_roles = folks_individual_real_set_roles;
}

static void
folks_individual_folks_url_details_interface_init (FolksUrlDetailsIface * iface,
                                                   gpointer iface_data)
{
	folks_individual_folks_url_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_urls = folks_individual_real_get_urls;
	iface->set_urls = folks_individual_real_set_urls;
}

static void
folks_individual_folks_web_service_details_interface_init (FolksWebServiceDetailsIface * iface,
                                                           gpointer iface_data)
{
	folks_individual_folks_web_service_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_web_service_addresses = folks_individual_real_get_web_service_addresses;
	iface->set_web_service_addresses = folks_individual_real_set_web_service_addresses;
}

static void
folks_individual_instance_init (FolksIndividual * self,
                                gpointer klass)
{
	FolksSmallSet* _tmp0_;
	GeeHashMap* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	self->priv = folks_individual_get_instance_private (self);
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->_persona_set = _tmp0_;
	_tmp1_ = gee_hash_map_new (FOLKS_TYPE_PERSONA_STORE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_UINT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->_stores = _tmp1_;
	self->priv->_persona_user_count = (guint) 0;
	self->priv->_avatar = NULL;
	_tmp2_ = g_strdup ("");
	self->priv->_presence_status = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->_presence_message = _tmp3_;
	_tmp4_ = g_strdup ("");
	self->priv->_id = _tmp4_;
	_tmp5_ = g_strdup ("");
	self->priv->_display_name = _tmp5_;
	_tmp6_ = g_strdup ("");
	self->priv->_alias = _tmp6_;
	self->priv->_structured_name = NULL;
	_tmp7_ = g_strdup ("");
	self->priv->_full_name = _tmp7_;
	_tmp8_ = g_strdup ("");
	self->priv->_nickname = _tmp8_;
	self->priv->_gender = FOLKS_GENDER_UNSPECIFIED;
	self->priv->_urls = NULL;
	self->priv->_urls_ro = NULL;
	self->priv->_phone_numbers = NULL;
	self->priv->_phone_numbers_ro = NULL;
	self->priv->_email_addresses = NULL;
	self->priv->_email_addresses_ro = NULL;
	self->priv->_roles = NULL;
	self->priv->_roles_ro = NULL;
	self->priv->_local_ids = NULL;
	self->priv->_local_ids_ro = NULL;
	self->priv->_location = NULL;
	self->priv->_birthday = NULL;
	self->priv->_calendar_event_id = NULL;
	self->priv->_notes = NULL;
	self->priv->_notes_ro = NULL;
	self->priv->_postal_addresses = NULL;
	self->priv->_postal_addresses_ro = NULL;
	self->priv->_is_favourite = FALSE;
	self->priv->_groups = NULL;
	self->priv->_groups_ro = NULL;
	self->priv->_im_addresses = NULL;
	self->priv->_web_service_addresses = NULL;
	self->priv->_last_im_interaction_datetime = NULL;
	self->priv->_last_call_interaction_datetime = NULL;
}

static void
folks_individual_finalize (GObject * obj)
{
	FolksIndividual * self;
	const gchar* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_TYPE_INDIVIDUAL, FolksIndividual);
	_tmp0_ = self->priv->_id;
	g_debug ("individual.vala:1424: Destroying Individual '%s': %p", _tmp0_, self);
	_g_object_unref0 (self->priv->_persona_set);
	_g_object_unref0 (self->priv->_persona_set_ro);
	_g_object_unref0 (self->priv->_stores);
	_g_object_unref0 (self->priv->_avatar);
	_g_free0 (self->priv->_presence_status);
	_g_free0 (self->priv->_presence_message);
	self->priv->_client_types = (_vala_array_free (self->priv->_client_types, self->priv->_client_types_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_display_name);
	_g_free0 (self->priv->_alias);
	_g_object_unref0 (self->priv->_structured_name);
	_g_free0 (self->priv->_full_name);
	_g_free0 (self->priv->_nickname);
	_g_object_unref0 (self->priv->_urls);
	_g_object_unref0 (self->priv->_urls_ro);
	_g_object_unref0 (self->priv->_phone_numbers);
	_g_object_unref0 (self->priv->_phone_numbers_ro);
	_g_object_unref0 (self->priv->_email_addresses);
	_g_object_unref0 (self->priv->_email_addresses_ro);
	_g_object_unref0 (self->priv->_roles);
	_g_object_unref0 (self->priv->_roles_ro);
	_g_object_unref0 (self->priv->_local_ids);
	_g_object_unref0 (self->priv->_local_ids_ro);
	_g_object_unref0 (self->priv->_location);
	_g_date_time_unref0 (self->priv->_birthday);
	_g_free0 (self->priv->_calendar_event_id);
	_g_object_unref0 (self->priv->_notes);
	_g_object_unref0 (self->priv->_notes_ro);
	_g_object_unref0 (self->priv->_postal_addresses);
	_g_object_unref0 (self->priv->_postal_addresses_ro);
	_g_object_unref0 (self->priv->_groups);
	_g_object_unref0 (self->priv->_groups_ro);
	_g_object_unref0 (self->priv->_im_addresses);
	_g_object_unref0 (self->priv->_web_service_addresses);
	_g_date_time_unref0 (self->priv->_last_im_interaction_datetime);
	_g_date_time_unref0 (self->priv->_last_call_interaction_datetime);
	G_OBJECT_CLASS (folks_individual_parent_class)->finalize (obj);
}

/**
 * A physical person, aggregated from the various {@link Persona}s the person
 * might have, such as their different IM addresses or vCard entries. An
 * individual must always contain at least one {@link Persona}.
 *
 * When choosing the values of single-valued properties (such as
 * {@link Individual.alias} and {@link Individual.avatar}; but not multi-valued
 * properties such as {@link Individual.groups} and
 * {@link Individual.im_addresses}) from the {@link Persona}s in the
 * individual to present as the values of those properties of the individual,
 * it is guaranteed that if the individual contains a persona from the primary
 * persona store (see {@link IndividualAggregator.primary_store}), its property
 * values will be chosen above all others. This means that any changes to
 * property values made through folks (which are normally written to the primary
 * store) will always be used by {@link Folks.Individual}s.
 *
 * No further guarantees are made about the order of preference used for
 * choosing which property values to use for the {@link Folks.Individual}, other
 * than that the order may vary between properties, but is guaranteed to be
 * stable for a given property.
 */
static GType
folks_individual_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FolksIndividualClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_individual_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksIndividual), 0, (GInstanceInitFunc) folks_individual_instance_init, NULL };
	static const GInterfaceInfo folks_alias_details_info = { (GInterfaceInitFunc) folks_individual_folks_alias_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_avatar_details_info = { (GInterfaceInitFunc) folks_individual_folks_avatar_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_birthday_details_info = { (GInterfaceInitFunc) folks_individual_folks_birthday_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_email_details_info = { (GInterfaceInitFunc) folks_individual_folks_email_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_extended_info_info = { (GInterfaceInitFunc) folks_individual_folks_extended_info_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_favourite_details_info = { (GInterfaceInitFunc) folks_individual_folks_favourite_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_gender_details_info = { (GInterfaceInitFunc) folks_individual_folks_gender_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_group_details_info = { (GInterfaceInitFunc) folks_individual_folks_group_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_im_details_info = { (GInterfaceInitFunc) folks_individual_folks_im_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_interaction_details_info = { (GInterfaceInitFunc) folks_individual_folks_interaction_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_local_id_details_info = { (GInterfaceInitFunc) folks_individual_folks_local_id_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_location_details_info = { (GInterfaceInitFunc) folks_individual_folks_location_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_name_details_info = { (GInterfaceInitFunc) folks_individual_folks_name_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_note_details_info = { (GInterfaceInitFunc) folks_individual_folks_note_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_presence_details_info = { (GInterfaceInitFunc) folks_individual_folks_presence_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_phone_details_info = { (GInterfaceInitFunc) folks_individual_folks_phone_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_postal_address_details_info = { (GInterfaceInitFunc) folks_individual_folks_postal_address_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_role_details_info = { (GInterfaceInitFunc) folks_individual_folks_role_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_url_details_info = { (GInterfaceInitFunc) folks_individual_folks_url_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo folks_web_service_details_info = { (GInterfaceInitFunc) folks_individual_folks_web_service_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType folks_individual_type_id;
	folks_individual_type_id = g_type_register_static (G_TYPE_OBJECT, "FolksIndividual", &g_define_type_info, 0);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_ALIAS_DETAILS, &folks_alias_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_AVATAR_DETAILS, &folks_avatar_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_BIRTHDAY_DETAILS, &folks_birthday_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_EMAIL_DETAILS, &folks_email_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_EXTENDED_INFO, &folks_extended_info_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_FAVOURITE_DETAILS, &folks_favourite_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_GENDER_DETAILS, &folks_gender_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_GROUP_DETAILS, &folks_group_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_IM_DETAILS, &folks_im_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_INTERACTION_DETAILS, &folks_interaction_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_LOCAL_ID_DETAILS, &folks_local_id_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_LOCATION_DETAILS, &folks_location_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_NAME_DETAILS, &folks_name_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_NOTE_DETAILS, &folks_note_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_PRESENCE_DETAILS, &folks_presence_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_PHONE_DETAILS, &folks_phone_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, &folks_postal_address_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_ROLE_DETAILS, &folks_role_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_URL_DETAILS, &folks_url_details_info);
	g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_WEB_SERVICE_DETAILS, &folks_web_service_details_info);
	FolksIndividual_private_offset = g_type_add_instance_private (folks_individual_type_id, sizeof (FolksIndividualPrivate));
	return folks_individual_type_id;
}

GType
folks_individual_get_type (void)
{
	static volatile gsize folks_individual_type_id__once = 0;
	if (g_once_init_enter (&folks_individual_type_id__once)) {
		GType folks_individual_type_id;
		folks_individual_type_id = folks_individual_get_type_once ();
		g_once_init_leave (&folks_individual_type_id__once, folks_individual_type_id);
	}
	return folks_individual_type_id__once;
}

static void
_vala_folks_individual_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	FolksIndividual * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_TYPE_INDIVIDUAL, FolksIndividual);
	switch (property_id) {
		case FOLKS_INDIVIDUAL_TRUST_LEVEL_PROPERTY:
		g_value_set_enum (value, folks_individual_get_trust_level (self));
		break;
		case FOLKS_INDIVIDUAL_AVATAR_PROPERTY:
		g_value_set_object (value, folks_avatar_details_get_avatar ((FolksAvatarDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_TYPE_PROPERTY:
		g_value_set_enum (value, folks_presence_details_get_presence_type ((FolksPresenceDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_STATUS_PROPERTY:
		g_value_set_string (value, folks_presence_details_get_presence_status ((FolksPresenceDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_MESSAGE_PROPERTY:
		g_value_set_string (value, folks_presence_details_get_presence_message ((FolksPresenceDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_CLIENT_TYPES_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, folks_presence_details_get_client_types ((FolksPresenceDetails*) self, &length));
		}
		break;
		case FOLKS_INDIVIDUAL_IS_USER_PROPERTY:
		g_value_set_boolean (value, folks_individual_get_is_user (self));
		break;
		case FOLKS_INDIVIDUAL_ID_PROPERTY:
		g_value_set_string (value, folks_individual_get_id (self));
		break;
		case FOLKS_INDIVIDUAL_DISPLAY_NAME_PROPERTY:
		g_value_set_string (value, folks_individual_get_display_name (self));
		break;
		case FOLKS_INDIVIDUAL_ALIAS_PROPERTY:
		g_value_set_string (value, folks_alias_details_get_alias ((FolksAliasDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_STRUCTURED_NAME_PROPERTY:
		g_value_set_object (value, folks_name_details_get_structured_name ((FolksNameDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_FULL_NAME_PROPERTY:
		g_value_set_string (value, folks_name_details_get_full_name ((FolksNameDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_NICKNAME_PROPERTY:
		g_value_set_string (value, folks_name_details_get_nickname ((FolksNameDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_GENDER_PROPERTY:
		g_value_set_enum (value, folks_gender_details_get_gender ((FolksGenderDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_URLS_PROPERTY:
		g_value_set_object (value, folks_url_details_get_urls ((FolksUrlDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PHONE_NUMBERS_PROPERTY:
		g_value_set_object (value, folks_phone_details_get_phone_numbers ((FolksPhoneDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_EMAIL_ADDRESSES_PROPERTY:
		g_value_set_object (value, folks_email_details_get_email_addresses ((FolksEmailDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_ROLES_PROPERTY:
		g_value_set_object (value, folks_role_details_get_roles ((FolksRoleDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_LOCAL_IDS_PROPERTY:
		g_value_set_object (value, folks_local_id_details_get_local_ids ((FolksLocalIdDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_LOCATION_PROPERTY:
		g_value_set_object (value, folks_location_details_get_location ((FolksLocationDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_BIRTHDAY_PROPERTY:
		g_value_set_boxed (value, folks_birthday_details_get_birthday ((FolksBirthdayDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_CALENDAR_EVENT_ID_PROPERTY:
		g_value_set_string (value, folks_birthday_details_get_calendar_event_id ((FolksBirthdayDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_NOTES_PROPERTY:
		g_value_set_object (value, folks_note_details_get_notes ((FolksNoteDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_POSTAL_ADDRESSES_PROPERTY:
		g_value_set_object (value, folks_postal_address_details_get_postal_addresses ((FolksPostalAddressDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_IS_FAVOURITE_PROPERTY:
		g_value_set_boolean (value, folks_favourite_details_get_is_favourite ((FolksFavouriteDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_GROUPS_PROPERTY:
		g_value_set_object (value, folks_group_details_get_groups ((FolksGroupDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_IM_ADDRESSES_PROPERTY:
		g_value_set_object (value, folks_im_details_get_im_addresses ((FolksImDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES_PROPERTY:
		g_value_set_object (value, folks_web_service_details_get_web_service_addresses ((FolksWebServiceDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_IM_INTERACTION_COUNT_PROPERTY:
		g_value_set_uint (value, folks_interaction_details_get_im_interaction_count ((FolksInteractionDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_LAST_IM_INTERACTION_DATETIME_PROPERTY:
		g_value_set_boxed (value, folks_interaction_details_get_last_im_interaction_datetime ((FolksInteractionDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_CALL_INTERACTION_COUNT_PROPERTY:
		g_value_set_uint (value, folks_interaction_details_get_call_interaction_count ((FolksInteractionDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_LAST_CALL_INTERACTION_DATETIME_PROPERTY:
		g_value_set_boxed (value, folks_interaction_details_get_last_call_interaction_datetime ((FolksInteractionDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PERSONAS_PROPERTY:
		g_value_set_object (value, folks_individual_get_personas (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_folks_individual_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	FolksIndividual * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_TYPE_INDIVIDUAL, FolksIndividual);
	switch (property_id) {
		case FOLKS_INDIVIDUAL_TRUST_LEVEL_PROPERTY:
		folks_individual_set_trust_level (self, g_value_get_enum (value));
		break;
		case FOLKS_INDIVIDUAL_AVATAR_PROPERTY:
		folks_avatar_details_set_avatar ((FolksAvatarDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_TYPE_PROPERTY:
		folks_presence_details_set_presence_type ((FolksPresenceDetails*) self, g_value_get_enum (value));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_STATUS_PROPERTY:
		folks_presence_details_set_presence_status ((FolksPresenceDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_MESSAGE_PROPERTY:
		folks_presence_details_set_presence_message ((FolksPresenceDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_CLIENT_TYPES_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			folks_presence_details_set_client_types ((FolksPresenceDetails*) self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		break;
		case FOLKS_INDIVIDUAL_IS_USER_PROPERTY:
		folks_individual_set_is_user (self, g_value_get_boolean (value));
		break;
		case FOLKS_INDIVIDUAL_ID_PROPERTY:
		folks_individual_set_id (self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_ALIAS_PROPERTY:
		folks_alias_details_set_alias ((FolksAliasDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_STRUCTURED_NAME_PROPERTY:
		folks_name_details_set_structured_name ((FolksNameDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_FULL_NAME_PROPERTY:
		folks_name_details_set_full_name ((FolksNameDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_NICKNAME_PROPERTY:
		folks_name_details_set_nickname ((FolksNameDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_GENDER_PROPERTY:
		folks_gender_details_set_gender ((FolksGenderDetails*) self, g_value_get_enum (value));
		break;
		case FOLKS_INDIVIDUAL_URLS_PROPERTY:
		folks_url_details_set_urls ((FolksUrlDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_PHONE_NUMBERS_PROPERTY:
		folks_phone_details_set_phone_numbers ((FolksPhoneDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_EMAIL_ADDRESSES_PROPERTY:
		folks_email_details_set_email_addresses ((FolksEmailDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_ROLES_PROPERTY:
		folks_role_details_set_roles ((FolksRoleDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_LOCAL_IDS_PROPERTY:
		folks_local_id_details_set_local_ids ((FolksLocalIdDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_LOCATION_PROPERTY:
		folks_location_details_set_location ((FolksLocationDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_BIRTHDAY_PROPERTY:
		folks_birthday_details_set_birthday ((FolksBirthdayDetails*) self, g_value_get_boxed (value));
		break;
		case FOLKS_INDIVIDUAL_CALENDAR_EVENT_ID_PROPERTY:
		folks_birthday_details_set_calendar_event_id ((FolksBirthdayDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_NOTES_PROPERTY:
		folks_note_details_set_notes ((FolksNoteDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_POSTAL_ADDRESSES_PROPERTY:
		folks_postal_address_details_set_postal_addresses ((FolksPostalAddressDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_IS_FAVOURITE_PROPERTY:
		folks_favourite_details_set_is_favourite ((FolksFavouriteDetails*) self, g_value_get_boolean (value));
		break;
		case FOLKS_INDIVIDUAL_GROUPS_PROPERTY:
		folks_group_details_set_groups ((FolksGroupDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_IM_ADDRESSES_PROPERTY:
		folks_im_details_set_im_addresses ((FolksImDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES_PROPERTY:
		folks_web_service_details_set_web_service_addresses ((FolksWebServiceDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_PERSONAS_PROPERTY:
		folks_individual_set_personas (self, g_value_get_object (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);
}

