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

#include <glib-object.h>
#include <gtk/gtk.h>
#include <json-glib/json-glib.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TUBA_TYPE_WIDGETIZABLE (tuba_widgetizable_get_type ())
#define TUBA_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizable))
#define TUBA_IS_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_WIDGETIZABLE))
#define TUBA_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizableIface))

typedef struct _TubaWidgetizable TubaWidgetizable;
typedef struct _TubaWidgetizableIface TubaWidgetizableIface;

#define TUBA_TYPE_ENTITY (tuba_entity_get_type ())
#define TUBA_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ENTITY, TubaEntity))
#define TUBA_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ENTITY, TubaEntityClass))
#define TUBA_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ENTITY))
#define TUBA_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ENTITY))
#define TUBA_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ENTITY, TubaEntityClass))

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

#define TUBA_API_TYPE_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

#define TUBA_TYPE_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;
typedef struct _TubaEntityPrivate TubaEntityPrivate;

#define TUBA_API_TYPE_POLL (tuba_api_poll_get_type ())
#define TUBA_API_POLL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_POLL, TubaAPIPoll))
#define TUBA_API_POLL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_POLL, TubaAPIPollClass))
#define TUBA_API_IS_POLL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_POLL))
#define TUBA_API_IS_POLL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_POLL))
#define TUBA_API_POLL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_POLL, TubaAPIPollClass))

typedef struct _TubaAPIPoll TubaAPIPoll;
typedef struct _TubaAPIPollClass TubaAPIPollClass;
typedef struct _TubaAPIPollPrivate TubaAPIPollPrivate;

#define TUBA_API_TYPE_POLL_OPTION (tuba_api_poll_option_get_type ())
#define TUBA_API_POLL_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_POLL_OPTION, TubaAPIPollOption))
#define TUBA_API_POLL_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_POLL_OPTION, TubaAPIPollOptionClass))
#define TUBA_API_IS_POLL_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_POLL_OPTION))
#define TUBA_API_IS_POLL_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_POLL_OPTION))
#define TUBA_API_POLL_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_POLL_OPTION, TubaAPIPollOptionClass))

typedef struct _TubaAPIPollOption TubaAPIPollOption;
typedef struct _TubaAPIPollOptionClass TubaAPIPollOptionClass;

#define TUBA_API_TYPE_EMOJI (tuba_api_emoji_get_type ())
#define TUBA_API_EMOJI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_EMOJI, TubaAPIEmoji))
#define TUBA_API_EMOJI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_EMOJI, TubaAPIEmojiClass))
#define TUBA_API_IS_EMOJI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_EMOJI))
#define TUBA_API_IS_EMOJI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_EMOJI))
#define TUBA_API_EMOJI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_EMOJI, TubaAPIEmojiClass))

typedef struct _TubaAPIEmoji TubaAPIEmoji;
typedef struct _TubaAPIEmojiClass TubaAPIEmojiClass;
enum  {
	TUBA_API_POLL_0_PROPERTY,
	TUBA_API_POLL_ID_PROPERTY,
	TUBA_API_POLL_EXPIRES_AT_PROPERTY,
	TUBA_API_POLL_EXPIRED_PROPERTY,
	TUBA_API_POLL_MULTIPLE_PROPERTY,
	TUBA_API_POLL_VOTES_COUNT_PROPERTY,
	TUBA_API_POLL_VOTED_PROPERTY,
	TUBA_API_POLL_OWN_VOTES_PROPERTY,
	TUBA_API_POLL_OPTIONS_PROPERTY,
	TUBA_API_POLL_EMOJIS_PROPERTY,
	TUBA_API_POLL_NUM_PROPERTIES
};
static GParamSpec* tuba_api_poll_properties[TUBA_API_POLL_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block12Data Block12Data;

#define TUBA_TYPE_REQUEST_V2 (tuba_request_v2_get_type ())
#define TUBA_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2))
#define TUBA_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))
#define TUBA_IS_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_REQUEST_V2))
#define TUBA_IS_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_REQUEST_V2))
#define TUBA_REQUEST_V2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))

typedef struct _TubaRequestV2 TubaRequestV2;
typedef struct _TubaRequestV2Class TubaRequestV2Class;
typedef enum  {
	TUBA_REQUEST_V2_METHOD_GET,
	TUBA_REQUEST_V2_METHOD_POST,
	TUBA_REQUEST_V2_METHOD_PUT,
	TUBA_REQUEST_V2_METHOD_DELETE,
	TUBA_REQUEST_V2_METHOD_PATCH
} TubaRequestV2Method;

#define TUBA_REQUEST_V2_TYPE_METHOD (tuba_request_v2_method_get_type ())

struct _TubaWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TubaWidgetizable* self);
	void (*open) (TubaWidgetizable* self);
	void (*resolve_open) (TubaWidgetizable* self, TubaInstanceAccount* account);
};

