/* IPBlock.c generated by valac 0.56.19, the Vala compiler
 * generated from IPBlock.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 <glib/gi18n-lib.h>
#include <adwaita.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_TYPE_BASIC_WIDGETIZABLE (tuba_basic_widgetizable_get_type ())
#define TUBA_BASIC_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_BASIC_WIDGETIZABLE, TubaBasicWidgetizable))
#define TUBA_IS_BASIC_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_BASIC_WIDGETIZABLE))
#define TUBA_BASIC_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_BASIC_WIDGETIZABLE, TubaBasicWidgetizableIface))

typedef struct _TubaBasicWidgetizable TubaBasicWidgetizable;
typedef struct _TubaBasicWidgetizableIface TubaBasicWidgetizableIface;

#define TUBA_API_ADMIN_TYPE_IP_BLOCK (tuba_api_admin_ip_block_get_type ())
#define TUBA_API_ADMIN_IP_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_ADMIN_TYPE_IP_BLOCK, TubaAPIAdminIPBlock))
#define TUBA_API_ADMIN_IP_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_ADMIN_TYPE_IP_BLOCK, TubaAPIAdminIPBlockClass))
#define TUBA_API_ADMIN_IS_IP_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_ADMIN_TYPE_IP_BLOCK))
#define TUBA_API_ADMIN_IS_IP_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_ADMIN_TYPE_IP_BLOCK))
#define TUBA_API_ADMIN_IP_BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_ADMIN_TYPE_IP_BLOCK, TubaAPIAdminIPBlockClass))

typedef struct _TubaAPIAdminIPBlock TubaAPIAdminIPBlock;
typedef struct _TubaAPIAdminIPBlockClass TubaAPIAdminIPBlockClass;
typedef struct _TubaAPIAdminIPBlockPrivate TubaAPIAdminIPBlockPrivate;
enum  {
	TUBA_API_ADMIN_IP_BLOCK_0_PROPERTY,
	TUBA_API_ADMIN_IP_BLOCK_ID_PROPERTY,
	TUBA_API_ADMIN_IP_BLOCK_IP_PROPERTY,
	TUBA_API_ADMIN_IP_BLOCK_SEVERITY_PROPERTY,
	TUBA_API_ADMIN_IP_BLOCK_COMMENT_PROPERTY,
	TUBA_API_ADMIN_IP_BLOCK_NUM_PROPERTIES
};
static GParamSpec* tuba_api_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_NUM_PROPERTIES];
typedef enum  {
	TUBA_API_ADMIN_IP_BLOCK_SEVERITY_NO_ACCESS,
	TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_BLOCK,
	TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_REQUIRES_APPROVAL
} TubaAPIAdminIPBlockSeverity;

#define TUBA_API_ADMIN_IP_BLOCK_TYPE_SEVERITY (tuba_api_admin_ip_block_severity_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_WIDGETS_ADMIN_TYPE_IP_BLOCK (tuba_widgets_admin_ip_block_get_type ())
#define TUBA_WIDGETS_ADMIN_IP_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_ADMIN_TYPE_IP_BLOCK, TubaWidgetsAdminIPBlock))
#define TUBA_WIDGETS_ADMIN_IP_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_ADMIN_TYPE_IP_BLOCK, TubaWidgetsAdminIPBlockClass))
#define TUBA_WIDGETS_ADMIN_IS_IP_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_ADMIN_TYPE_IP_BLOCK))
#define TUBA_WIDGETS_ADMIN_IS_IP_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_ADMIN_TYPE_IP_BLOCK))
#define TUBA_WIDGETS_ADMIN_IP_BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_ADMIN_TYPE_IP_BLOCK, TubaWidgetsAdminIPBlockClass))

typedef struct _TubaWidgetsAdminIPBlock TubaWidgetsAdminIPBlock;
typedef struct _TubaWidgetsAdminIPBlockClass TubaWidgetsAdminIPBlockClass;

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 _TubaBasicWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TubaBasicWidgetizable* self);
};

struct _TubaAPIAdminIPBlock {
	TubaEntity parent_instance;
	TubaAPIAdminIPBlockPrivate * priv;
};

struct _TubaAPIAdminIPBlockClass {
	TubaEntityClass parent_class;
};

struct _TubaAPIAdminIPBlockPrivate {
	gchar* _id;
	gchar* _ip;
	gchar* _severity;
	gchar* _comment;
};

static gint TubaAPIAdminIPBlock_private_offset;
static gpointer tuba_api_admin_ip_block_parent_class = NULL;
static TubaBasicWidgetizableIface * tuba_api_admin_ip_block_tuba_basic_widgetizable_parent_iface = NULL;

VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN GType tuba_basic_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaBasicWidgetizable, g_object_unref)
VALA_EXTERN GType tuba_api_admin_ip_block_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAdminIPBlock, g_object_unref)
VALA_EXTERN GType tuba_api_admin_ip_block_severity_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* tuba_api_admin_ip_block_severity_to_string (TubaAPIAdminIPBlockSeverity self);
VALA_EXTERN gchar* tuba_api_admin_ip_block_severity_to_title (TubaAPIAdminIPBlockSeverity self);
VALA_EXTERN gchar* tuba_api_admin_ip_block_severity_to_descritpion (TubaAPIAdminIPBlockSeverity self);
VALA_EXTERN TubaAPIAdminIPBlockSeverity tuba_api_admin_ip_block_severity_from_string (const gchar* severity);
VALA_EXTERN gchar* tuba_api_admin_ip_block_severity_to_api_string (TubaAPIAdminIPBlockSeverity self);
static GtkWidget* tuba_api_admin_ip_block_real_to_widget (TubaBasicWidgetizable* base);
VALA_EXTERN TubaWidgetsAdminIPBlock* tuba_widgets_admin_ip_block_new (TubaAPIAdminIPBlock* ip_block);
VALA_EXTERN TubaWidgetsAdminIPBlock* tuba_widgets_admin_ip_block_construct (GType object_type,
                                                                TubaAPIAdminIPBlock* ip_block);
VALA_EXTERN GType tuba_widgets_admin_ip_block_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAdminIPBlock, g_object_unref)
VALA_EXTERN TubaAPIAdminIPBlock* tuba_api_admin_ip_block_new (void);
VALA_EXTERN TubaAPIAdminIPBlock* tuba_api_admin_ip_block_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_admin_ip_block_get_id (TubaAPIAdminIPBlock* self);
VALA_EXTERN void tuba_api_admin_ip_block_set_id (TubaAPIAdminIPBlock* self,
                                     const gchar* value);
VALA_EXTERN const gchar* tuba_api_admin_ip_block_get_ip (TubaAPIAdminIPBlock* self);
VALA_EXTERN void tuba_api_admin_ip_block_set_ip (TubaAPIAdminIPBlock* self,
                                     const gchar* value);
VALA_EXTERN const gchar* tuba_api_admin_ip_block_get_severity (TubaAPIAdminIPBlock* self);
VALA_EXTERN void tuba_api_admin_ip_block_set_severity (TubaAPIAdminIPBlock* self,
                                           const gchar* value);
VALA_EXTERN const gchar* tuba_api_admin_ip_block_get_comment (TubaAPIAdminIPBlock* self);
VALA_EXTERN void tuba_api_admin_ip_block_set_comment (TubaAPIAdminIPBlock* self,
                                          const gchar* value);
VALA_EXTERN GtkWidget* tuba_basic_widgetizable_to_widget (TubaBasicWidgetizable* self);
static void tuba_api_admin_ip_block_finalize (GObject * obj);
static GType tuba_api_admin_ip_block_get_type_once (void);
static void _vala_tuba_api_admin_ip_block_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_tuba_api_admin_ip_block_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static inline gpointer
tuba_api_admin_ip_block_get_instance_private (TubaAPIAdminIPBlock* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAPIAdminIPBlock_private_offset);
}

gchar*
tuba_api_admin_ip_block_severity_to_string (TubaAPIAdminIPBlockSeverity self)
{
	gchar* result;
	switch (self) {
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_NO_ACCESS:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (_ ("Blocked"));
			result = _tmp0_;
			return result;
		}
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_BLOCK:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (_ ("Blocked Sign-ups"));
			result = _tmp1_;
			return result;
		}
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_REQUIRES_APPROVAL:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (_ ("Limited Sign-ups"));
			result = _tmp2_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

gchar*
tuba_api_admin_ip_block_severity_to_title (TubaAPIAdminIPBlockSeverity self)
{
	gchar* result;
	switch (self) {
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_NO_ACCESS:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (_ ("Block Access"));
			result = _tmp0_;
			return result;
		}
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_BLOCK:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (_ ("Block Sign-ups"));
			result = _tmp1_;
			return result;
		}
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_REQUIRES_APPROVAL:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (_ ("Limit Sign-ups"));
			result = _tmp2_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

gchar*
tuba_api_admin_ip_block_severity_to_descritpion (TubaAPIAdminIPBlockSeverity self)
{
	gchar* result;
	switch (self) {
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_NO_ACCESS:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (_ ("Block access to all resources"));
			result = _tmp0_;
			return result;
		}
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_BLOCK:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (_ ("New sign-ups will not be possible"));
			result = _tmp1_;
			return result;
		}
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_REQUIRES_APPROVAL:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (_ ("New sign-ups will require your approval"));
			result = _tmp2_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

TubaAPIAdminIPBlockSeverity
tuba_api_admin_ip_block_severity_from_string (const gchar* severity)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	TubaAPIAdminIPBlockSeverity result;
	g_return_val_if_fail (severity != NULL, 0);
	_tmp0_ = g_utf8_strdown (severity, (gssize) -1);
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	g_free (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("sign_up_block")))) {
		switch (0) {
			default:
			{
				result = TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_BLOCK;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("sign_up_requires_approval")))) {
		switch (0) {
			default:
			{
				result = TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_REQUIRES_APPROVAL;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = TUBA_API_ADMIN_IP_BLOCK_SEVERITY_NO_ACCESS;
				return result;
			}
		}
	}
}

gchar*
tuba_api_admin_ip_block_severity_to_api_string (TubaAPIAdminIPBlockSeverity self)
{
	gchar* result;
	switch (self) {
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_NO_ACCESS:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("no_access");
			result = _tmp0_;
			return result;
		}
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_BLOCK:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("sign_up_block");
			result = _tmp1_;
			return result;
		}
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_REQUIRES_APPROVAL:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("sign_up_requires_approval");
			result = _tmp2_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

 G_GNUC_NO_INLINE static GType
tuba_api_admin_ip_block_severity_get_type_once (void)
{
	static const GEnumValue values[] = {{TUBA_API_ADMIN_IP_BLOCK_SEVERITY_NO_ACCESS, "TUBA_API_ADMIN_IP_BLOCK_SEVERITY_NO_ACCESS", "no-access"}, {TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_BLOCK, "TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_BLOCK", "sign-up-block"}, {TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_REQUIRES_APPROVAL, "TUBA_API_ADMIN_IP_BLOCK_SEVERITY_SIGN_UP_REQUIRES_APPROVAL", "sign-up-requires-approval"}, {0, NULL, NULL}};
	GType tuba_api_admin_ip_block_severity_type_id;
	tuba_api_admin_ip_block_severity_type_id = g_enum_register_static ("TubaAPIAdminIPBlockSeverity", values);
	return tuba_api_admin_ip_block_severity_type_id;
}

GType
tuba_api_admin_ip_block_severity_get_type (void)
{
	static GType tuba_api_admin_ip_block_severity_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_admin_ip_block_severity_type_id__once)) {
		GType tuba_api_admin_ip_block_severity_type_id;
		tuba_api_admin_ip_block_severity_type_id = tuba_api_admin_ip_block_severity_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_admin_ip_block_severity_type_id__once, tuba_api_admin_ip_block_severity_type_id);
	}
	return tuba_api_admin_ip_block_severity_type_id__once;
}

static GtkWidget*
tuba_api_admin_ip_block_real_to_widget (TubaBasicWidgetizable* base)
{
	TubaAPIAdminIPBlock * self;
	TubaWidgetsAdminIPBlock* _tmp0_;
	GtkWidget* result;
	self = (TubaAPIAdminIPBlock*) base;
	_tmp0_ = tuba_widgets_admin_ip_block_new (self);
	g_object_ref_sink (_tmp0_);
	result = (GtkWidget*) _tmp0_;
	return result;
}

TubaAPIAdminIPBlock*
tuba_api_admin_ip_block_construct (GType object_type)
{
	TubaAPIAdminIPBlock * self = NULL;
	self = (TubaAPIAdminIPBlock*) tuba_entity_construct (object_type);
	return self;
}

TubaAPIAdminIPBlock*
tuba_api_admin_ip_block_new (void)
{
	return tuba_api_admin_ip_block_construct (TUBA_API_ADMIN_TYPE_IP_BLOCK);
}

const gchar*
tuba_api_admin_ip_block_get_id (TubaAPIAdminIPBlock* 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_admin_ip_block_set_id (TubaAPIAdminIPBlock* self,
                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_admin_ip_block_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_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_ID_PROPERTY]);
	}
}

const gchar*
tuba_api_admin_ip_block_get_ip (TubaAPIAdminIPBlock* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ip;
	result = _tmp0_;
	return result;
}

void
tuba_api_admin_ip_block_set_ip (TubaAPIAdminIPBlock* self,
                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_admin_ip_block_get_ip (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_ip);
		self->priv->_ip = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_IP_PROPERTY]);
	}
}

const gchar*
tuba_api_admin_ip_block_get_severity (TubaAPIAdminIPBlock* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_severity;
	result = _tmp0_;
	return result;
}

void
tuba_api_admin_ip_block_set_severity (TubaAPIAdminIPBlock* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_admin_ip_block_get_severity (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_severity);
		self->priv->_severity = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_SEVERITY_PROPERTY]);
	}
}

const gchar*
tuba_api_admin_ip_block_get_comment (TubaAPIAdminIPBlock* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_comment;
	result = _tmp0_;
	return result;
}

void
tuba_api_admin_ip_block_set_comment (TubaAPIAdminIPBlock* self,
                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_api_admin_ip_block_get_comment (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_comment);
		self->priv->_comment = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_api_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_COMMENT_PROPERTY]);
	}
}

static void
tuba_api_admin_ip_block_class_init (TubaAPIAdminIPBlockClass * klass,
                                    gpointer klass_data)
{
	tuba_api_admin_ip_block_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAPIAdminIPBlock_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_api_admin_ip_block_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_api_admin_ip_block_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_api_admin_ip_block_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ADMIN_IP_BLOCK_ID_PROPERTY, tuba_api_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_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_ADMIN_IP_BLOCK_IP_PROPERTY, tuba_api_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_IP_PROPERTY] = g_param_spec_string ("ip", "ip", "ip", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ADMIN_IP_BLOCK_SEVERITY_PROPERTY, tuba_api_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_SEVERITY_PROPERTY] = g_param_spec_string ("severity", "severity", "severity", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_API_ADMIN_IP_BLOCK_COMMENT_PROPERTY, tuba_api_admin_ip_block_properties[TUBA_API_ADMIN_IP_BLOCK_COMMENT_PROPERTY] = g_param_spec_string ("comment", "comment", "comment", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_api_admin_ip_block_tuba_basic_widgetizable_interface_init (TubaBasicWidgetizableIface * iface,
                                                                gpointer iface_data)
{
	tuba_api_admin_ip_block_tuba_basic_widgetizable_parent_iface = g_type_interface_peek_parent (iface);
	iface->to_widget = (GtkWidget* (*) (TubaBasicWidgetizable*)) tuba_api_admin_ip_block_real_to_widget;
}

static void
tuba_api_admin_ip_block_instance_init (TubaAPIAdminIPBlock * self,
                                       gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = tuba_api_admin_ip_block_get_instance_private (self);
	_tmp0_ = g_strdup ("no_access");
	self->priv->_severity = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_comment = _tmp1_;
}

static void
tuba_api_admin_ip_block_finalize (GObject * obj)
{
	TubaAPIAdminIPBlock * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_API_ADMIN_TYPE_IP_BLOCK, TubaAPIAdminIPBlock);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_ip);
	_g_free0 (self->priv->_severity);
	_g_free0 (self->priv->_comment);
	G_OBJECT_CLASS (tuba_api_admin_ip_block_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_api_admin_ip_block_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAPIAdminIPBlockClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_api_admin_ip_block_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAPIAdminIPBlock), 0, (GInstanceInitFunc) tuba_api_admin_ip_block_instance_init, NULL };
	static const GInterfaceInfo tuba_basic_widgetizable_info = { (GInterfaceInitFunc) tuba_api_admin_ip_block_tuba_basic_widgetizable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_api_admin_ip_block_type_id;
	tuba_api_admin_ip_block_type_id = g_type_register_static (TUBA_TYPE_ENTITY, "TubaAPIAdminIPBlock", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_add_interface_static (tuba_api_admin_ip_block_type_id, TUBA_TYPE_BASIC_WIDGETIZABLE, &tuba_basic_widgetizable_info);
	TubaAPIAdminIPBlock_private_offset = g_type_add_instance_private (tuba_api_admin_ip_block_type_id, sizeof (TubaAPIAdminIPBlockPrivate));
	return tuba_api_admin_ip_block_type_id;
}

GType
tuba_api_admin_ip_block_get_type (void)
{
	static GType tuba_api_admin_ip_block_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_api_admin_ip_block_type_id__once)) {
		GType tuba_api_admin_ip_block_type_id;
		tuba_api_admin_ip_block_type_id = tuba_api_admin_ip_block_get_type_once ();
		g_once_init_leave_pointer (&tuba_api_admin_ip_block_type_id__once, tuba_api_admin_ip_block_type_id);
	}
	return tuba_api_admin_ip_block_type_id__once;
}

static void
_vala_tuba_api_admin_ip_block_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	TubaAPIAdminIPBlock * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_ADMIN_TYPE_IP_BLOCK, TubaAPIAdminIPBlock);
	switch (property_id) {
		case TUBA_API_ADMIN_IP_BLOCK_ID_PROPERTY:
		g_value_set_string (value, tuba_api_admin_ip_block_get_id (self));
		break;
		case TUBA_API_ADMIN_IP_BLOCK_IP_PROPERTY:
		g_value_set_string (value, tuba_api_admin_ip_block_get_ip (self));
		break;
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_PROPERTY:
		g_value_set_string (value, tuba_api_admin_ip_block_get_severity (self));
		break;
		case TUBA_API_ADMIN_IP_BLOCK_COMMENT_PROPERTY:
		g_value_set_string (value, tuba_api_admin_ip_block_get_comment (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_api_admin_ip_block_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	TubaAPIAdminIPBlock * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_API_ADMIN_TYPE_IP_BLOCK, TubaAPIAdminIPBlock);
	switch (property_id) {
		case TUBA_API_ADMIN_IP_BLOCK_ID_PROPERTY:
		tuba_api_admin_ip_block_set_id (self, g_value_get_string (value));
		break;
		case TUBA_API_ADMIN_IP_BLOCK_IP_PROPERTY:
		tuba_api_admin_ip_block_set_ip (self, g_value_get_string (value));
		break;
		case TUBA_API_ADMIN_IP_BLOCK_SEVERITY_PROPERTY:
		tuba_api_admin_ip_block_set_severity (self, g_value_get_string (value));
		break;
		case TUBA_API_ADMIN_IP_BLOCK_COMMENT_PROPERTY:
		tuba_api_admin_ip_block_set_comment (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

