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

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <libsoup/soup.h>
#include <glib/gi18n-lib.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_DIALOGS_ADMIN_TYPE_BASE (tuba_dialogs_admin_base_get_type ())
#define TUBA_DIALOGS_ADMIN_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_ADMIN_TYPE_BASE, TubaDialogsAdminBase))
#define TUBA_DIALOGS_ADMIN_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_ADMIN_TYPE_BASE, TubaDialogsAdminBaseClass))
#define TUBA_DIALOGS_ADMIN_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_ADMIN_TYPE_BASE))
#define TUBA_DIALOGS_ADMIN_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_ADMIN_TYPE_BASE))
#define TUBA_DIALOGS_ADMIN_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_ADMIN_TYPE_BASE, TubaDialogsAdminBaseClass))

typedef struct _TubaDialogsAdminBase TubaDialogsAdminBase;
typedef struct _TubaDialogsAdminBaseClass TubaDialogsAdminBaseClass;
typedef struct _TubaDialogsAdminBasePrivate TubaDialogsAdminBasePrivate;

#define TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK (tuba_dialogs_admin_add_federation_block_get_type ())
#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK, TubaDialogsAdminAddFederationBlock))
#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK, TubaDialogsAdminAddFederationBlockClass))
#define TUBA_DIALOGS_ADMIN_IS_ADD_FEDERATION_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK))
#define TUBA_DIALOGS_ADMIN_IS_ADD_FEDERATION_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK))
#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK, TubaDialogsAdminAddFederationBlockClass))

typedef struct _TubaDialogsAdminAddFederationBlock TubaDialogsAdminAddFederationBlock;
typedef struct _TubaDialogsAdminAddFederationBlockClass TubaDialogsAdminAddFederationBlockClass;
typedef struct _TubaDialogsAdminAddFederationBlockPrivate TubaDialogsAdminAddFederationBlockPrivate;
enum  {
	TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_0_PROPERTY,
	TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_admin_add_federation_block_properties[TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT (tuba_dialogs_admin_add_federation_block_severity_object_get_type ())
#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObject))
#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObjectClass))
#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_IS_SEVERITY_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT))
#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_IS_SEVERITY_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT))
#define TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObjectClass))

typedef struct _TubaDialogsAdminAddFederationBlockSeverityObject TubaDialogsAdminAddFederationBlockSeverityObject;
typedef struct _TubaDialogsAdminAddFederationBlockSeverityObjectClass TubaDialogsAdminAddFederationBlockSeverityObjectClass;
typedef enum  {
	TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_NOOP,
	TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_SILENCE,
	TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_SUSPEND
} TubaAPIAdminDomainBlockSeverity;

#define TUBA_API_ADMIN_DOMAIN_BLOCK_TYPE_SEVERITY (tuba_api_admin_domain_block_severity_get_type ())

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

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

#define TUBA_REQUEST_V2_TYPE_METHOD (tuba_request_v2_method_get_type ())

#define TUBA_TYPE_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

#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;
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_TYPE_OOPSIE (tuba_oopsie_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaDialogsAdminAddFederationBlockOnSaveRealData TubaDialogsAdminAddFederationBlockOnSaveRealData;
typedef struct _TubaDialogsAdminAddFederationBlockSeverityObjectPrivate TubaDialogsAdminAddFederationBlockSeverityObjectPrivate;
enum  {
	TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_0_PROPERTY,
	TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_SEVERITY_PROPERTY,
	TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_admin_add_federation_block_severity_object_properties[TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_NUM_PROPERTIES];
enum  {
	TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_ADDED_SIGNAL,
	TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_NUM_SIGNALS
};
static guint tuba_dialogs_admin_add_federation_block_signals[TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_NUM_SIGNALS] = {0};

struct _TubaDialogsAdminBase {
	AdwDialog parent_instance;
	TubaDialogsAdminBasePrivate * priv;
};

struct _TubaDialogsAdminBaseClass {
	AdwDialogClass parent_class;
};

struct _TubaDialogsAdminAddFederationBlock {
	TubaDialogsAdminBase parent_instance;
	TubaDialogsAdminAddFederationBlockPrivate * priv;
};

struct _TubaDialogsAdminAddFederationBlockClass {
	TubaDialogsAdminBaseClass parent_class;
};

struct _TubaDialogsAdminAddFederationBlockPrivate {
	GtkButton* save_button;
	AdwEntryRow* domain_row;
	AdwComboRow* sev_row;
	GListStore* sev_model;
	GtkCheckButton* rule_obfuscate;
	GtkCheckButton* rule_reject_media;
	GtkCheckButton* rule_reject_reports;
	AdwActionRow* reject_media_row;
	AdwActionRow* reject_reports_row;
	AdwActionRow* obfuscate_row;
	AdwEntryRow* private_comment_row;
	AdwEntryRow* public_comment_row;
};

typedef enum  {
	TUBA_OOPSIE_USER,
	TUBA_OOPSIE_PARSING,
	TUBA_OOPSIE_INSTANCE,
	TUBA_OOPSIE_INTERNAL,
	TUBA_OOPSIE_HTTP_401 = 401,
	TUBA_OOPSIE_HTTP_403 = 403,
	TUBA_OOPSIE_HTTP_404 = 404,
	TUBA_OOPSIE_HTTP_410 = 410,
	TUBA_OOPSIE_HTTP_422 = 422,
	TUBA_OOPSIE_HTTP_429 = 429,
	TUBA_OOPSIE_HTTP_500 = 500,
	TUBA_OOPSIE_HTTP_503 = 503
} TubaOopsie;
#define TUBA_OOPSIE tuba_oopsie_quark ()

struct _TubaDialogsAdminAddFederationBlockOnSaveRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsAdminAddFederationBlock* self;
	TubaRequestV2* req;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaRequestV2* _tmp4_;
	TubaRequestV2* _tmp5_;
	AdwEntryRow* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	TubaRequestV2* _tmp9_;
	AdwComboRow* _tmp10_;
	GObject* _tmp11_;
	GObject* _tmp12_;
	TubaAPIAdminDomainBlockSeverity _tmp13_;
	TubaAPIAdminDomainBlockSeverity _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	TubaRequestV2* _tmp17_;
	AdwEntryRow* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	TubaRequestV2* _tmp21_;
	AdwEntryRow* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	TubaRequestV2* _tmp25_;
	GtkCheckButton* _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gboolean _tmp31_;
	AdwActionRow* _tmp32_;
	gboolean _tmp33_;
	gboolean _tmp34_;
	GtkCheckButton* _tmp35_;
	gboolean _tmp36_;
	gboolean _tmp37_;
	TubaRequestV2* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gboolean _tmp41_;
	AdwActionRow* _tmp42_;
	gboolean _tmp43_;
	gboolean _tmp44_;
	GtkCheckButton* _tmp45_;
	gboolean _tmp46_;
	gboolean _tmp47_;
	TubaRequestV2* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	TubaRequestV2* _tmp51_;
	GInputStream* _tmp52_;
	GInputStream* _tmp53_;
	GError* e;
	AdwEntryRow* _tmp54_;
	const gchar* _tmp55_;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	GError* _tmp58_;
	gchar* _tmp59_;
	gchar* _tmp60_;
	GError* _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	GError* _tmp66_;
	const gchar* _tmp67_;
	GError* _inner_error0_;
};

struct _TubaDialogsAdminAddFederationBlockSeverityObject {
	GObject parent_instance;
	TubaDialogsAdminAddFederationBlockSeverityObjectPrivate * priv;
};

struct _TubaDialogsAdminAddFederationBlockSeverityObjectClass {
	GObjectClass parent_class;
};

struct _TubaDialogsAdminAddFederationBlockSeverityObjectPrivate {
	TubaAPIAdminDomainBlockSeverity _severity;
};

static gint TubaDialogsAdminAddFederationBlock_private_offset;
static gpointer tuba_dialogs_admin_add_federation_block_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
static gint TubaDialogsAdminAddFederationBlockSeverityObject_private_offset;
static gpointer tuba_dialogs_admin_add_federation_block_severity_object_parent_class = NULL;

VALA_EXTERN GType tuba_dialogs_admin_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsAdminBase, g_object_unref)
VALA_EXTERN GType tuba_dialogs_admin_add_federation_block_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsAdminAddFederationBlock, g_object_unref)
static void tuba_dialogs_admin_add_federation_block_on_domain_changed (TubaDialogsAdminAddFederationBlock* self);
static void tuba_dialogs_admin_add_federation_block_on_sev_change (TubaDialogsAdminAddFederationBlock* self);
static GType tuba_dialogs_admin_add_federation_block_severity_object_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsAdminAddFederationBlockSeverityObject, g_object_unref)
VALA_EXTERN GType tuba_api_admin_domain_block_severity_get_type (void) G_GNUC_CONST ;
static TubaAPIAdminDomainBlockSeverity tuba_dialogs_admin_add_federation_block_severity_object_get_severity (TubaDialogsAdminAddFederationBlockSeverityObject* self);
static void tuba_dialogs_admin_add_federation_block_on_cancel (TubaDialogsAdminAddFederationBlock* self);
static void tuba_dialogs_admin_add_federation_block_on_save (TubaDialogsAdminAddFederationBlock* self);
static void tuba_dialogs_admin_add_federation_block_on_save_real (TubaDialogsAdminAddFederationBlock* self,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_);
static void tuba_dialogs_admin_add_federation_block_on_save_real_finish (TubaDialogsAdminAddFederationBlock* self,
                                                                  GAsyncResult* _res_);