struct _TubaEntity {
	GObject parent_instance;
	TubaEntityPrivate * priv;
};

struct _TubaEntityClass {
	GObjectClass parent_class;
	gboolean (*is_local) (TubaEntity* self, TubaInstanceAccount* account);
	GType (*deserialize_array_type) (TubaEntity* self, const gchar* prop);
};

struct _TubaAPIPoll {
	TubaEntity parent_instance;
	TubaAPIPollPrivate * priv;
};

struct _TubaAPIPollClass {
	TubaEntityClass parent_class;
};

struct _TubaAPIPollPrivate {
	gchar* _id;
	gchar* _expires_at;
	gboolean _expired;
	gboolean _multiple;
	gint64 _votes_count;
	gboolean _voted;
	GeeArrayList* _own_votes;
	GeeArrayList* _options;
	GeeArrayList* _emojis;
};

struct _Block12Data {
	int _ref_count_;
	TubaAPIPoll* self;
	GeeHashMap* res;
};

static gint TubaAPIPoll_private_offset;
static gpointer tuba_api_poll_parent_class = NULL;
static TubaWidgetizableIface * tuba_api_poll_tuba_widgetizable_parent_iface = NULL;

VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN GType tuba_api_poll_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPoll, g_object_unref)
VALA_EXTERN GType tuba_api_poll_option_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPollOption, g_object_unref)
VALA_EXTERN GType tuba_api_emoji_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIEmoji, g_object_unref)
VALA_EXTERN GType tuba_entity_deserialize_array_type (TubaEntity* self,
                                          const gchar* prop);
VALA_EXTERN GeeHashMap* tuba_api_poll_gen_emojis_map (TubaAPIPoll* self);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
VALA_EXTERN GeeArrayList* tuba_api_poll_get_emojis (TubaAPIPoll* self);
static gboolean ___lambda37_ (Block12Data* _data12_,
                       TubaAPIEmoji* e);
VALA_EXTERN const gchar* tuba_api_emoji_get_shortcode (TubaAPIEmoji* self);
VALA_EXTERN const gchar* tuba_api_emoji_get_url (TubaAPIEmoji* self);
static gboolean ____lambda37__gee_forall_func (gpointer g,
                                        gpointer self);
VALA_EXTERN TubaAPIPoll* tuba_api_poll_new (const gchar* _id);
VALA_EXTERN TubaAPIPoll* tuba_api_poll_construct (GType object_type,
                                      const gchar* _id);
VALA_EXTERN TubaEntity* tuba_entity_new (void);
VALA_EXTERN TubaEntity* tuba_entity_construct (GType object_type);
VALA_EXTERN void tuba_api_poll_set_id (TubaAPIPoll* self,
                           const gchar* value);
static GType tuba_api_poll_real_deserialize_array_type (TubaEntity* base,
                                                 const gchar* prop);
