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

#include "seafile-object.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.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

enum  {
	SEAFILE_WEB_ACCESS_0_PROPERTY,
	SEAFILE_WEB_ACCESS_REPO_ID_PROPERTY,
	SEAFILE_WEB_ACCESS_OBJ_ID_PROPERTY,
	SEAFILE_WEB_ACCESS_OP_PROPERTY,
	SEAFILE_WEB_ACCESS_USERNAME_PROPERTY,
	SEAFILE_WEB_ACCESS_NUM_PROPERTIES
};
static GParamSpec* seafile_web_access_properties[SEAFILE_WEB_ACCESS_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _SeafileWebAccessPrivate {
	gchar* _repo_id;
	gchar* _obj_id;
	gchar* _op;
	gchar* _username;
};

static gint SeafileWebAccess_private_offset;
static gpointer seafile_web_access_parent_class = NULL;

static void seafile_web_access_finalize (GObject * obj);
static GType seafile_web_access_get_type_once (void);
static void _vala_seafile_web_access_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_seafile_web_access_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);

static inline gpointer
seafile_web_access_get_instance_private (SeafileWebAccess* self)
{
	return G_STRUCT_MEMBER_P (self, SeafileWebAccess_private_offset);
}

SeafileWebAccess*
seafile_web_access_construct (GType object_type)
{
	SeafileWebAccess * self = NULL;
	self = (SeafileWebAccess*) g_object_new (object_type, NULL);
	return self;
}

SeafileWebAccess*
seafile_web_access_new (void)
{
	return seafile_web_access_construct (SEAFILE_TYPE_WEB_ACCESS);
}

const gchar*
seafile_web_access_get_repo_id (SeafileWebAccess* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_repo_id;
	result = _tmp0_;
	return result;
}

void
seafile_web_access_set_repo_id (SeafileWebAccess* self,
                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_web_access_get_repo_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_repo_id);
		self->priv->_repo_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, seafile_web_access_properties[SEAFILE_WEB_ACCESS_REPO_ID_PROPERTY]);
	}
}

const gchar*
seafile_web_access_get_obj_id (SeafileWebAccess* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_obj_id;
	result = _tmp0_;
	return result;
}

void
seafile_web_access_set_obj_id (SeafileWebAccess* self,
                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_web_access_get_obj_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_obj_id);
		self->priv->_obj_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, seafile_web_access_properties[SEAFILE_WEB_ACCESS_OBJ_ID_PROPERTY]);
	}
}

const gchar*
seafile_web_access_get_op (SeafileWebAccess* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_op;
	result = _tmp0_;
	return result;
}

void
seafile_web_access_set_op (SeafileWebAccess* self,
                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_web_access_get_op (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_op);
		self->priv->_op = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, seafile_web_access_properties[SEAFILE_WEB_ACCESS_OP_PROPERTY]);
	}
}

const gchar*
seafile_web_access_get_username (SeafileWebAccess* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_username;
	result = _tmp0_;
	return result;
}

void
seafile_web_access_set_username (SeafileWebAccess* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_web_access_get_username (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_username);
		self->priv->_username = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, seafile_web_access_properties[SEAFILE_WEB_ACCESS_USERNAME_PROPERTY]);
	}
}

static void
seafile_web_access_class_init (SeafileWebAccessClass * klass,
                               gpointer klass_data)
{
	seafile_web_access_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SeafileWebAccess_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_seafile_web_access_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_seafile_web_access_set_property;
	G_OBJECT_CLASS (klass)->finalize = seafile_web_access_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_WEB_ACCESS_REPO_ID_PROPERTY, seafile_web_access_properties[SEAFILE_WEB_ACCESS_REPO_ID_PROPERTY] = g_param_spec_string ("repo-id", "repo-id", "repo-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_WEB_ACCESS_OBJ_ID_PROPERTY, seafile_web_access_properties[SEAFILE_WEB_ACCESS_OBJ_ID_PROPERTY] = g_param_spec_string ("obj-id", "obj-id", "obj-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_WEB_ACCESS_OP_PROPERTY, seafile_web_access_properties[SEAFILE_WEB_ACCESS_OP_PROPERTY] = g_param_spec_string ("op", "op", "op", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_WEB_ACCESS_USERNAME_PROPERTY, seafile_web_access_properties[SEAFILE_WEB_ACCESS_USERNAME_PROPERTY] = g_param_spec_string ("username", "username", "username", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
seafile_web_access_instance_init (SeafileWebAccess * self,
                                  gpointer klass)
{
	self->priv = seafile_web_access_get_instance_private (self);
}

static void
seafile_web_access_finalize (GObject * obj)
{
	SeafileWebAccess * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_WEB_ACCESS, SeafileWebAccess);
	_g_free0 (self->priv->_repo_id);
	_g_free0 (self->priv->_obj_id);
	_g_free0 (self->priv->_op);
	_g_free0 (self->priv->_username);
	G_OBJECT_CLASS (seafile_web_access_parent_class)->finalize (obj);
}

static GType
seafile_web_access_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SeafileWebAccessClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_web_access_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileWebAccess), 0, (GInstanceInitFunc) seafile_web_access_instance_init, NULL };
	GType seafile_web_access_type_id;
	seafile_web_access_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileWebAccess", &g_define_type_info, 0);
	SeafileWebAccess_private_offset = g_type_add_instance_private (seafile_web_access_type_id, sizeof (SeafileWebAccessPrivate));
	return seafile_web_access_type_id;
}

GType
seafile_web_access_get_type (void)
{
	static volatile gsize seafile_web_access_type_id__once = 0;
	if (g_once_init_enter (&seafile_web_access_type_id__once)) {
		GType seafile_web_access_type_id;
		seafile_web_access_type_id = seafile_web_access_get_type_once ();
		g_once_init_leave (&seafile_web_access_type_id__once, seafile_web_access_type_id);
	}
	return seafile_web_access_type_id__once;
}

static void
_vala_seafile_web_access_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	SeafileWebAccess * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_WEB_ACCESS, SeafileWebAccess);
	switch (property_id) {
		case SEAFILE_WEB_ACCESS_REPO_ID_PROPERTY:
		g_value_set_string (value, seafile_web_access_get_repo_id (self));
		break;
		case SEAFILE_WEB_ACCESS_OBJ_ID_PROPERTY:
		g_value_set_string (value, seafile_web_access_get_obj_id (self));
		break;
		case SEAFILE_WEB_ACCESS_OP_PROPERTY:
		g_value_set_string (value, seafile_web_access_get_op (self));
		break;
		case SEAFILE_WEB_ACCESS_USERNAME_PROPERTY:
		g_value_set_string (value, seafile_web_access_get_username (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_seafile_web_access_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	SeafileWebAccess * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_WEB_ACCESS, SeafileWebAccess);
	switch (property_id) {
		case SEAFILE_WEB_ACCESS_REPO_ID_PROPERTY:
		seafile_web_access_set_repo_id (self, g_value_get_string (value));
		break;
		case SEAFILE_WEB_ACCESS_OBJ_ID_PROPERTY:
		seafile_web_access_set_obj_id (self, g_value_get_string (value));
		break;
		case SEAFILE_WEB_ACCESS_OP_PROPERTY:
		seafile_web_access_set_op (self, g_value_get_string (value));
		break;
		case SEAFILE_WEB_ACCESS_USERNAME_PROPERTY:
		seafile_web_access_set_username (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