static void tuba_dialogs_admin_add_federation_block_on_save_real_data_free (gpointer _data);
static gboolean tuba_dialogs_admin_add_federation_block_on_save_real_co (TubaDialogsAdminAddFederationBlockOnSaveRealData* _data_);
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
VALA_EXTERN GType tuba_request_v2_method_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
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 TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN TubaRequestV2* tuba_request_v2_new (const gchar* url,
                                    TubaRequestV2Method method);
VALA_EXTERN TubaRequestV2* tuba_request_v2_construct (GType object_type,
                                          const gchar* url,
                                          TubaRequestV2Method method);
VALA_EXTERN void tuba_request_v2_set_account (TubaRequestV2* self,
                                  TubaInstanceAccount* value);
VALA_EXTERN void tuba_request_v2_add_form_data (TubaRequestV2* self,
                                    const gchar* name,
                                    const gchar* val);
VALA_EXTERN gchar* tuba_api_admin_domain_block_severity_to_api_string (TubaAPIAdminDomainBlockSeverity self);
VALA_EXTERN void tuba_request_v2_exec (TubaRequestV2* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN GQuark tuba_oopsie_quark (void);
VALA_EXTERN GType tuba_oopsie_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GInputStream* tuba_request_v2_exec_finish (TubaRequestV2* self,
                                           GAsyncResult* _res_,
                                           SoupMessageHeaders** response_headers,
                                           GError** error);
static void tuba_dialogs_admin_add_federation_block_on_save_real_ready (GObject* source_object,
                                                                 GAsyncResult* _res_,
                                                                 gpointer _user_data_);
VALA_EXTERN void tuba_dialogs_admin_base_add_toast (TubaDialogsAdminBase* self,
                                        const gchar* content);
static void tuba_dialogs_admin_add_federation_block_sev_signal (TubaDialogsAdminAddFederationBlock* self,
                                                         GObject* item);
VALA_EXTERN gchar* tuba_api_admin_domain_block_severity_to_string (TubaAPIAdminDomainBlockSeverity self);
VALA_EXTERN TubaDialogsAdminAddFederationBlock* tuba_dialogs_admin_add_federation_block_new (void);
VALA_EXTERN TubaDialogsAdminAddFederationBlock* tuba_dialogs_admin_add_federation_block_construct (GType object_type);
VALA_EXTERN TubaDialogsAdminBase* tuba_dialogs_admin_base_new (void);
VALA_EXTERN TubaDialogsAdminBase* tuba_dialogs_admin_base_construct (GType object_type);
static TubaDialogsAdminAddFederationBlockSeverityObject* tuba_dialogs_admin_add_federation_block_severity_object_new (TubaAPIAdminDomainBlockSeverity sev);
static TubaDialogsAdminAddFederationBlockSeverityObject* tuba_dialogs_admin_add_federation_block_severity_object_construct (GType object_type,
                                                                                                                     TubaAPIAdminDomainBlockSeverity sev);
static void tuba_dialogs_admin_add_federation_block_severity_object_set_severity (TubaDialogsAdminAddFederationBlockSeverityObject* self,
                                                                           TubaAPIAdminDomainBlockSeverity value);
static void tuba_dialogs_admin_add_federation_block_severity_object_finalize (GObject * obj);
static GType tuba_dialogs_admin_add_federation_block_severity_object_get_type_once (void);
static void _vala_tuba_dialogs_admin_add_federation_block_severity_object_get_property (GObject * object,
                                                                                 guint property_id,
                                                                                 GValue * value,
                                                                                 GParamSpec * pspec);
static void _vala_tuba_dialogs_admin_add_federation_block_severity_object_set_property (GObject * object,
                                                                                 guint property_id,
                                                                                 const GValue * value,
                                                                                 GParamSpec * pspec);
static GObject * tuba_dialogs_admin_add_federation_block_constructor (GType type,
                                                               guint n_construct_properties,
                                                               GObjectConstructParam * construct_properties);
VALA_EXTERN AdwHeaderBar* tuba_dialogs_admin_base_get_headerbar (TubaDialogsAdminBase* self);
static void _tuba_dialogs_admin_add_federation_block_on_cancel_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _tuba_dialogs_admin_add_federation_block_on_save_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
static void _tuba_dialogs_admin_add_federation_block_on_domain_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                                      gpointer self);
static void _tuba_dialogs_admin_add_federation_block_sev_signal_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                            GObject* object,
                                                                                            gpointer self);