VALA_EXTERN TubaAPIPoll* tuba_api_poll_from (JsonNode* node,
                                 GError** error);
VALA_EXTERN TubaEntity* tuba_entity_from_json (GType type,
                                   JsonNode* node,
                                   GError** error);
static void tuba_api_poll_real_open (TubaWidgetizable* base);
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
VALA_EXTERN TubaRequestV2* tuba_api_poll_vote (TubaInstanceAccount* acc,
                                   GeeArrayList* options,
                                   GeeArrayList* selection,
                                   const gchar* id);
VALA_EXTERN const gchar* tuba_api_poll_option_get_title (TubaAPIPollOption* self);
VALA_EXTERN GType tuba_request_v2_method_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaRequestV2* tuba_request_v2_new (const gchar* url,
                                    TubaRequestV2Method method);
VALA_EXTERN TubaRequestV2* tuba_request_v2_construct (GType object_type,
                                          const gchar* url,
                                          TubaRequestV2Method method);
VALA_EXTERN void tuba_request_v2_set_account (TubaRequestV2* self,
                                  TubaInstanceAccount* value);
VALA_EXTERN void tuba_request_v2_set_body_from_json (TubaRequestV2* self,
                                         JsonBuilder* json_builder);
VALA_EXTERN const gchar* tuba_api_poll_get_id (TubaAPIPoll* self);
VALA_EXTERN const gchar* tuba_api_poll_get_expires_at (TubaAPIPoll* self);
VALA_EXTERN void tuba_api_poll_set_expires_at (TubaAPIPoll* self,
                                   const gchar* value);
VALA_EXTERN gboolean tuba_api_poll_get_expired (TubaAPIPoll* self);
VALA_EXTERN void tuba_api_poll_set_expired (TubaAPIPoll* self,
                                gboolean value);
VALA_EXTERN gboolean tuba_api_poll_get_multiple (TubaAPIPoll* self);
VALA_EXTERN void tuba_api_poll_set_multiple (TubaAPIPoll* self,
                                 gboolean value);
VALA_EXTERN gint64 tuba_api_poll_get_votes_count (TubaAPIPoll* self);
VALA_EXTERN void tuba_api_poll_set_votes_count (TubaAPIPoll* self,
                                    gint64 value);
VALA_EXTERN gboolean tuba_api_poll_get_voted (TubaAPIPoll* self);
VALA_EXTERN void tuba_api_poll_set_voted (TubaAPIPoll* self,
                              gboolean value);
VALA_EXTERN GeeArrayList* tuba_api_poll_get_own_votes (TubaAPIPoll* self);
VALA_EXTERN void tuba_api_poll_set_own_votes (TubaAPIPoll* self,
                                  GeeArrayList* value);
VALA_EXTERN GeeArrayList* tuba_api_poll_get_options (TubaAPIPoll* self);
VALA_EXTERN void tuba_api_poll_set_options (TubaAPIPoll* self,
                                GeeArrayList* value);
VALA_EXTERN void tuba_api_poll_set_emojis (TubaAPIPoll* self,
                               GeeArrayList* value);
VALA_EXTERN void tuba_widgetizable_open (TubaWidgetizable* self);
static void tuba_api_poll_finalize (GObject * obj);
static GType tuba_api_poll_get_type_once (void);
static void _vala_tuba_api_poll_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec);
static void _vala_tuba_api_poll_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec);

static inline gpointer
tuba_api_poll_get_instance_private (TubaAPIPoll* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAPIPoll_private_offset);
}

static Block12Data*
block12_data_ref (Block12Data* _data12_)
{
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}

static void
block12_data_unref (void * _userdata_)
{
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		TubaAPIPoll* self;
		self = _data12_->self;
		_g_object_unref0 (_data12_->res);
		_g_object_unref0 (self);
		g_slice_free (Block12Data, _data12_);
	}
}

