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

#include "xmpp-vala.h"
#include <glib.h>
#include <gee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gobject/gvaluecollector.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

#define _xmpp_stanza_entry_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_stanza_entry_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _XmppXepDataFormsDataFormParamSpecOption XmppXepDataFormsDataFormParamSpecOption;
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_NODE_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_LABEL_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_VAR_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_NUM_PROPERTIES];
#define _xmpp_xep_data_forms_data_form_option_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_data_forms_data_form_option_unref (var), NULL)))
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_VALUE_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_boolean_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_NUM_PROPERTIES];
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_VALUE_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_fixed_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_NUM_PROPERTIES];
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_HIDDEN_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_HIDDEN_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_hidden_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_HIDDEN_FIELD_NUM_PROPERTIES];
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_OPTIONS_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_VALUE_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_jid_multi_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_NUM_PROPERTIES];
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_OPTIONS_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_VALUE_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_list_single_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_NUM_PROPERTIES];
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_OPTIONS_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_VALUE_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_list_multi_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_NUM_PROPERTIES];
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_VALUE_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_text_private_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_NUM_PROPERTIES];
enum  {
	XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_0_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_VALUE_PROPERTY,
	XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_data_forms_data_form_text_single_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_NUM_PROPERTIES];
typedef struct _XmppXepDataFormsParamSpecDataForm XmppXepDataFormsParamSpecDataForm;

struct _XmppXepDataFormsDataFormPrivate {
	XmppStanzaNode* _stanza_node;
};

struct _XmppXepDataFormsDataFormOptionPrivate {
	gchar* _label;
	gchar* _value;
};

struct _XmppXepDataFormsDataFormParamSpecOption {
	GParamSpec parent_instance;
};

struct _XmppXepDataFormsDataFormFieldPrivate {
	XmppStanzaNode* _node;
	XmppXepDataFormsDataFormType* _type_;
};

struct _XmppXepDataFormsDataFormJidMultiFieldPrivate {
	GeeList* _value;
};

struct _XmppXepDataFormsDataFormListMultiFieldPrivate {
	GeeList* _value;
};

struct _XmppXepDataFormsParamSpecDataForm {
	GParamSpec parent_instance;
};

static gint XmppXepDataFormsDataForm_private_offset;
static gpointer xmpp_xep_data_forms_data_form_parent_class = NULL;
static gint XmppXepDataFormsDataFormOption_private_offset;
static gpointer xmpp_xep_data_forms_data_form_option_parent_class = NULL;
static gint XmppXepDataFormsDataFormField_private_offset;
static gpointer xmpp_xep_data_forms_data_form_field_parent_class = NULL;
static gpointer xmpp_xep_data_forms_data_form_boolean_field_parent_class = NULL;
static gpointer xmpp_xep_data_forms_data_form_fixed_field_parent_class = NULL;
static gpointer xmpp_xep_data_forms_data_form_hidden_field_parent_class = NULL;
static gint XmppXepDataFormsDataFormJidMultiField_private_offset;
static gpointer xmpp_xep_data_forms_data_form_jid_multi_field_parent_class = NULL;
static gpointer xmpp_xep_data_forms_data_form_list_single_field_parent_class = NULL;
static gint XmppXepDataFormsDataFormListMultiField_private_offset;
static gpointer xmpp_xep_data_forms_data_form_list_multi_field_parent_class = NULL;
static gpointer xmpp_xep_data_forms_data_form_text_private_field_parent_class = NULL;
static gpointer xmpp_xep_data_forms_data_form_text_single_field_parent_class = NULL;

VALA_EXTERN XmppXepDataFormsDataForm* xmpp_xep_data_forms_data_form_new_from_node (XmppStanzaNode* node);
VALA_EXTERN XmppXepDataFormsDataForm* xmpp_xep_data_forms_data_form_construct_from_node (GType object_type,
                                                                             XmppStanzaNode* node);
VALA_EXTERN XmppXepDataFormsDataForm* xmpp_xep_data_forms_data_form_new (void);
VALA_EXTERN XmppXepDataFormsDataForm* xmpp_xep_data_forms_data_form_construct (GType object_type);
static void xmpp_xep_data_forms_data_form_option_finalize (XmppXepDataFormsDataFormOption * obj);
static GType xmpp_xep_data_forms_data_form_option_get_type_once (void);
VALA_EXTERN void xmpp_xep_data_forms_data_form_field_set_type_ (XmppXepDataFormsDataFormField* self,
                                                    XmppXepDataFormsDataFormType* value);
VALA_EXTERN GeeList* xmpp_xep_data_forms_data_form_field_get_values (XmppXepDataFormsDataFormField* self);
VALA_EXTERN void xmpp_xep_data_forms_data_form_field_add_value_string (XmppXepDataFormsDataFormField* self,
                                                           const gchar* val);
VALA_EXTERN GeeList* xmpp_xep_data_forms_data_form_field_get_options (XmppXepDataFormsDataFormField* self);
static XmppXepDataFormsDataFormType* _xmpp_xep_data_forms_data_form_type_dup (XmppXepDataFormsDataFormType* self);
static void xmpp_xep_data_forms_data_form_field_finalize (GObject * obj);
static GType xmpp_xep_data_forms_data_form_field_get_type_once (void);
static void _vala_xmpp_xep_data_forms_data_form_field_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec);
static void _vala_xmpp_xep_data_forms_data_form_field_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec);
static GType xmpp_xep_data_forms_data_form_boolean_field_get_type_once (void);
static void _vala_xmpp_xep_data_forms_data_form_boolean_field_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec);
static void _vala_xmpp_xep_data_forms_data_form_boolean_field_set_property (GObject * object,
                                                                     guint property_id,
                                                                     const GValue * value,
                                                                     GParamSpec * pspec);
static GType xmpp_xep_data_forms_data_form_fixed_field_get_type_once (void);
static void _vala_xmpp_xep_data_forms_data_form_fixed_field_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec);
static void _vala_xmpp_xep_data_forms_data_form_fixed_field_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec);
static GType xmpp_xep_data_forms_data_form_hidden_field_get_type_once (void);
static void xmpp_xep_data_forms_data_form_jid_multi_field_finalize (GObject * obj);
static GType xmpp_xep_data_forms_data_form_jid_multi_field_get_type_once (void);
static void _vala_xmpp_xep_data_forms_data_form_jid_multi_field_get_property (GObject * object,
                                                                       guint property_id,
                                                                       GValue * value,
                                                                       GParamSpec * pspec);
static void _vala_xmpp_xep_data_forms_data_form_jid_multi_field_set_property (GObject * object,
                                                                       guint property_id,
                                                                       const GValue * value,
                                                                       GParamSpec * pspec);
static GType xmpp_xep_data_forms_data_form_list_single_field_get_type_once (void);
static void _vala_xmpp_xep_data_forms_data_form_list_single_field_get_property (GObject * object,
                                                                         guint property_id,
                                                                         GValue * value,
                                                                         GParamSpec * pspec);
static void _vala_xmpp_xep_data_forms_data_form_list_single_field_set_property (GObject * object,
                                                                         guint property_id,
                                                                         const GValue * value,
                                                                         GParamSpec * pspec);
static void xmpp_xep_data_forms_data_form_list_multi_field_finalize (GObject * obj);
static GType xmpp_xep_data_forms_data_form_list_multi_field_get_type_once (void);
static void _vala_xmpp_xep_data_forms_data_form_list_multi_field_get_property (GObject * object,
                                                                        guint property_id,
                                                                        GValue * value,
                                                                        GParamSpec * pspec);
static void _vala_xmpp_xep_data_forms_data_form_list_multi_field_set_property (GObject * object,
                                                                        guint property_id,
                                                                        const GValue * value,
                                                                        GParamSpec * pspec);
static GType xmpp_xep_data_forms_data_form_text_private_field_get_type_once (void);
static void _vala_xmpp_xep_data_forms_data_form_text_private_field_get_property (GObject * object,
                                                                          guint property_id,
                                                                          GValue * value,
                                                                          GParamSpec * pspec);
static void _vala_xmpp_xep_data_forms_data_form_text_private_field_set_property (GObject * object,
                                                                          guint property_id,
                                                                          const GValue * value,
                                                                          GParamSpec * pspec);
static GType xmpp_xep_data_forms_data_form_text_single_field_get_type_once (void);
static void _vala_xmpp_xep_data_forms_data_form_text_single_field_get_property (GObject * object,
                                                                         guint property_id,
                                                                         GValue * value,
                                                                         GParamSpec * pspec);
static void _vala_xmpp_xep_data_forms_data_form_text_single_field_set_property (GObject * object,
                                                                         guint property_id,
                                                                         const GValue * value,
                                                                         GParamSpec * pspec);
static void xmpp_xep_data_forms_data_form_finalize (XmppXepDataFormsDataForm * obj);
static GType xmpp_xep_data_forms_data_form_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
xmpp_xep_data_forms_data_form_get_instance_private (XmppXepDataFormsDataForm* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepDataFormsDataForm_private_offset);
}

static GType
xmpp_xep_data_forms_data_form_type_get_type_once (void)
{
	static const GEnumValue values[] = {{XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_BOOLEAN, "XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_BOOLEAN", "boolean"}, {XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIXED, "XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIXED", "fixed"}, {XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_HIDDEN, "XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_HIDDEN", "hidden"}, {XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_JID_MULTI, "XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_JID_MULTI", "jid-multi"}, {XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_SINGLE, "XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_SINGLE", "list-single"}, {XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_MULTI, "XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_MULTI", "list-multi"}, {XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_PRIVATE, "XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_PRIVATE", "text-private"}, {XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_SINGLE, "XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_SINGLE", "text-single"}, {0, NULL, NULL}};
	GType xmpp_xep_data_forms_data_form_type_type_id;
	xmpp_xep_data_forms_data_form_type_type_id = g_enum_register_static ("XmppXepDataFormsDataFormType", values);
	return xmpp_xep_data_forms_data_form_type_type_id;
}

GType
xmpp_xep_data_forms_data_form_type_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_type_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_type_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_type_type_id;
		xmpp_xep_data_forms_data_form_type_type_id = xmpp_xep_data_forms_data_form_type_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_type_type_id__once, xmpp_xep_data_forms_data_form_type_type_id);
	}
	return xmpp_xep_data_forms_data_form_type_type_id__once;
}

static gpointer
_xmpp_stanza_entry_ref0 (gpointer self)
{
	return self ? xmpp_stanza_entry_ref (self) : NULL;
}

