/* Role.c generated by valac 0.56.19, the Vala compiler
 * generated from Role.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 <pango/pango.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_ACCOUNT_ROLE (tuba_api_account_role_get_type ())
#define TUBA_API_ACCOUNT_ROLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT_ROLE, TubaAPIAccountRole))
#define TUBA_API_ACCOUNT_ROLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT_ROLE, TubaAPIAccountRoleClass))
#define TUBA_API_IS_ACCOUNT_ROLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT_ROLE))
#define TUBA_API_IS_ACCOUNT_ROLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT_ROLE))
#define TUBA_API_ACCOUNT_ROLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT_ROLE, TubaAPIAccountRoleClass))

typedef struct _TubaAPIAccountRole TubaAPIAccountRole;
typedef struct _TubaAPIAccountRoleClass TubaAPIAccountRoleClass;
typedef struct _TubaAPIAccountRolePrivate TubaAPIAccountRolePrivate;
enum  {
	TUBA_API_ACCOUNT_ROLE_0_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_ID_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_NAME_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_COLLECTION_LIMIT_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_NUM_PROPERTIES
};
static GParamSpec* tuba_api_account_role_properties[TUBA_API_ACCOUNT_ROLE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS (tuba_api_account_role_permissions_get_type ())
#define TUBA_API_ACCOUNT_ROLE_PERMISSIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS, TubaAPIAccountRolePermissions))
#define TUBA_API_ACCOUNT_ROLE_PERMISSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS, TubaAPIAccountRolePermissionsClass))
#define TUBA_API_ACCOUNT_ROLE_IS_PERMISSIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS))
#define TUBA_API_ACCOUNT_ROLE_IS_PERMISSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS))
#define TUBA_API_ACCOUNT_ROLE_PERMISSIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS, TubaAPIAccountRolePermissionsClass))

typedef struct _TubaAPIAccountRolePermissions TubaAPIAccountRolePermissions;
typedef struct _TubaAPIAccountRolePermissionsClass TubaAPIAccountRolePermissionsClass;
typedef struct _TubaAPIAccountRolePermissionsPrivate TubaAPIAccountRolePermissionsPrivate;
enum  {
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_0_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_ADMIN_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_DASHBOARD_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_REPORTS_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_APPEALS_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_USERS_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_BLOCKS_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_FEDERATION_PROPERTY,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_NUM_PROPERTIES
};
static GParamSpec* tuba_api_account_role_permissions_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_NUM_PROPERTIES];
typedef enum  {
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_ADMINISTRATOR = 1 << 0,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_DEVOPS = 1 << 1,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_VIEW_AUDIT_LOG = 1 << 2,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_VIEW_DASHBOARD = 1 << 3,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_REPORTS = 1 << 4,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_FEDERATION = 1 << 5,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_SETTINGS = 1 << 6,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_BLOCKS = 1 << 7,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_TAXONOMIES = 1 << 8,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_APPEALS = 1 << 9,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_USERS = 1 << 10,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_INVITES = 1 << 11,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_RULES = 1 << 12,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_ANNOUNCEMENTS = 1 << 13,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_CUSTOM_EMOJIS = 1 << 14,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_WEBHOOKS = 1 << 15,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_INVITE_USERS = 1 << 16,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_ROLES = 1 << 17,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_USER_ACCESS = 1 << 18,
	TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_DELETE_USER_DATA = 1 << 19
} TubaAPIAccountRolePermissionsPermissions;

#define TUBA_API_ACCOUNT_ROLE_PERMISSIONS_TYPE_PERMISSIONS (tuba_api_account_role_permissions_permissions_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 _TubaAPIAccountRole {
	TubaEntity parent_instance;
	TubaAPIAccountRolePrivate * priv;
};

struct _TubaAPIAccountRoleClass {
	TubaEntityClass parent_class;
};

struct _TubaAPIAccountRolePrivate {
	gchar* _id;
	gchar* _name;
	gchar* _permissions;
	gint16 _collection_limit;
};

struct _TubaAPIAccountRolePermissions {
	GObject parent_instance;
	TubaAPIAccountRolePermissionsPrivate * priv;
};

struct _TubaAPIAccountRolePermissionsClass {
	GObjectClass parent_class;
};

struct _TubaAPIAccountRolePermissionsPrivate {
	gint bitmask;
};

static gint TubaAPIAccountRole_private_offset;
static gpointer tuba_api_account_role_parent_class = NULL;
static gint TubaAPIAccountRolePermissions_private_offset;
static gpointer tuba_api_account_role_permissions_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_account_role_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccountRole, g_object_unref)
VALA_EXTERN GtkWidget* tuba_api_account_role_to_widget (TubaAPIAccountRole* self);
VALA_EXTERN const gchar* tuba_api_account_role_get_name (TubaAPIAccountRole* self);
VALA_EXTERN TubaAPIAccountRole* tuba_api_account_role_new (void);
VALA_EXTERN TubaAPIAccountRole* tuba_api_account_role_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_account_role_get_id (TubaAPIAccountRole* self);
VALA_EXTERN void tuba_api_account_role_set_id (TubaAPIAccountRole* self,
                                   const gchar* value);
VALA_EXTERN void tuba_api_account_role_set_name (TubaAPIAccountRole* self,
                                     const gchar* value);
VALA_EXTERN const gchar* tuba_api_account_role_get_permissions (TubaAPIAccountRole* self);
VALA_EXTERN void tuba_api_account_role_set_permissions (TubaAPIAccountRole* self,
                                            const gchar* value);
VALA_EXTERN gint16 tuba_api_account_role_get_collection_limit (TubaAPIAccountRole* self);
VALA_EXTERN void tuba_api_account_role_set_collection_limit (TubaAPIAccountRole* self,
                                                 gint16 value);
VALA_EXTERN GType tuba_api_account_role_permissions_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccountRolePermissions, g_object_unref)
static GType tuba_api_account_role_permissions_permissions_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
VALA_EXTERN TubaAPIAccountRolePermissions* tuba_api_account_role_permissions_new_from_string (const gchar* bitmask);
VALA_EXTERN TubaAPIAccountRolePermissions* tuba_api_account_role_permissions_construct_from_string (GType object_type,
                                                                                        const gchar* bitmask);
VALA_EXTERN TubaAPIAccountRolePermissions* tuba_api_account_role_permissions_new (void);
VALA_EXTERN TubaAPIAccountRolePermissions* tuba_api_account_role_permissions_construct (GType object_type);
VALA_EXTERN gboolean tuba_api_account_role_permissions_get_admin (TubaAPIAccountRolePermissions* self);
VALA_EXTERN gboolean tuba_api_account_role_permissions_get_dashboard (TubaAPIAccountRolePermissions* self);
VALA_EXTERN gboolean tuba_api_account_role_permissions_get_reports (TubaAPIAccountRolePermissions* self);
VALA_EXTERN gboolean tuba_api_account_role_permissions_get_appeals (TubaAPIAccountRolePermissions* self);
VALA_EXTERN gboolean tuba_api_account_role_permissions_get_users (TubaAPIAccountRolePermissions* self);
VALA_EXTERN gboolean tuba_api_account_role_permissions_get_blocks (TubaAPIAccountRolePermissions* self);
VALA_EXTERN gboolean tuba_api_account_role_permissions_get_federation (TubaAPIAccountRolePermissions* self);
static void tuba_api_account_role_permissions_finalize (GObject * obj);
static GType tuba_api_account_role_permissions_get_type_once (void);
static void _vala_tuba_api_account_role_permissions_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec);
static void tuba_api_account_role_finalize (GObject * obj);
static GType tuba_api_account_role_get_type_once (void);
static void _vala_tuba_api_account_role_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_tuba_api_account_role_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
tuba_api_account_role_get_instance_private (TubaAPIAccountRole* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAPIAccountRole_private_offset);
}

GtkWidget*
tuba_api_account_role_to_widget (TubaAPIAccountRole* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkLabel* _tmp4_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	_tmp1_ = g_strdup ("profile-role");
	_tmp2_ = g_strdup ("tuba-circular");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = (GtkLabel*) gtk_label_new (_tmp0_);
	gtk_label_set_wrap (_tmp4_, TRUE);
	gtk_label_set_wrap_mode (_tmp4_, PANGO_WRAP_WORD_CHAR);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	result = (GtkWidget*) _tmp4_;
	return result;
}

TubaAPIAccountRole*
tuba_api_account_role_construct (GType object_type)
{
	TubaAPIAccountRole * self = NULL;
	self = (TubaAPIAccountRole*) tuba_entity_construct (object_type);
	return self;
}

TubaAPIAccountRole*
tuba_api_account_role_new (void)
{
	return tuba_api_account_role_construct (TUBA_API_TYPE_ACCOUNT_ROLE);
}

const gchar*
tuba_api_account_role_get_id (TubaAPIAccountRole* 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_account_role_set_id (TubaAPIAccountRole* self,
                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_account_role_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_account_role_properties[TUBA_API_ACCOUNT_ROLE_ID_PROPERTY]);
	}
}

const gchar*
tuba_api_account_role_get_name (TubaAPIAccountRole* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
tuba_api_account_role_set_name (TubaAPIAccountRole* self,
                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_account_role_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_account_role_properties[TUBA_API_ACCOUNT_ROLE_NAME_PROPERTY]);
	}
}

const gchar*
tuba_api_account_role_get_permissions (TubaAPIAccountRole* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_permissions;
	result = _tmp0_;
	return result;
}

void
tuba_api_account_role_set_permissions (TubaAPIAccountRole* self,
                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_account_role_get_permissions (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_permissions);
		self->priv->_permissions = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_account_role_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PROPERTY]);
	}
}

gint16
tuba_api_account_role_get_collection_limit (TubaAPIAccountRole* self)
{
	gint16 result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_collection_limit;
	return result;
}

void
tuba_api_account_role_set_collection_limit (TubaAPIAccountRole* self,
                                            gint16 value)
{
	gint16 old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_account_role_get_collection_limit (self);
	if (old_value != value) {
		self->priv->_collection_limit = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_account_role_properties[TUBA_API_ACCOUNT_ROLE_COLLECTION_LIMIT_PROPERTY]);
	}
}

static inline gpointer
tuba_api_account_role_permissions_get_instance_private (TubaAPIAccountRolePermissions* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAPIAccountRolePermissions_private_offset);
}

 G_GNUC_NO_INLINE static GType
tuba_api_account_role_permissions_permissions_get_type_once (void)
{
	static const GFlagsValue values[] = {{TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_ADMINISTRATOR, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_ADMINISTRATOR", "administrator"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_DEVOPS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_DEVOPS", "devops"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_VIEW_AUDIT_LOG, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_VIEW_AUDIT_LOG", "view-audit-log"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_VIEW_DASHBOARD, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_VIEW_DASHBOARD", "view-dashboard"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_REPORTS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_REPORTS", "manage-reports"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_FEDERATION, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_FEDERATION", "manage-federation"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_SETTINGS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_SETTINGS", "manage-settings"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_BLOCKS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_BLOCKS", "manage-blocks"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_TAXONOMIES, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_TAXONOMIES", "manage-taxonomies"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_APPEALS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_APPEALS", "manage-appeals"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_USERS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_USERS", "manage-users"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_INVITES, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_INVITES", "manage-invites"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_RULES, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_RULES", "manage-rules"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_ANNOUNCEMENTS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_ANNOUNCEMENTS", "manage-announcements"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_CUSTOM_EMOJIS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_CUSTOM_EMOJIS", "manage-custom-emojis"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_WEBHOOKS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_WEBHOOKS", "manage-webhooks"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_INVITE_USERS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_INVITE_USERS", "invite-users"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_ROLES, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_ROLES", "manage-roles"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_USER_ACCESS, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_USER_ACCESS", "manage-user-access"}, {TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_DELETE_USER_DATA, "TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_DELETE_USER_DATA", "delete-user-data"}, {0, NULL, NULL}};
	GType tuba_api_account_role_permissions_permissions_type_id;
	tuba_api_account_role_permissions_permissions_type_id = g_flags_register_static ("TubaAPIAccountRolePermissionsPermissions", values);
	return tuba_api_account_role_permissions_permissions_type_id;
}

static GType
tuba_api_account_role_permissions_permissions_get_type (void)
{
	static GType tuba_api_account_role_permissions_permissions_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_account_role_permissions_permissions_type_id__once)) {
		GType tuba_api_account_role_permissions_permissions_type_id;
		tuba_api_account_role_permissions_permissions_type_id = tuba_api_account_role_permissions_permissions_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_account_role_permissions_permissions_type_id__once, tuba_api_account_role_permissions_permissions_type_id);
	}
	return tuba_api_account_role_permissions_permissions_type_id__once;
}

TubaAPIAccountRolePermissions*
tuba_api_account_role_permissions_construct_from_string (GType object_type,
                                                         const gchar* bitmask)
{
	TubaAPIAccountRolePermissions * self = NULL;
	g_return_val_if_fail (bitmask != NULL, NULL);
	self = (TubaAPIAccountRolePermissions*) g_object_new (object_type, NULL);
	self->priv->bitmask = atoi (bitmask);
	return self;
}

TubaAPIAccountRolePermissions*
tuba_api_account_role_permissions_new_from_string (const gchar* bitmask)
{
	return tuba_api_account_role_permissions_construct_from_string (TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS, bitmask);
}

TubaAPIAccountRolePermissions*
tuba_api_account_role_permissions_construct (GType object_type)
{
	TubaAPIAccountRolePermissions * self = NULL;
	self = (TubaAPIAccountRolePermissions*) g_object_new (object_type, NULL);
	return self;
}

TubaAPIAccountRolePermissions*
tuba_api_account_role_permissions_new (void)
{
	return tuba_api_account_role_permissions_construct (TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS);
}

gboolean
tuba_api_account_role_permissions_get_admin (TubaAPIAccountRolePermissions* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = (self->priv->bitmask & TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_ADMINISTRATOR) == TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_ADMINISTRATOR;
	return result;
}

gboolean
tuba_api_account_role_permissions_get_dashboard (TubaAPIAccountRolePermissions* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = (self->priv->bitmask & TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_VIEW_DASHBOARD) == TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_VIEW_DASHBOARD;
	return result;
}

gboolean
tuba_api_account_role_permissions_get_reports (TubaAPIAccountRolePermissions* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = (self->priv->bitmask & TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_REPORTS) == TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_REPORTS;
	return result;
}

gboolean
tuba_api_account_role_permissions_get_appeals (TubaAPIAccountRolePermissions* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = (self->priv->bitmask & TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_APPEALS) == TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_APPEALS;
	return result;
}

gboolean
tuba_api_account_role_permissions_get_users (TubaAPIAccountRolePermissions* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = (self->priv->bitmask & TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_USERS) == TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_USERS;
	return result;
}

gboolean
tuba_api_account_role_permissions_get_blocks (TubaAPIAccountRolePermissions* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = (self->priv->bitmask & TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_BLOCKS) == TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_BLOCKS;
	return result;
}

gboolean
tuba_api_account_role_permissions_get_federation (TubaAPIAccountRolePermissions* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = (self->priv->bitmask & TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_FEDERATION) == TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PERMISSIONS_MANAGE_FEDERATION;
	return result;
}

static void
tuba_api_account_role_permissions_class_init (TubaAPIAccountRolePermissionsClass * klass,
                                              gpointer klass_data)
{
	tuba_api_account_role_permissions_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAPIAccountRolePermissions_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_api_account_role_permissions_get_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_api_account_role_permissions_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_PERMISSIONS_ADMIN_PROPERTY, tuba_api_account_role_permissions_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_ADMIN_PROPERTY] = g_param_spec_boolean ("admin", "admin", "admin", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_PERMISSIONS_DASHBOARD_PROPERTY, tuba_api_account_role_permissions_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_DASHBOARD_PROPERTY] = g_param_spec_boolean ("dashboard", "dashboard", "dashboard", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_PERMISSIONS_REPORTS_PROPERTY, tuba_api_account_role_permissions_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_REPORTS_PROPERTY] = g_param_spec_boolean ("reports", "reports", "reports", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_PERMISSIONS_APPEALS_PROPERTY, tuba_api_account_role_permissions_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_APPEALS_PROPERTY] = g_param_spec_boolean ("appeals", "appeals", "appeals", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_PERMISSIONS_USERS_PROPERTY, tuba_api_account_role_permissions_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_USERS_PROPERTY] = g_param_spec_boolean ("users", "users", "users", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_PERMISSIONS_BLOCKS_PROPERTY, tuba_api_account_role_permissions_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_BLOCKS_PROPERTY] = g_param_spec_boolean ("blocks", "blocks", "blocks", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_PERMISSIONS_FEDERATION_PROPERTY, tuba_api_account_role_permissions_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_FEDERATION_PROPERTY] = g_param_spec_boolean ("federation", "federation", "federation", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
tuba_api_account_role_permissions_instance_init (TubaAPIAccountRolePermissions * self,
                                                 gpointer klass)
{
	self->priv = tuba_api_account_role_permissions_get_instance_private (self);
	self->priv->bitmask = 0;
}

static void
tuba_api_account_role_permissions_finalize (GObject * obj)
{
	TubaAPIAccountRolePermissions * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS, TubaAPIAccountRolePermissions);
	G_OBJECT_CLASS (tuba_api_account_role_permissions_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_api_account_role_permissions_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAPIAccountRolePermissionsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_api_account_role_permissions_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAPIAccountRolePermissions), 0, (GInstanceInitFunc) tuba_api_account_role_permissions_instance_init, NULL };
	GType tuba_api_account_role_permissions_type_id;
	tuba_api_account_role_permissions_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaAPIAccountRolePermissions", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaAPIAccountRolePermissions_private_offset = g_type_add_instance_private (tuba_api_account_role_permissions_type_id, sizeof (TubaAPIAccountRolePermissionsPrivate));
	return tuba_api_account_role_permissions_type_id;
}

GType
tuba_api_account_role_permissions_get_type (void)
{
	static GType tuba_api_account_role_permissions_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_account_role_permissions_type_id__once)) {
		GType tuba_api_account_role_permissions_type_id;
		tuba_api_account_role_permissions_type_id = tuba_api_account_role_permissions_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_account_role_permissions_type_id__once, tuba_api_account_role_permissions_type_id);
	}
	return tuba_api_account_role_permissions_type_id__once;
}

static void
_vala_tuba_api_account_role_permissions_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec)
{
	TubaAPIAccountRolePermissions * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_ACCOUNT_ROLE_TYPE_PERMISSIONS, TubaAPIAccountRolePermissions);
	switch (property_id) {
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_ADMIN_PROPERTY:
		g_value_set_boolean (value, tuba_api_account_role_permissions_get_admin (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_DASHBOARD_PROPERTY:
		g_value_set_boolean (value, tuba_api_account_role_permissions_get_dashboard (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_REPORTS_PROPERTY:
		g_value_set_boolean (value, tuba_api_account_role_permissions_get_reports (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_APPEALS_PROPERTY:
		g_value_set_boolean (value, tuba_api_account_role_permissions_get_appeals (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_USERS_PROPERTY:
		g_value_set_boolean (value, tuba_api_account_role_permissions_get_users (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_BLOCKS_PROPERTY:
		g_value_set_boolean (value, tuba_api_account_role_permissions_get_blocks (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_FEDERATION_PROPERTY:
		g_value_set_boolean (value, tuba_api_account_role_permissions_get_federation (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
tuba_api_account_role_class_init (TubaAPIAccountRoleClass * klass,
                                  gpointer klass_data)
{
	tuba_api_account_role_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAPIAccountRole_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_api_account_role_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_api_account_role_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_api_account_role_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_ID_PROPERTY, tuba_api_account_role_properties[TUBA_API_ACCOUNT_ROLE_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_ACCOUNT_ROLE_NAME_PROPERTY, tuba_api_account_role_properties[TUBA_API_ACCOUNT_ROLE_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PROPERTY, tuba_api_account_role_properties[TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PROPERTY] = g_param_spec_string ("permissions", "permissions", "permissions", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ACCOUNT_ROLE_COLLECTION_LIMIT_PROPERTY, tuba_api_account_role_properties[TUBA_API_ACCOUNT_ROLE_COLLECTION_LIMIT_PROPERTY] = g_param_spec_int ("collection-limit", "collection-limit", "collection-limit", G_MININT, G_MAXINT, (gint16) 10, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_api_account_role_instance_init (TubaAPIAccountRole * self,
                                     gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = tuba_api_account_role_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_id = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_name = _tmp1_;
	self->priv->_permissions = NULL;
	self->priv->_collection_limit = (gint16) 10;
}

static void
tuba_api_account_role_finalize (GObject * obj)
{
	TubaAPIAccountRole * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_API_TYPE_ACCOUNT_ROLE, TubaAPIAccountRole);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_permissions);
	G_OBJECT_CLASS (tuba_api_account_role_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_api_account_role_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAPIAccountRoleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_api_account_role_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAPIAccountRole), 0, (GInstanceInitFunc) tuba_api_account_role_instance_init, NULL };
	GType tuba_api_account_role_type_id;
	tuba_api_account_role_type_id = g_type_register_static (TUBA_TYPE_ENTITY, "TubaAPIAccountRole", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaAPIAccountRole_private_offset = g_type_add_instance_private (tuba_api_account_role_type_id, sizeof (TubaAPIAccountRolePrivate));
	return tuba_api_account_role_type_id;
}

GType
tuba_api_account_role_get_type (void)
{
	static GType tuba_api_account_role_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_account_role_type_id__once)) {
		GType tuba_api_account_role_type_id;
		tuba_api_account_role_type_id = tuba_api_account_role_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_account_role_type_id__once, tuba_api_account_role_type_id);
	}
	return tuba_api_account_role_type_id__once;
}

static void
_vala_tuba_api_account_role_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	TubaAPIAccountRole * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TYPE_ACCOUNT_ROLE, TubaAPIAccountRole);
	switch (property_id) {
		case TUBA_API_ACCOUNT_ROLE_ID_PROPERTY:
		g_value_set_string (value, tuba_api_account_role_get_id (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_NAME_PROPERTY:
		g_value_set_string (value, tuba_api_account_role_get_name (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PROPERTY:
		g_value_set_string (value, tuba_api_account_role_get_permissions (self));
		break;
		case TUBA_API_ACCOUNT_ROLE_COLLECTION_LIMIT_PROPERTY:
		g_value_set_int (value, tuba_api_account_role_get_collection_limit (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_api_account_role_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	TubaAPIAccountRole * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_TYPE_ACCOUNT_ROLE, TubaAPIAccountRole);
	switch (property_id) {
		case TUBA_API_ACCOUNT_ROLE_ID_PROPERTY:
		tuba_api_account_role_set_id (self, g_value_get_string (value));
		break;
		case TUBA_API_ACCOUNT_ROLE_NAME_PROPERTY:
		tuba_api_account_role_set_name (self, g_value_get_string (value));
		break;
		case TUBA_API_ACCOUNT_ROLE_PERMISSIONS_PROPERTY:
		tuba_api_account_role_set_permissions (self, g_value_get_string (value));
		break;
		case TUBA_API_ACCOUNT_ROLE_COLLECTION_LIMIT_PROPERTY:
		tuba_api_account_role_set_collection_limit (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