static gboolean
___lambda37_ (Block12Data* _data12_,
              TubaAPIEmoji* e)
{
	TubaAPIPoll* self;
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gboolean result;
	self = _data12_->self;
	g_return_val_if_fail (e != NULL, FALSE);
	_tmp0_ = _data12_->res;
	_tmp1_ = tuba_api_emoji_get_shortcode (e);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_api_emoji_get_url (e);
	_tmp4_ = _tmp3_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, _tmp2_, _tmp4_);
	result = TRUE;
	_g_object_unref0 (e);
	return result;
}

static gboolean
____lambda37__gee_forall_func (gpointer g,
                               gpointer self)
{
	gboolean result;
	result = ___lambda37_ (self, (TubaAPIEmoji*) g);
	return result;
}

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

GeeHashMap*
tuba_api_poll_gen_emojis_map (TubaAPIPoll* self)
{
	Block12Data* _data12_;
	gboolean _tmp0_ = FALSE;
	GeeArrayList* _tmp1_;
	GeeHashMap* _tmp7_;
	GeeHashMap* _tmp8_;
	GeeHashMap* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data12_ = g_slice_new0 (Block12Data);
	_data12_->_ref_count_ = 1;
	_data12_->self = g_object_ref (self);
	_data12_->res = NULL;
	_tmp1_ = self->priv->_emojis;
	if (_tmp1_ != NULL) {
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->_emojis;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ > 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GeeHashMap* _tmp5_;
		GeeArrayList* _tmp6_;
		_tmp5_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
		_g_object_unref0 (_data12_->res);
		_data12_->res = _tmp5_;
		_tmp6_ = self->priv->_emojis;
		gee_abstract_collection_foreach ((GeeAbstractCollection*) _tmp6_, ____lambda37__gee_forall_func, _data12_);
	}
	_tmp7_ = _data12_->res;
	_tmp8_ = _g_object_ref0 (_tmp7_);
	result = _tmp8_;
	block12_data_unref (_data12_);
	_data12_ = NULL;
	return result;
}

TubaAPIPoll*
tuba_api_poll_construct (GType object_type,
                         const gchar* _id)
{
	TubaAPIPoll * self = NULL;
	g_return_val_if_fail (_id != NULL, NULL);
	self = (TubaAPIPoll*) tuba_entity_construct (object_type);
	tuba_api_poll_set_id (self, _id);
	return self;
}

TubaAPIPoll*
tuba_api_poll_new (const gchar* _id)
{
	return tuba_api_poll_construct (TUBA_API_TYPE_POLL, _id);
}

static GType
tuba_api_poll_real_deserialize_array_type (TubaEntity* base,
                                           const gchar* prop)
{
	TubaAPIPoll * self;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	GType result;
	self = (TubaAPIPoll*) base;
	g_return_val_if_fail (prop != NULL, G_TYPE_INVALID);
	_tmp0_ = prop;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("options")))) {
		switch (0) {
			default:
			{
				result = TUBA_API_TYPE_POLL_OPTION;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("emojis")))) {
		switch (0) {
			default:
			{
				result = TUBA_API_TYPE_EMOJI;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("own-votes")))) {
		switch (0) {
			default:
			{
				result = G_TYPE_INT;
				return result;
			}
		}
	}
	result = TUBA_ENTITY_CLASS (tuba_api_poll_parent_class)->deserialize_array_type (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_TYPE_ENTITY, TubaEntity), prop);
	return result;
}