XmppStanzaNode*
xmpp_xep_data_forms_data_form_get_submit_node (XmppXepDataFormsDataForm* self)
{
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_stanza_node;
	xmpp_stanza_node_set_attribute (_tmp0_, "type", "submit", NULL);
	_tmp1_ = self->priv->_stanza_node;
	_tmp2_ = _xmpp_stanza_entry_ref0 (_tmp1_);
	result = _tmp2_;
	return result;
}

XmppXepDataFormsDataForm*
xmpp_xep_data_forms_data_form_construct_from_node (GType object_type,
                                                   XmppStanzaNode* node)
{
	XmppXepDataFormsDataForm* self = NULL;
	GeeList* field_nodes = NULL;
	GeeList* _tmp0_;
	XmppStanzaNode* instructions_node = NULL;
	XmppStanzaNode* _tmp53_;
	XmppStanzaNode* _tmp54_;
	XmppStanzaNode* title_node = NULL;
	XmppStanzaNode* _tmp58_;
	XmppStanzaNode* _tmp59_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataForm*) g_type_create_instance (object_type);
	xmpp_xep_data_forms_data_form_set_stanza_node (self, node);
	_tmp0_ = xmpp_stanza_node_get_subnodes (node, "field", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
	field_nodes = _tmp0_;
	{
		GeeList* _field_node_list = NULL;
		GeeList* _tmp1_;
		gint _field_node_size = 0;
		GeeList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _field_node_index = 0;
		_tmp1_ = field_nodes;
		_field_node_list = _tmp1_;
		_tmp2_ = _field_node_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_field_node_size = _tmp4_;
		_field_node_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			XmppStanzaNode* field_node = NULL;
			GeeList* _tmp7_;
			gpointer _tmp8_;
			gchar* type = NULL;
			XmppStanzaNode* _tmp9_;
			const gchar* _tmp10_;
			gchar* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			GQuark _tmp15_ = 0U;
			static GQuark _tmp14_label0 = 0;
			static GQuark _tmp14_label1 = 0;
			static GQuark _tmp14_label2 = 0;
			static GQuark _tmp14_label3 = 0;
			static GQuark _tmp14_label4 = 0;
			static GQuark _tmp14_label5 = 0;
			static GQuark _tmp14_label6 = 0;
			static GQuark _tmp14_label7 = 0;
			_field_node_index = _field_node_index + 1;
			_tmp5_ = _field_node_index;
			_tmp6_ = _field_node_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _field_node_list;
			_tmp8_ = gee_list_get (_tmp7_, _field_node_index);
			field_node = (XmppStanzaNode*) _tmp8_;
			_tmp9_ = field_node;
			_tmp10_ = xmpp_stanza_node_get_attribute (_tmp9_, "type", XMPP_XEP_DATA_FORMS_NS_URI);
			_tmp11_ = g_strdup (_tmp10_);
			type = _tmp11_;
			_tmp12_ = type;
			_tmp13_ = _tmp12_;
			_tmp15_ = (NULL == _tmp13_) ? 0 : g_quark_from_string (_tmp13_);
			if (_tmp15_ == ((0 != _tmp14_label0) ? _tmp14_label0 : (_tmp14_label0 = g_quark_from_static_string ("boolean")))) {
				switch (0) {
					default:
					{
						GeeList* _tmp16_;
						XmppStanzaNode* _tmp17_;
						XmppXepDataFormsDataFormBooleanField* _tmp18_;
						XmppXepDataFormsDataFormBooleanField* _tmp19_;
						_tmp16_ = self->fields;
						_tmp17_ = field_node;
						_tmp18_ = xmpp_xep_data_forms_data_form_boolean_field_new (_tmp17_);
						_tmp19_ = _tmp18_;
						gee_collection_add ((GeeCollection*) _tmp16_, (XmppXepDataFormsDataFormField*) _tmp19_);
						_g_object_unref0 (_tmp19_);
						break;
					}
				}
			} else if (_tmp15_ == ((0 != _tmp14_label1) ? _tmp14_label1 : (_tmp14_label1 = g_quark_from_static_string ("fixed")))) {
				switch (0) {
					default:
					{
						GeeList* _tmp20_;
						XmppStanzaNode* _tmp21_;
						XmppXepDataFormsDataFormFixedField* _tmp22_;
						XmppXepDataFormsDataFormFixedField* _tmp23_;
						_tmp20_ = self->fields;
						_tmp21_ = field_node;
						_tmp22_ = xmpp_xep_data_forms_data_form_fixed_field_new (_tmp21_);
						_tmp23_ = _tmp22_;
						gee_collection_add ((GeeCollection*) _tmp20_, (XmppXepDataFormsDataFormField*) _tmp23_);
						_g_object_unref0 (_tmp23_);
						break;
					}
				}
			} else if (_tmp15_ == ((0 != _tmp14_label2) ? _tmp14_label2 : (_tmp14_label2 = g_quark_from_static_string ("hidden")))) {
				switch (0) {
					default:
					{
						XmppXepDataFormsDataFormHiddenField* field = NULL;
						XmppStanzaNode* _tmp24_;
						XmppXepDataFormsDataFormHiddenField* _tmp25_;
						XmppXepDataFormsDataFormHiddenField* _tmp26_;
						const gchar* _tmp27_;
						const gchar* _tmp28_;
						GeeList* _tmp31_;
						XmppXepDataFormsDataFormHiddenField* _tmp32_;
						_tmp24_ = field_node;
						_tmp25_ = xmpp_xep_data_forms_data_form_hidden_field_new_from_node (_tmp24_);
						field = _tmp25_;
						_tmp26_ = field;
						_tmp27_ = xmpp_xep_data_forms_data_form_field_get_var ((XmppXepDataFormsDataFormField*) _tmp26_);
						_tmp28_ = _tmp27_;
						if (g_strcmp0 (_tmp28_, "FORM_TYPE") == 0) {
							XmppXepDataFormsDataFormHiddenField* _tmp29_;
							gchar* _tmp30_;
							_tmp29_ = field;
							_tmp30_ = xmpp_xep_data_forms_data_form_field_get_value_string ((XmppXepDataFormsDataFormField*) _tmp29_);
							_g_free0 (self->form_type);
							self->form_type = _tmp30_;
							_g_object_unref0 (field);
							break;
						}
						_tmp31_ = self->fields;
						_tmp32_ = field;
						gee_collection_add ((GeeCollection*) _tmp31_, (XmppXepDataFormsDataFormField*) _tmp32_);
						_g_object_unref0 (field);
						break;
					}
				}
			} else if (_tmp15_ == ((0 != _tmp14_label3) ? _tmp14_label3 : (_tmp14_label3 = g_quark_from_static_string ("jid-multi")))) {
				switch (0) {
					default:
					{
						GeeList* _tmp33_;
						XmppStanzaNode* _tmp34_;
						XmppXepDataFormsDataFormJidMultiField* _tmp35_;
						XmppXepDataFormsDataFormJidMultiField* _tmp36_;
						_tmp33_ = self->fields;
						_tmp34_ = field_node;
						_tmp35_ = xmpp_xep_data_forms_data_form_jid_multi_field_new (_tmp34_);
						_tmp36_ = _tmp35_;
						gee_collection_add ((GeeCollection*) _tmp33_, (XmppXepDataFormsDataFormField*) _tmp36_);
						_g_object_unref0 (_tmp36_);
						break;
					}
				}
			} else if (_tmp15_ == ((0 != _tmp14_label4) ? _tmp14_label4 : (_tmp14_label4 = g_quark_from_static_string ("list-single")))) {
				switch (0) {
					default:
					{
						GeeList* _tmp37_;
						XmppStanzaNode* _tmp38_;
						XmppXepDataFormsDataFormListSingleField* _tmp39_;
						XmppXepDataFormsDataFormListSingleField* _tmp40_;
						_tmp37_ = self->fields;
						_tmp38_ = field_node;
						_tmp39_ = xmpp_xep_data_forms_data_form_list_single_field_new (_tmp38_);
						_tmp40_ = _tmp39_;
						gee_collection_add ((GeeCollection*) _tmp37_, (XmppXepDataFormsDataFormField*) _tmp40_);
						_g_object_unref0 (_tmp40_);
						break;
					}
				}
			} else if (_tmp15_ == ((0 != _tmp14_label5) ? _tmp14_label5 : (_tmp14_label5 = g_quark_from_static_string ("list-multi")))) {
				switch (0) {
					default:
					{
						GeeList* _tmp41_;
						XmppStanzaNode* _tmp42_;
						XmppXepDataFormsDataFormListMultiField* _tmp43_;
						XmppXepDataFormsDataFormListMultiField* _tmp44_;
						_tmp41_ = self->fields;
						_tmp42_ = field_node;
						_tmp43_ = xmpp_xep_data_forms_data_form_list_multi_field_new (_tmp42_);
						_tmp44_ = _tmp43_;
						gee_collection_add ((GeeCollection*) _tmp41_, (XmppXepDataFormsDataFormField*) _tmp44_);
						_g_object_unref0 (_tmp44_);
						break;
					}
				}
			} else if (_tmp15_ == ((0 != _tmp14_label6) ? _tmp14_label6 : (_tmp14_label6 = g_quark_from_static_string ("text-private")))) {
				switch (0) {
					default:
					{
						GeeList* _tmp45_;
						XmppStanzaNode* _tmp46_;
						XmppXepDataFormsDataFormTextPrivateField* _tmp47_;
						XmppXepDataFormsDataFormTextPrivateField* _tmp48_;
						_tmp45_ = self->fields;
						_tmp46_ = field_node;
						_tmp47_ = xmpp_xep_data_forms_data_form_text_private_field_new (_tmp46_);
						_tmp48_ = _tmp47_;
						gee_collection_add ((GeeCollection*) _tmp45_, (XmppXepDataFormsDataFormField*) _tmp48_);
						_g_object_unref0 (_tmp48_);
						break;
					}
				}
			} else if (_tmp15_ == ((0 != _tmp14_label7) ? _tmp14_label7 : (_tmp14_label7 = g_quark_from_static_string ("text-single")))) {
				switch (0) {
					default:
					{
						GeeList* _tmp49_;
						XmppStanzaNode* _tmp50_;
						XmppXepDataFormsDataFormTextSingleField* _tmp51_;
						XmppXepDataFormsDataFormTextSingleField* _tmp52_;
						_tmp49_ = self->fields;
						_tmp50_ = field_node;
						_tmp51_ = xmpp_xep_data_forms_data_form_text_single_field_new (_tmp50_);
						_tmp52_ = _tmp51_;
						gee_collection_add ((GeeCollection*) _tmp49_, (XmppXepDataFormsDataFormField*) _tmp52_);
						_g_object_unref0 (_tmp52_);
						break;
					}
				}
			}
			_g_free0 (type);
			_xmpp_stanza_entry_unref0 (field_node);
		}
	}
	_tmp53_ = xmpp_stanza_node_get_subnode (node, "instructions", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
	instructions_node = _tmp53_;
	_tmp54_ = instructions_node;
	if (_tmp54_ != NULL) {
		XmppStanzaNode* _tmp55_;
		const gchar* _tmp56_;
		gchar* _tmp57_;
		_tmp55_ = instructions_node;
		_tmp56_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _tmp55_);
		_tmp57_ = g_strdup (_tmp56_);
		_g_free0 (self->instructions);
		self->instructions = _tmp57_;
	}
	_tmp58_ = xmpp_stanza_node_get_subnode (node, "title", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
	title_node = _tmp58_;
	_tmp59_ = title_node;
	if (_tmp59_ != NULL) {
		XmppStanzaNode* _tmp60_;
		const gchar* _tmp61_;
		gchar* _tmp62_;
		_tmp60_ = title_node;
		_tmp61_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _tmp60_);
		_tmp62_ = g_strdup (_tmp61_);
		_g_free0 (self->title);
		self->title = _tmp62_;
	}
	_xmpp_stanza_entry_unref0 (title_node);
	_xmpp_stanza_entry_unref0 (instructions_node);
	_g_object_unref0 (field_nodes);
	return self;
}

