/* Translation.c generated by valac 0.56.19, the Vala compiler
 * generated from Translation.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_TRANSLATION (tuba_api_translation_get_type ())
#define TUBA_API_TRANSLATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_TRANSLATION, TubaAPITranslation))
#define TUBA_API_TRANSLATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_TRANSLATION, TubaAPITranslationClass))
#define TUBA_API_IS_TRANSLATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_TRANSLATION))
#define TUBA_API_IS_TRANSLATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_TRANSLATION))
#define TUBA_API_TRANSLATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_TRANSLATION, TubaAPITranslationClass))

typedef struct _TubaAPITranslation TubaAPITranslation;
typedef struct _TubaAPITranslationClass TubaAPITranslationClass;
typedef struct _TubaAPITranslationPrivate TubaAPITranslationPrivate;

#define TUBA_API_TRANSLATION_TYPE_POLL (tuba_api_translation_poll_get_type ())
#define TUBA_API_TRANSLATION_POLL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TRANSLATION_TYPE_POLL, TubaAPITranslationPoll))
#define TUBA_API_TRANSLATION_POLL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TRANSLATION_TYPE_POLL, TubaAPITranslationPollClass))
#define TUBA_API_TRANSLATION_IS_POLL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TRANSLATION_TYPE_POLL))
#define TUBA_API_TRANSLATION_IS_POLL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TRANSLATION_TYPE_POLL))
#define TUBA_API_TRANSLATION_POLL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TRANSLATION_TYPE_POLL, TubaAPITranslationPollClass))

typedef struct _TubaAPITranslationPoll TubaAPITranslationPoll;
typedef struct _TubaAPITranslationPollClass TubaAPITranslationPollClass;

#define TUBA_API_TRANSLATION_TYPE_ATTACHMENT (tuba_api_translation_attachment_get_type ())
#define TUBA_API_TRANSLATION_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TRANSLATION_TYPE_ATTACHMENT, TubaAPITranslationAttachment))
#define TUBA_API_TRANSLATION_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TRANSLATION_TYPE_ATTACHMENT, TubaAPITranslationAttachmentClass))
#define TUBA_API_TRANSLATION_IS_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TRANSLATION_TYPE_ATTACHMENT))
#define TUBA_API_TRANSLATION_IS_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TRANSLATION_TYPE_ATTACHMENT))
#define TUBA_API_TRANSLATION_ATTACHMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TRANSLATION_TYPE_ATTACHMENT, TubaAPITranslationAttachmentClass))

typedef struct _TubaAPITranslationAttachment TubaAPITranslationAttachment;
typedef struct _TubaAPITranslationAttachmentClass TubaAPITranslationAttachmentClass;
enum  {
	TUBA_API_TRANSLATION_0_PROPERTY,
	TUBA_API_TRANSLATION_CONTENT_PROPERTY,
	TUBA_API_TRANSLATION_SPOILER_TEXT_PROPERTY,
	TUBA_API_TRANSLATION_POLL_PROPERTY,
	TUBA_API_TRANSLATION_MEDIA_ATTACHMENTS_PROPERTY,
	TUBA_API_TRANSLATION_DETECTED_SOURCE_LANGUAGE_PROPERTY,
	TUBA_API_TRANSLATION_PROVIDER_PROPERTY,
	TUBA_API_TRANSLATION_NUM_PROPERTIES
};
static GParamSpec* tuba_api_translation_properties[TUBA_API_TRANSLATION_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 _TubaAPITranslationPollPrivate TubaAPITranslationPollPrivate;

#define TUBA_API_TRANSLATION_POLL_TYPE_OPTION (tuba_api_translation_poll_option_get_type ())
#define TUBA_API_TRANSLATION_POLL_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TRANSLATION_POLL_TYPE_OPTION, TubaAPITranslationPollOption))
#define TUBA_API_TRANSLATION_POLL_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TRANSLATION_POLL_TYPE_OPTION, TubaAPITranslationPollOptionClass))
#define TUBA_API_TRANSLATION_POLL_IS_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TRANSLATION_POLL_TYPE_OPTION))
#define TUBA_API_TRANSLATION_POLL_IS_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TRANSLATION_POLL_TYPE_OPTION))
#define TUBA_API_TRANSLATION_POLL_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TRANSLATION_POLL_TYPE_OPTION, TubaAPITranslationPollOptionClass))

typedef struct _TubaAPITranslationPollOption TubaAPITranslationPollOption;
typedef struct _TubaAPITranslationPollOptionClass TubaAPITranslationPollOptionClass;
enum  {
	TUBA_API_TRANSLATION_POLL_0_PROPERTY,
	TUBA_API_TRANSLATION_POLL_ID_PROPERTY,
	TUBA_API_TRANSLATION_POLL_OPTIONS_PROPERTY,
	TUBA_API_TRANSLATION_POLL_NUM_PROPERTIES
};
static GParamSpec* tuba_api_translation_poll_properties[TUBA_API_TRANSLATION_POLL_NUM_PROPERTIES];
typedef struct _TubaAPITranslationPollOptionPrivate TubaAPITranslationPollOptionPrivate;
enum  {
	TUBA_API_TRANSLATION_POLL_OPTION_0_PROPERTY,
	TUBA_API_TRANSLATION_POLL_OPTION_TITLE_PROPERTY,
	TUBA_API_TRANSLATION_POLL_OPTION_NUM_PROPERTIES
};
static GParamSpec* tuba_api_translation_poll_option_properties[TUBA_API_TRANSLATION_POLL_OPTION_NUM_PROPERTIES];
typedef struct _TubaAPITranslationAttachmentPrivate TubaAPITranslationAttachmentPrivate;
enum  {
	TUBA_API_TRANSLATION_ATTACHMENT_0_PROPERTY,
	TUBA_API_TRANSLATION_ATTACHMENT_ID_PROPERTY,
	TUBA_API_TRANSLATION_ATTACHMENT_DESCRIPTION_PROPERTY,
	TUBA_API_TRANSLATION_ATTACHMENT_NUM_PROPERTIES
};
static GParamSpec* tuba_api_translation_attachment_properties[TUBA_API_TRANSLATION_ATTACHMENT_NUM_PROPERTIES];

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 _TubaAPITranslation {
	TubaEntity parent_instance;
	TubaAPITranslationPrivate * priv;
};

struct _TubaAPITranslationClass {
	TubaEntityClass parent_class;
};

struct _TubaAPITranslationPrivate {
	gchar* _content;
	gchar* _spoiler_text;
	TubaAPITranslationPoll* _poll;
	GeeArrayList* _media_attachments;
	gchar* _detected_source_language;
	gchar* _provider;
};

struct _TubaAPITranslationPoll {
	TubaEntity parent_instance;
	TubaAPITranslationPollPrivate * priv;
};

struct _TubaAPITranslationPollClass {
	TubaEntityClass parent_class;
};

struct _TubaAPITranslationPollPrivate {
	gchar* _id;
	GeeArrayList* _options;
};

struct _TubaAPITranslationPollOption {
	TubaEntity parent_instance;
	TubaAPITranslationPollOptionPrivate * priv;
};

struct _TubaAPITranslationPollOptionClass {
	TubaEntityClass parent_class;
};

struct _TubaAPITranslationPollOptionPrivate {
	gchar* _title;
};

struct _TubaAPITranslationAttachment {
	TubaEntity parent_instance;
	TubaAPITranslationAttachmentPrivate * priv;
};

struct _TubaAPITranslationAttachmentClass {
	TubaEntityClass parent_class;
};

struct _TubaAPITranslationAttachmentPrivate {
	gchar* _id;
	gchar* _description;
};

static gint TubaAPITranslation_private_offset;
static gpointer tuba_api_translation_parent_class = NULL;
static gint TubaAPITranslationPoll_private_offset;
static gpointer tuba_api_translation_poll_parent_class = NULL;
static gint TubaAPITranslationPollOption_private_offset;
static gpointer tuba_api_translation_poll_option_parent_class = NULL;
static gint TubaAPITranslationAttachment_private_offset;
static gpointer tuba_api_translation_attachment_parent_class = 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_translation_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITranslation, g_object_unref)
VALA_EXTERN GType tuba_api_translation_poll_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITranslationPoll, g_object_unref)
VALA_EXTERN GType tuba_api_translation_attachment_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITranslationAttachment, g_object_unref)
VALA_EXTERN GType tuba_entity_deserialize_array_type (TubaEntity* self,
                                          const gchar* prop);
VALA_EXTERN TubaAPITranslation* tuba_api_translation_from (JsonNode* node,
                                               GError** error);
VALA_EXTERN TubaEntity* tuba_entity_from_json (GType type,
                                   JsonNode* node,
                                   GError** error);
static GType tuba_api_translation_real_deserialize_array_type (TubaEntity* base,
                                                        const gchar* prop);
VALA_EXTERN TubaAPITranslation* tuba_api_translation_new (void);
VALA_EXTERN TubaAPITranslation* tuba_api_translation_construct (GType object_type);
VALA_EXTERN TubaEntity* tuba_entity_new (void);
VALA_EXTERN TubaEntity* tuba_entity_construct (GType object_type);
VALA_EXTERN const gchar* tuba_api_translation_get_content (TubaAPITranslation* self);
VALA_EXTERN void tuba_api_translation_set_content (TubaAPITranslation* self,
                                       const gchar* value);
VALA_EXTERN const gchar* tuba_api_translation_get_spoiler_text (TubaAPITranslation* self);
VALA_EXTERN void tuba_api_translation_set_spoiler_text (TubaAPITranslation* self,
                                            const gchar* value);
VALA_EXTERN TubaAPITranslationPoll* tuba_api_translation_get_poll (TubaAPITranslation* self);
VALA_EXTERN void tuba_api_translation_set_poll (TubaAPITranslation* self,
                                    TubaAPITranslationPoll* value);
VALA_EXTERN GeeArrayList* tuba_api_translation_get_media_attachments (TubaAPITranslation* self);
VALA_EXTERN void tuba_api_translation_set_media_attachments (TubaAPITranslation* self,
                                                 GeeArrayList* value);
VALA_EXTERN const gchar* tuba_api_translation_get_detected_source_language (TubaAPITranslation* self);
VALA_EXTERN void tuba_api_translation_set_detected_source_language (TubaAPITranslation* self,
                                                        const gchar* value);
VALA_EXTERN const gchar* tuba_api_translation_get_provider (TubaAPITranslation* self);
VALA_EXTERN void tuba_api_translation_set_provider (TubaAPITranslation* self,
                                        const gchar* value);
VALA_EXTERN GType tuba_api_translation_poll_option_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITranslationPollOption, g_object_unref)
static GType tuba_api_translation_poll_real_deserialize_array_type (TubaEntity* base,
                                                             const gchar* prop);
VALA_EXTERN TubaAPITranslationPoll* tuba_api_translation_poll_new (void);
VALA_EXTERN TubaAPITranslationPoll* tuba_api_translation_poll_construct (GType object_type);
VALA_EXTERN const gchar* tuba_api_translation_poll_get_id (TubaAPITranslationPoll* self);
VALA_EXTERN void tuba_api_translation_poll_set_id (TubaAPITranslationPoll* self,
                                       const gchar* value);
VALA_EXTERN GeeArrayList* tuba_api_translation_poll_get_options (TubaAPITranslationPoll* self);
VALA_EXTERN void tuba_api_translation_poll_set_options (TubaAPITranslationPoll* self,
                                            GeeArrayList* value);
VALA_EXTERN TubaAPITranslationPollOption* tuba_api_translation_poll_option_new (void);
VALA_EXTERN TubaAPITranslationPollOption* tuba_api_translation_poll_option_construct (GType object_type);
VALA_EXTERN const gchar* tuba_api_translation_poll_option_get_title (TubaAPITranslationPollOption* self);
VALA_EXTERN void tuba_api_translation_poll_option_set_title (TubaAPITranslationPollOption* self,
                                                 const gchar* value);
static void tuba_api_translation_poll_option_finalize (GObject * obj);
static GType tuba_api_translation_poll_option_get_type_once (void);
static void _vala_tuba_api_translation_poll_option_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);
static void _vala_tuba_api_translation_poll_option_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec);
static void tuba_api_translation_poll_finalize (GObject * obj);
static GType tuba_api_translation_poll_get_type_once (void);
static void _vala_tuba_api_translation_poll_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_tuba_api_translation_poll_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);
VALA_EXTERN TubaAPITranslationAttachment* tuba_api_translation_attachment_new (void);
VALA_EXTERN TubaAPITranslationAttachment* tuba_api_translation_attachment_construct (GType object_type);
VALA_EXTERN const gchar* tuba_api_translation_attachment_get_id (TubaAPITranslationAttachment* self);
VALA_EXTERN void tuba_api_translation_attachment_set_id (TubaAPITranslationAttachment* self,
                                             const gchar* value);
VALA_EXTERN const gchar* tuba_api_translation_attachment_get_description (TubaAPITranslationAttachment* self);
VALA_EXTERN void tuba_api_translation_attachment_set_description (TubaAPITranslationAttachment* self,
                                                      const gchar* value);
static void tuba_api_translation_attachment_finalize (GObject * obj);
static GType tuba_api_translation_attachment_get_type_once (void);
static void _vala_tuba_api_translation_attachment_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_tuba_api_translation_attachment_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec);
static void tuba_api_translation_finalize (GObject * obj);
static GType tuba_api_translation_get_type_once (void);
static void _vala_tuba_api_translation_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_tuba_api_translation_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);

static inline gpointer
tuba_api_translation_get_instance_private (TubaAPITranslation* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAPITranslation_private_offset);
}

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

TubaAPITranslation*
tuba_api_translation_from (JsonNode* node,
                           GError** error)
{
	TubaEntity* _tmp0_ = NULL;
	TubaEntity* _tmp1_;
	TubaAPITranslation* _tmp2_;
	GError* _inner_error0_ = NULL;
	TubaAPITranslation* result;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp1_ = tuba_entity_from_json (TUBA_API_TYPE_TRANSLATION, 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_TRANSLATION (_tmp0_) ? ((TubaAPITranslation*) _tmp0_) : NULL);
	result = _tmp2_;
	_g_object_unref0 (_tmp0_);
	return result;
}

static GType
tuba_api_translation_real_deserialize_array_type (TubaEntity* base,
                                                  const gchar* prop)
{
	TubaAPITranslation * self;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	GType result;
	self = (TubaAPITranslation*) 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 ("media-attachments")))) {
		switch (0) {
			default:
			{
				result = TUBA_API_TRANSLATION_TYPE_ATTACHMENT;
				return result;
			}
		}
	}
	result = TUBA_ENTITY_CLASS (tuba_api_translation_parent_class)->deserialize_array_type (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_TYPE_ENTITY, TubaEntity), prop);
	return result;
}

TubaAPITranslation*
tuba_api_translation_construct (GType object_type)
{
	TubaAPITranslation * self = NULL;
	self = (TubaAPITranslation*) tuba_entity_construct (object_type);
	return self;
}

TubaAPITranslation*
tuba_api_translation_new (void)
{
	return tuba_api_translation_construct (TUBA_API_TYPE_TRANSLATION);
}

const gchar*
tuba_api_translation_get_content (TubaAPITranslation* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_content;
	result = _tmp0_;
	return result;
}

void
tuba_api_translation_set_content (TubaAPITranslation* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_get_content (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_content);
		self->priv->_content = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_translation_properties[TUBA_API_TRANSLATION_CONTENT_PROPERTY]);
	}
}

const gchar*
tuba_api_translation_get_spoiler_text (TubaAPITranslation* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_spoiler_text;
	result = _tmp0_;
	return result;
}

void
tuba_api_translation_set_spoiler_text (TubaAPITranslation* self,
                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_get_spoiler_text (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_spoiler_text);
		self->priv->_spoiler_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_translation_properties[TUBA_API_TRANSLATION_SPOILER_TEXT_PROPERTY]);
	}
}

TubaAPITranslationPoll*
tuba_api_translation_get_poll (TubaAPITranslation* self)
{
	TubaAPITranslationPoll* result;
	TubaAPITranslationPoll* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_poll;
	result = _tmp0_;
	return result;
}

void
tuba_api_translation_set_poll (TubaAPITranslation* self,
                               TubaAPITranslationPoll* value)
{
	TubaAPITranslationPoll* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_get_poll (self);
	if (old_value != value) {
		TubaAPITranslationPoll* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_poll);
		self->priv->_poll = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_translation_properties[TUBA_API_TRANSLATION_POLL_PROPERTY]);
	}
}

GeeArrayList*
tuba_api_translation_get_media_attachments (TubaAPITranslation* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_media_attachments;
	result = _tmp0_;
	return result;
}

void
tuba_api_translation_set_media_attachments (TubaAPITranslation* self,
                                            GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_get_media_attachments (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_media_attachments);
		self->priv->_media_attachments = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_translation_properties[TUBA_API_TRANSLATION_MEDIA_ATTACHMENTS_PROPERTY]);
	}
}

const gchar*
tuba_api_translation_get_detected_source_language (TubaAPITranslation* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_detected_source_language;
	result = _tmp0_;
	return result;
}

void
tuba_api_translation_set_detected_source_language (TubaAPITranslation* self,
                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_get_detected_source_language (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_detected_source_language);
		self->priv->_detected_source_language = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_translation_properties[TUBA_API_TRANSLATION_DETECTED_SOURCE_LANGUAGE_PROPERTY]);
	}
}

const gchar*
tuba_api_translation_get_provider (TubaAPITranslation* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_provider;
	result = _tmp0_;
	return result;
}

void
tuba_api_translation_set_provider (TubaAPITranslation* self,
                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_get_provider (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_provider);
		self->priv->_provider = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_translation_properties[TUBA_API_TRANSLATION_PROVIDER_PROPERTY]);
	}
}

static inline gpointer
tuba_api_translation_poll_get_instance_private (TubaAPITranslationPoll* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAPITranslationPoll_private_offset);
}

static GType
tuba_api_translation_poll_real_deserialize_array_type (TubaEntity* base,
                                                       const gchar* prop)
{
	TubaAPITranslationPoll * self;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	GType result;
	self = (TubaAPITranslationPoll*) 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_TRANSLATION_POLL_TYPE_OPTION;
				return result;
			}
		}
	}
	result = TUBA_ENTITY_CLASS (tuba_api_translation_poll_parent_class)->deserialize_array_type (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_TYPE_ENTITY, TubaEntity), prop);
	return result;
}

TubaAPITranslationPoll*
tuba_api_translation_poll_construct (GType object_type)
{
	TubaAPITranslationPoll * self = NULL;
	self = (TubaAPITranslationPoll*) tuba_entity_construct (object_type);
	return self;
}

TubaAPITranslationPoll*
tuba_api_translation_poll_new (void)
{
	return tuba_api_translation_poll_construct (TUBA_API_TRANSLATION_TYPE_POLL);
}

const gchar*
tuba_api_translation_poll_get_id (TubaAPITranslationPoll* 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_translation_poll_set_id (TubaAPITranslationPoll* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_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_translation_poll_properties[TUBA_API_TRANSLATION_POLL_ID_PROPERTY]);
	}
}

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

void
tuba_api_translation_poll_set_options (TubaAPITranslationPoll* self,
                                       GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_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_translation_poll_properties[TUBA_API_TRANSLATION_POLL_OPTIONS_PROPERTY]);
	}
}

static inline gpointer
tuba_api_translation_poll_option_get_instance_private (TubaAPITranslationPollOption* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAPITranslationPollOption_private_offset);
}

TubaAPITranslationPollOption*
tuba_api_translation_poll_option_construct (GType object_type)
{
	TubaAPITranslationPollOption * self = NULL;
	self = (TubaAPITranslationPollOption*) tuba_entity_construct (object_type);
	return self;
}

TubaAPITranslationPollOption*
tuba_api_translation_poll_option_new (void)
{
	return tuba_api_translation_poll_option_construct (TUBA_API_TRANSLATION_POLL_TYPE_OPTION);
}

const gchar*
tuba_api_translation_poll_option_get_title (TubaAPITranslationPollOption* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

void
tuba_api_translation_poll_option_set_title (TubaAPITranslationPollOption* self,
                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_poll_option_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_translation_poll_option_properties[TUBA_API_TRANSLATION_POLL_OPTION_TITLE_PROPERTY]);
	}
}

static void
tuba_api_translation_poll_option_class_init (TubaAPITranslationPollOptionClass * klass,
                                             gpointer klass_data)
{
	tuba_api_translation_poll_option_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAPITranslationPollOption_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_api_translation_poll_option_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_api_translation_poll_option_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_api_translation_poll_option_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_TRANSLATION_POLL_OPTION_TITLE_PROPERTY, tuba_api_translation_poll_option_properties[TUBA_API_TRANSLATION_POLL_OPTION_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_api_translation_poll_option_instance_init (TubaAPITranslationPollOption * self,
                                                gpointer klass)
{
	gchar* _tmp0_;
	self->priv = tuba_api_translation_poll_option_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_title = _tmp0_;
}

static void
tuba_api_translation_poll_option_finalize (GObject * obj)
{
	TubaAPITranslationPollOption * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_API_TRANSLATION_POLL_TYPE_OPTION, TubaAPITranslationPollOption);
	_g_free0 (self->priv->_title);
	G_OBJECT_CLASS (tuba_api_translation_poll_option_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_api_translation_poll_option_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAPITranslationPollOptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_api_translation_poll_option_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAPITranslationPollOption), 0, (GInstanceInitFunc) tuba_api_translation_poll_option_instance_init, NULL };
	GType tuba_api_translation_poll_option_type_id;
	tuba_api_translation_poll_option_type_id = g_type_register_static (TUBA_TYPE_ENTITY, "TubaAPITranslationPollOption", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaAPITranslationPollOption_private_offset = g_type_add_instance_private (tuba_api_translation_poll_option_type_id, sizeof (TubaAPITranslationPollOptionPrivate));
	return tuba_api_translation_poll_option_type_id;
}

GType
tuba_api_translation_poll_option_get_type (void)
{
	static GType tuba_api_translation_poll_option_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_translation_poll_option_type_id__once)) {
		GType tuba_api_translation_poll_option_type_id;
		tuba_api_translation_poll_option_type_id = tuba_api_translation_poll_option_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_translation_poll_option_type_id__once, tuba_api_translation_poll_option_type_id);
	}
	return tuba_api_translation_poll_option_type_id__once;
}

static void
_vala_tuba_api_translation_poll_option_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	TubaAPITranslationPollOption * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TRANSLATION_POLL_TYPE_OPTION, TubaAPITranslationPollOption);
	switch (property_id) {
		case TUBA_API_TRANSLATION_POLL_OPTION_TITLE_PROPERTY:
		g_value_set_string (value, tuba_api_translation_poll_option_get_title (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_api_translation_poll_option_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec)
{
	TubaAPITranslationPollOption * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TRANSLATION_POLL_TYPE_OPTION, TubaAPITranslationPollOption);
	switch (property_id) {
		case TUBA_API_TRANSLATION_POLL_OPTION_TITLE_PROPERTY:
		tuba_api_translation_poll_option_set_title (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
tuba_api_translation_poll_class_init (TubaAPITranslationPollClass * klass,
                                      gpointer klass_data)
{
	tuba_api_translation_poll_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAPITranslationPoll_private_offset);
	((TubaEntityClass *) klass)->deserialize_array_type = (GType (*) (TubaEntity*, const gchar*)) tuba_api_translation_poll_real_deserialize_array_type;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_api_translation_poll_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_api_translation_poll_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_api_translation_poll_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_TRANSLATION_POLL_ID_PROPERTY, tuba_api_translation_poll_properties[TUBA_API_TRANSLATION_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_TRANSLATION_POLL_OPTIONS_PROPERTY, tuba_api_translation_poll_properties[TUBA_API_TRANSLATION_POLL_OPTIONS_PROPERTY] = g_param_spec_object ("options", "options", "options", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_api_translation_poll_instance_init (TubaAPITranslationPoll * self,
                                         gpointer klass)
{
	gchar* _tmp0_;
	self->priv = tuba_api_translation_poll_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_id = _tmp0_;
	self->priv->_options = NULL;
}

static void
tuba_api_translation_poll_finalize (GObject * obj)
{
	TubaAPITranslationPoll * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_API_TRANSLATION_TYPE_POLL, TubaAPITranslationPoll);
	_g_free0 (self->priv->_id);
	_g_object_unref0 (self->priv->_options);
	G_OBJECT_CLASS (tuba_api_translation_poll_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_api_translation_poll_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAPITranslationPollClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_api_translation_poll_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAPITranslationPoll), 0, (GInstanceInitFunc) tuba_api_translation_poll_instance_init, NULL };
	GType tuba_api_translation_poll_type_id;
	tuba_api_translation_poll_type_id = g_type_register_static (TUBA_TYPE_ENTITY, "TubaAPITranslationPoll", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaAPITranslationPoll_private_offset = g_type_add_instance_private (tuba_api_translation_poll_type_id, sizeof (TubaAPITranslationPollPrivate));
	return tuba_api_translation_poll_type_id;
}

GType
tuba_api_translation_poll_get_type (void)
{
	static GType tuba_api_translation_poll_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_translation_poll_type_id__once)) {
		GType tuba_api_translation_poll_type_id;
		tuba_api_translation_poll_type_id = tuba_api_translation_poll_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_translation_poll_type_id__once, tuba_api_translation_poll_type_id);
	}
	return tuba_api_translation_poll_type_id__once;
}

static void
_vala_tuba_api_translation_poll_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	TubaAPITranslationPoll * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TRANSLATION_TYPE_POLL, TubaAPITranslationPoll);
	switch (property_id) {
		case TUBA_API_TRANSLATION_POLL_ID_PROPERTY:
		g_value_set_string (value, tuba_api_translation_poll_get_id (self));
		break;
		case TUBA_API_TRANSLATION_POLL_OPTIONS_PROPERTY:
		g_value_set_object (value, tuba_api_translation_poll_get_options (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_api_translation_poll_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	TubaAPITranslationPoll * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TRANSLATION_TYPE_POLL, TubaAPITranslationPoll);
	switch (property_id) {
		case TUBA_API_TRANSLATION_POLL_ID_PROPERTY:
		tuba_api_translation_poll_set_id (self, g_value_get_string (value));
		break;
		case TUBA_API_TRANSLATION_POLL_OPTIONS_PROPERTY:
		tuba_api_translation_poll_set_options (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
tuba_api_translation_attachment_get_instance_private (TubaAPITranslationAttachment* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAPITranslationAttachment_private_offset);
}

TubaAPITranslationAttachment*
tuba_api_translation_attachment_construct (GType object_type)
{
	TubaAPITranslationAttachment * self = NULL;
	self = (TubaAPITranslationAttachment*) tuba_entity_construct (object_type);
	return self;
}

TubaAPITranslationAttachment*
tuba_api_translation_attachment_new (void)
{
	return tuba_api_translation_attachment_construct (TUBA_API_TRANSLATION_TYPE_ATTACHMENT);
}

const gchar*
tuba_api_translation_attachment_get_id (TubaAPITranslationAttachment* 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_translation_attachment_set_id (TubaAPITranslationAttachment* self,
                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_attachment_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_translation_attachment_properties[TUBA_API_TRANSLATION_ATTACHMENT_ID_PROPERTY]);
	}
}

const gchar*
tuba_api_translation_attachment_get_description (TubaAPITranslationAttachment* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}

void
tuba_api_translation_attachment_set_description (TubaAPITranslationAttachment* self,
                                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_translation_attachment_get_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description);
		self->priv->_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_translation_attachment_properties[TUBA_API_TRANSLATION_ATTACHMENT_DESCRIPTION_PROPERTY]);
	}
}

static void
tuba_api_translation_attachment_class_init (TubaAPITranslationAttachmentClass * klass,
                                            gpointer klass_data)
{
	tuba_api_translation_attachment_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAPITranslationAttachment_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_api_translation_attachment_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_api_translation_attachment_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_api_translation_attachment_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_TRANSLATION_ATTACHMENT_ID_PROPERTY, tuba_api_translation_attachment_properties[TUBA_API_TRANSLATION_ATTACHMENT_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_TRANSLATION_ATTACHMENT_DESCRIPTION_PROPERTY, tuba_api_translation_attachment_properties[TUBA_API_TRANSLATION_ATTACHMENT_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_api_translation_attachment_instance_init (TubaAPITranslationAttachment * self,
                                               gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = tuba_api_translation_attachment_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_id = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_description = _tmp1_;
}

static void
tuba_api_translation_attachment_finalize (GObject * obj)
{
	TubaAPITranslationAttachment * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_API_TRANSLATION_TYPE_ATTACHMENT, TubaAPITranslationAttachment);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_description);
	G_OBJECT_CLASS (tuba_api_translation_attachment_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_api_translation_attachment_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAPITranslationAttachmentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_api_translation_attachment_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAPITranslationAttachment), 0, (GInstanceInitFunc) tuba_api_translation_attachment_instance_init, NULL };
	GType tuba_api_translation_attachment_type_id;
	tuba_api_translation_attachment_type_id = g_type_register_static (TUBA_TYPE_ENTITY, "TubaAPITranslationAttachment", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaAPITranslationAttachment_private_offset = g_type_add_instance_private (tuba_api_translation_attachment_type_id, sizeof (TubaAPITranslationAttachmentPrivate));
	return tuba_api_translation_attachment_type_id;
}

GType
tuba_api_translation_attachment_get_type (void)
{
	static GType tuba_api_translation_attachment_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_translation_attachment_type_id__once)) {
		GType tuba_api_translation_attachment_type_id;
		tuba_api_translation_attachment_type_id = tuba_api_translation_attachment_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_translation_attachment_type_id__once, tuba_api_translation_attachment_type_id);
	}
	return tuba_api_translation_attachment_type_id__once;
}

static void
_vala_tuba_api_translation_attachment_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	TubaAPITranslationAttachment * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TRANSLATION_TYPE_ATTACHMENT, TubaAPITranslationAttachment);
	switch (property_id) {
		case TUBA_API_TRANSLATION_ATTACHMENT_ID_PROPERTY:
		g_value_set_string (value, tuba_api_translation_attachment_get_id (self));
		break;
		case TUBA_API_TRANSLATION_ATTACHMENT_DESCRIPTION_PROPERTY:
		g_value_set_string (value, tuba_api_translation_attachment_get_description (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_api_translation_attachment_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	TubaAPITranslationAttachment * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TRANSLATION_TYPE_ATTACHMENT, TubaAPITranslationAttachment);
	switch (property_id) {
		case TUBA_API_TRANSLATION_ATTACHMENT_ID_PROPERTY:
		tuba_api_translation_attachment_set_id (self, g_value_get_string (value));
		break;
		case TUBA_API_TRANSLATION_ATTACHMENT_DESCRIPTION_PROPERTY:
		tuba_api_translation_attachment_set_description (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
tuba_api_translation_class_init (TubaAPITranslationClass * klass,
                                 gpointer klass_data)
{
	tuba_api_translation_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAPITranslation_private_offset);
	((TubaEntityClass *) klass)->deserialize_array_type = (GType (*) (TubaEntity*, const gchar*)) tuba_api_translation_real_deserialize_array_type;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_api_translation_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_api_translation_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_api_translation_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_TRANSLATION_CONTENT_PROPERTY, tuba_api_translation_properties[TUBA_API_TRANSLATION_CONTENT_PROPERTY] = g_param_spec_string ("content", "content", "content", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_TRANSLATION_SPOILER_TEXT_PROPERTY, tuba_api_translation_properties[TUBA_API_TRANSLATION_SPOILER_TEXT_PROPERTY] = g_param_spec_string ("spoiler-text", "spoiler-text", "spoiler-text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_TRANSLATION_POLL_PROPERTY, tuba_api_translation_properties[TUBA_API_TRANSLATION_POLL_PROPERTY] = g_param_spec_object ("poll", "poll", "poll", TUBA_API_TRANSLATION_TYPE_POLL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_TRANSLATION_MEDIA_ATTACHMENTS_PROPERTY, tuba_api_translation_properties[TUBA_API_TRANSLATION_MEDIA_ATTACHMENTS_PROPERTY] = g_param_spec_object ("media-attachments", "media-attachments", "media-attachments", 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_TRANSLATION_DETECTED_SOURCE_LANGUAGE_PROPERTY, tuba_api_translation_properties[TUBA_API_TRANSLATION_DETECTED_SOURCE_LANGUAGE_PROPERTY] = g_param_spec_string ("detected-source-language", "detected-source-language", "detected-source-language", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_TRANSLATION_PROVIDER_PROPERTY, tuba_api_translation_properties[TUBA_API_TRANSLATION_PROVIDER_PROPERTY] = g_param_spec_string ("provider", "provider", "provider", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_api_translation_instance_init (TubaAPITranslation * self,
                                    gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self->priv = tuba_api_translation_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_content = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_spoiler_text = _tmp1_;
	self->priv->_poll = NULL;
	self->priv->_media_attachments = NULL;
	_tmp2_ = g_strdup ("");
	self->priv->_detected_source_language = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->_provider = _tmp3_;
}

static void
tuba_api_translation_finalize (GObject * obj)
{
	TubaAPITranslation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_API_TYPE_TRANSLATION, TubaAPITranslation);
	_g_free0 (self->priv->_content);
	_g_free0 (self->priv->_spoiler_text);
	_g_object_unref0 (self->priv->_poll);
	_g_object_unref0 (self->priv->_media_attachments);
	_g_free0 (self->priv->_detected_source_language);
	_g_free0 (self->priv->_provider);
	G_OBJECT_CLASS (tuba_api_translation_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_api_translation_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAPITranslationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_api_translation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAPITranslation), 0, (GInstanceInitFunc) tuba_api_translation_instance_init, NULL };
	GType tuba_api_translation_type_id;
	tuba_api_translation_type_id = g_type_register_static (TUBA_TYPE_ENTITY, "TubaAPITranslation", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaAPITranslation_private_offset = g_type_add_instance_private (tuba_api_translation_type_id, sizeof (TubaAPITranslationPrivate));
	return tuba_api_translation_type_id;
}

GType
tuba_api_translation_get_type (void)
{
	static GType tuba_api_translation_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_translation_type_id__once)) {
		GType tuba_api_translation_type_id;
		tuba_api_translation_type_id = tuba_api_translation_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_translation_type_id__once, tuba_api_translation_type_id);
	}
	return tuba_api_translation_type_id__once;
}

static void
_vala_tuba_api_translation_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	TubaAPITranslation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TYPE_TRANSLATION, TubaAPITranslation);
	switch (property_id) {
		case TUBA_API_TRANSLATION_CONTENT_PROPERTY:
		g_value_set_string (value, tuba_api_translation_get_content (self));
		break;
		case TUBA_API_TRANSLATION_SPOILER_TEXT_PROPERTY:
		g_value_set_string (value, tuba_api_translation_get_spoiler_text (self));
		break;
		case TUBA_API_TRANSLATION_POLL_PROPERTY:
		g_value_set_object (value, tuba_api_translation_get_poll (self));
		break;
		case TUBA_API_TRANSLATION_MEDIA_ATTACHMENTS_PROPERTY:
		g_value_set_object (value, tuba_api_translation_get_media_attachments (self));
		break;
		case TUBA_API_TRANSLATION_DETECTED_SOURCE_LANGUAGE_PROPERTY:
		g_value_set_string (value, tuba_api_translation_get_detected_source_language (self));
		break;
		case TUBA_API_TRANSLATION_PROVIDER_PROPERTY:
		g_value_set_string (value, tuba_api_translation_get_provider (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_api_translation_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	TubaAPITranslation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TYPE_TRANSLATION, TubaAPITranslation);
	switch (property_id) {
		case TUBA_API_TRANSLATION_CONTENT_PROPERTY:
		tuba_api_translation_set_content (self, g_value_get_string (value));
		break;
		case TUBA_API_TRANSLATION_SPOILER_TEXT_PROPERTY:
		tuba_api_translation_set_spoiler_text (self, g_value_get_string (value));
		break;
		case TUBA_API_TRANSLATION_POLL_PROPERTY:
		tuba_api_translation_set_poll (self, g_value_get_object (value));
		break;
		case TUBA_API_TRANSLATION_MEDIA_ATTACHMENTS_PROPERTY:
		tuba_api_translation_set_media_attachments (self, g_value_get_object (value));
		break;
		case TUBA_API_TRANSLATION_DETECTED_SOURCE_LANGUAGE_PROPERTY:
		tuba_api_translation_set_detected_source_language (self, g_value_get_string (value));
		break;
		case TUBA_API_TRANSLATION_PROVIDER_PROPERTY:
		tuba_api_translation_set_provider (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