TubaAPIPoll*
tuba_api_poll_from (JsonNode* node,
                    GError** error)
{
	TubaEntity* _tmp0_ = NULL;
	TubaEntity* _tmp1_;
	TubaAPIPoll* _tmp2_;
	GError* _inner_error0_ = NULL;
	TubaAPIPoll* result;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp1_ = tuba_entity_from_json (TUBA_API_TYPE_POLL, node, &_inner_error0_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp2_ = _g_object_ref0 (TUBA_API_IS_POLL (_tmp0_) ? ((TubaAPIPoll*) _tmp0_) : NULL);
	result = _tmp2_;
	_g_object_unref0 (_tmp0_);
	return result;
}

static void
tuba_api_poll_real_open (TubaWidgetizable* base)
{
	TubaAPIPoll * self;
	self = (TubaAPIPoll*) base;
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

TubaRequestV2*
tuba_api_poll_vote (TubaInstanceAccount* acc,
                    GeeArrayList* options,
                    GeeArrayList* selection,
                    const gchar* id)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	JsonBuilder* builder = NULL;
	JsonBuilder* _tmp3_;
	JsonBuilder* _tmp4_;
	JsonBuilder* _tmp5_;
	JsonBuilder* _tmp6_;
	gint row_number = 0;
	JsonBuilder* _tmp29_;
	JsonBuilder* _tmp30_;
	TubaRequestV2* voting = NULL;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	TubaInstanceAccount* _tmp34_;
	TubaRequestV2* _tmp35_ = NULL;
	TubaRequestV2* _tmp36_;
	JsonBuilder* _tmp37_;
	TubaRequestV2* result;
	g_return_val_if_fail (acc != NULL, NULL);
	g_return_val_if_fail (options != NULL, NULL);
	g_return_val_if_fail (selection != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	_tmp0_ = string_to_string (id);
	_tmp1_ = g_strconcat ("Voting poll ", _tmp0_, "…", NULL);
	_tmp2_ = _tmp1_;
	g_debug ("Poll.vala:55: %s", _tmp2_);
	_g_free0 (_tmp2_);
	_tmp3_ = json_builder_new ();
	builder = _tmp3_;
	_tmp4_ = builder;
	json_builder_begin_object (_tmp4_);
	_tmp5_ = builder;
	json_builder_set_member_name (_tmp5_, "choices");
	_tmp6_ = builder;
	json_builder_begin_array (_tmp6_);
	row_number = 0;
	{
		GeeArrayList* _p_list = NULL;
		gint _p_size = 0;
		GeeArrayList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _p_index = 0;
		_p_list = options;
		_tmp7_ = _p_list;
		_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_p_size = _tmp9_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp10_;
			gint _tmp11_;
			TubaAPIPollOption* p = NULL;
			GeeArrayList* _tmp12_;
			gpointer _tmp13_;
			gint _tmp28_;
			_p_index = _p_index + 1;
			_tmp10_ = _p_index;
			_tmp11_ = _p_size;
			if (!(_tmp10_ < _tmp11_)) {
				break;
			}
			_tmp12_ = _p_list;
			_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _p_index);
			p = (TubaAPIPollOption*) _tmp13_;
			{
				GeeArrayList* _select_list = NULL;
				gint _select_size = 0;
				GeeArrayList* _tmp14_;
				gint _tmp15_;
				gint _tmp16_;
				gint _select_index = 0;
				_select_list = selection;
				_tmp14_ = _select_list;
				_tmp15_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp14_);
				_tmp16_ = _tmp15_;
				_select_size = _tmp16_;
				_select_index = -1;
				while (TRUE) {
					gint _tmp17_;
					gint _tmp18_;
					gchar* select = NULL;
					GeeArrayList* _tmp19_;
					gpointer _tmp20_;
					const gchar* _tmp21_;
					TubaAPIPollOption* _tmp22_;
					const gchar* _tmp23_;
					const gchar* _tmp24_;
					_select_index = _select_index + 1;
					_tmp17_ = _select_index;
					_tmp18_ = _select_size;
					if (!(_tmp17_ < _tmp18_)) {
						break;
					}
					_tmp19_ = _select_list;
					_tmp20_ = gee_abstract_list_get ((GeeAbstractList*) _tmp19_, _select_index);
					select = (gchar*) _tmp20_;
					_tmp21_ = select;
					_tmp22_ = p;
					_tmp23_ = tuba_api_poll_option_get_title (_tmp22_);
					_tmp24_ = _tmp23_;
					if (g_strcmp0 (_tmp21_, _tmp24_) == 0) {
						JsonBuilder* _tmp25_;
						gchar* _tmp26_;
						gchar* _tmp27_;
						_tmp25_ = builder;
						_tmp26_ = g_strdup_printf ("%i", row_number);
						_tmp27_ = _tmp26_;
						json_builder_add_string_value (_tmp25_, _tmp27_);
						_g_free0 (_tmp27_);
					}
					_g_free0 (select);
				}
			}
			_tmp28_ = row_number;
			row_number = _tmp28_ + 1;
			_g_object_unref0 (p);
		}
	}
	_tmp29_ = builder;
	json_builder_end_array (_tmp29_);
	_tmp30_ = builder;
	json_builder_end_object (_tmp30_);
	_tmp31_ = string_to_string (id);
	_tmp32_ = g_strconcat ("/api/v1/polls/", _tmp31_, "/votes", NULL);
	_tmp33_ = _tmp32_;
	_tmp34_ = _g_object_ref0 (acc);
	_tmp35_ = tuba_request_v2_new (_tmp33_, TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_tmp35_, _tmp34_);
	_g_object_unref0 (_tmp34_);
	_tmp36_ = _tmp35_;
	_g_free0 (_tmp33_);
	voting = _tmp36_;
	_tmp37_ = builder;
	tuba_request_v2_set_body_from_json (voting, _tmp37_);
	result = voting;
	_g_object_unref0 (builder);
	return result;
}