XmppXepDataFormsDataForm*
xmpp_xep_data_forms_data_form_new_from_node (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_construct_from_node (XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM, node);
}

XmppXepDataFormsDataForm*
xmpp_xep_data_forms_data_form_construct (GType object_type)
{
	XmppXepDataFormsDataForm* self = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	self = (XmppXepDataFormsDataForm*) g_type_create_instance (object_type);
	_tmp0_ = xmpp_stanza_node_new_build ("x", XMPP_XEP_DATA_FORMS_NS_URI, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	xmpp_xep_data_forms_data_form_set_stanza_node (self, _tmp3_);
	_xmpp_stanza_entry_unref0 (_tmp3_);
	_xmpp_stanza_entry_unref0 (_tmp1_);
	return self;
}

XmppXepDataFormsDataForm*
xmpp_xep_data_forms_data_form_new (void)
{
	return xmpp_xep_data_forms_data_form_construct (XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM);
}

XmppXepDataFormsDataForm*
xmpp_xep_data_forms_data_form_create_from_node (XmppStanzaNode* node)
{
	XmppXepDataFormsDataForm* _tmp0_;
	XmppXepDataFormsDataForm* result;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_new_from_node (node);
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_add_field (XmppXepDataFormsDataForm* self,
                                         XmppXepDataFormsDataFormField* field)
{
	GeeList* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (field != NULL);
	_tmp0_ = self->fields;
	gee_collection_add ((GeeCollection*) _tmp0_, field);
	_tmp1_ = self->priv->_stanza_node;
	_tmp2_ = xmpp_xep_data_forms_data_form_field_get_node (field);
	_tmp3_ = _tmp2_;
	_tmp4_ = xmpp_stanza_node_put_node (_tmp1_, _tmp3_);
	_tmp5_ = _tmp4_;
	_xmpp_stanza_entry_unref0 (_tmp5_);
}

XmppStanzaNode*
xmpp_xep_data_forms_data_form_get_stanza_node (XmppXepDataFormsDataForm* self)
{
	XmppStanzaNode* result;
	XmppStanzaNode* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_stanza_node;
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_set_stanza_node (XmppXepDataFormsDataForm* self,
                                               XmppStanzaNode* value)
{
	XmppStanzaNode* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _xmpp_stanza_entry_ref0 (value);
	_xmpp_stanza_entry_unref0 (self->priv->_stanza_node);
	self->priv->_stanza_node = _tmp0_;
}

static inline gpointer
xmpp_xep_data_forms_data_form_option_get_instance_private (XmppXepDataFormsDataFormOption* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepDataFormsDataFormOption_private_offset);
}

XmppXepDataFormsDataFormOption*
xmpp_xep_data_forms_data_form_option_construct (GType object_type,
                                                const gchar* label,
                                                const gchar* value)
{
	XmppXepDataFormsDataFormOption* self = NULL;
	g_return_val_if_fail (label != NULL, NULL);
	g_return_val_if_fail (value != NULL, NULL);
	self = (XmppXepDataFormsDataFormOption*) g_type_create_instance (object_type);
	xmpp_xep_data_forms_data_form_option_set_label (self, label);
	xmpp_xep_data_forms_data_form_option_set_value (self, value);
	return self;
}

XmppXepDataFormsDataFormOption*
xmpp_xep_data_forms_data_form_option_new (const gchar* label,
                                          const gchar* value)
{
	return xmpp_xep_data_forms_data_form_option_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION, label, value);
}

const gchar*
xmpp_xep_data_forms_data_form_option_get_label (XmppXepDataFormsDataFormOption* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_option_set_label (XmppXepDataFormsDataFormOption* self,
                                                const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_label);
	self->priv->_label = _tmp0_;
}

const gchar*
xmpp_xep_data_forms_data_form_option_get_value (XmppXepDataFormsDataFormOption* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_value;
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_option_set_value (XmppXepDataFormsDataFormOption* self,
                                                const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_value);
	self->priv->_value = _tmp0_;
}

static void
xmpp_xep_data_forms_data_form_value_option_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
xmpp_xep_data_forms_data_form_value_option_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		xmpp_xep_data_forms_data_form_option_unref (value->data[0].v_pointer);
	}
}

static void
xmpp_xep_data_forms_data_form_value_option_copy_value (const GValue* src_value,
                                                       GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = xmpp_xep_data_forms_data_form_option_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
xmpp_xep_data_forms_data_form_value_option_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
xmpp_xep_data_forms_data_form_value_option_collect_value (GValue* value,
                                                          guint n_collect_values,
                                                          GTypeCValue* collect_values,
                                                          guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		XmppXepDataFormsDataFormOption * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = xmpp_xep_data_forms_data_form_option_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
xmpp_xep_data_forms_data_form_value_option_lcopy_value (const GValue* value,
                                                        guint n_collect_values,
                                                        GTypeCValue* collect_values,
                                                        guint collect_flags)
{
	XmppXepDataFormsDataFormOption ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = xmpp_xep_data_forms_data_form_option_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
xmpp_xep_data_forms_data_form_param_spec_option (const gchar* name,
                                                 const gchar* nick,
                                                 const gchar* blurb,
                                                 GType object_type,
                                                 GParamFlags flags)
{
	XmppXepDataFormsDataFormParamSpecOption* spec;
	g_return_val_if_fail (g_type_is_a (object_type, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
xmpp_xep_data_forms_data_form_value_get_option (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION), NULL);
	return value->data[0].v_pointer;
}

void
xmpp_xep_data_forms_data_form_value_set_option (GValue* value,
                                                gpointer v_object)
{
	XmppXepDataFormsDataFormOption * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		xmpp_xep_data_forms_data_form_option_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_data_forms_data_form_option_unref (old);
	}
}

void
xmpp_xep_data_forms_data_form_value_take_option (GValue* value,
                                                 gpointer v_object)
{
	XmppXepDataFormsDataFormOption * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_data_forms_data_form_option_unref (old);
	}
}

static void
xmpp_xep_data_forms_data_form_option_class_init (XmppXepDataFormsDataFormOptionClass * klass,
                                                 gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_option_parent_class = g_type_class_peek_parent (klass);
	((XmppXepDataFormsDataFormOptionClass *) klass)->finalize = xmpp_xep_data_forms_data_form_option_finalize;
	g_type_class_adjust_private_offset (klass, &XmppXepDataFormsDataFormOption_private_offset);
}

static void
xmpp_xep_data_forms_data_form_option_instance_init (XmppXepDataFormsDataFormOption * self,
                                                    gpointer klass)
{
	self->priv = xmpp_xep_data_forms_data_form_option_get_instance_private (self);
	self->ref_count = 1;
}

static void
xmpp_xep_data_forms_data_form_option_finalize (XmppXepDataFormsDataFormOption * obj)
{
	XmppXepDataFormsDataFormOption * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION, XmppXepDataFormsDataFormOption);
	g_signal_handlers_destroy (self);
	_g_free0 (self->priv->_label);
	_g_free0 (self->priv->_value);
}

static GType
xmpp_xep_data_forms_data_form_option_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_data_forms_data_form_value_option_init, xmpp_xep_data_forms_data_form_value_option_free_value, xmpp_xep_data_forms_data_form_value_option_copy_value, xmpp_xep_data_forms_data_form_value_option_peek_pointer, "p", xmpp_xep_data_forms_data_form_value_option_collect_value, "p", xmpp_xep_data_forms_data_form_value_option_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormOptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_option_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormOption), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_option_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType xmpp_xep_data_forms_data_form_option_type_id;
	xmpp_xep_data_forms_data_form_option_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepDataFormsDataFormOption", &g_define_type_info, &g_define_type_fundamental_info, 0);
	XmppXepDataFormsDataFormOption_private_offset = g_type_add_instance_private (xmpp_xep_data_forms_data_form_option_type_id, sizeof (XmppXepDataFormsDataFormOptionPrivate));
	return xmpp_xep_data_forms_data_form_option_type_id;
}

GType
xmpp_xep_data_forms_data_form_option_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_option_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_option_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_option_type_id;
		xmpp_xep_data_forms_data_form_option_type_id = xmpp_xep_data_forms_data_form_option_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_option_type_id__once, xmpp_xep_data_forms_data_form_option_type_id);
	}
	return xmpp_xep_data_forms_data_form_option_type_id__once;
}