static void _tuba_dialogs_admin_add_federation_block_on_sev_change_g_object_notify (GObject* _sender,
                                                                             GParamSpec* pspec,
                                                                             gpointer self);
VALA_EXTERN AdwPreferencesPage* tuba_dialogs_admin_base_get_page (TubaDialogsAdminBase* self);
static void tuba_dialogs_admin_add_federation_block_finalize (GObject * obj);
static GType tuba_dialogs_admin_add_federation_block_get_type_once (void);
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_dialogs_admin_add_federation_block_get_instance_private (TubaDialogsAdminAddFederationBlock* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsAdminAddFederationBlock_private_offset);
}

static void
tuba_dialogs_admin_add_federation_block_on_domain_changed (TubaDialogsAdminAddFederationBlock* self)
{
	AdwEntryRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->domain_row;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > 0) {
		AdwEntryRow* _tmp5_;
		GtkButton* _tmp6_;
		_tmp5_ = self->priv->domain_row;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp5_, "error");
		_tmp6_ = self->priv->save_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, TRUE);
	} else {
		AdwEntryRow* _tmp7_;
		GtkButton* _tmp8_;
		_tmp7_ = self->priv->domain_row;
		gtk_widget_add_css_class ((GtkWidget*) _tmp7_, "error");
		_tmp8_ = self->priv->save_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, FALSE);
	}
}

static void
tuba_dialogs_admin_add_federation_block_on_sev_change (TubaDialogsAdminAddFederationBlock* self)
{
	gboolean is_suspend = FALSE;
	AdwComboRow* _tmp0_;
	GObject* _tmp1_;
	GObject* _tmp2_;
	TubaAPIAdminDomainBlockSeverity _tmp3_;
	TubaAPIAdminDomainBlockSeverity _tmp4_;
	AdwActionRow* _tmp5_;
	AdwActionRow* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->sev_row;
	_tmp1_ = adw_combo_row_get_selected_item (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_dialogs_admin_add_federation_block_severity_object_get_severity (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObject));
	_tmp4_ = _tmp3_;
	is_suspend = _tmp4_ == TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_SUSPEND;
	_tmp5_ = self->priv->reject_media_row;
	_tmp6_ = self->priv->reject_reports_row;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, !is_suspend);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, !is_suspend);
}

static void
tuba_dialogs_admin_add_federation_block_on_cancel (TubaDialogsAdminAddFederationBlock* self)
{
	g_return_if_fail (self != NULL);
	adw_dialog_force_close ((AdwDialog*) self);
}

static void
tuba_dialogs_admin_add_federation_block_on_save (TubaDialogsAdminAddFederationBlock* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->save_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, FALSE);
	tuba_dialogs_admin_add_federation_block_on_save_real (self, NULL, NULL);
}

static void
tuba_dialogs_admin_add_federation_block_on_save_real_data_free (gpointer _data)
{
	TubaDialogsAdminAddFederationBlockOnSaveRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaDialogsAdminAddFederationBlockOnSaveRealData, _data_);
}

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

static void
tuba_dialogs_admin_add_federation_block_on_save_real (TubaDialogsAdminAddFederationBlock* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_)
{
	TubaDialogsAdminAddFederationBlockOnSaveRealData* _data_;
	TubaDialogsAdminAddFederationBlock* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsAdminAddFederationBlockOnSaveRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_admin_add_federation_block_on_save_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_dialogs_admin_add_federation_block_on_save_real_co (_data_);
}

static void
tuba_dialogs_admin_add_federation_block_on_save_real_finish (TubaDialogsAdminAddFederationBlock* self,
                                                             GAsyncResult* _res_)
{
	TubaDialogsAdminAddFederationBlockOnSaveRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

static void
tuba_dialogs_admin_add_federation_block_on_save_real_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_)
{
	TubaDialogsAdminAddFederationBlockOnSaveRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_admin_add_federation_block_on_save_real_co (_data_);
}

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