const gchar*
tuba_api_poll_get_id (TubaAPIPoll* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

void
tuba_api_poll_set_id (TubaAPIPoll* self,
                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_ID_PROPERTY]);
	}
}

const gchar*
tuba_api_poll_get_expires_at (TubaAPIPoll* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_expires_at;
	result = _tmp0_;
	return result;
}

void
tuba_api_poll_set_expires_at (TubaAPIPoll* self,
                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_expires_at (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_expires_at);
		self->priv->_expires_at = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_EXPIRES_AT_PROPERTY]);
	}
}

gboolean
tuba_api_poll_get_expired (TubaAPIPoll* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_expired;
	return result;
}

void
tuba_api_poll_set_expired (TubaAPIPoll* self,
                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_expired (self);
	if (old_value != value) {
		self->priv->_expired = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_EXPIRED_PROPERTY]);
	}
}

gboolean
tuba_api_poll_get_multiple (TubaAPIPoll* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_multiple;
	return result;
}

void
tuba_api_poll_set_multiple (TubaAPIPoll* self,
                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_multiple (self);
	if (old_value != value) {
		self->priv->_multiple = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_MULTIPLE_PROPERTY]);
	}
}

gint64
tuba_api_poll_get_votes_count (TubaAPIPoll* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_votes_count;
	return result;
}

void
tuba_api_poll_set_votes_count (TubaAPIPoll* self,
                               gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_votes_count (self);
	if (old_value != value) {
		self->priv->_votes_count = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_VOTES_COUNT_PROPERTY]);
	}
}

gboolean
tuba_api_poll_get_voted (TubaAPIPoll* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_voted;
	return result;
}

void
tuba_api_poll_set_voted (TubaAPIPoll* self,
                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_voted (self);
	if (old_value != value) {
		self->priv->_voted = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_VOTED_PROPERTY]);
	}
}

GeeArrayList*
tuba_api_poll_get_own_votes (TubaAPIPoll* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_own_votes;
	result = _tmp0_;
	return result;
}

void
tuba_api_poll_set_own_votes (TubaAPIPoll* self,
                             GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_own_votes (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_own_votes);
		self->priv->_own_votes = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_OWN_VOTES_PROPERTY]);
	}
}