gpointer
xmpp_xep_data_forms_data_form_option_ref (gpointer instance)
{
	XmppXepDataFormsDataFormOption * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
xmpp_xep_data_forms_data_form_option_unref (gpointer instance)
{
	XmppXepDataFormsDataFormOption * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_DATA_FORMS_DATA_FORM_OPTION_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
xmpp_xep_data_forms_data_form_field_get_instance_private (XmppXepDataFormsDataFormField* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepDataFormsDataFormField_private_offset);
}

XmppXepDataFormsDataFormField*
xmpp_xep_data_forms_data_form_field_construct (GType object_type)
{
	XmppXepDataFormsDataFormField * self = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	self = (XmppXepDataFormsDataFormField*) g_object_new (object_type, NULL);
	_tmp0_ = xmpp_stanza_node_new_build ("field", XMPP_XEP_DATA_FORMS_NS_URI, NULL, NULL);
	_tmp1_ = _tmp0_;
	xmpp_xep_data_forms_data_form_field_set_node (self, _tmp1_);
	_xmpp_stanza_entry_unref0 (_tmp1_);
	return self;
}

XmppXepDataFormsDataFormField*
xmpp_xep_data_forms_data_form_field_new (void)
{
	return xmpp_xep_data_forms_data_form_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD);
}

XmppXepDataFormsDataFormField*
xmpp_xep_data_forms_data_form_field_construct_from_node (GType object_type,
                                                         XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormField * self = NULL;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormField*) g_object_new (object_type, NULL);
	xmpp_xep_data_forms_data_form_field_set_node (self, node);
	return self;
}

XmppXepDataFormsDataFormField*
xmpp_xep_data_forms_data_form_field_new_from_node (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_field_construct_from_node (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, node);
}

GeeList*
xmpp_xep_data_forms_data_form_field_get_values (XmppXepDataFormsDataFormField* self)
{
	GeeList* ret = NULL;
	GeeArrayList* _tmp0_;
	GeeList* value_nodes = NULL;
	XmppStanzaNode* _tmp1_;
	GeeList* _tmp2_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	ret = (GeeList*) _tmp0_;
	_tmp1_ = self->priv->_node;
	_tmp2_ = xmpp_stanza_node_get_subnodes (_tmp1_, "value", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
	value_nodes = _tmp2_;
	{
		GeeList* _node_list = NULL;
		GeeList* _tmp3_;
		gint _node_size = 0;
		GeeList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _node_index = 0;
		_tmp3_ = value_nodes;
		_node_list = _tmp3_;
		_tmp4_ = _node_list;
		_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_node_size = _tmp6_;
		_node_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			XmppStanzaNode* node = NULL;
			GeeList* _tmp9_;
			gpointer _tmp10_;
			GeeList* _tmp11_;
			XmppStanzaNode* _tmp12_;
			const gchar* _tmp13_;
			_node_index = _node_index + 1;
			_tmp7_ = _node_index;
			_tmp8_ = _node_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _node_list;
			_tmp10_ = gee_list_get (_tmp9_, _node_index);
			node = (XmppStanzaNode*) _tmp10_;
			_tmp11_ = ret;
			_tmp12_ = node;
			_tmp13_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _tmp12_);
			gee_collection_add ((GeeCollection*) _tmp11_, _tmp13_);
			_xmpp_stanza_entry_unref0 (node);
		}
	}
	result = ret;
	_g_object_unref0 (value_nodes);
	return result;
}

gchar*
xmpp_xep_data_forms_data_form_field_get_value_string (XmppXepDataFormsDataFormField* self)
{
	GeeList* values = NULL;
	GeeList* _tmp0_;
	gchar* _tmp1_ = NULL;
	GeeList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gchar* _tmp8_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_values (self);
	values = _tmp0_;
	_tmp2_ = values;
	_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > 0) {
		GeeList* _tmp5_;
		gpointer _tmp6_;
		_tmp5_ = values;
		_tmp6_ = gee_list_get (_tmp5_, 0);
		_g_free0 (_tmp1_);
		_tmp1_ = (gchar*) _tmp6_;
	} else {
		gchar* _tmp7_;
		_tmp7_ = g_strdup ("");
		_g_free0 (_tmp1_);
		_tmp1_ = _tmp7_;
	}
	_tmp8_ = _tmp1_;
	_tmp1_ = NULL;
	result = _tmp8_;
	_g_free0 (_tmp1_);
	_g_object_unref0 (values);
	return result;
}

void
xmpp_xep_data_forms_data_form_field_set_value_string (XmppXepDataFormsDataFormField* self,
                                                      const gchar* val)
{
	XmppStanzaNode* value_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp8_;
	GeeList* _tmp9_;
	XmppStanzaNode* _tmp10_;
	XmppStanzaNode* _tmp11_;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (val != NULL);
	_tmp0_ = self->priv->_node;
	_tmp1_ = xmpp_stanza_node_get_subnode (_tmp0_, "value", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
	value_node = _tmp1_;
	_tmp2_ = value_node;
	if (_tmp2_ == NULL) {
		XmppStanzaNode* _tmp3_;
		XmppStanzaNode* _tmp4_;
		XmppStanzaNode* _tmp5_;
		XmppStanzaNode* _tmp6_;
		XmppStanzaNode* _tmp7_;
		_tmp3_ = xmpp_stanza_node_new_build ("value", XMPP_XEP_DATA_FORMS_NS_URI, NULL, NULL);
		_xmpp_stanza_entry_unref0 (value_node);
		value_node = _tmp3_;
		_tmp4_ = self->priv->_node;
		_tmp5_ = value_node;
		_tmp6_ = xmpp_stanza_node_put_node (_tmp4_, _tmp5_);
		_tmp7_ = _tmp6_;
		_xmpp_stanza_entry_unref0 (_tmp7_);
	}
	_tmp8_ = value_node;
	_tmp9_ = _tmp8_->sub_nodes;
	gee_collection_clear ((GeeCollection*) _tmp9_);
	_tmp10_ = value_node;
	_tmp11_ = xmpp_stanza_node_new_text (val);
	_tmp12_ = _tmp11_;
	_tmp13_ = xmpp_stanza_node_put_node (_tmp10_, _tmp12_);
	_tmp14_ = _tmp13_;
	_xmpp_stanza_entry_unref0 (_tmp14_);
	_xmpp_stanza_entry_unref0 (_tmp12_);
	_xmpp_stanza_entry_unref0 (value_node);
}

void
xmpp_xep_data_forms_data_form_field_add_value_string (XmppXepDataFormsDataFormField* self,
                                                      const gchar* val)
{
	XmppStanzaNode* node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (val != NULL);
	_tmp0_ = xmpp_stanza_node_new_build ("value", "jabber:client", NULL, NULL);
	node = _tmp0_;
	_tmp1_ = xmpp_stanza_node_new_text (val);
	_tmp2_ = _tmp1_;
	_tmp3_ = xmpp_stanza_node_put_node (node, _tmp2_);
	_tmp4_ = _tmp3_;
	_xmpp_stanza_entry_unref0 (_tmp4_);
	_xmpp_stanza_entry_unref0 (_tmp2_);
	_xmpp_stanza_entry_unref0 (node);
}

GeeList*
xmpp_xep_data_forms_data_form_field_get_options (XmppXepDataFormsDataFormField* self)
{
	GeeList* ret = NULL;
	GeeArrayList* _tmp0_;
	GeeList* option_nodes = NULL;
	XmppStanzaNode* _tmp1_;
	GeeList* _tmp2_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_OPTION, (GBoxedCopyFunc) xmpp_xep_data_forms_data_form_option_ref, (GDestroyNotify) xmpp_xep_data_forms_data_form_option_unref, NULL, NULL, NULL);
	ret = (GeeList*) _tmp0_;
	_tmp1_ = self->priv->_node;
	_tmp2_ = xmpp_stanza_node_get_subnodes (_tmp1_, "option", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
	option_nodes = _tmp2_;
	{
		GeeList* _node_list = NULL;
		GeeList* _tmp3_;
		gint _node_size = 0;
		GeeList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _node_index = 0;
		_tmp3_ = option_nodes;
		_node_list = _tmp3_;
		_tmp4_ = _node_list;
		_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_node_size = _tmp6_;
		_node_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			XmppStanzaNode* node = NULL;
			GeeList* _tmp9_;
			gpointer _tmp10_;
			XmppXepDataFormsDataFormOption* option = NULL;
			XmppStanzaNode* _tmp11_;
			const gchar* _tmp12_;
			XmppStanzaNode* _tmp13_;
			XmppStanzaNode* _tmp14_;
			XmppStanzaNode* _tmp15_;
			const gchar* _tmp16_;
			XmppXepDataFormsDataFormOption* _tmp17_;
			XmppXepDataFormsDataFormOption* _tmp18_;
			GeeList* _tmp19_;
			XmppXepDataFormsDataFormOption* _tmp20_;
			_node_index = _node_index + 1;
			_tmp7_ = _node_index;
			_tmp8_ = _node_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _node_list;
			_tmp10_ = gee_list_get (_tmp9_, _node_index);
			node = (XmppStanzaNode*) _tmp10_;
			_tmp11_ = node;
			_tmp12_ = xmpp_stanza_node_get_attribute (_tmp11_, "label", XMPP_XEP_DATA_FORMS_NS_URI);
			_tmp13_ = node;
			_tmp14_ = xmpp_stanza_node_get_subnode (_tmp13_, "value", NULL, FALSE);
			_tmp15_ = _tmp14_;
			_tmp16_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _tmp15_);
			_tmp17_ = xmpp_xep_data_forms_data_form_option_new (_tmp12_, _tmp16_);
			_tmp18_ = _tmp17_;
			_xmpp_stanza_entry_unref0 (_tmp15_);
			option = _tmp18_;
			_tmp19_ = ret;
			_tmp20_ = option;
			gee_collection_add ((GeeCollection*) _tmp19_, _tmp20_);
			_xmpp_xep_data_forms_data_form_option_unref0 (option);
			_xmpp_stanza_entry_unref0 (node);
		}
	}
	result = ret;
	_g_object_unref0 (option_nodes);
	return result;
}

XmppStanzaNode*
xmpp_xep_data_forms_data_form_field_get_node (XmppXepDataFormsDataFormField* self)
{
	XmppStanzaNode* result;
	XmppStanzaNode* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_node;
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_field_set_node (XmppXepDataFormsDataFormField* self,
                                              XmppStanzaNode* value)
{
	XmppStanzaNode* old_value;
	g_return_if_fail (self != NULL);
	old_value = xmpp_xep_data_forms_data_form_field_get_node (self);
	if (old_value != value) {
		XmppStanzaNode* _tmp0_;
		_tmp0_ = _xmpp_stanza_entry_ref0 (value);
		_xmpp_stanza_entry_unref0 (self->priv->_node);
		self->priv->_node = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_NODE_PROPERTY]);
	}
}