static gboolean
tuba_dialogs_admin_add_federation_block_on_save_real_co (TubaDialogsAdminAddFederationBlockOnSaveRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = tuba_accounts;
	_data_->_tmp1_ = tuba_account_store_get_active (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = tuba_request_v2_new ("/api/v1/admin/domain_blocks", TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp4_, _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->req = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->req;
	_data_->_tmp6_ = _data_->self->priv->domain_row;
	_data_->_tmp7_ = gtk_editable_get_text ((GtkEditable*) _data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	tuba_request_v2_add_form_data (_data_->_tmp5_, "domain", _data_->_tmp8_);
	_data_->_tmp9_ = _data_->req;
	_data_->_tmp10_ = _data_->self->priv->sev_row;
	_data_->_tmp11_ = adw_combo_row_get_selected_item (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = tuba_dialogs_admin_add_federation_block_severity_object_get_severity (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp12_, TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObject));
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = tuba_api_admin_domain_block_severity_to_api_string (_data_->_tmp14_);
	_data_->_tmp16_ = _data_->_tmp15_;
	tuba_request_v2_add_form_data (_data_->_tmp9_, "severity", _data_->_tmp16_);
	_g_free0 (_data_->_tmp16_);
	_data_->_tmp17_ = _data_->req;
	_data_->_tmp18_ = _data_->self->priv->public_comment_row;
	_data_->_tmp19_ = gtk_editable_get_text ((GtkEditable*) _data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	tuba_request_v2_add_form_data (_data_->_tmp17_, "public_comment", _data_->_tmp20_);
	_data_->_tmp21_ = _data_->req;
	_data_->_tmp22_ = _data_->self->priv->private_comment_row;
	_data_->_tmp23_ = gtk_editable_get_text ((GtkEditable*) _data_->_tmp22_);
	_data_->_tmp24_ = _data_->_tmp23_;
	tuba_request_v2_add_form_data (_data_->_tmp21_, "private_comment", _data_->_tmp24_);
	_data_->_tmp25_ = _data_->req;
	_data_->_tmp26_ = _data_->self->priv->rule_obfuscate;
	_data_->_tmp27_ = gtk_check_button_get_active (_data_->_tmp26_);
	_data_->_tmp28_ = _data_->_tmp27_;
	_data_->_tmp29_ = bool_to_string (_data_->_tmp28_);
	_data_->_tmp30_ = _data_->_tmp29_;
	tuba_request_v2_add_form_data (_data_->_tmp25_, "obfuscate", _data_->_tmp30_);
	_g_free0 (_data_->_tmp30_);
	_data_->_tmp32_ = _data_->self->priv->reject_media_row;
	_data_->_tmp33_ = gtk_widget_get_sensitive ((GtkWidget*) _data_->_tmp32_);
	_data_->_tmp34_ = _data_->_tmp33_;
	if (_data_->_tmp34_) {
		_data_->_tmp35_ = _data_->self->priv->rule_reject_media;
		_data_->_tmp36_ = gtk_check_button_get_active (_data_->_tmp35_);
		_data_->_tmp37_ = _data_->_tmp36_;
		_data_->_tmp31_ = _data_->_tmp37_;
	} else {
		_data_->_tmp31_ = FALSE;
	}
	_data_->_tmp38_ = _data_->req;
	_data_->_tmp39_ = bool_to_string (_data_->_tmp31_);
	_data_->_tmp40_ = _data_->_tmp39_;
	tuba_request_v2_add_form_data (_data_->_tmp38_, "reject_media", _data_->_tmp40_);
	_g_free0 (_data_->_tmp40_);
	_data_->_tmp42_ = _data_->self->priv->reject_reports_row;
	_data_->_tmp43_ = gtk_widget_get_sensitive ((GtkWidget*) _data_->_tmp42_);
	_data_->_tmp44_ = _data_->_tmp43_;
	if (_data_->_tmp44_) {
		_data_->_tmp45_ = _data_->self->priv->rule_reject_reports;
		_data_->_tmp46_ = gtk_check_button_get_active (_data_->_tmp45_);
		_data_->_tmp47_ = _data_->_tmp46_;
		_data_->_tmp41_ = _data_->_tmp47_;
	} else {
		_data_->_tmp41_ = FALSE;
	}
	_data_->_tmp48_ = _data_->req;
	_data_->_tmp49_ = bool_to_string (_data_->_tmp41_);
	_data_->_tmp50_ = _data_->_tmp49_;
	tuba_request_v2_add_form_data (_data_->_tmp48_, "reject_reports", _data_->_tmp50_);
	_g_free0 (_data_->_tmp50_);
	{
		_data_->_tmp51_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp51_, tuba_dialogs_admin_add_federation_block_on_save_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp52_ = tuba_request_v2_exec_finish (_data_->_tmp51_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp53_ = _data_->_tmp52_;
		_g_object_unref0 (_data_->_tmp53_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		tuba_dialogs_admin_add_federation_block_on_domain_changed (_data_->self);
		g_signal_emit (_data_->self, tuba_dialogs_admin_add_federation_block_signals[TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_ADDED_SIGNAL], 0);
		tuba_dialogs_admin_add_federation_block_on_cancel (_data_->self);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp54_ = _data_->self->priv->domain_row;
		_data_->_tmp55_ = gtk_editable_get_text ((GtkEditable*) _data_->_tmp54_);
		_data_->_tmp56_ = _data_->_tmp55_;
		_data_->_tmp57_ = string_to_string (_data_->_tmp56_);
		_data_->_tmp58_ = _data_->e;
		_data_->_tmp59_ = g_strdup_printf ("%i", _data_->_tmp58_->code);
		_data_->_tmp60_ = _data_->_tmp59_;
		_data_->_tmp61_ = _data_->e;
		_data_->_tmp62_ = _data_->_tmp61_->message;
		_data_->_tmp63_ = string_to_string (_data_->_tmp62_);
		_data_->_tmp64_ = g_strconcat ("Couldn't create federation block ", _data_->_tmp57_, ": ", _data_->_tmp60_, " ", _data_->_tmp63_, NULL);
		_data_->_tmp65_ = _data_->_tmp64_;
		g_warning ("AddFederationBlock.vala:190: %s", _data_->_tmp65_);
		_g_free0 (_data_->_tmp65_);
		_g_free0 (_data_->_tmp60_);
		_data_->_tmp66_ = _data_->e;
		_data_->_tmp67_ = _data_->_tmp66_->message;
		tuba_dialogs_admin_base_add_toast ((TubaDialogsAdminBase*) _data_->self, _data_->_tmp67_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_dialogs_admin_add_federation_block_sev_signal (TubaDialogsAdminAddFederationBlock* self,
                                                    GObject* item)
{
	GObject* _tmp0_;
	GObject* _tmp1_;
	TubaAPIAdminDomainBlockSeverity _tmp2_;
	TubaAPIAdminDomainBlockSeverity _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = gtk_list_item_get_item (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem));
	_tmp1_ = _tmp0_;
	_tmp2_ = tuba_dialogs_admin_add_federation_block_severity_object_get_severity (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObject));
	_tmp3_ = _tmp2_;
	_tmp4_ = tuba_api_admin_domain_block_severity_to_string (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = (GtkLabel*) gtk_label_new (_tmp5_);
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	gtk_list_item_set_child (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem), (GtkWidget*) _tmp7_);
	_g_object_unref0 (_tmp7_);
	_g_free0 (_tmp5_);
}

TubaDialogsAdminAddFederationBlock*
tuba_dialogs_admin_add_federation_block_construct (GType object_type)
{
	TubaDialogsAdminAddFederationBlock * self = NULL;
	self = (TubaDialogsAdminAddFederationBlock*) tuba_dialogs_admin_base_construct (object_type);
	return self;
}

TubaDialogsAdminAddFederationBlock*
tuba_dialogs_admin_add_federation_block_new (void)
{
	return tuba_dialogs_admin_add_federation_block_construct (TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK);
}

static inline gpointer
tuba_dialogs_admin_add_federation_block_severity_object_get_instance_private (TubaDialogsAdminAddFederationBlockSeverityObject* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsAdminAddFederationBlockSeverityObject_private_offset);
}

static TubaDialogsAdminAddFederationBlockSeverityObject*
tuba_dialogs_admin_add_federation_block_severity_object_construct (GType object_type,
                                                                   TubaAPIAdminDomainBlockSeverity sev)
{
	TubaDialogsAdminAddFederationBlockSeverityObject * self = NULL;
	self = (TubaDialogsAdminAddFederationBlockSeverityObject*) g_object_new (object_type, NULL);
	tuba_dialogs_admin_add_federation_block_severity_object_set_severity (self, sev);
	return self;
}

static TubaDialogsAdminAddFederationBlockSeverityObject*
tuba_dialogs_admin_add_federation_block_severity_object_new (TubaAPIAdminDomainBlockSeverity sev)
{
	return tuba_dialogs_admin_add_federation_block_severity_object_construct (TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, sev);
}

static TubaAPIAdminDomainBlockSeverity
tuba_dialogs_admin_add_federation_block_severity_object_get_severity (TubaDialogsAdminAddFederationBlockSeverityObject* self)
{
	TubaAPIAdminDomainBlockSeverity result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_severity;
	return result;
}

static void
tuba_dialogs_admin_add_federation_block_severity_object_set_severity (TubaDialogsAdminAddFederationBlockSeverityObject* self,
                                                                      TubaAPIAdminDomainBlockSeverity value)
{
	TubaAPIAdminDomainBlockSeverity old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_admin_add_federation_block_severity_object_get_severity (self);
	if (old_value != value) {
		self->priv->_severity = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_admin_add_federation_block_severity_object_properties[TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_SEVERITY_PROPERTY]);
	}
}

static void
tuba_dialogs_admin_add_federation_block_severity_object_class_init (TubaDialogsAdminAddFederationBlockSeverityObjectClass * klass,
                                                                    gpointer klass_data)
{
	tuba_dialogs_admin_add_federation_block_severity_object_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsAdminAddFederationBlockSeverityObject_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_admin_add_federation_block_severity_object_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_admin_add_federation_block_severity_object_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_admin_add_federation_block_severity_object_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_SEVERITY_PROPERTY, tuba_dialogs_admin_add_federation_block_severity_object_properties[TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_SEVERITY_PROPERTY] = g_param_spec_enum ("severity", "severity", "severity", TUBA_API_ADMIN_DOMAIN_BLOCK_TYPE_SEVERITY, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_dialogs_admin_add_federation_block_severity_object_instance_init (TubaDialogsAdminAddFederationBlockSeverityObject * self,
                                                                       gpointer klass)
{
	self->priv = tuba_dialogs_admin_add_federation_block_severity_object_get_instance_private (self);
}

static void
tuba_dialogs_admin_add_federation_block_severity_object_finalize (GObject * obj)
{
	TubaDialogsAdminAddFederationBlockSeverityObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObject);
	G_OBJECT_CLASS (tuba_dialogs_admin_add_federation_block_severity_object_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_admin_add_federation_block_severity_object_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsAdminAddFederationBlockSeverityObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_admin_add_federation_block_severity_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsAdminAddFederationBlockSeverityObject), 0, (GInstanceInitFunc) tuba_dialogs_admin_add_federation_block_severity_object_instance_init, NULL };
	GType tuba_dialogs_admin_add_federation_block_severity_object_type_id;
	tuba_dialogs_admin_add_federation_block_severity_object_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaDialogsAdminAddFederationBlockSeverityObject", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsAdminAddFederationBlockSeverityObject_private_offset = g_type_add_instance_private (tuba_dialogs_admin_add_federation_block_severity_object_type_id, sizeof (TubaDialogsAdminAddFederationBlockSeverityObjectPrivate));
	return tuba_dialogs_admin_add_federation_block_severity_object_type_id;
}

static GType
tuba_dialogs_admin_add_federation_block_severity_object_get_type (void)
{
	static GType tuba_dialogs_admin_add_federation_block_severity_object_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_admin_add_federation_block_severity_object_type_id__once)) {
		GType tuba_dialogs_admin_add_federation_block_severity_object_type_id;
		tuba_dialogs_admin_add_federation_block_severity_object_type_id = tuba_dialogs_admin_add_federation_block_severity_object_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_admin_add_federation_block_severity_object_type_id__once, tuba_dialogs_admin_add_federation_block_severity_object_type_id);
	}
	return tuba_dialogs_admin_add_federation_block_severity_object_type_id__once;
}

static void
_vala_tuba_dialogs_admin_add_federation_block_severity_object_get_property (GObject * object,
                                                                            guint property_id,
                                                                            GValue * value,
                                                                            GParamSpec * pspec)
{
	TubaDialogsAdminAddFederationBlockSeverityObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObject);
	switch (property_id) {
		case TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_SEVERITY_PROPERTY:
		g_value_set_enum (value, tuba_dialogs_admin_add_federation_block_severity_object_get_severity (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_admin_add_federation_block_severity_object_set_property (GObject * object,
                                                                            guint property_id,
                                                                            const GValue * value,
                                                                            GParamSpec * pspec)
{
	TubaDialogsAdminAddFederationBlockSeverityObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT, TubaDialogsAdminAddFederationBlockSeverityObject);
	switch (property_id) {
		case TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_SEVERITY_OBJECT_SEVERITY_PROPERTY:
		tuba_dialogs_admin_add_federation_block_severity_object_set_severity (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_tuba_dialogs_admin_add_federation_block_on_cancel_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	tuba_dialogs_admin_add_federation_block_on_cancel ((TubaDialogsAdminAddFederationBlock*) self);
}

static void
_tuba_dialogs_admin_add_federation_block_on_save_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	tuba_dialogs_admin_add_federation_block_on_save ((TubaDialogsAdminAddFederationBlock*) self);
}

static void
_tuba_dialogs_admin_add_federation_block_on_domain_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                                 gpointer self)
{
	tuba_dialogs_admin_add_federation_block_on_domain_changed ((TubaDialogsAdminAddFederationBlock*) self);
}

static void
_tuba_dialogs_admin_add_federation_block_sev_signal_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                       GObject* object,
                                                                                       gpointer self)
{
	tuba_dialogs_admin_add_federation_block_sev_signal ((TubaDialogsAdminAddFederationBlock*) self, object);
}

static void
_tuba_dialogs_admin_add_federation_block_on_sev_change_g_object_notify (GObject* _sender,
                                                                        GParamSpec* pspec,
                                                                        gpointer self)
{
	tuba_dialogs_admin_add_federation_block_on_sev_change ((TubaDialogsAdminAddFederationBlock*) self);
}

static GObject *
tuba_dialogs_admin_add_federation_block_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsAdminAddFederationBlock * self;
	AdwHeaderBar* _tmp0_;
	AdwHeaderBar* _tmp1_;
	AdwHeaderBar* _tmp2_;
	AdwHeaderBar* _tmp3_;
	GtkButton* cancel_button = NULL;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	GtkButton* _tmp8_ = NULL;
	GtkButton* _tmp9_;
	AdwHeaderBar* _tmp10_;
	AdwHeaderBar* _tmp11_;
	GtkButton* _tmp12_;
	AdwHeaderBar* _tmp13_;
	AdwHeaderBar* _tmp14_;
	GtkButton* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar** _tmp18_;
	AdwEntryRow* _tmp19_ = NULL;
	AdwEntryRow* _tmp20_;
	GtkSignalListItemFactory* signallistitemfactory = NULL;
	GtkSignalListItemFactory* _tmp21_;
	GtkSignalListItemFactory* _tmp22_;
	GListStore* _tmp23_;
	GListStore* _tmp24_;
	TubaDialogsAdminAddFederationBlockSeverityObject* _tmp25_;
	TubaDialogsAdminAddFederationBlockSeverityObject* _tmp26_;
	TubaDialogsAdminAddFederationBlockSeverityObject* _tmp27_;
	GObject** _tmp28_;
	GObject** _tmp29_;
	gint _tmp29__length1;
	gchar* _tmp30_;
	GListStore* _tmp31_;
	GListModel* _tmp32_;
	GtkSignalListItemFactory* _tmp33_;
	GtkListItemFactory* _tmp34_;
	AdwComboRow* _tmp35_ = NULL;
	AdwComboRow* _tmp36_;
	gchar* _tmp37_;
	gchar** _tmp38_;
	GtkCheckButton* _tmp39_ = NULL;
	gchar* _tmp40_;
	gchar** _tmp41_;
	GtkCheckButton* _tmp42_ = NULL;
	gchar* _tmp43_;
	gchar** _tmp44_;
	GtkCheckButton* _tmp45_ = NULL;
	gchar* _tmp46_;
	gchar* _tmp47_;
	GtkCheckButton* _tmp48_;
	GtkWidget* _tmp49_;
	AdwActionRow* _tmp50_ = NULL;
	AdwActionRow* _tmp51_;
	GtkCheckButton* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	GtkCheckButton* _tmp55_;
	GtkWidget* _tmp56_;
	AdwActionRow* _tmp57_ = NULL;
	AdwActionRow* _tmp58_;
	GtkCheckButton* _tmp59_;
	gchar* _tmp60_;
	gchar* _tmp61_;
	GtkCheckButton* _tmp62_;
	GtkWidget* _tmp63_;
	AdwActionRow* _tmp64_ = NULL;
	AdwActionRow* _tmp65_;
	GtkCheckButton* _tmp66_;
	gchar* _tmp67_;
	AdwEntryRow* _tmp68_ = NULL;
	gchar* _tmp69_;
	AdwEntryRow* _tmp70_ = NULL;
	AdwPreferencesGroup* main_group = NULL;
	AdwPreferencesGroup* _tmp71_;
	AdwPreferencesGroup* _tmp72_;
	AdwEntryRow* _tmp73_;
	AdwPreferencesGroup* _tmp74_;
	AdwComboRow* _tmp75_;
	AdwPreferencesGroup* _tmp76_;
	AdwActionRow* _tmp77_;
	AdwPreferencesGroup* _tmp78_;
	AdwActionRow* _tmp79_;
	AdwPreferencesGroup* _tmp80_;
	AdwActionRow* _tmp81_;
	AdwPreferencesGroup* _tmp82_;
	AdwEntryRow* _tmp83_;
	AdwPreferencesGroup* _tmp84_;
	AdwEntryRow* _tmp85_;
	AdwPreferencesPage* _tmp86_;
	AdwPreferencesPage* _tmp87_;
	AdwPreferencesGroup* _tmp88_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_admin_add_federation_block_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK, TubaDialogsAdminAddFederationBlock);
	adw_dialog_set_title ((AdwDialog*) self, _ ("Add Federation Block"));
	adw_dialog_set_content_width ((AdwDialog*) self, 460);
	adw_dialog_set_content_height ((AdwDialog*) self, 510);
	adw_dialog_set_can_close ((AdwDialog*) self, FALSE);
	_tmp0_ = tuba_dialogs_admin_base_get_headerbar ((TubaDialogsAdminBase*) self);
	_tmp1_ = _tmp0_;
	adw_header_bar_set_show_end_title_buttons (_tmp1_, FALSE);
	_tmp2_ = tuba_dialogs_admin_base_get_headerbar ((TubaDialogsAdminBase*) self);
	_tmp3_ = _tmp2_;
	adw_header_bar_set_show_start_title_buttons (_tmp3_, FALSE);
	_tmp4_ = (GtkButton*) gtk_button_new_with_label (_ ("Cancel"));
	g_object_ref_sink (_tmp4_);
	cancel_button = _tmp4_;
	_tmp5_ = cancel_button;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) _tuba_dialogs_admin_add_federation_block_on_cancel_gtk_button_clicked, self, 0);
	_tmp6_ = g_strdup ("suggested-action");
	_tmp7_ = g_new0 (gchar*, 1 + 1);
	_tmp7_[0] = _tmp6_;
	_tmp8_ = (GtkButton*) gtk_button_new_with_label (_ ("Add"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp8_, _tmp7_);
	_tmp7_ = (_vala_array_free (_tmp7_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, FALSE);
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->save_button);
	self->priv->save_button = _tmp8_;
	_tmp9_ = self->priv->save_button;
	g_signal_connect_object (_tmp9_, "clicked", (GCallback) _tuba_dialogs_admin_add_federation_block_on_save_gtk_button_clicked, self, 0);
	_tmp10_ = tuba_dialogs_admin_base_get_headerbar ((TubaDialogsAdminBase*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = cancel_button;
	adw_header_bar_pack_start (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = tuba_dialogs_admin_base_get_headerbar ((TubaDialogsAdminBase*) self);
	_tmp14_ = _tmp13_;
	_tmp15_ = self->priv->save_button;
	adw_header_bar_pack_end (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = g_strdup (_ ("Domain"));
	_tmp17_ = g_strdup ("error");
	_tmp18_ = g_new0 (gchar*, 1 + 1);
	_tmp18_[0] = _tmp17_;
	_tmp19_ = (AdwEntryRow*) adw_entry_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp19_, _tmp16_);
	_g_free0 (_tmp16_);
	adw_entry_row_set_input_hints (_tmp19_, GTK_INPUT_HINT_NO_EMOJI | GTK_INPUT_HINT_NO_SPELLCHECK);
	adw_entry_row_set_show_apply_button (_tmp19_, FALSE);
	adw_entry_row_set_input_purpose (_tmp19_, GTK_INPUT_PURPOSE_FREE_FORM);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp19_, _tmp18_);
	_tmp18_ = (_vala_array_free (_tmp18_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->priv->domain_row);
	self->priv->domain_row = _tmp19_;
	_tmp20_ = self->priv->domain_row;
	g_signal_connect_object ((GtkEditable*) _tmp20_, "changed", (GCallback) _tuba_dialogs_admin_add_federation_block_on_domain_changed_gtk_editable_changed, self, 0);
	_tmp21_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	signallistitemfactory = _tmp21_;
	_tmp22_ = signallistitemfactory;
	g_signal_connect_object (_tmp22_, "bind", (GCallback) _tuba_dialogs_admin_add_federation_block_sev_signal_gtk_signal_list_item_factory_bind, self, 0);
	_tmp23_ = g_list_store_new (TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_TYPE_SEVERITY_OBJECT);
	_g_object_unref0 (self->priv->sev_model);
	self->priv->sev_model = _tmp23_;
	_tmp24_ = self->priv->sev_model;
	_tmp25_ = tuba_dialogs_admin_add_federation_block_severity_object_new (TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_SILENCE);
	_tmp26_ = tuba_dialogs_admin_add_federation_block_severity_object_new (TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_SUSPEND);
	_tmp27_ = tuba_dialogs_admin_add_federation_block_severity_object_new (TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_NOOP);
	_tmp28_ = g_new0 (GObject*, 3 + 1);
	_tmp28_[0] = (GObject*) _tmp25_;
	_tmp28_[1] = (GObject*) _tmp26_;
	_tmp28_[2] = (GObject*) _tmp27_;
	_tmp29_ = _tmp28_;
	_tmp29__length1 = 3;
	g_list_store_splice (_tmp24_, (guint) 0, (guint) 0, _tmp29_, (guint) 3);
	_tmp29_ = (_vala_array_free (_tmp29_, _tmp29__length1, (GDestroyNotify) g_object_unref), NULL);
	_tmp30_ = g_strdup (_ ("Severity"));
	_tmp31_ = self->priv->sev_model;
	_tmp32_ = _g_object_ref0 ((GListModel*) _tmp31_);
	_tmp33_ = signallistitemfactory;
	_tmp34_ = _g_object_ref0 ((GtkListItemFactory*) _tmp33_);
	_tmp35_ = (AdwComboRow*) adw_combo_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp35_, _tmp30_);
	_g_free0 (_tmp30_);
	adw_combo_row_set_model (_tmp35_, _tmp32_);
	_g_object_unref0 (_tmp32_);
	adw_combo_row_set_factory (_tmp35_, _tmp34_);
	_g_object_unref0 (_tmp34_);
	g_object_ref_sink (_tmp35_);
	_g_object_unref0 (self->priv->sev_row);
	self->priv->sev_row = _tmp35_;
	_tmp36_ = self->priv->sev_row;
	g_signal_connect_object ((GObject*) _tmp36_, "notify::selected", (GCallback) _tuba_dialogs_admin_add_federation_block_on_sev_change_g_object_notify, self, 0);
	_tmp37_ = g_strdup ("selection-mode");
	_tmp38_ = g_new0 (gchar*, 1 + 1);
	_tmp38_[0] = _tmp37_;
	_tmp39_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_check_button_set_active (_tmp39_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp39_, _tmp38_);
	_tmp38_ = (_vala_array_free (_tmp38_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp39_);
	_g_object_unref0 (self->priv->rule_reject_media);
	self->priv->rule_reject_media = _tmp39_;
	_tmp40_ = g_strdup ("selection-mode");
	_tmp41_ = g_new0 (gchar*, 1 + 1);
	_tmp41_[0] = _tmp40_;
	_tmp42_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp42_, _tmp41_);
	_tmp41_ = (_vala_array_free (_tmp41_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp42_);
	_g_object_unref0 (self->priv->rule_reject_reports);
	self->priv->rule_reject_reports = _tmp42_;
	_tmp43_ = g_strdup ("selection-mode");
	_tmp44_ = g_new0 (gchar*, 1 + 1);
	_tmp44_[0] = _tmp43_;
	_tmp45_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp45_, _tmp44_);
	_tmp44_ = (_vala_array_free (_tmp44_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp45_);
	_g_object_unref0 (self->priv->rule_obfuscate);
	self->priv->rule_obfuscate = _tmp45_;
	_tmp46_ = g_strdup (_ ("Reject Media Files"));
	_tmp47_ = g_strdup (_ ("Removes locally stored media files and refuses to download any in the " \
"future"));
	_tmp48_ = self->priv->rule_reject_media;
	_tmp49_ = _g_object_ref0 ((GtkWidget*) _tmp48_);
	_tmp50_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp50_, _tmp46_);
	_g_free0 (_tmp46_);
	adw_action_row_set_subtitle (_tmp50_, _tmp47_);
	_g_free0 (_tmp47_);
	adw_action_row_set_activatable_widget (_tmp50_, _tmp49_);
	_g_object_unref0 (_tmp49_);
	g_object_ref_sink (_tmp50_);
	_g_object_unref0 (self->priv->reject_media_row);
	self->priv->reject_media_row = _tmp50_;
	_tmp51_ = self->priv->reject_media_row;
	_tmp52_ = self->priv->rule_reject_media;
	adw_action_row_add_prefix (_tmp51_, (GtkWidget*) _tmp52_);
	_tmp53_ = g_strdup (_ ("Reject Reports"));
	_tmp54_ = g_strdup (_ ("Ignore all reports coming from this domain"));
	_tmp55_ = self->priv->rule_reject_reports;
	_tmp56_ = _g_object_ref0 ((GtkWidget*) _tmp55_);
	_tmp57_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp57_, _tmp53_);
	_g_free0 (_tmp53_);
	adw_action_row_set_subtitle (_tmp57_, _tmp54_);
	_g_free0 (_tmp54_);
	adw_action_row_set_activatable_widget (_tmp57_, _tmp56_);
	_g_object_unref0 (_tmp56_);
	g_object_ref_sink (_tmp57_);
	_g_object_unref0 (self->priv->reject_reports_row);
	self->priv->reject_reports_row = _tmp57_;
	_tmp58_ = self->priv->reject_reports_row;
	_tmp59_ = self->priv->rule_reject_reports;
	adw_action_row_add_prefix (_tmp58_, (GtkWidget*) _tmp59_);
	_tmp60_ = g_strdup (_ ("Obfuscate Domain Name"));
	_tmp61_ = g_strdup (_ ("Partially obfuscate the domain name in the list if advertising the lis" \
"t of domain limitations is enabled"));
	_tmp62_ = self->priv->rule_obfuscate;
	_tmp63_ = _g_object_ref0 ((GtkWidget*) _tmp62_);
	_tmp64_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp64_, _tmp60_);
	_g_free0 (_tmp60_);
	adw_action_row_set_subtitle (_tmp64_, _tmp61_);
	_g_free0 (_tmp61_);
	adw_action_row_set_activatable_widget (_tmp64_, _tmp63_);
	_g_object_unref0 (_tmp63_);
	g_object_ref_sink (_tmp64_);
	_g_object_unref0 (self->priv->obfuscate_row);
	self->priv->obfuscate_row = _tmp64_;
	_tmp65_ = self->priv->obfuscate_row;
	_tmp66_ = self->priv->rule_obfuscate;
	adw_action_row_add_prefix (_tmp65_, (GtkWidget*) _tmp66_);
	_tmp67_ = g_strdup (_ ("Private Comment"));
	_tmp68_ = (AdwEntryRow*) adw_entry_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp68_, _tmp67_);
	_g_free0 (_tmp67_);
	adw_entry_row_set_input_purpose (_tmp68_, GTK_INPUT_PURPOSE_FREE_FORM);
	adw_entry_row_set_show_apply_button (_tmp68_, FALSE);
	g_object_ref_sink (_tmp68_);
	_g_object_unref0 (self->priv->private_comment_row);
	self->priv->private_comment_row = _tmp68_;
	_tmp69_ = g_strdup (_ ("Public Comment"));
	_tmp70_ = (AdwEntryRow*) adw_entry_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp70_, _tmp69_);
	_g_free0 (_tmp69_);
	adw_entry_row_set_input_purpose (_tmp70_, GTK_INPUT_PURPOSE_FREE_FORM);
	adw_entry_row_set_show_apply_button (_tmp70_, FALSE);
	g_object_ref_sink (_tmp70_);
	_g_object_unref0 (self->priv->public_comment_row);
	self->priv->public_comment_row = _tmp70_;
	_tmp71_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	g_object_ref_sink (_tmp71_);
	main_group = _tmp71_;
	_tmp72_ = main_group;
	_tmp73_ = self->priv->domain_row;
	adw_preferences_group_add (_tmp72_, (GtkWidget*) _tmp73_);
	_tmp74_ = main_group;
	_tmp75_ = self->priv->sev_row;
	adw_preferences_group_add (_tmp74_, (GtkWidget*) _tmp75_);
	_tmp76_ = main_group;
	_tmp77_ = self->priv->reject_media_row;
	adw_preferences_group_add (_tmp76_, (GtkWidget*) _tmp77_);
	_tmp78_ = main_group;
	_tmp79_ = self->priv->reject_reports_row;
	adw_preferences_group_add (_tmp78_, (GtkWidget*) _tmp79_);
	_tmp80_ = main_group;
	_tmp81_ = self->priv->obfuscate_row;
	adw_preferences_group_add (_tmp80_, (GtkWidget*) _tmp81_);
	_tmp82_ = main_group;
	_tmp83_ = self->priv->private_comment_row;
	adw_preferences_group_add (_tmp82_, (GtkWidget*) _tmp83_);
	_tmp84_ = main_group;
	_tmp85_ = self->priv->public_comment_row;
	adw_preferences_group_add (_tmp84_, (GtkWidget*) _tmp85_);
	_tmp86_ = tuba_dialogs_admin_base_get_page ((TubaDialogsAdminBase*) self);
	_tmp87_ = _tmp86_;
	_tmp88_ = main_group;
	adw_preferences_page_add (_tmp87_, _tmp88_);
	tuba_dialogs_admin_add_federation_block_on_sev_change (self);
	_g_object_unref0 (main_group);
	_g_object_unref0 (signallistitemfactory);
	_g_object_unref0 (cancel_button);
	return obj;
}