GeeArrayList*
tuba_api_poll_get_options (TubaAPIPoll* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_options;
	result = _tmp0_;
	return result;
}

void
tuba_api_poll_set_options (TubaAPIPoll* self,
                           GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_options (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_options);
		self->priv->_options = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_OPTIONS_PROPERTY]);
	}
}

GeeArrayList*
tuba_api_poll_get_emojis (TubaAPIPoll* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_emojis;
	result = _tmp0_;
	return result;
}

void
tuba_api_poll_set_emojis (TubaAPIPoll* self,
                          GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_poll_get_emojis (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_emojis);
		self->priv->_emojis = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_poll_properties[TUBA_API_POLL_EMOJIS_PROPERTY]);
	}
}

static void
tuba_api_poll_class_init (TubaAPIPollClass * klass,
                          gpointer klass_data)
{
	tuba_api_poll_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAPIPoll_private_offset);
	((TubaEntityClass *) klass)->deserialize_array_type = (GType (*) (TubaEntity*, const gchar*)) tuba_api_poll_real_deserialize_array_type;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_api_poll_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_api_poll_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_api_poll_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_ID_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_EXPIRES_AT_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_EXPIRES_AT_PROPERTY] = g_param_spec_string ("expires-at", "expires-at", "expires-at", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_EXPIRED_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_EXPIRED_PROPERTY] = g_param_spec_boolean ("expired", "expired", "expired", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_MULTIPLE_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_MULTIPLE_PROPERTY] = g_param_spec_boolean ("multiple", "multiple", "multiple", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_VOTES_COUNT_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_VOTES_COUNT_PROPERTY] = g_param_spec_int64 ("votes-count", "votes-count", "votes-count", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_VOTED_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_VOTED_PROPERTY] = g_param_spec_boolean ("voted", "voted", "voted", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_OWN_VOTES_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_OWN_VOTES_PROPERTY] = g_param_spec_object ("own-votes", "own-votes", "own-votes", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_OPTIONS_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_OPTIONS_PROPERTY] = g_param_spec_object ("options", "options", "options", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_POLL_EMOJIS_PROPERTY, tuba_api_poll_properties[TUBA_API_POLL_EMOJIS_PROPERTY] = g_param_spec_object ("emojis", "emojis", "emojis", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_api_poll_tuba_widgetizable_interface_init (TubaWidgetizableIface * iface,
                                                gpointer iface_data)
{
	tuba_api_poll_tuba_widgetizable_parent_iface = g_type_interface_peek_parent (iface);
	iface->open = (void (*) (TubaWidgetizable*)) tuba_api_poll_real_open;
}

static void
tuba_api_poll_instance_init (TubaAPIPoll * self,
                             gpointer klass)
{
	self->priv = tuba_api_poll_get_instance_private (self);
	self->priv->_voted = TRUE;
	self->priv->_own_votes = NULL;
	self->priv->_options = NULL;
	self->priv->_emojis = NULL;
}

static void
tuba_api_poll_finalize (GObject * obj)
{
	TubaAPIPoll * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_API_TYPE_POLL, TubaAPIPoll);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_expires_at);
	_g_object_unref0 (self->priv->_own_votes);
	_g_object_unref0 (self->priv->_options);
	_g_object_unref0 (self->priv->_emojis);
	G_OBJECT_CLASS (tuba_api_poll_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_api_poll_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAPIPollClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_api_poll_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAPIPoll), 0, (GInstanceInitFunc) tuba_api_poll_instance_init, NULL };
	static const GInterfaceInfo tuba_widgetizable_info = { (GInterfaceInitFunc) tuba_api_poll_tuba_widgetizable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_api_poll_type_id;
	tuba_api_poll_type_id = g_type_register_static (TUBA_TYPE_ENTITY, "TubaAPIPoll", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_add_interface_static (tuba_api_poll_type_id, TUBA_TYPE_WIDGETIZABLE, &tuba_widgetizable_info);
	TubaAPIPoll_private_offset = g_type_add_instance_private (tuba_api_poll_type_id, sizeof (TubaAPIPollPrivate));
	return tuba_api_poll_type_id;
}

GType
tuba_api_poll_get_type (void)
{
	static GType tuba_api_poll_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_poll_type_id__once)) {
		GType tuba_api_poll_type_id;
		tuba_api_poll_type_id = tuba_api_poll_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_poll_type_id__once, tuba_api_poll_type_id);
	}
	return tuba_api_poll_type_id__once;
}