const gchar*
xmpp_xep_data_forms_data_form_field_get_label (XmppXepDataFormsDataFormField* self)
{
	const gchar* result;
	XmppStanzaNode* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_node;
	_tmp1_ = xmpp_stanza_node_get_attribute (_tmp0_, "label", XMPP_XEP_DATA_FORMS_NS_URI);
	result = _tmp1_;
	return result;
}

void
xmpp_xep_data_forms_data_form_field_set_label (XmppXepDataFormsDataFormField* self,
                                               const gchar* value)
{
	XmppStanzaNode* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_node;
	xmpp_stanza_node_set_attribute (_tmp0_, "label", value, NULL);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_LABEL_PROPERTY]);
}

XmppXepDataFormsDataFormType*
xmpp_xep_data_forms_data_form_field_get_type_ (XmppXepDataFormsDataFormField* self)
{
	XmppXepDataFormsDataFormFieldClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_GET_CLASS (self);
	if (_klass_->get_type_) {
		return _klass_->get_type_ (self);
	}
	return NULL;
}

static XmppXepDataFormsDataFormType*
xmpp_xep_data_forms_data_form_field_real_get_type_ (XmppXepDataFormsDataFormField* base)
{
	XmppXepDataFormsDataFormType* result;
	XmppXepDataFormsDataFormField* self;
	XmppXepDataFormsDataFormType* _tmp0_;
	self = base;
	_tmp0_ = self->priv->_type_;
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_field_set_type_ (XmppXepDataFormsDataFormField* self,
                                               XmppXepDataFormsDataFormType* value)
{
	XmppXepDataFormsDataFormFieldClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_GET_CLASS (self);
	if (_klass_->set_type_) {
		_klass_->set_type_ (self, value);
	}
}

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

static gpointer
__xmpp_xep_data_forms_data_form_type_dup0 (gpointer self)
{
	return self ? _xmpp_xep_data_forms_data_form_type_dup (self) : NULL;
}

static void
xmpp_xep_data_forms_data_form_field_real_set_type_ (XmppXepDataFormsDataFormField* base,
                                                    XmppXepDataFormsDataFormType* value)
{
	XmppXepDataFormsDataFormField* self;
	XmppXepDataFormsDataFormType* _tmp0_;
	self = base;
	_tmp0_ = __xmpp_xep_data_forms_data_form_type_dup0 (value);
	_g_free0 (self->priv->_type_);
	self->priv->_type_ = _tmp0_;
}

const gchar*
xmpp_xep_data_forms_data_form_field_get_var (XmppXepDataFormsDataFormField* self)
{
	const gchar* result;
	XmppStanzaNode* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_node;
	_tmp1_ = xmpp_stanza_node_get_attribute (_tmp0_, "var", XMPP_XEP_DATA_FORMS_NS_URI);
	result = _tmp1_;
	return result;
}

void
xmpp_xep_data_forms_data_form_field_set_var (XmppXepDataFormsDataFormField* self,
                                             const gchar* value)
{
	XmppStanzaNode* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_node;
	xmpp_stanza_node_set_attribute (_tmp0_, "var", value, NULL);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_VAR_PROPERTY]);
}

static void
xmpp_xep_data_forms_data_form_field_class_init (XmppXepDataFormsDataFormFieldClass * klass,
                                                gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_field_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppXepDataFormsDataFormField_private_offset);
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_CLASS (klass)->get_type_ = (XmppXepDataFormsDataFormType* (*) (XmppXepDataFormsDataFormField*)) xmpp_xep_data_forms_data_form_field_real_get_type_;
	XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_CLASS (klass)->set_type_ = (void (*) (XmppXepDataFormsDataFormField*, XmppXepDataFormsDataFormType*)) xmpp_xep_data_forms_data_form_field_real_set_type_;
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_data_forms_data_form_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_data_forms_data_form_field_set_property;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_data_forms_data_form_field_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_NODE_PROPERTY, xmpp_xep_data_forms_data_form_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_NODE_PROPERTY] = xmpp_param_spec_stanza_entry ("node", "node", "node", XMPP_TYPE_STANZA_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_LABEL_PROPERTY, xmpp_xep_data_forms_data_form_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_VAR_PROPERTY, xmpp_xep_data_forms_data_form_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_VAR_PROPERTY] = g_param_spec_string ("var", "var", "var", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_data_forms_data_form_field_instance_init (XmppXepDataFormsDataFormField * self,
                                                   gpointer klass)
{
	self->priv = xmpp_xep_data_forms_data_form_field_get_instance_private (self);
	self->priv->_type_ = NULL;
}

static void
xmpp_xep_data_forms_data_form_field_finalize (GObject * obj)
{
	XmppXepDataFormsDataFormField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, XmppXepDataFormsDataFormField);
	_xmpp_stanza_entry_unref0 (self->priv->_node);
	_g_free0 (self->priv->_type_);
	G_OBJECT_CLASS (xmpp_xep_data_forms_data_form_field_parent_class)->finalize (obj);
}

static GType
xmpp_xep_data_forms_data_form_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_field_type_id;
	xmpp_xep_data_forms_data_form_field_type_id = g_type_register_static (G_TYPE_OBJECT, "XmppXepDataFormsDataFormField", &g_define_type_info, 0);
	XmppXepDataFormsDataFormField_private_offset = g_type_add_instance_private (xmpp_xep_data_forms_data_form_field_type_id, sizeof (XmppXepDataFormsDataFormFieldPrivate));
	return xmpp_xep_data_forms_data_form_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_field_type_id;
		xmpp_xep_data_forms_data_form_field_type_id = xmpp_xep_data_forms_data_form_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_field_type_id__once, xmpp_xep_data_forms_data_form_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_field_type_id__once;
}