static void
tuba_dialogs_admin_add_federation_block_class_init (TubaDialogsAdminAddFederationBlockClass * klass,
                                                    gpointer klass_data)
{
	tuba_dialogs_admin_add_federation_block_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsAdminAddFederationBlock_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_admin_add_federation_block_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_admin_add_federation_block_finalize;
	tuba_dialogs_admin_add_federation_block_signals[TUBA_DIALOGS_ADMIN_ADD_FEDERATION_BLOCK_ADDED_SIGNAL] = g_signal_new ("added", TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_dialogs_admin_add_federation_block_instance_init (TubaDialogsAdminAddFederationBlock * self,
                                                       gpointer klass)
{
	self->priv = tuba_dialogs_admin_add_federation_block_get_instance_private (self);
}

static void
tuba_dialogs_admin_add_federation_block_finalize (GObject * obj)
{
	TubaDialogsAdminAddFederationBlock * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_ADMIN_TYPE_ADD_FEDERATION_BLOCK, TubaDialogsAdminAddFederationBlock);
	g_debug ("AddFederationBlock.vala:3: Destroying AddFederationBlock");
	_g_object_unref0 (self->priv->save_button);
	_g_object_unref0 (self->priv->domain_row);
	_g_object_unref0 (self->priv->sev_row);
	_g_object_unref0 (self->priv->sev_model);
	_g_object_unref0 (self->priv->rule_obfuscate);
	_g_object_unref0 (self->priv->rule_reject_media);
	_g_object_unref0 (self->priv->rule_reject_reports);
	_g_object_unref0 (self->priv->reject_media_row);
	_g_object_unref0 (self->priv->reject_reports_row);
	_g_object_unref0 (self->priv->obfuscate_row);
	_g_object_unref0 (self->priv->private_comment_row);
	_g_object_unref0 (self->priv->public_comment_row);
	G_OBJECT_CLASS (tuba_dialogs_admin_add_federation_block_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_admin_add_federation_block_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsAdminAddFederationBlockClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_admin_add_federation_block_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsAdminAddFederationBlock), 0, (GInstanceInitFunc) tuba_dialogs_admin_add_federation_block_instance_init, NULL };
	GType tuba_dialogs_admin_add_federation_block_type_id;
	tuba_dialogs_admin_add_federation_block_type_id = g_type_register_static (TUBA_DIALOGS_ADMIN_TYPE_BASE, "TubaDialogsAdminAddFederationBlock", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsAdminAddFederationBlock_private_offset = g_type_add_instance_private (tuba_dialogs_admin_add_federation_block_type_id, sizeof (TubaDialogsAdminAddFederationBlockPrivate));
	return tuba_dialogs_admin_add_federation_block_type_id;
}

GType
tuba_dialogs_admin_add_federation_block_get_type (void)
{
	static GType tuba_dialogs_admin_add_federation_block_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_admin_add_federation_block_type_id__once)) {
		GType tuba_dialogs_admin_add_federation_block_type_id;
		tuba_dialogs_admin_add_federation_block_type_id = tuba_dialogs_admin_add_federation_block_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_admin_add_federation_block_type_id__once, tuba_dialogs_admin_add_federation_block_type_id);
	}
	return tuba_dialogs_admin_add_federation_block_type_id__once;
}

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);
}