static void
_vala_tuba_api_poll_get_property (GObject * object,
                                  guint property_id,
                                  GValue * value,
                                  GParamSpec * pspec)
{
	TubaAPIPoll * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TYPE_POLL, TubaAPIPoll);
	switch (property_id) {
		case TUBA_API_POLL_ID_PROPERTY:
		g_value_set_string (value, tuba_api_poll_get_id (self));
		break;
		case TUBA_API_POLL_EXPIRES_AT_PROPERTY:
		g_value_set_string (value, tuba_api_poll_get_expires_at (self));
		break;
		case TUBA_API_POLL_EXPIRED_PROPERTY:
		g_value_set_boolean (value, tuba_api_poll_get_expired (self));
		break;
		case TUBA_API_POLL_MULTIPLE_PROPERTY:
		g_value_set_boolean (value, tuba_api_poll_get_multiple (self));
		break;
		case TUBA_API_POLL_VOTES_COUNT_PROPERTY:
		g_value_set_int64 (value, tuba_api_poll_get_votes_count (self));
		break;
		case TUBA_API_POLL_VOTED_PROPERTY:
		g_value_set_boolean (value, tuba_api_poll_get_voted (self));
		break;
		case TUBA_API_POLL_OWN_VOTES_PROPERTY:
		g_value_set_object (value, tuba_api_poll_get_own_votes (self));
		break;
		case TUBA_API_POLL_OPTIONS_PROPERTY:
		g_value_set_object (value, tuba_api_poll_get_options (self));
		break;
		case TUBA_API_POLL_EMOJIS_PROPERTY:
		g_value_set_object (value, tuba_api_poll_get_emojis (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_api_poll_set_property (GObject * object,
                                  guint property_id,
                                  const GValue * value,
                                  GParamSpec * pspec)
{
	TubaAPIPoll * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TYPE_POLL, TubaAPIPoll);
	switch (property_id) {
		case TUBA_API_POLL_ID_PROPERTY:
		tuba_api_poll_set_id (self, g_value_get_string (value));
		break;
		case TUBA_API_POLL_EXPIRES_AT_PROPERTY:
		tuba_api_poll_set_expires_at (self, g_value_get_string (value));
		break;
		case TUBA_API_POLL_EXPIRED_PROPERTY:
		tuba_api_poll_set_expired (self, g_value_get_boolean (value));
		break;
		case TUBA_API_POLL_MULTIPLE_PROPERTY:
		tuba_api_poll_set_multiple (self, g_value_get_boolean (value));
		break;
		case TUBA_API_POLL_VOTES_COUNT_PROPERTY:
		tuba_api_poll_set_votes_count (self, g_value_get_int64 (value));
		break;
		case TUBA_API_POLL_VOTED_PROPERTY:
		tuba_api_poll_set_voted (self, g_value_get_boolean (value));
		break;
		case TUBA_API_POLL_OWN_VOTES_PROPERTY:
		tuba_api_poll_set_own_votes (self, g_value_get_object (value));
		break;
		case TUBA_API_POLL_OPTIONS_PROPERTY:
		tuba_api_poll_set_options (self, g_value_get_object (value));
		break;
		case TUBA_API_POLL_EMOJIS_PROPERTY:
		tuba_api_poll_set_emojis (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