static void
_vala_xmpp_xep_data_forms_data_form_field_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec)
{
	XmppXepDataFormsDataFormField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, XmppXepDataFormsDataFormField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_NODE_PROPERTY:
		xmpp_value_set_stanza_entry (value, xmpp_xep_data_forms_data_form_field_get_node (self));
		break;
		case XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_LABEL_PROPERTY:
		g_value_set_string (value, xmpp_xep_data_forms_data_form_field_get_label (self));
		break;
		case XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_VAR_PROPERTY:
		g_value_set_string (value, xmpp_xep_data_forms_data_form_field_get_var (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_data_forms_data_form_field_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec)
{
	XmppXepDataFormsDataFormField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, XmppXepDataFormsDataFormField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_NODE_PROPERTY:
		xmpp_xep_data_forms_data_form_field_set_node (self, xmpp_value_get_stanza_entry (value));
		break;
		case XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_LABEL_PROPERTY:
		xmpp_xep_data_forms_data_form_field_set_label (self, g_value_get_string (value));
		break;
		case XMPP_XEP_DATA_FORMS_DATA_FORM_FIELD_VAR_PROPERTY:
		xmpp_xep_data_forms_data_form_field_set_var (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

XmppXepDataFormsDataFormBooleanField*
xmpp_xep_data_forms_data_form_boolean_field_construct (GType object_type,
                                                       XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormBooleanField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormBooleanField*) xmpp_xep_data_forms_data_form_field_construct_from_node (object_type, node);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_BOOLEAN;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	return self;
}

XmppXepDataFormsDataFormBooleanField*
xmpp_xep_data_forms_data_form_boolean_field_new (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_boolean_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_BOOLEAN_FIELD, node);
}

gboolean
xmpp_xep_data_forms_data_form_boolean_field_get_value (XmppXepDataFormsDataFormBooleanField* self)
{
	gboolean result;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_value_string ((XmppXepDataFormsDataFormField*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "1") == 0;
	_g_free0 (_tmp1_);
	result = _tmp2_;
	return result;
}

void
xmpp_xep_data_forms_data_form_boolean_field_set_value (XmppXepDataFormsDataFormBooleanField* self,
                                                       gboolean value)
{
	const gchar* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	if (value) {
		_tmp0_ = "1";
	} else {
		_tmp0_ = "0";
	}
	xmpp_xep_data_forms_data_form_field_set_value_string ((XmppXepDataFormsDataFormField*) self, _tmp0_);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_boolean_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_VALUE_PROPERTY]);
}

static void
xmpp_xep_data_forms_data_form_boolean_field_class_init (XmppXepDataFormsDataFormBooleanFieldClass * klass,
                                                        gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_boolean_field_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_data_forms_data_form_boolean_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_data_forms_data_form_boolean_field_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_VALUE_PROPERTY, xmpp_xep_data_forms_data_form_boolean_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_VALUE_PROPERTY] = g_param_spec_boolean ("value", "value", "value", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_data_forms_data_form_boolean_field_instance_init (XmppXepDataFormsDataFormBooleanField * self,
                                                           gpointer klass)
{
}

static GType
xmpp_xep_data_forms_data_form_boolean_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormBooleanFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_boolean_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormBooleanField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_boolean_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_boolean_field_type_id;
	xmpp_xep_data_forms_data_form_boolean_field_type_id = g_type_register_static (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, "XmppXepDataFormsDataFormBooleanField", &g_define_type_info, 0);
	return xmpp_xep_data_forms_data_form_boolean_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_boolean_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_boolean_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_boolean_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_boolean_field_type_id;
		xmpp_xep_data_forms_data_form_boolean_field_type_id = xmpp_xep_data_forms_data_form_boolean_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_boolean_field_type_id__once, xmpp_xep_data_forms_data_form_boolean_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_boolean_field_type_id__once;
}

static void
_vala_xmpp_xep_data_forms_data_form_boolean_field_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec)
{
	XmppXepDataFormsDataFormBooleanField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_BOOLEAN_FIELD, XmppXepDataFormsDataFormBooleanField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_VALUE_PROPERTY:
		g_value_set_boolean (value, xmpp_xep_data_forms_data_form_boolean_field_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_data_forms_data_form_boolean_field_set_property (GObject * object,
                                                                guint property_id,
                                                                const GValue * value,
                                                                GParamSpec * pspec)
{
	XmppXepDataFormsDataFormBooleanField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_BOOLEAN_FIELD, XmppXepDataFormsDataFormBooleanField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_BOOLEAN_FIELD_VALUE_PROPERTY:
		xmpp_xep_data_forms_data_form_boolean_field_set_value (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

XmppXepDataFormsDataFormFixedField*
xmpp_xep_data_forms_data_form_fixed_field_construct (GType object_type,
                                                     XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormFixedField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormFixedField*) xmpp_xep_data_forms_data_form_field_construct_from_node (object_type, node);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIXED;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	return self;
}

XmppXepDataFormsDataFormFixedField*
xmpp_xep_data_forms_data_form_fixed_field_new (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_fixed_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIXED_FIELD, node);
}

gchar*
xmpp_xep_data_forms_data_form_fixed_field_get_value (XmppXepDataFormsDataFormFixedField* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_value_string ((XmppXepDataFormsDataFormField*) self);
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_fixed_field_set_value (XmppXepDataFormsDataFormFixedField* self,
                                                     const gchar* value)
{
	g_return_if_fail (self != NULL);
	xmpp_xep_data_forms_data_form_field_set_value_string ((XmppXepDataFormsDataFormField*) self, value);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_fixed_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_VALUE_PROPERTY]);
}

static void
xmpp_xep_data_forms_data_form_fixed_field_class_init (XmppXepDataFormsDataFormFixedFieldClass * klass,
                                                      gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_fixed_field_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_data_forms_data_form_fixed_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_data_forms_data_form_fixed_field_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_VALUE_PROPERTY, xmpp_xep_data_forms_data_form_fixed_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_data_forms_data_form_fixed_field_instance_init (XmppXepDataFormsDataFormFixedField * self,
                                                         gpointer klass)
{
}

static GType
xmpp_xep_data_forms_data_form_fixed_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormFixedFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_fixed_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormFixedField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_fixed_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_fixed_field_type_id;
	xmpp_xep_data_forms_data_form_fixed_field_type_id = g_type_register_static (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, "XmppXepDataFormsDataFormFixedField", &g_define_type_info, 0);
	return xmpp_xep_data_forms_data_form_fixed_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_fixed_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_fixed_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_fixed_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_fixed_field_type_id;
		xmpp_xep_data_forms_data_form_fixed_field_type_id = xmpp_xep_data_forms_data_form_fixed_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_fixed_field_type_id__once, xmpp_xep_data_forms_data_form_fixed_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_fixed_field_type_id__once;
}

static void
_vala_xmpp_xep_data_forms_data_form_fixed_field_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec)
{
	XmppXepDataFormsDataFormFixedField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIXED_FIELD, XmppXepDataFormsDataFormFixedField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_VALUE_PROPERTY:
		g_value_take_string (value, xmpp_xep_data_forms_data_form_fixed_field_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_data_forms_data_form_fixed_field_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec)
{
	XmppXepDataFormsDataFormFixedField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIXED_FIELD, XmppXepDataFormsDataFormFixedField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_FIXED_FIELD_VALUE_PROPERTY:
		xmpp_xep_data_forms_data_form_fixed_field_set_value (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

XmppXepDataFormsDataFormHiddenField*
xmpp_xep_data_forms_data_form_hidden_field_construct (GType object_type)
{
	XmppXepDataFormsDataFormHiddenField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	self = (XmppXepDataFormsDataFormHiddenField*) xmpp_xep_data_forms_data_form_field_construct (object_type);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_HIDDEN;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	_tmp1_ = xmpp_xep_data_forms_data_form_field_get_node ((XmppXepDataFormsDataFormField*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = xmpp_stanza_node_put_attribute (_tmp2_, "type", "hidden", NULL);
	_tmp4_ = _tmp3_;
	_xmpp_stanza_entry_unref0 (_tmp4_);
	return self;
}

XmppXepDataFormsDataFormHiddenField*
xmpp_xep_data_forms_data_form_hidden_field_new (void)
{
	return xmpp_xep_data_forms_data_form_hidden_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_HIDDEN_FIELD);
}

XmppXepDataFormsDataFormHiddenField*
xmpp_xep_data_forms_data_form_hidden_field_construct_from_node (GType object_type,
                                                                XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormHiddenField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormHiddenField*) xmpp_xep_data_forms_data_form_field_construct_from_node (object_type, node);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_HIDDEN;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	return self;
}

XmppXepDataFormsDataFormHiddenField*
xmpp_xep_data_forms_data_form_hidden_field_new_from_node (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_hidden_field_construct_from_node (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_HIDDEN_FIELD, node);
}

static void
xmpp_xep_data_forms_data_form_hidden_field_class_init (XmppXepDataFormsDataFormHiddenFieldClass * klass,
                                                       gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_hidden_field_parent_class = g_type_class_peek_parent (klass);
}

static void
xmpp_xep_data_forms_data_form_hidden_field_instance_init (XmppXepDataFormsDataFormHiddenField * self,
                                                          gpointer klass)
{
}

static GType
xmpp_xep_data_forms_data_form_hidden_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormHiddenFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_hidden_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormHiddenField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_hidden_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_hidden_field_type_id;
	xmpp_xep_data_forms_data_form_hidden_field_type_id = g_type_register_static (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, "XmppXepDataFormsDataFormHiddenField", &g_define_type_info, 0);
	return xmpp_xep_data_forms_data_form_hidden_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_hidden_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_hidden_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_hidden_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_hidden_field_type_id;
		xmpp_xep_data_forms_data_form_hidden_field_type_id = xmpp_xep_data_forms_data_form_hidden_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_hidden_field_type_id__once, xmpp_xep_data_forms_data_form_hidden_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_hidden_field_type_id__once;
}

static inline gpointer
xmpp_xep_data_forms_data_form_jid_multi_field_get_instance_private (XmppXepDataFormsDataFormJidMultiField* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepDataFormsDataFormJidMultiField_private_offset);
}

XmppXepDataFormsDataFormJidMultiField*
xmpp_xep_data_forms_data_form_jid_multi_field_construct (GType object_type,
                                                         XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormJidMultiField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormJidMultiField*) xmpp_xep_data_forms_data_form_field_construct_from_node (object_type, node);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_JID_MULTI;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	return self;
}

XmppXepDataFormsDataFormJidMultiField*
xmpp_xep_data_forms_data_form_jid_multi_field_new (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_jid_multi_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_JID_MULTI_FIELD, node);
}

GeeList*
xmpp_xep_data_forms_data_form_jid_multi_field_get_options (XmppXepDataFormsDataFormJidMultiField* self)
{
	GeeList* result;
	GeeList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_options ((XmppXepDataFormsDataFormField*) self);
	result = _tmp0_;
	return result;
}

GeeList*
xmpp_xep_data_forms_data_form_jid_multi_field_get_value (XmppXepDataFormsDataFormJidMultiField* self)
{
	GeeList* result;
	GeeList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_value;
	result = _tmp0_;
	return result;
}

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

void
xmpp_xep_data_forms_data_form_jid_multi_field_set_value (XmppXepDataFormsDataFormJidMultiField* self,
                                                         GeeList* value)
{
	GeeList* old_value;
	g_return_if_fail (self != NULL);
	old_value = xmpp_xep_data_forms_data_form_jid_multi_field_get_value (self);
	if (old_value != value) {
		GeeList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_value);
		self->priv->_value = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_jid_multi_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_VALUE_PROPERTY]);
	}
}

static void
xmpp_xep_data_forms_data_form_jid_multi_field_class_init (XmppXepDataFormsDataFormJidMultiFieldClass * klass,
                                                          gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_jid_multi_field_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppXepDataFormsDataFormJidMultiField_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_data_forms_data_form_jid_multi_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_data_forms_data_form_jid_multi_field_set_property;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_data_forms_data_form_jid_multi_field_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_OPTIONS_PROPERTY, xmpp_xep_data_forms_data_form_jid_multi_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_OPTIONS_PROPERTY] = g_param_spec_object ("options", "options", "options", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_VALUE_PROPERTY, xmpp_xep_data_forms_data_form_jid_multi_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_VALUE_PROPERTY] = g_param_spec_object ("value", "value", "value", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_data_forms_data_form_jid_multi_field_instance_init (XmppXepDataFormsDataFormJidMultiField * self,
                                                             gpointer klass)
{
	self->priv = xmpp_xep_data_forms_data_form_jid_multi_field_get_instance_private (self);
}

static void
xmpp_xep_data_forms_data_form_jid_multi_field_finalize (GObject * obj)
{
	XmppXepDataFormsDataFormJidMultiField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_JID_MULTI_FIELD, XmppXepDataFormsDataFormJidMultiField);
	_g_object_unref0 (self->priv->_value);
	G_OBJECT_CLASS (xmpp_xep_data_forms_data_form_jid_multi_field_parent_class)->finalize (obj);
}

static GType
xmpp_xep_data_forms_data_form_jid_multi_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormJidMultiFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_jid_multi_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormJidMultiField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_jid_multi_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_jid_multi_field_type_id;
	xmpp_xep_data_forms_data_form_jid_multi_field_type_id = g_type_register_static (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, "XmppXepDataFormsDataFormJidMultiField", &g_define_type_info, 0);
	XmppXepDataFormsDataFormJidMultiField_private_offset = g_type_add_instance_private (xmpp_xep_data_forms_data_form_jid_multi_field_type_id, sizeof (XmppXepDataFormsDataFormJidMultiFieldPrivate));
	return xmpp_xep_data_forms_data_form_jid_multi_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_jid_multi_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_jid_multi_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_jid_multi_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_jid_multi_field_type_id;
		xmpp_xep_data_forms_data_form_jid_multi_field_type_id = xmpp_xep_data_forms_data_form_jid_multi_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_jid_multi_field_type_id__once, xmpp_xep_data_forms_data_form_jid_multi_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_jid_multi_field_type_id__once;
}

static void
_vala_xmpp_xep_data_forms_data_form_jid_multi_field_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec)
{
	XmppXepDataFormsDataFormJidMultiField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_JID_MULTI_FIELD, XmppXepDataFormsDataFormJidMultiField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_OPTIONS_PROPERTY:
		g_value_take_object (value, xmpp_xep_data_forms_data_form_jid_multi_field_get_options (self));
		break;
		case XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_VALUE_PROPERTY:
		g_value_set_object (value, xmpp_xep_data_forms_data_form_jid_multi_field_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_data_forms_data_form_jid_multi_field_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec)
{
	XmppXepDataFormsDataFormJidMultiField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_JID_MULTI_FIELD, XmppXepDataFormsDataFormJidMultiField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_JID_MULTI_FIELD_VALUE_PROPERTY:
		xmpp_xep_data_forms_data_form_jid_multi_field_set_value (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

XmppXepDataFormsDataFormListSingleField*
xmpp_xep_data_forms_data_form_list_single_field_construct (GType object_type,
                                                           XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormListSingleField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormListSingleField*) xmpp_xep_data_forms_data_form_field_construct_from_node (object_type, node);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_SINGLE;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	xmpp_stanza_node_set_attribute (node, "type", "list-single", NULL);
	return self;
}

XmppXepDataFormsDataFormListSingleField*
xmpp_xep_data_forms_data_form_list_single_field_new (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_list_single_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_SINGLE_FIELD, node);
}

GeeList*
xmpp_xep_data_forms_data_form_list_single_field_get_options (XmppXepDataFormsDataFormListSingleField* self)
{
	GeeList* result;
	GeeList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_options ((XmppXepDataFormsDataFormField*) self);
	result = _tmp0_;
	return result;
}

gchar*
xmpp_xep_data_forms_data_form_list_single_field_get_value (XmppXepDataFormsDataFormListSingleField* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_value_string ((XmppXepDataFormsDataFormField*) self);
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_list_single_field_set_value (XmppXepDataFormsDataFormListSingleField* self,
                                                           const gchar* value)
{
	g_return_if_fail (self != NULL);
	xmpp_xep_data_forms_data_form_field_set_value_string ((XmppXepDataFormsDataFormField*) self, value);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_list_single_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_VALUE_PROPERTY]);
}

static void
xmpp_xep_data_forms_data_form_list_single_field_class_init (XmppXepDataFormsDataFormListSingleFieldClass * klass,
                                                            gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_list_single_field_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_data_forms_data_form_list_single_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_data_forms_data_form_list_single_field_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_OPTIONS_PROPERTY, xmpp_xep_data_forms_data_form_list_single_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_OPTIONS_PROPERTY] = g_param_spec_object ("options", "options", "options", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_VALUE_PROPERTY, xmpp_xep_data_forms_data_form_list_single_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_data_forms_data_form_list_single_field_instance_init (XmppXepDataFormsDataFormListSingleField * self,
                                                               gpointer klass)
{
}

static GType
xmpp_xep_data_forms_data_form_list_single_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormListSingleFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_list_single_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormListSingleField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_list_single_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_list_single_field_type_id;
	xmpp_xep_data_forms_data_form_list_single_field_type_id = g_type_register_static (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, "XmppXepDataFormsDataFormListSingleField", &g_define_type_info, 0);
	return xmpp_xep_data_forms_data_form_list_single_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_list_single_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_list_single_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_list_single_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_list_single_field_type_id;
		xmpp_xep_data_forms_data_form_list_single_field_type_id = xmpp_xep_data_forms_data_form_list_single_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_list_single_field_type_id__once, xmpp_xep_data_forms_data_form_list_single_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_list_single_field_type_id__once;
}

static void
_vala_xmpp_xep_data_forms_data_form_list_single_field_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec)
{
	XmppXepDataFormsDataFormListSingleField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_SINGLE_FIELD, XmppXepDataFormsDataFormListSingleField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_OPTIONS_PROPERTY:
		g_value_take_object (value, xmpp_xep_data_forms_data_form_list_single_field_get_options (self));
		break;
		case XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_VALUE_PROPERTY:
		g_value_take_string (value, xmpp_xep_data_forms_data_form_list_single_field_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_data_forms_data_form_list_single_field_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec)
{
	XmppXepDataFormsDataFormListSingleField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_SINGLE_FIELD, XmppXepDataFormsDataFormListSingleField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_SINGLE_FIELD_VALUE_PROPERTY:
		xmpp_xep_data_forms_data_form_list_single_field_set_value (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
xmpp_xep_data_forms_data_form_list_multi_field_get_instance_private (XmppXepDataFormsDataFormListMultiField* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepDataFormsDataFormListMultiField_private_offset);
}

XmppXepDataFormsDataFormListMultiField*
xmpp_xep_data_forms_data_form_list_multi_field_construct (GType object_type,
                                                          XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormListMultiField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormListMultiField*) xmpp_xep_data_forms_data_form_field_construct_from_node (object_type, node);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_MULTI;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	return self;
}

XmppXepDataFormsDataFormListMultiField*
xmpp_xep_data_forms_data_form_list_multi_field_new (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_list_multi_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_MULTI_FIELD, node);
}

GeeList*
xmpp_xep_data_forms_data_form_list_multi_field_get_options (XmppXepDataFormsDataFormListMultiField* self)
{
	GeeList* result;
	GeeList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_options ((XmppXepDataFormsDataFormField*) self);
	result = _tmp0_;
	return result;
}

GeeList*
xmpp_xep_data_forms_data_form_list_multi_field_get_value (XmppXepDataFormsDataFormListMultiField* self)
{
	GeeList* result;
	GeeList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_value;
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_list_multi_field_set_value (XmppXepDataFormsDataFormListMultiField* self,
                                                          GeeList* value)
{
	GeeList* old_value;
	g_return_if_fail (self != NULL);
	old_value = xmpp_xep_data_forms_data_form_list_multi_field_get_value (self);
	if (old_value != value) {
		GeeList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_value);
		self->priv->_value = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_list_multi_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_VALUE_PROPERTY]);
	}
}

static void
xmpp_xep_data_forms_data_form_list_multi_field_class_init (XmppXepDataFormsDataFormListMultiFieldClass * klass,
                                                           gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_list_multi_field_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppXepDataFormsDataFormListMultiField_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_data_forms_data_form_list_multi_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_data_forms_data_form_list_multi_field_set_property;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_data_forms_data_form_list_multi_field_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_OPTIONS_PROPERTY, xmpp_xep_data_forms_data_form_list_multi_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_OPTIONS_PROPERTY] = g_param_spec_object ("options", "options", "options", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_VALUE_PROPERTY, xmpp_xep_data_forms_data_form_list_multi_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_VALUE_PROPERTY] = g_param_spec_object ("value", "value", "value", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_data_forms_data_form_list_multi_field_instance_init (XmppXepDataFormsDataFormListMultiField * self,
                                                              gpointer klass)
{
	self->priv = xmpp_xep_data_forms_data_form_list_multi_field_get_instance_private (self);
}

static void
xmpp_xep_data_forms_data_form_list_multi_field_finalize (GObject * obj)
{
	XmppXepDataFormsDataFormListMultiField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_MULTI_FIELD, XmppXepDataFormsDataFormListMultiField);
	_g_object_unref0 (self->priv->_value);
	G_OBJECT_CLASS (xmpp_xep_data_forms_data_form_list_multi_field_parent_class)->finalize (obj);
}

static GType
xmpp_xep_data_forms_data_form_list_multi_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormListMultiFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_list_multi_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormListMultiField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_list_multi_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_list_multi_field_type_id;
	xmpp_xep_data_forms_data_form_list_multi_field_type_id = g_type_register_static (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, "XmppXepDataFormsDataFormListMultiField", &g_define_type_info, 0);
	XmppXepDataFormsDataFormListMultiField_private_offset = g_type_add_instance_private (xmpp_xep_data_forms_data_form_list_multi_field_type_id, sizeof (XmppXepDataFormsDataFormListMultiFieldPrivate));
	return xmpp_xep_data_forms_data_form_list_multi_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_list_multi_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_list_multi_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_list_multi_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_list_multi_field_type_id;
		xmpp_xep_data_forms_data_form_list_multi_field_type_id = xmpp_xep_data_forms_data_form_list_multi_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_list_multi_field_type_id__once, xmpp_xep_data_forms_data_form_list_multi_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_list_multi_field_type_id__once;
}

static void
_vala_xmpp_xep_data_forms_data_form_list_multi_field_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec)
{
	XmppXepDataFormsDataFormListMultiField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_MULTI_FIELD, XmppXepDataFormsDataFormListMultiField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_OPTIONS_PROPERTY:
		g_value_take_object (value, xmpp_xep_data_forms_data_form_list_multi_field_get_options (self));
		break;
		case XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_VALUE_PROPERTY:
		g_value_set_object (value, xmpp_xep_data_forms_data_form_list_multi_field_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_data_forms_data_form_list_multi_field_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec)
{
	XmppXepDataFormsDataFormListMultiField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_LIST_MULTI_FIELD, XmppXepDataFormsDataFormListMultiField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_LIST_MULTI_FIELD_VALUE_PROPERTY:
		xmpp_xep_data_forms_data_form_list_multi_field_set_value (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

XmppXepDataFormsDataFormTextPrivateField*
xmpp_xep_data_forms_data_form_text_private_field_construct (GType object_type,
                                                            XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormTextPrivateField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormTextPrivateField*) xmpp_xep_data_forms_data_form_field_construct_from_node (object_type, node);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_PRIVATE;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	return self;
}

XmppXepDataFormsDataFormTextPrivateField*
xmpp_xep_data_forms_data_form_text_private_field_new (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_text_private_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_PRIVATE_FIELD, node);
}

gchar*
xmpp_xep_data_forms_data_form_text_private_field_get_value (XmppXepDataFormsDataFormTextPrivateField* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_value_string ((XmppXepDataFormsDataFormField*) self);
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_text_private_field_set_value (XmppXepDataFormsDataFormTextPrivateField* self,
                                                            const gchar* value)
{
	g_return_if_fail (self != NULL);
	xmpp_xep_data_forms_data_form_field_set_value_string ((XmppXepDataFormsDataFormField*) self, value);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_text_private_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_VALUE_PROPERTY]);
}

static void
xmpp_xep_data_forms_data_form_text_private_field_class_init (XmppXepDataFormsDataFormTextPrivateFieldClass * klass,
                                                             gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_text_private_field_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_data_forms_data_form_text_private_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_data_forms_data_form_text_private_field_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_VALUE_PROPERTY, xmpp_xep_data_forms_data_form_text_private_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_data_forms_data_form_text_private_field_instance_init (XmppXepDataFormsDataFormTextPrivateField * self,
                                                                gpointer klass)
{
}

static GType
xmpp_xep_data_forms_data_form_text_private_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormTextPrivateFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_text_private_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormTextPrivateField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_text_private_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_text_private_field_type_id;
	xmpp_xep_data_forms_data_form_text_private_field_type_id = g_type_register_static (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, "XmppXepDataFormsDataFormTextPrivateField", &g_define_type_info, 0);
	return xmpp_xep_data_forms_data_form_text_private_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_text_private_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_text_private_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_text_private_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_text_private_field_type_id;
		xmpp_xep_data_forms_data_form_text_private_field_type_id = xmpp_xep_data_forms_data_form_text_private_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_text_private_field_type_id__once, xmpp_xep_data_forms_data_form_text_private_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_text_private_field_type_id__once;
}

static void
_vala_xmpp_xep_data_forms_data_form_text_private_field_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec)
{
	XmppXepDataFormsDataFormTextPrivateField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_PRIVATE_FIELD, XmppXepDataFormsDataFormTextPrivateField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_VALUE_PROPERTY:
		g_value_take_string (value, xmpp_xep_data_forms_data_form_text_private_field_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_data_forms_data_form_text_private_field_set_property (GObject * object,
                                                                     guint property_id,
                                                                     const GValue * value,
                                                                     GParamSpec * pspec)
{
	XmppXepDataFormsDataFormTextPrivateField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_PRIVATE_FIELD, XmppXepDataFormsDataFormTextPrivateField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_PRIVATE_FIELD_VALUE_PROPERTY:
		xmpp_xep_data_forms_data_form_text_private_field_set_value (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

XmppXepDataFormsDataFormTextSingleField*
xmpp_xep_data_forms_data_form_text_single_field_construct (GType object_type,
                                                           XmppStanzaNode* node)
{
	XmppXepDataFormsDataFormTextSingleField * self = NULL;
	XmppXepDataFormsDataFormType _tmp0_;
	g_return_val_if_fail (node != NULL, NULL);
	self = (XmppXepDataFormsDataFormTextSingleField*) xmpp_xep_data_forms_data_form_field_construct_from_node (object_type, node);
	_tmp0_ = XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_SINGLE;
	xmpp_xep_data_forms_data_form_field_set_type_ ((XmppXepDataFormsDataFormField*) self, &_tmp0_);
	return self;
}

XmppXepDataFormsDataFormTextSingleField*
xmpp_xep_data_forms_data_form_text_single_field_new (XmppStanzaNode* node)
{
	return xmpp_xep_data_forms_data_form_text_single_field_construct (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_SINGLE_FIELD, node);
}

gchar*
xmpp_xep_data_forms_data_form_text_single_field_get_value (XmppXepDataFormsDataFormTextSingleField* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_data_forms_data_form_field_get_value_string ((XmppXepDataFormsDataFormField*) self);
	result = _tmp0_;
	return result;
}

void
xmpp_xep_data_forms_data_form_text_single_field_set_value (XmppXepDataFormsDataFormTextSingleField* self,
                                                           const gchar* value)
{
	g_return_if_fail (self != NULL);
	xmpp_xep_data_forms_data_form_field_set_value_string ((XmppXepDataFormsDataFormField*) self, value);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_data_forms_data_form_text_single_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_VALUE_PROPERTY]);
}

static void
xmpp_xep_data_forms_data_form_text_single_field_class_init (XmppXepDataFormsDataFormTextSingleFieldClass * klass,
                                                            gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_text_single_field_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_data_forms_data_form_text_single_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_data_forms_data_form_text_single_field_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_VALUE_PROPERTY, xmpp_xep_data_forms_data_form_text_single_field_properties[XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_data_forms_data_form_text_single_field_instance_init (XmppXepDataFormsDataFormTextSingleField * self,
                                                               gpointer klass)
{
}

static GType
xmpp_xep_data_forms_data_form_text_single_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormTextSingleFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_text_single_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataFormTextSingleField), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_text_single_field_instance_init, NULL };
	GType xmpp_xep_data_forms_data_form_text_single_field_type_id;
	xmpp_xep_data_forms_data_form_text_single_field_type_id = g_type_register_static (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, "XmppXepDataFormsDataFormTextSingleField", &g_define_type_info, 0);
	return xmpp_xep_data_forms_data_form_text_single_field_type_id;
}

GType
xmpp_xep_data_forms_data_form_text_single_field_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_text_single_field_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_text_single_field_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_text_single_field_type_id;
		xmpp_xep_data_forms_data_form_text_single_field_type_id = xmpp_xep_data_forms_data_form_text_single_field_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_text_single_field_type_id__once, xmpp_xep_data_forms_data_form_text_single_field_type_id);
	}
	return xmpp_xep_data_forms_data_form_text_single_field_type_id__once;
}

static void
_vala_xmpp_xep_data_forms_data_form_text_single_field_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec)
{
	XmppXepDataFormsDataFormTextSingleField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_SINGLE_FIELD, XmppXepDataFormsDataFormTextSingleField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_VALUE_PROPERTY:
		g_value_take_string (value, xmpp_xep_data_forms_data_form_text_single_field_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_data_forms_data_form_text_single_field_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec)
{
	XmppXepDataFormsDataFormTextSingleField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_TEXT_SINGLE_FIELD, XmppXepDataFormsDataFormTextSingleField);
	switch (property_id) {
		case XMPP_XEP_DATA_FORMS_DATA_FORM_TEXT_SINGLE_FIELD_VALUE_PROPERTY:
		xmpp_xep_data_forms_data_form_text_single_field_set_value (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
xmpp_xep_data_forms_value_data_form_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
xmpp_xep_data_forms_value_data_form_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		xmpp_xep_data_forms_data_form_unref (value->data[0].v_pointer);
	}
}

static void
xmpp_xep_data_forms_value_data_form_copy_value (const GValue* src_value,
                                                GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = xmpp_xep_data_forms_data_form_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
xmpp_xep_data_forms_value_data_form_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
xmpp_xep_data_forms_value_data_form_collect_value (GValue* value,
                                                   guint n_collect_values,
                                                   GTypeCValue* collect_values,
                                                   guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		XmppXepDataFormsDataForm * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = xmpp_xep_data_forms_data_form_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
xmpp_xep_data_forms_value_data_form_lcopy_value (const GValue* value,
                                                 guint n_collect_values,
                                                 GTypeCValue* collect_values,
                                                 guint collect_flags)
{
	XmppXepDataFormsDataForm ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = xmpp_xep_data_forms_data_form_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
xmpp_xep_data_forms_param_spec_data_form (const gchar* name,
                                          const gchar* nick,
                                          const gchar* blurb,
                                          GType object_type,
                                          GParamFlags flags)
{
	XmppXepDataFormsParamSpecDataForm* spec;
	g_return_val_if_fail (g_type_is_a (object_type, XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
xmpp_xep_data_forms_value_get_data_form (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM), NULL);
	return value->data[0].v_pointer;
}

void
xmpp_xep_data_forms_value_set_data_form (GValue* value,
                                         gpointer v_object)
{
	XmppXepDataFormsDataForm * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		xmpp_xep_data_forms_data_form_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_data_forms_data_form_unref (old);
	}
}

void
xmpp_xep_data_forms_value_take_data_form (GValue* value,
                                          gpointer v_object)
{
	XmppXepDataFormsDataForm * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_data_forms_data_form_unref (old);
	}
}

static void
xmpp_xep_data_forms_data_form_class_init (XmppXepDataFormsDataFormClass * klass,
                                          gpointer klass_data)
{
	xmpp_xep_data_forms_data_form_parent_class = g_type_class_peek_parent (klass);
	((XmppXepDataFormsDataFormClass *) klass)->finalize = xmpp_xep_data_forms_data_form_finalize;
	g_type_class_adjust_private_offset (klass, &XmppXepDataFormsDataForm_private_offset);
}

static void
xmpp_xep_data_forms_data_form_instance_init (XmppXepDataFormsDataForm * self,
                                             gpointer klass)
{
	GeeArrayList* _tmp0_;
	self->priv = xmpp_xep_data_forms_data_form_get_instance_private (self);
	_tmp0_ = gee_array_list_new (XMPP_XEP_DATA_FORMS_DATA_FORM_TYPE_FIELD, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->fields = (GeeList*) _tmp0_;
	self->form_type = NULL;
	self->instructions = NULL;
	self->title = NULL;
	self->ref_count = 1;
}

static void
xmpp_xep_data_forms_data_form_finalize (XmppXepDataFormsDataForm * obj)
{
	XmppXepDataFormsDataForm * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_DATA_FORMS_TYPE_DATA_FORM, XmppXepDataFormsDataForm);
	g_signal_handlers_destroy (self);
	_xmpp_stanza_entry_unref0 (self->priv->_stanza_node);
	_g_object_unref0 (self->fields);
	_g_free0 (self->form_type);
	_g_free0 (self->instructions);
	_g_free0 (self->title);
}

static GType
xmpp_xep_data_forms_data_form_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_data_forms_value_data_form_init, xmpp_xep_data_forms_value_data_form_free_value, xmpp_xep_data_forms_value_data_form_copy_value, xmpp_xep_data_forms_value_data_form_peek_pointer, "p", xmpp_xep_data_forms_value_data_form_collect_value, "p", xmpp_xep_data_forms_value_data_form_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepDataFormsDataFormClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_data_forms_data_form_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepDataFormsDataForm), 0, (GInstanceInitFunc) xmpp_xep_data_forms_data_form_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType xmpp_xep_data_forms_data_form_type_id;
	xmpp_xep_data_forms_data_form_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepDataFormsDataForm", &g_define_type_info, &g_define_type_fundamental_info, 0);
	XmppXepDataFormsDataForm_private_offset = g_type_add_instance_private (xmpp_xep_data_forms_data_form_type_id, sizeof (XmppXepDataFormsDataFormPrivate));
	return xmpp_xep_data_forms_data_form_type_id;
}

GType
xmpp_xep_data_forms_data_form_get_type (void)
{
	static volatile gsize xmpp_xep_data_forms_data_form_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_data_forms_data_form_type_id__once)) {
		GType xmpp_xep_data_forms_data_form_type_id;
		xmpp_xep_data_forms_data_form_type_id = xmpp_xep_data_forms_data_form_get_type_once ();
		g_once_init_leave (&xmpp_xep_data_forms_data_form_type_id__once, xmpp_xep_data_forms_data_form_type_id);
	}
	return xmpp_xep_data_forms_data_form_type_id__once;
}

gpointer
xmpp_xep_data_forms_data_form_ref (gpointer instance)
{
	XmppXepDataFormsDataForm * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
xmpp_xep_data_forms_data_form_unref (gpointer instance)
{
	XmppXepDataFormsDataForm * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_DATA_FORMS_DATA_FORM_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

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

