
/* Python wrapper functions auto-generated by pidl */
#define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
#include "lib/replace/system/python.h"
#include "python/py3compat.h"
#include "includes.h"
#include "python/modules.h"
#include <pytalloc.h>
#include "librpc/rpc/pyrpc.h"
#include "librpc/rpc/pyrpc_util.h"
#include "bin/default/librpc/gen_ndr/ndr_dfs.h"
#include "bin/default/librpc/gen_ndr/ndr_dfs_c.h"

/*
 * Suppress compiler warnings if the generated code does not call these
 * functions
 */
#ifndef _MAYBE_UNUSED_
#ifdef __has_attribute
#if __has_attribute(unused)
#define _MAYBE_UNUSED_ __attribute__ ((unused))
#else
#define _MAYBE_UNUSED_
#endif
#endif
#endif
/*
 * These functions are here to ensure they can be optimized out by
 * the compiler based on the constant input values
 */

static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
{
	switch (var_size) {
	case 8:
		return UINT64_MAX;
	case 4:
		return UINT32_MAX;
	case 2:
		return UINT16_MAX;
	case 1:
		return UINT8_MAX;
	}

	return 0;
}

static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
{
	switch (var_size) {
	case 8:
		return INT64_MAX;
	case 4:
		return INT32_MAX;
	case 2:
		return INT16_MAX;
	case 1:
		return INT8_MAX;
	}

	return 0;
}

#include "librpc/gen_ndr/misc.h"
static PyTypeObject dfs_Info0_Type;
static PyTypeObject dfs_Info1_Type;
static PyTypeObject dfs_Info2_Type;
static PyTypeObject dfs_StorageInfo_Type;
static PyTypeObject dfs_Info3_Type;
static PyTypeObject dfs_Info4_Type;
static PyTypeObject dfs_Info5_Type;
static PyTypeObject dfs_Target_Priority_Type;
static PyTypeObject dfs_StorageInfo2_Type;
static PyTypeObject dfs_Info6_Type;
static PyTypeObject dfs_Info7_Type;
static PyTypeObject dfs_Info100_Type;
static PyTypeObject dfs_Info101_Type;
static PyTypeObject dfs_Info102_Type;
static PyTypeObject dfs_Info103_Type;
static PyTypeObject dfs_Info104_Type;
static PyTypeObject dfs_Info105_Type;
static PyTypeObject dfs_Info106_Type;
static PyTypeObject dfs_Info200_Type;
static PyTypeObject dfs_Info300_Type;
static PyTypeObject dfs_Info_Type;
static PyTypeObject dfs_EnumArray1_Type;
static PyTypeObject dfs_EnumArray2_Type;
static PyTypeObject dfs_EnumArray3_Type;
static PyTypeObject dfs_EnumArray4_Type;
static PyTypeObject dfs_EnumArray5_Type;
static PyTypeObject dfs_EnumArray6_Type;
static PyTypeObject dfs_EnumArray200_Type;
static PyTypeObject dfs_EnumArray300_Type;
static PyTypeObject dfs_EnumInfo_Type;
static PyTypeObject dfs_EnumStruct_Type;
static PyTypeObject dfs_UnknownStruct_Type;
static PyTypeObject netdfs_InterfaceType;
static PyTypeObject dfs_GetManagerVersion_Type;
static PyTypeObject dfs_Add_Type;
static PyTypeObject dfs_Remove_Type;
static PyTypeObject dfs_SetInfo_Type;
static PyTypeObject dfs_GetInfo_Type;
static PyTypeObject dfs_Enum_Type;
static PyTypeObject dfs_AddFtRoot_Type;
static PyTypeObject dfs_RemoveFtRoot_Type;
static PyTypeObject dfs_AddStdRoot_Type;
static PyTypeObject dfs_RemoveStdRoot_Type;
static PyTypeObject dfs_ManagerInitialize_Type;
static PyTypeObject dfs_AddStdRootForced_Type;
static PyTypeObject dfs_GetDcAddress_Type;
static PyTypeObject dfs_SetDcAddress_Type;
static PyTypeObject dfs_FlushFtTable_Type;
static PyTypeObject dfs_EnumEx_Type;

static PyTypeObject *BaseObject_Type;
static PyTypeObject *GUID_Type;
static PyTypeObject *ndr_pointer_Type;
static PyTypeObject *ClientConnection_Type;
static PyTypeObject *ndr_syntax_id_Type;

static PyObject *py_dfs_Info0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info0, type);
}


static PyTypeObject dfs_Info0_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info0",
	.tp_getset = NULL,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info0_new,
};


static PyObject *py_dfs_Info1_get_path(PyObject *obj, void *closure)
{
	struct dfs_Info1 *object = pytalloc_get_ptr(obj);
	PyObject *py_path;
	if (object->path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->path == NULL) {
		py_path = Py_None;
		Py_INCREF(py_path);
	} else {
		if (object->path == NULL) {
			py_path = Py_None;
			Py_INCREF(py_path);
		} else {
			py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
		}
	}
	return py_path;
}

static int py_dfs_Info1_set_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info1 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->path");
		return -1;
	}
	if (value == Py_None) {
		object->path = NULL;
	} else {
		object->path = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->path = talloc_str;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info1_getsetters[] = {
	{
		.name = discard_const_p(char, "path"),
		.get = py_dfs_Info1_get_path,
		.set = py_dfs_Info1_set_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info1, type);
}


static PyTypeObject dfs_Info1_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info1",
	.tp_getset = py_dfs_Info1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info1_new,
};


static PyObject *py_dfs_Info2_get_path(PyObject *obj, void *closure)
{
	struct dfs_Info2 *object = pytalloc_get_ptr(obj);
	PyObject *py_path;
	if (object->path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->path == NULL) {
		py_path = Py_None;
		Py_INCREF(py_path);
	} else {
		if (object->path == NULL) {
			py_path = Py_None;
			Py_INCREF(py_path);
		} else {
			py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
		}
	}
	return py_path;
}

static int py_dfs_Info2_set_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->path");
		return -1;
	}
	if (value == Py_None) {
		object->path = NULL;
	} else {
		object->path = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->path = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info2_get_comment(PyObject *obj, void *closure)
{
	struct dfs_Info2 *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		Py_RETURN_NONE;
	}
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_dfs_Info2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
		return -1;
	}
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->comment = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info2_get_state(PyObject *obj, void *closure)
{
	struct dfs_Info2 *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_Info2_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info2_get_num_stores(PyObject *obj, void *closure)
{
	struct dfs_Info2 *object = pytalloc_get_ptr(obj);
	PyObject *py_num_stores;
	py_num_stores = PyLong_FromUnsignedLongLong((uint32_t)(object->num_stores));
	return py_num_stores;
}

static int py_dfs_Info2_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_stores");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_stores));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_stores = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info2_getsetters[] = {
	{
		.name = discard_const_p(char, "path"),
		.get = py_dfs_Info2_get_path,
		.set = py_dfs_Info2_set_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "comment"),
		.get = py_dfs_Info2_get_comment,
		.set = py_dfs_Info2_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_Info2_get_state,
		.set = py_dfs_Info2_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_VolumeState")
	},
	{
		.name = discard_const_p(char, "num_stores"),
		.get = py_dfs_Info2_get_num_stores,
		.set = py_dfs_Info2_set_num_stores,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info2, type);
}


static PyTypeObject dfs_Info2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info2",
	.tp_getset = py_dfs_Info2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info2_new,
};


static PyObject *py_dfs_StorageInfo_get_state(PyObject *obj, void *closure)
{
	struct dfs_StorageInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_StorageInfo_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_StorageInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_StorageInfo_get_server(PyObject *obj, void *closure)
{
	struct dfs_StorageInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_server;
	if (object->server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->server == NULL) {
		py_server = Py_None;
		Py_INCREF(py_server);
	} else {
		if (object->server == NULL) {
			py_server = Py_None;
			Py_INCREF(py_server);
		} else {
			py_server = PyUnicode_Decode(object->server, strlen(object->server), "utf-8", "ignore");
		}
	}
	return py_server;
}

static int py_dfs_StorageInfo_set_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_StorageInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->server");
		return -1;
	}
	if (value == Py_None) {
		object->server = NULL;
	} else {
		object->server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->server = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_StorageInfo_get_share(PyObject *obj, void *closure)
{
	struct dfs_StorageInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_share;
	if (object->share == NULL) {
		Py_RETURN_NONE;
	}
	if (object->share == NULL) {
		py_share = Py_None;
		Py_INCREF(py_share);
	} else {
		if (object->share == NULL) {
			py_share = Py_None;
			Py_INCREF(py_share);
		} else {
			py_share = PyUnicode_Decode(object->share, strlen(object->share), "utf-8", "ignore");
		}
	}
	return py_share;
}

static int py_dfs_StorageInfo_set_share(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_StorageInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->share");
		return -1;
	}
	if (value == Py_None) {
		object->share = NULL;
	} else {
		object->share = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->share = talloc_str;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_StorageInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_StorageInfo_get_state,
		.set = py_dfs_StorageInfo_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_StorageState")
	},
	{
		.name = discard_const_p(char, "server"),
		.get = py_dfs_StorageInfo_get_server,
		.set = py_dfs_StorageInfo_set_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "share"),
		.get = py_dfs_StorageInfo_get_share,
		.set = py_dfs_StorageInfo_set_share,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_StorageInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_StorageInfo, type);
}


static PyTypeObject dfs_StorageInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.StorageInfo",
	.tp_getset = py_dfs_StorageInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_StorageInfo_new,
};


static PyObject *py_dfs_Info3_get_path(PyObject *obj, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(obj);
	PyObject *py_path;
	if (object->path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->path == NULL) {
		py_path = Py_None;
		Py_INCREF(py_path);
	} else {
		if (object->path == NULL) {
			py_path = Py_None;
			Py_INCREF(py_path);
		} else {
			py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
		}
	}
	return py_path;
}

static int py_dfs_Info3_set_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->path");
		return -1;
	}
	if (value == Py_None) {
		object->path = NULL;
	} else {
		object->path = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->path = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info3_get_comment(PyObject *obj, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		Py_RETURN_NONE;
	}
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_dfs_Info3_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
		return -1;
	}
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->comment = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info3_get_state(PyObject *obj, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_Info3_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info3_get_num_stores(PyObject *obj, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(obj);
	PyObject *py_num_stores;
	py_num_stores = PyLong_FromUnsignedLongLong((uint32_t)(object->num_stores));
	return py_num_stores;
}

static int py_dfs_Info3_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_stores");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_stores));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_stores = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info3_get_stores(PyObject *obj, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(obj);
	PyObject *py_stores;
	if (object->stores == NULL) {
		Py_RETURN_NONE;
	}
	if (object->stores == NULL) {
		py_stores = Py_None;
		Py_INCREF(py_stores);
	} else {
		py_stores = PyList_New(object->num_stores);
		if (py_stores == NULL) {
			return NULL;
		}
		{
			int stores_cntr_1;
			for (stores_cntr_1 = 0; stores_cntr_1 < (object->num_stores); stores_cntr_1++) {
				PyObject *py_stores_1;
				py_stores_1 = pytalloc_reference_ex(&dfs_StorageInfo_Type, object->stores, &(object->stores)[stores_cntr_1]);
				PyList_SetItem(py_stores, stores_cntr_1, py_stores_1);
			}
		}
	}
	return py_stores;
}

static int py_dfs_Info3_set_stores(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info3 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->stores));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->stores");
		return -1;
	}
	if (value == Py_None) {
		object->stores = NULL;
	} else {
		object->stores = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int stores_cntr_1;
			object->stores = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->stores, PyList_GET_SIZE(value));
			if (!object->stores) { return -1; }
			talloc_set_name_const(object->stores, "ARRAY: object->stores");
			for (stores_cntr_1 = 0; stores_cntr_1 < PyList_GET_SIZE(value); stores_cntr_1++) {
				if (PyList_GET_ITEM(value, stores_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->stores)[stores_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_StorageInfo_Type, PyList_GET_ITEM(value, stores_cntr_1), return -1;);
				if (talloc_reference(object->stores, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, stores_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->stores)[stores_cntr_1] = *(struct dfs_StorageInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info3_getsetters[] = {
	{
		.name = discard_const_p(char, "path"),
		.get = py_dfs_Info3_get_path,
		.set = py_dfs_Info3_set_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "comment"),
		.get = py_dfs_Info3_get_comment,
		.set = py_dfs_Info3_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_Info3_get_state,
		.set = py_dfs_Info3_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_VolumeState")
	},
	{
		.name = discard_const_p(char, "num_stores"),
		.get = py_dfs_Info3_get_num_stores,
		.set = py_dfs_Info3_set_num_stores,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "stores"),
		.get = py_dfs_Info3_get_stores,
		.set = py_dfs_Info3_set_stores,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_StorageInfo")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info3, type);
}


static PyTypeObject dfs_Info3_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info3",
	.tp_getset = py_dfs_Info3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info3_new,
};


static PyObject *py_dfs_Info4_get_path(PyObject *obj, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(obj);
	PyObject *py_path;
	if (object->path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->path == NULL) {
		py_path = Py_None;
		Py_INCREF(py_path);
	} else {
		if (object->path == NULL) {
			py_path = Py_None;
			Py_INCREF(py_path);
		} else {
			py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
		}
	}
	return py_path;
}

static int py_dfs_Info4_set_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->path");
		return -1;
	}
	if (value == Py_None) {
		object->path = NULL;
	} else {
		object->path = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->path = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info4_get_comment(PyObject *obj, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		Py_RETURN_NONE;
	}
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_dfs_Info4_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
		return -1;
	}
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->comment = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info4_get_state(PyObject *obj, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_Info4_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info4_get_timeout(PyObject *obj, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(obj);
	PyObject *py_timeout;
	py_timeout = PyLong_FromUnsignedLongLong((uint32_t)(object->timeout));
	return py_timeout;
}

static int py_dfs_Info4_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timeout");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timeout));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->timeout = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info4_get_guid(PyObject *obj, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(obj);
	PyObject *py_guid;
	py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
	return py_guid;
}

static int py_dfs_Info4_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guid");
		return -1;
	}
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_dfs_Info4_get_num_stores(PyObject *obj, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(obj);
	PyObject *py_num_stores;
	py_num_stores = PyLong_FromUnsignedLongLong((uint32_t)(object->num_stores));
	return py_num_stores;
}

static int py_dfs_Info4_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_stores");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_stores));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_stores = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info4_get_stores(PyObject *obj, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(obj);
	PyObject *py_stores;
	if (object->stores == NULL) {
		Py_RETURN_NONE;
	}
	if (object->stores == NULL) {
		py_stores = Py_None;
		Py_INCREF(py_stores);
	} else {
		py_stores = PyList_New(object->num_stores);
		if (py_stores == NULL) {
			return NULL;
		}
		{
			int stores_cntr_1;
			for (stores_cntr_1 = 0; stores_cntr_1 < (object->num_stores); stores_cntr_1++) {
				PyObject *py_stores_1;
				py_stores_1 = pytalloc_reference_ex(&dfs_StorageInfo_Type, object->stores, &(object->stores)[stores_cntr_1]);
				PyList_SetItem(py_stores, stores_cntr_1, py_stores_1);
			}
		}
	}
	return py_stores;
}

static int py_dfs_Info4_set_stores(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info4 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->stores));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->stores");
		return -1;
	}
	if (value == Py_None) {
		object->stores = NULL;
	} else {
		object->stores = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int stores_cntr_1;
			object->stores = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->stores, PyList_GET_SIZE(value));
			if (!object->stores) { return -1; }
			talloc_set_name_const(object->stores, "ARRAY: object->stores");
			for (stores_cntr_1 = 0; stores_cntr_1 < PyList_GET_SIZE(value); stores_cntr_1++) {
				if (PyList_GET_ITEM(value, stores_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->stores)[stores_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_StorageInfo_Type, PyList_GET_ITEM(value, stores_cntr_1), return -1;);
				if (talloc_reference(object->stores, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, stores_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->stores)[stores_cntr_1] = *(struct dfs_StorageInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info4_getsetters[] = {
	{
		.name = discard_const_p(char, "path"),
		.get = py_dfs_Info4_get_path,
		.set = py_dfs_Info4_set_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "comment"),
		.get = py_dfs_Info4_get_comment,
		.set = py_dfs_Info4_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_Info4_get_state,
		.set = py_dfs_Info4_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_VolumeState")
	},
	{
		.name = discard_const_p(char, "timeout"),
		.get = py_dfs_Info4_get_timeout,
		.set = py_dfs_Info4_set_timeout,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "guid"),
		.get = py_dfs_Info4_get_guid,
		.set = py_dfs_Info4_set_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "num_stores"),
		.get = py_dfs_Info4_get_num_stores,
		.set = py_dfs_Info4_set_num_stores,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "stores"),
		.get = py_dfs_Info4_get_stores,
		.set = py_dfs_Info4_set_stores,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_StorageInfo")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info4, type);
}


static PyTypeObject dfs_Info4_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info4",
	.tp_getset = py_dfs_Info4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info4_new,
};


static PyObject *py_dfs_Info5_get_path(PyObject *obj, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(obj);
	PyObject *py_path;
	if (object->path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->path == NULL) {
		py_path = Py_None;
		Py_INCREF(py_path);
	} else {
		if (object->path == NULL) {
			py_path = Py_None;
			Py_INCREF(py_path);
		} else {
			py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
		}
	}
	return py_path;
}

static int py_dfs_Info5_set_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->path");
		return -1;
	}
	if (value == Py_None) {
		object->path = NULL;
	} else {
		object->path = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->path = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info5_get_comment(PyObject *obj, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		Py_RETURN_NONE;
	}
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_dfs_Info5_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
		return -1;
	}
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->comment = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info5_get_state(PyObject *obj, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_Info5_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info5_get_timeout(PyObject *obj, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(obj);
	PyObject *py_timeout;
	py_timeout = PyLong_FromUnsignedLongLong((uint32_t)(object->timeout));
	return py_timeout;
}

static int py_dfs_Info5_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timeout");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timeout));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->timeout = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info5_get_guid(PyObject *obj, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(obj);
	PyObject *py_guid;
	py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
	return py_guid;
}

static int py_dfs_Info5_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guid");
		return -1;
	}
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_dfs_Info5_get_flags(PyObject *obj, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
	return py_flags;
}

static int py_dfs_Info5_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info5_get_pktsize(PyObject *obj, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(obj);
	PyObject *py_pktsize;
	py_pktsize = PyLong_FromUnsignedLongLong((uint32_t)(object->pktsize));
	return py_pktsize;
}

static int py_dfs_Info5_set_pktsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pktsize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pktsize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->pktsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info5_get_num_stores(PyObject *obj, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(obj);
	PyObject *py_num_stores;
	py_num_stores = PyLong_FromUnsignedLongLong((uint32_t)(object->num_stores));
	return py_num_stores;
}

static int py_dfs_Info5_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_stores");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_stores));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_stores = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info5_getsetters[] = {
	{
		.name = discard_const_p(char, "path"),
		.get = py_dfs_Info5_get_path,
		.set = py_dfs_Info5_set_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "comment"),
		.get = py_dfs_Info5_get_comment,
		.set = py_dfs_Info5_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_Info5_get_state,
		.set = py_dfs_Info5_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_VolumeState")
	},
	{
		.name = discard_const_p(char, "timeout"),
		.get = py_dfs_Info5_get_timeout,
		.set = py_dfs_Info5_set_timeout,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "guid"),
		.get = py_dfs_Info5_get_guid,
		.set = py_dfs_Info5_set_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "flags"),
		.get = py_dfs_Info5_get_flags,
		.set = py_dfs_Info5_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_PropertyFlags")
	},
	{
		.name = discard_const_p(char, "pktsize"),
		.get = py_dfs_Info5_get_pktsize,
		.set = py_dfs_Info5_set_pktsize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "num_stores"),
		.get = py_dfs_Info5_get_num_stores,
		.set = py_dfs_Info5_set_num_stores,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info5, type);
}


static PyTypeObject dfs_Info5_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info5",
	.tp_getset = py_dfs_Info5_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info5_new,
};


static PyObject *py_dfs_Target_Priority_get_target_priority_class(PyObject *obj, void *closure)
{
	struct dfs_Target_Priority *object = pytalloc_get_ptr(obj);
	PyObject *py_target_priority_class;
	py_target_priority_class = PyLong_FromUnsignedLongLong((uint32_t)(object->target_priority_class));
	return py_target_priority_class;
}

static int py_dfs_Target_Priority_set_target_priority_class(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Target_Priority *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->target_priority_class");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->target_priority_class));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->target_priority_class = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Target_Priority_get_target_priority_rank(PyObject *obj, void *closure)
{
	struct dfs_Target_Priority *object = pytalloc_get_ptr(obj);
	PyObject *py_target_priority_rank;
	py_target_priority_rank = PyLong_FromLong((uint16_t)(object->target_priority_rank));
	return py_target_priority_rank;
}

static int py_dfs_Target_Priority_set_target_priority_rank(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Target_Priority *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->target_priority_rank");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->target_priority_rank));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->target_priority_rank = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Target_Priority_get_reserved(PyObject *obj, void *closure)
{
	struct dfs_Target_Priority *object = pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyLong_FromLong((uint16_t)(object->reserved));
	return py_reserved;
}

static int py_dfs_Target_Priority_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Target_Priority *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->reserved = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Target_Priority_getsetters[] = {
	{
		.name = discard_const_p(char, "target_priority_class"),
		.get = py_dfs_Target_Priority_get_target_priority_class,
		.set = py_dfs_Target_Priority_set_target_priority_class,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Target_PriorityClass")
	},
	{
		.name = discard_const_p(char, "target_priority_rank"),
		.get = py_dfs_Target_Priority_get_target_priority_rank,
		.set = py_dfs_Target_Priority_set_target_priority_rank,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "reserved"),
		.get = py_dfs_Target_Priority_get_reserved,
		.set = py_dfs_Target_Priority_set_reserved,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Target_Priority_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Target_Priority, type);
}


static PyTypeObject dfs_Target_Priority_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Target_Priority",
	.tp_getset = py_dfs_Target_Priority_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Target_Priority_new,
};


static PyObject *py_dfs_StorageInfo2_get_info(PyObject *obj, void *closure)
{
	struct dfs_StorageInfo2 *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	py_info = pytalloc_reference_ex(&dfs_StorageInfo_Type, pytalloc_get_mem_ctx(obj), &object->info);
	return py_info;
}

static int py_dfs_StorageInfo2_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_StorageInfo2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->info");
		return -1;
	}
	PY_CHECK_TYPE(&dfs_StorageInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->info = *(struct dfs_StorageInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_dfs_StorageInfo2_get_target_priority(PyObject *obj, void *closure)
{
	struct dfs_StorageInfo2 *object = pytalloc_get_ptr(obj);
	PyObject *py_target_priority;
	py_target_priority = pytalloc_reference_ex(&dfs_Target_Priority_Type, pytalloc_get_mem_ctx(obj), &object->target_priority);
	return py_target_priority;
}

static int py_dfs_StorageInfo2_set_target_priority(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_StorageInfo2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->target_priority");
		return -1;
	}
	PY_CHECK_TYPE(&dfs_Target_Priority_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->target_priority = *(struct dfs_Target_Priority *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_dfs_StorageInfo2_getsetters[] = {
	{
		.name = discard_const_p(char, "info"),
		.get = py_dfs_StorageInfo2_get_info,
		.set = py_dfs_StorageInfo2_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_StorageInfo")
	},
	{
		.name = discard_const_p(char, "target_priority"),
		.get = py_dfs_StorageInfo2_get_target_priority,
		.set = py_dfs_StorageInfo2_set_target_priority,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Target_Priority")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_StorageInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_StorageInfo2, type);
}


static PyTypeObject dfs_StorageInfo2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.StorageInfo2",
	.tp_getset = py_dfs_StorageInfo2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_StorageInfo2_new,
};


static PyObject *py_dfs_Info6_get_entry_path(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_entry_path;
	if (object->entry_path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->entry_path == NULL) {
		py_entry_path = Py_None;
		Py_INCREF(py_entry_path);
	} else {
		if (object->entry_path == NULL) {
			py_entry_path = Py_None;
			Py_INCREF(py_entry_path);
		} else {
			py_entry_path = PyUnicode_Decode(object->entry_path, strlen(object->entry_path), "utf-8", "ignore");
		}
	}
	return py_entry_path;
}

static int py_dfs_Info6_set_entry_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->entry_path");
		return -1;
	}
	if (value == Py_None) {
		object->entry_path = NULL;
	} else {
		object->entry_path = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->entry_path = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info6_get_comment(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		Py_RETURN_NONE;
	}
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_dfs_Info6_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
		return -1;
	}
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->comment = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info6_get_state(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_Info6_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info6_get_timeout(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_timeout;
	py_timeout = PyLong_FromUnsignedLongLong((uint32_t)(object->timeout));
	return py_timeout;
}

static int py_dfs_Info6_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timeout");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timeout));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->timeout = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info6_get_guid(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_guid;
	py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
	return py_guid;
}

static int py_dfs_Info6_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guid");
		return -1;
	}
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_dfs_Info6_get_flags(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
	return py_flags;
}

static int py_dfs_Info6_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info6_get_pktsize(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_pktsize;
	py_pktsize = PyLong_FromUnsignedLongLong((uint32_t)(object->pktsize));
	return py_pktsize;
}

static int py_dfs_Info6_set_pktsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pktsize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pktsize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->pktsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info6_get_num_stores(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_num_stores;
	py_num_stores = PyLong_FromLong((uint16_t)(object->num_stores));
	return py_num_stores;
}

static int py_dfs_Info6_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_stores");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_stores));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_stores = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info6_get_stores(PyObject *obj, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(obj);
	PyObject *py_stores;
	if (object->stores == NULL) {
		Py_RETURN_NONE;
	}
	if (object->stores == NULL) {
		py_stores = Py_None;
		Py_INCREF(py_stores);
	} else {
		py_stores = PyList_New(object->num_stores);
		if (py_stores == NULL) {
			return NULL;
		}
		{
			int stores_cntr_1;
			for (stores_cntr_1 = 0; stores_cntr_1 < (object->num_stores); stores_cntr_1++) {
				PyObject *py_stores_1;
				py_stores_1 = pytalloc_reference_ex(&dfs_StorageInfo2_Type, object->stores, &(object->stores)[stores_cntr_1]);
				PyList_SetItem(py_stores, stores_cntr_1, py_stores_1);
			}
		}
	}
	return py_stores;
}

static int py_dfs_Info6_set_stores(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info6 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->stores));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->stores");
		return -1;
	}
	if (value == Py_None) {
		object->stores = NULL;
	} else {
		object->stores = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int stores_cntr_1;
			object->stores = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->stores, PyList_GET_SIZE(value));
			if (!object->stores) { return -1; }
			talloc_set_name_const(object->stores, "ARRAY: object->stores");
			for (stores_cntr_1 = 0; stores_cntr_1 < PyList_GET_SIZE(value); stores_cntr_1++) {
				if (PyList_GET_ITEM(value, stores_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->stores)[stores_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_StorageInfo2_Type, PyList_GET_ITEM(value, stores_cntr_1), return -1;);
				if (talloc_reference(object->stores, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, stores_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->stores)[stores_cntr_1] = *(struct dfs_StorageInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info6_getsetters[] = {
	{
		.name = discard_const_p(char, "entry_path"),
		.get = py_dfs_Info6_get_entry_path,
		.set = py_dfs_Info6_set_entry_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "comment"),
		.get = py_dfs_Info6_get_comment,
		.set = py_dfs_Info6_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_Info6_get_state,
		.set = py_dfs_Info6_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_VolumeState")
	},
	{
		.name = discard_const_p(char, "timeout"),
		.get = py_dfs_Info6_get_timeout,
		.set = py_dfs_Info6_set_timeout,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "guid"),
		.get = py_dfs_Info6_get_guid,
		.set = py_dfs_Info6_set_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "flags"),
		.get = py_dfs_Info6_get_flags,
		.set = py_dfs_Info6_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_PropertyFlags")
	},
	{
		.name = discard_const_p(char, "pktsize"),
		.get = py_dfs_Info6_get_pktsize,
		.set = py_dfs_Info6_set_pktsize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "num_stores"),
		.get = py_dfs_Info6_get_num_stores,
		.set = py_dfs_Info6_set_num_stores,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "stores"),
		.get = py_dfs_Info6_get_stores,
		.set = py_dfs_Info6_set_stores,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_StorageInfo2")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info6, type);
}


static PyTypeObject dfs_Info6_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info6",
	.tp_getset = py_dfs_Info6_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info6_new,
};


static PyObject *py_dfs_Info7_get_generation_guid(PyObject *obj, void *closure)
{
	struct dfs_Info7 *object = pytalloc_get_ptr(obj);
	PyObject *py_generation_guid;
	py_generation_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->generation_guid);
	return py_generation_guid;
}

static int py_dfs_Info7_set_generation_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info7 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->generation_guid");
		return -1;
	}
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->generation_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_dfs_Info7_getsetters[] = {
	{
		.name = discard_const_p(char, "generation_guid"),
		.get = py_dfs_Info7_get_generation_guid,
		.set = py_dfs_Info7_set_generation_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info7_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info7, type);
}


static PyTypeObject dfs_Info7_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info7",
	.tp_getset = py_dfs_Info7_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info7_new,
};


static PyObject *py_dfs_Info100_get_comment(PyObject *obj, void *closure)
{
	struct dfs_Info100 *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		Py_RETURN_NONE;
	}
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_dfs_Info100_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info100 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
		return -1;
	}
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->comment = talloc_str;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info100_getsetters[] = {
	{
		.name = discard_const_p(char, "comment"),
		.get = py_dfs_Info100_get_comment,
		.set = py_dfs_Info100_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info100_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info100, type);
}


static PyTypeObject dfs_Info100_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info100",
	.tp_getset = py_dfs_Info100_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info100_new,
};


static PyObject *py_dfs_Info101_get_state(PyObject *obj, void *closure)
{
	struct dfs_Info101 *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_Info101_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info101 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info101_getsetters[] = {
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_Info101_get_state,
		.set = py_dfs_Info101_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_StorageState")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info101_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info101, type);
}


static PyTypeObject dfs_Info101_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info101",
	.tp_getset = py_dfs_Info101_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info101_new,
};


static PyObject *py_dfs_Info102_get_timeout(PyObject *obj, void *closure)
{
	struct dfs_Info102 *object = pytalloc_get_ptr(obj);
	PyObject *py_timeout;
	py_timeout = PyLong_FromUnsignedLongLong((uint32_t)(object->timeout));
	return py_timeout;
}

static int py_dfs_Info102_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info102 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timeout");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timeout));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->timeout = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info102_getsetters[] = {
	{
		.name = discard_const_p(char, "timeout"),
		.get = py_dfs_Info102_get_timeout,
		.set = py_dfs_Info102_set_timeout,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info102_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info102, type);
}


static PyTypeObject dfs_Info102_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info102",
	.tp_getset = py_dfs_Info102_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info102_new,
};


static PyObject *py_dfs_Info103_get_flags(PyObject *obj, void *closure)
{
	struct dfs_Info103 *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
	return py_flags;
}

static int py_dfs_Info103_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info103 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info103_getsetters[] = {
	{
		.name = discard_const_p(char, "flags"),
		.get = py_dfs_Info103_get_flags,
		.set = py_dfs_Info103_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_PropertyFlags")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info103_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info103, type);
}


static PyTypeObject dfs_Info103_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info103",
	.tp_getset = py_dfs_Info103_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info103_new,
};


static PyObject *py_dfs_Info104_get_priority(PyObject *obj, void *closure)
{
	struct dfs_Info104 *object = pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = pytalloc_reference_ex(&dfs_Target_Priority_Type, pytalloc_get_mem_ctx(obj), &object->priority);
	return py_priority;
}

static int py_dfs_Info104_set_priority(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info104 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->priority");
		return -1;
	}
	PY_CHECK_TYPE(&dfs_Target_Priority_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->priority = *(struct dfs_Target_Priority *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_dfs_Info104_getsetters[] = {
	{
		.name = discard_const_p(char, "priority"),
		.get = py_dfs_Info104_get_priority,
		.set = py_dfs_Info104_set_priority,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Target_Priority")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info104_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info104, type);
}


static PyTypeObject dfs_Info104_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info104",
	.tp_getset = py_dfs_Info104_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info104_new,
};


static PyObject *py_dfs_Info105_get_comment(PyObject *obj, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		Py_RETURN_NONE;
	}
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_dfs_Info105_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
		return -1;
	}
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->comment = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info105_get_state(PyObject *obj, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_Info105_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info105_get_timeout(PyObject *obj, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(obj);
	PyObject *py_timeout;
	py_timeout = PyLong_FromUnsignedLongLong((uint32_t)(object->timeout));
	return py_timeout;
}

static int py_dfs_Info105_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timeout");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timeout));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->timeout = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info105_get_property_flag_mask(PyObject *obj, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(obj);
	PyObject *py_property_flag_mask;
	py_property_flag_mask = PyLong_FromUnsignedLongLong((uint32_t)(object->property_flag_mask));
	return py_property_flag_mask;
}

static int py_dfs_Info105_set_property_flag_mask(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->property_flag_mask");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->property_flag_mask));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->property_flag_mask = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info105_get_property_flags(PyObject *obj, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(obj);
	PyObject *py_property_flags;
	py_property_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->property_flags));
	return py_property_flags;
}

static int py_dfs_Info105_set_property_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info105 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->property_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->property_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->property_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info105_getsetters[] = {
	{
		.name = discard_const_p(char, "comment"),
		.get = py_dfs_Info105_get_comment,
		.set = py_dfs_Info105_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_Info105_get_state,
		.set = py_dfs_Info105_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_VolumeState")
	},
	{
		.name = discard_const_p(char, "timeout"),
		.get = py_dfs_Info105_get_timeout,
		.set = py_dfs_Info105_set_timeout,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "property_flag_mask"),
		.get = py_dfs_Info105_get_property_flag_mask,
		.set = py_dfs_Info105_set_property_flag_mask,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "property_flags"),
		.get = py_dfs_Info105_get_property_flags,
		.set = py_dfs_Info105_set_property_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info105_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info105, type);
}


static PyTypeObject dfs_Info105_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info105",
	.tp_getset = py_dfs_Info105_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info105_new,
};


static PyObject *py_dfs_Info106_get_state(PyObject *obj, void *closure)
{
	struct dfs_Info106 *object = pytalloc_get_ptr(obj);
	PyObject *py_state;
	py_state = PyLong_FromUnsignedLongLong((uint32_t)(object->state));
	return py_state;
}

static int py_dfs_Info106_set_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info106 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info106_get_priority(PyObject *obj, void *closure)
{
	struct dfs_Info106 *object = pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = pytalloc_reference_ex(&dfs_Target_Priority_Type, pytalloc_get_mem_ctx(obj), &object->priority);
	return py_priority;
}

static int py_dfs_Info106_set_priority(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info106 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->priority");
		return -1;
	}
	PY_CHECK_TYPE(&dfs_Target_Priority_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->priority = *(struct dfs_Target_Priority *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_dfs_Info106_getsetters[] = {
	{
		.name = discard_const_p(char, "state"),
		.get = py_dfs_Info106_get_state,
		.set = py_dfs_Info106_set_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_StorageState")
	},
	{
		.name = discard_const_p(char, "priority"),
		.get = py_dfs_Info106_get_priority,
		.set = py_dfs_Info106_set_priority,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Target_Priority")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info106_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info106, type);
}


static PyTypeObject dfs_Info106_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info106",
	.tp_getset = py_dfs_Info106_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info106_new,
};


static PyObject *py_dfs_Info200_get_dom_root(PyObject *obj, void *closure)
{
	struct dfs_Info200 *object = pytalloc_get_ptr(obj);
	PyObject *py_dom_root;
	if (object->dom_root == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dom_root == NULL) {
		py_dom_root = Py_None;
		Py_INCREF(py_dom_root);
	} else {
		if (object->dom_root == NULL) {
			py_dom_root = Py_None;
			Py_INCREF(py_dom_root);
		} else {
			py_dom_root = PyUnicode_Decode(object->dom_root, strlen(object->dom_root), "utf-8", "ignore");
		}
	}
	return py_dom_root;
}

static int py_dfs_Info200_set_dom_root(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info200 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dom_root");
		return -1;
	}
	if (value == Py_None) {
		object->dom_root = NULL;
	} else {
		object->dom_root = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dom_root = talloc_str;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info200_getsetters[] = {
	{
		.name = discard_const_p(char, "dom_root"),
		.get = py_dfs_Info200_get_dom_root,
		.set = py_dfs_Info200_set_dom_root,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info200_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info200, type);
}


static PyTypeObject dfs_Info200_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info200",
	.tp_getset = py_dfs_Info200_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info200_new,
};


static PyObject *py_dfs_Info300_get_flavor(PyObject *obj, void *closure)
{
	struct dfs_Info300 *object = pytalloc_get_ptr(obj);
	PyObject *py_flavor;
	py_flavor = PyLong_FromLong((uint16_t)(object->flavor));
	return py_flavor;
}

static int py_dfs_Info300_set_flavor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info300 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flavor");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flavor));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flavor = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Info300_get_dom_root(PyObject *obj, void *closure)
{
	struct dfs_Info300 *object = pytalloc_get_ptr(obj);
	PyObject *py_dom_root;
	if (object->dom_root == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dom_root == NULL) {
		py_dom_root = Py_None;
		Py_INCREF(py_dom_root);
	} else {
		if (object->dom_root == NULL) {
			py_dom_root = Py_None;
			Py_INCREF(py_dom_root);
		} else {
			py_dom_root = PyUnicode_Decode(object->dom_root, strlen(object->dom_root), "utf-8", "ignore");
		}
	}
	return py_dom_root;
}

static int py_dfs_Info300_set_dom_root(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Info300 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dom_root");
		return -1;
	}
	if (value == Py_None) {
		object->dom_root = NULL;
	} else {
		object->dom_root = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dom_root = talloc_str;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_Info300_getsetters[] = {
	{
		.name = discard_const_p(char, "flavor"),
		.get = py_dfs_Info300_get_flavor,
		.set = py_dfs_Info300_set_flavor,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_VolumeFlavor")
	},
	{
		.name = discard_const_p(char, "dom_root"),
		.get = py_dfs_Info300_get_dom_root,
		.set = py_dfs_Info300_set_dom_root,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Info300_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_Info300, type);
}


static PyTypeObject dfs_Info300_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info300",
	.tp_getset = py_dfs_Info300_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info300_new,
};

static PyObject *py_import_dfs_Info(TALLOC_CTX *mem_ctx, int level, union dfs_Info *in)
{
	PyObject *ret;

	switch (level) {
		case 0:
			if (in->info0 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info0_Type, in->info0, in->info0);
			}
			return ret;

		case 1:
			if (in->info1 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info1_Type, in->info1, in->info1);
			}
			return ret;

		case 2:
			if (in->info2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info2_Type, in->info2, in->info2);
			}
			return ret;

		case 3:
			if (in->info3 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info3_Type, in->info3, in->info3);
			}
			return ret;

		case 4:
			if (in->info4 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info4_Type, in->info4, in->info4);
			}
			return ret;

		case 5:
			if (in->info5 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info5_Type, in->info5, in->info5);
			}
			return ret;

		case 6:
			if (in->info6 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info6_Type, in->info6, in->info6);
			}
			return ret;

		case 7:
			if (in->info7 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info7_Type, in->info7, in->info7);
			}
			return ret;

		case 100:
			if (in->info100 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info100_Type, in->info100, in->info100);
			}
			return ret;

		case 101:
			if (in->info101 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info101_Type, in->info101, in->info101);
			}
			return ret;

		case 102:
			if (in->info102 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info102_Type, in->info102, in->info102);
			}
			return ret;

		case 103:
			if (in->info103 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info103_Type, in->info103, in->info103);
			}
			return ret;

		case 104:
			if (in->info104 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info104_Type, in->info104, in->info104);
			}
			return ret;

		case 105:
			if (in->info105 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info105_Type, in->info105, in->info105);
			}
			return ret;

		case 106:
			if (in->info106 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_Info106_Type, in->info106, in->info106);
			}
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

static union dfs_Info *py_export_dfs_Info(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union dfs_Info *ret = talloc_zero(mem_ctx, union dfs_Info);
	switch (level) {
		case 0:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info0");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info0 = NULL;
			} else {
				ret->info0 = NULL;
				PY_CHECK_TYPE(&dfs_Info0_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info0 = (struct dfs_Info0 *)pytalloc_get_ptr(in);
			}
			break;

		case 1:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&dfs_Info1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info1 = (struct dfs_Info1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info2");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info2 = NULL;
			} else {
				ret->info2 = NULL;
				PY_CHECK_TYPE(&dfs_Info2_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info2 = (struct dfs_Info2 *)pytalloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info3");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info3 = NULL;
			} else {
				ret->info3 = NULL;
				PY_CHECK_TYPE(&dfs_Info3_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info3 = (struct dfs_Info3 *)pytalloc_get_ptr(in);
			}
			break;

		case 4:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info4");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info4 = NULL;
			} else {
				ret->info4 = NULL;
				PY_CHECK_TYPE(&dfs_Info4_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info4 = (struct dfs_Info4 *)pytalloc_get_ptr(in);
			}
			break;

		case 5:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info5");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info5 = NULL;
			} else {
				ret->info5 = NULL;
				PY_CHECK_TYPE(&dfs_Info5_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info5 = (struct dfs_Info5 *)pytalloc_get_ptr(in);
			}
			break;

		case 6:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info6");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info6 = NULL;
			} else {
				ret->info6 = NULL;
				PY_CHECK_TYPE(&dfs_Info6_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info6 = (struct dfs_Info6 *)pytalloc_get_ptr(in);
			}
			break;

		case 7:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info7");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info7 = NULL;
			} else {
				ret->info7 = NULL;
				PY_CHECK_TYPE(&dfs_Info7_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info7 = (struct dfs_Info7 *)pytalloc_get_ptr(in);
			}
			break;

		case 100:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info100");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info100 = NULL;
			} else {
				ret->info100 = NULL;
				PY_CHECK_TYPE(&dfs_Info100_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info100 = (struct dfs_Info100 *)pytalloc_get_ptr(in);
			}
			break;

		case 101:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info101");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info101 = NULL;
			} else {
				ret->info101 = NULL;
				PY_CHECK_TYPE(&dfs_Info101_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info101 = (struct dfs_Info101 *)pytalloc_get_ptr(in);
			}
			break;

		case 102:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info102");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info102 = NULL;
			} else {
				ret->info102 = NULL;
				PY_CHECK_TYPE(&dfs_Info102_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info102 = (struct dfs_Info102 *)pytalloc_get_ptr(in);
			}
			break;

		case 103:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info103");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info103 = NULL;
			} else {
				ret->info103 = NULL;
				PY_CHECK_TYPE(&dfs_Info103_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info103 = (struct dfs_Info103 *)pytalloc_get_ptr(in);
			}
			break;

		case 104:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info104");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info104 = NULL;
			} else {
				ret->info104 = NULL;
				PY_CHECK_TYPE(&dfs_Info104_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info104 = (struct dfs_Info104 *)pytalloc_get_ptr(in);
			}
			break;

		case 105:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info105");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info105 = NULL;
			} else {
				ret->info105 = NULL;
				PY_CHECK_TYPE(&dfs_Info105_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info105 = (struct dfs_Info105 *)pytalloc_get_ptr(in);
			}
			break;

		case 106:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info106");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info106 = NULL;
			} else {
				ret->info106 = NULL;
				PY_CHECK_TYPE(&dfs_Info106_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info106 = (struct dfs_Info106 *)pytalloc_get_ptr(in);
			}
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}

static PyObject *py_dfs_Info_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union dfs_Info *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union dfs_Info *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union dfs_Info!");
		return NULL;
	}

	return py_import_dfs_Info(mem_ctx, level, in);
}

static PyObject *py_dfs_Info_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union dfs_Info *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_dfs_Info(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_dfs_Info_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Info_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Info_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_dfs_Info_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject dfs_Info_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Info",
	.tp_getset = NULL,
	.tp_methods = py_dfs_Info_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Info_new,
};


static PyObject *py_dfs_EnumArray1_get_count(PyObject *obj, void *closure)
{
	struct dfs_EnumArray1 *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_dfs_EnumArray1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray1 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumArray1_get_s(PyObject *obj, void *closure)
{
	struct dfs_EnumArray1 *object = pytalloc_get_ptr(obj);
	PyObject *py_s;
	if (object->s == NULL) {
		Py_RETURN_NONE;
	}
	if (object->s == NULL) {
		py_s = Py_None;
		Py_INCREF(py_s);
	} else {
		py_s = PyList_New(object->count);
		if (py_s == NULL) {
			return NULL;
		}
		{
			int s_cntr_1;
			for (s_cntr_1 = 0; s_cntr_1 < (object->count); s_cntr_1++) {
				PyObject *py_s_1;
				py_s_1 = pytalloc_reference_ex(&dfs_Info1_Type, object->s, &(object->s)[s_cntr_1]);
				PyList_SetItem(py_s, s_cntr_1, py_s_1);
			}
		}
	}
	return py_s;
}

static int py_dfs_EnumArray1_set_s(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray1 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->s));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->s");
		return -1;
	}
	if (value == Py_None) {
		object->s = NULL;
	} else {
		object->s = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int s_cntr_1;
			object->s = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
			if (!object->s) { return -1; }
			talloc_set_name_const(object->s, "ARRAY: object->s");
			for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
				if (PyList_GET_ITEM(value, s_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->s)[s_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_Info1_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
				if (talloc_reference(object->s, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->s)[s_cntr_1] = *(struct dfs_Info1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumArray1_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_dfs_EnumArray1_get_count,
		.set = py_dfs_EnumArray1_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "s"),
		.get = py_dfs_EnumArray1_get_s,
		.set = py_dfs_EnumArray1_set_s,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info1")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumArray1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumArray1, type);
}


static PyTypeObject dfs_EnumArray1_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumArray1",
	.tp_getset = py_dfs_EnumArray1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumArray1_new,
};


static PyObject *py_dfs_EnumArray2_get_count(PyObject *obj, void *closure)
{
	struct dfs_EnumArray2 *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_dfs_EnumArray2_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumArray2_get_s(PyObject *obj, void *closure)
{
	struct dfs_EnumArray2 *object = pytalloc_get_ptr(obj);
	PyObject *py_s;
	if (object->s == NULL) {
		Py_RETURN_NONE;
	}
	if (object->s == NULL) {
		py_s = Py_None;
		Py_INCREF(py_s);
	} else {
		py_s = PyList_New(object->count);
		if (py_s == NULL) {
			return NULL;
		}
		{
			int s_cntr_1;
			for (s_cntr_1 = 0; s_cntr_1 < (object->count); s_cntr_1++) {
				PyObject *py_s_1;
				py_s_1 = pytalloc_reference_ex(&dfs_Info2_Type, object->s, &(object->s)[s_cntr_1]);
				PyList_SetItem(py_s, s_cntr_1, py_s_1);
			}
		}
	}
	return py_s;
}

static int py_dfs_EnumArray2_set_s(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->s));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->s");
		return -1;
	}
	if (value == Py_None) {
		object->s = NULL;
	} else {
		object->s = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int s_cntr_1;
			object->s = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
			if (!object->s) { return -1; }
			talloc_set_name_const(object->s, "ARRAY: object->s");
			for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
				if (PyList_GET_ITEM(value, s_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->s)[s_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_Info2_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
				if (talloc_reference(object->s, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->s)[s_cntr_1] = *(struct dfs_Info2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumArray2_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_dfs_EnumArray2_get_count,
		.set = py_dfs_EnumArray2_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "s"),
		.get = py_dfs_EnumArray2_get_s,
		.set = py_dfs_EnumArray2_set_s,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info2")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumArray2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumArray2, type);
}


static PyTypeObject dfs_EnumArray2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumArray2",
	.tp_getset = py_dfs_EnumArray2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumArray2_new,
};


static PyObject *py_dfs_EnumArray3_get_count(PyObject *obj, void *closure)
{
	struct dfs_EnumArray3 *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_dfs_EnumArray3_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumArray3_get_s(PyObject *obj, void *closure)
{
	struct dfs_EnumArray3 *object = pytalloc_get_ptr(obj);
	PyObject *py_s;
	if (object->s == NULL) {
		Py_RETURN_NONE;
	}
	if (object->s == NULL) {
		py_s = Py_None;
		Py_INCREF(py_s);
	} else {
		py_s = PyList_New(object->count);
		if (py_s == NULL) {
			return NULL;
		}
		{
			int s_cntr_1;
			for (s_cntr_1 = 0; s_cntr_1 < (object->count); s_cntr_1++) {
				PyObject *py_s_1;
				py_s_1 = pytalloc_reference_ex(&dfs_Info3_Type, object->s, &(object->s)[s_cntr_1]);
				PyList_SetItem(py_s, s_cntr_1, py_s_1);
			}
		}
	}
	return py_s;
}

static int py_dfs_EnumArray3_set_s(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray3 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->s));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->s");
		return -1;
	}
	if (value == Py_None) {
		object->s = NULL;
	} else {
		object->s = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int s_cntr_1;
			object->s = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
			if (!object->s) { return -1; }
			talloc_set_name_const(object->s, "ARRAY: object->s");
			for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
				if (PyList_GET_ITEM(value, s_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->s)[s_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_Info3_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
				if (talloc_reference(object->s, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->s)[s_cntr_1] = *(struct dfs_Info3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumArray3_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_dfs_EnumArray3_get_count,
		.set = py_dfs_EnumArray3_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "s"),
		.get = py_dfs_EnumArray3_get_s,
		.set = py_dfs_EnumArray3_set_s,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info3")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumArray3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumArray3, type);
}


static PyTypeObject dfs_EnumArray3_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumArray3",
	.tp_getset = py_dfs_EnumArray3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumArray3_new,
};


static PyObject *py_dfs_EnumArray4_get_count(PyObject *obj, void *closure)
{
	struct dfs_EnumArray4 *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_dfs_EnumArray4_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumArray4_get_s(PyObject *obj, void *closure)
{
	struct dfs_EnumArray4 *object = pytalloc_get_ptr(obj);
	PyObject *py_s;
	if (object->s == NULL) {
		Py_RETURN_NONE;
	}
	if (object->s == NULL) {
		py_s = Py_None;
		Py_INCREF(py_s);
	} else {
		py_s = PyList_New(object->count);
		if (py_s == NULL) {
			return NULL;
		}
		{
			int s_cntr_1;
			for (s_cntr_1 = 0; s_cntr_1 < (object->count); s_cntr_1++) {
				PyObject *py_s_1;
				py_s_1 = pytalloc_reference_ex(&dfs_Info4_Type, object->s, &(object->s)[s_cntr_1]);
				PyList_SetItem(py_s, s_cntr_1, py_s_1);
			}
		}
	}
	return py_s;
}

static int py_dfs_EnumArray4_set_s(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray4 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->s));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->s");
		return -1;
	}
	if (value == Py_None) {
		object->s = NULL;
	} else {
		object->s = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int s_cntr_1;
			object->s = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
			if (!object->s) { return -1; }
			talloc_set_name_const(object->s, "ARRAY: object->s");
			for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
				if (PyList_GET_ITEM(value, s_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->s)[s_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_Info4_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
				if (talloc_reference(object->s, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->s)[s_cntr_1] = *(struct dfs_Info4 *)pytalloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumArray4_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_dfs_EnumArray4_get_count,
		.set = py_dfs_EnumArray4_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "s"),
		.get = py_dfs_EnumArray4_get_s,
		.set = py_dfs_EnumArray4_set_s,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info4")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumArray4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumArray4, type);
}


static PyTypeObject dfs_EnumArray4_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumArray4",
	.tp_getset = py_dfs_EnumArray4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumArray4_new,
};


static PyObject *py_dfs_EnumArray5_get_count(PyObject *obj, void *closure)
{
	struct dfs_EnumArray5 *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_dfs_EnumArray5_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray5 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumArray5_get_s(PyObject *obj, void *closure)
{
	struct dfs_EnumArray5 *object = pytalloc_get_ptr(obj);
	PyObject *py_s;
	if (object->s == NULL) {
		Py_RETURN_NONE;
	}
	if (object->s == NULL) {
		py_s = Py_None;
		Py_INCREF(py_s);
	} else {
		py_s = PyList_New(object->count);
		if (py_s == NULL) {
			return NULL;
		}
		{
			int s_cntr_1;
			for (s_cntr_1 = 0; s_cntr_1 < (object->count); s_cntr_1++) {
				PyObject *py_s_1;
				py_s_1 = pytalloc_reference_ex(&dfs_Info5_Type, object->s, &(object->s)[s_cntr_1]);
				PyList_SetItem(py_s, s_cntr_1, py_s_1);
			}
		}
	}
	return py_s;
}

static int py_dfs_EnumArray5_set_s(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray5 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->s));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->s");
		return -1;
	}
	if (value == Py_None) {
		object->s = NULL;
	} else {
		object->s = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int s_cntr_1;
			object->s = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
			if (!object->s) { return -1; }
			talloc_set_name_const(object->s, "ARRAY: object->s");
			for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
				if (PyList_GET_ITEM(value, s_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->s)[s_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_Info5_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
				if (talloc_reference(object->s, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->s)[s_cntr_1] = *(struct dfs_Info5 *)pytalloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumArray5_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_dfs_EnumArray5_get_count,
		.set = py_dfs_EnumArray5_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "s"),
		.get = py_dfs_EnumArray5_get_s,
		.set = py_dfs_EnumArray5_set_s,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info5")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumArray5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumArray5, type);
}


static PyTypeObject dfs_EnumArray5_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumArray5",
	.tp_getset = py_dfs_EnumArray5_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumArray5_new,
};


static PyObject *py_dfs_EnumArray6_get_count(PyObject *obj, void *closure)
{
	struct dfs_EnumArray6 *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_dfs_EnumArray6_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumArray6_get_s(PyObject *obj, void *closure)
{
	struct dfs_EnumArray6 *object = pytalloc_get_ptr(obj);
	PyObject *py_s;
	if (object->s == NULL) {
		Py_RETURN_NONE;
	}
	if (object->s == NULL) {
		py_s = Py_None;
		Py_INCREF(py_s);
	} else {
		py_s = PyList_New(object->count);
		if (py_s == NULL) {
			return NULL;
		}
		{
			int s_cntr_1;
			for (s_cntr_1 = 0; s_cntr_1 < (object->count); s_cntr_1++) {
				PyObject *py_s_1;
				py_s_1 = pytalloc_reference_ex(&dfs_Info6_Type, object->s, &(object->s)[s_cntr_1]);
				PyList_SetItem(py_s, s_cntr_1, py_s_1);
			}
		}
	}
	return py_s;
}

static int py_dfs_EnumArray6_set_s(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray6 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->s));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->s");
		return -1;
	}
	if (value == Py_None) {
		object->s = NULL;
	} else {
		object->s = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int s_cntr_1;
			object->s = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
			if (!object->s) { return -1; }
			talloc_set_name_const(object->s, "ARRAY: object->s");
			for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
				if (PyList_GET_ITEM(value, s_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->s)[s_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_Info6_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
				if (talloc_reference(object->s, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->s)[s_cntr_1] = *(struct dfs_Info6 *)pytalloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumArray6_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_dfs_EnumArray6_get_count,
		.set = py_dfs_EnumArray6_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "s"),
		.get = py_dfs_EnumArray6_get_s,
		.set = py_dfs_EnumArray6_set_s,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info6")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumArray6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumArray6, type);
}


static PyTypeObject dfs_EnumArray6_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumArray6",
	.tp_getset = py_dfs_EnumArray6_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumArray6_new,
};


static PyObject *py_dfs_EnumArray200_get_count(PyObject *obj, void *closure)
{
	struct dfs_EnumArray200 *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_dfs_EnumArray200_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray200 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumArray200_get_s(PyObject *obj, void *closure)
{
	struct dfs_EnumArray200 *object = pytalloc_get_ptr(obj);
	PyObject *py_s;
	if (object->s == NULL) {
		Py_RETURN_NONE;
	}
	if (object->s == NULL) {
		py_s = Py_None;
		Py_INCREF(py_s);
	} else {
		py_s = PyList_New(object->count);
		if (py_s == NULL) {
			return NULL;
		}
		{
			int s_cntr_1;
			for (s_cntr_1 = 0; s_cntr_1 < (object->count); s_cntr_1++) {
				PyObject *py_s_1;
				py_s_1 = pytalloc_reference_ex(&dfs_Info200_Type, object->s, &(object->s)[s_cntr_1]);
				PyList_SetItem(py_s, s_cntr_1, py_s_1);
			}
		}
	}
	return py_s;
}

static int py_dfs_EnumArray200_set_s(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray200 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->s));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->s");
		return -1;
	}
	if (value == Py_None) {
		object->s = NULL;
	} else {
		object->s = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int s_cntr_1;
			object->s = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
			if (!object->s) { return -1; }
			talloc_set_name_const(object->s, "ARRAY: object->s");
			for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
				if (PyList_GET_ITEM(value, s_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->s)[s_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_Info200_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
				if (talloc_reference(object->s, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->s)[s_cntr_1] = *(struct dfs_Info200 *)pytalloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumArray200_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_dfs_EnumArray200_get_count,
		.set = py_dfs_EnumArray200_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "s"),
		.get = py_dfs_EnumArray200_get_s,
		.set = py_dfs_EnumArray200_set_s,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info200")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumArray200_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumArray200, type);
}


static PyTypeObject dfs_EnumArray200_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumArray200",
	.tp_getset = py_dfs_EnumArray200_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumArray200_new,
};


static PyObject *py_dfs_EnumArray300_get_count(PyObject *obj, void *closure)
{
	struct dfs_EnumArray300 *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_dfs_EnumArray300_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray300 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumArray300_get_s(PyObject *obj, void *closure)
{
	struct dfs_EnumArray300 *object = pytalloc_get_ptr(obj);
	PyObject *py_s;
	if (object->s == NULL) {
		Py_RETURN_NONE;
	}
	if (object->s == NULL) {
		py_s = Py_None;
		Py_INCREF(py_s);
	} else {
		py_s = PyList_New(object->count);
		if (py_s == NULL) {
			return NULL;
		}
		{
			int s_cntr_1;
			for (s_cntr_1 = 0; s_cntr_1 < (object->count); s_cntr_1++) {
				PyObject *py_s_1;
				py_s_1 = pytalloc_reference_ex(&dfs_Info300_Type, object->s, &(object->s)[s_cntr_1]);
				PyList_SetItem(py_s, s_cntr_1, py_s_1);
			}
		}
	}
	return py_s;
}

static int py_dfs_EnumArray300_set_s(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumArray300 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->s));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->s");
		return -1;
	}
	if (value == Py_None) {
		object->s = NULL;
	} else {
		object->s = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int s_cntr_1;
			object->s = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
			if (!object->s) { return -1; }
			talloc_set_name_const(object->s, "ARRAY: object->s");
			for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
				if (PyList_GET_ITEM(value, s_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->s)[s_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&dfs_Info300_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
				if (talloc_reference(object->s, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->s)[s_cntr_1] = *(struct dfs_Info300 *)pytalloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumArray300_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_dfs_EnumArray300_get_count,
		.set = py_dfs_EnumArray300_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "s"),
		.get = py_dfs_EnumArray300_get_s,
		.set = py_dfs_EnumArray300_set_s,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info300")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumArray300_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumArray300, type);
}


static PyTypeObject dfs_EnumArray300_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumArray300",
	.tp_getset = py_dfs_EnumArray300_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumArray300_new,
};

static PyObject *py_import_dfs_EnumInfo(TALLOC_CTX *mem_ctx, int level, union dfs_EnumInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			if (in->info1 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_EnumArray1_Type, in->info1, in->info1);
			}
			return ret;

		case 2:
			if (in->info2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_EnumArray2_Type, in->info2, in->info2);
			}
			return ret;

		case 3:
			if (in->info3 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_EnumArray3_Type, in->info3, in->info3);
			}
			return ret;

		case 4:
			if (in->info4 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_EnumArray4_Type, in->info4, in->info4);
			}
			return ret;

		case 5:
			if (in->info5 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_EnumArray5_Type, in->info5, in->info5);
			}
			return ret;

		case 6:
			if (in->info6 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_EnumArray6_Type, in->info6, in->info6);
			}
			return ret;

		case 200:
			if (in->info200 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_EnumArray200_Type, in->info200, in->info200);
			}
			return ret;

		case 300:
			if (in->info300 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&dfs_EnumArray300_Type, in->info300, in->info300);
			}
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

static union dfs_EnumInfo *py_export_dfs_EnumInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union dfs_EnumInfo *ret = talloc_zero(mem_ctx, union dfs_EnumInfo);
	switch (level) {
		case 1:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&dfs_EnumArray1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info1 = (struct dfs_EnumArray1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info2");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info2 = NULL;
			} else {
				ret->info2 = NULL;
				PY_CHECK_TYPE(&dfs_EnumArray2_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info2 = (struct dfs_EnumArray2 *)pytalloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info3");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info3 = NULL;
			} else {
				ret->info3 = NULL;
				PY_CHECK_TYPE(&dfs_EnumArray3_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info3 = (struct dfs_EnumArray3 *)pytalloc_get_ptr(in);
			}
			break;

		case 4:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info4");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info4 = NULL;
			} else {
				ret->info4 = NULL;
				PY_CHECK_TYPE(&dfs_EnumArray4_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info4 = (struct dfs_EnumArray4 *)pytalloc_get_ptr(in);
			}
			break;

		case 5:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info5");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info5 = NULL;
			} else {
				ret->info5 = NULL;
				PY_CHECK_TYPE(&dfs_EnumArray5_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info5 = (struct dfs_EnumArray5 *)pytalloc_get_ptr(in);
			}
			break;

		case 6:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info6");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info6 = NULL;
			} else {
				ret->info6 = NULL;
				PY_CHECK_TYPE(&dfs_EnumArray6_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info6 = (struct dfs_EnumArray6 *)pytalloc_get_ptr(in);
			}
			break;

		case 200:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info200");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info200 = NULL;
			} else {
				ret->info200 = NULL;
				PY_CHECK_TYPE(&dfs_EnumArray200_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info200 = (struct dfs_EnumArray200 *)pytalloc_get_ptr(in);
			}
			break;

		case 300:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info300");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info300 = NULL;
			} else {
				ret->info300 = NULL;
				PY_CHECK_TYPE(&dfs_EnumArray300_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info300 = (struct dfs_EnumArray300 *)pytalloc_get_ptr(in);
			}
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}

static PyObject *py_dfs_EnumInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union dfs_EnumInfo *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union dfs_EnumInfo *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union dfs_EnumInfo!");
		return NULL;
	}

	return py_import_dfs_EnumInfo(mem_ctx, level, in);
}

static PyObject *py_dfs_EnumInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union dfs_EnumInfo *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_dfs_EnumInfo(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_dfs_EnumInfo_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_EnumInfo_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_EnumInfo_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_dfs_EnumInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject dfs_EnumInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumInfo",
	.tp_getset = NULL,
	.tp_methods = py_dfs_EnumInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumInfo_new,
};


static PyObject *py_dfs_EnumStruct_get_level(PyObject *obj, void *closure)
{
	struct dfs_EnumStruct *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
	return py_level;
}

static int py_dfs_EnumStruct_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumStruct *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumStruct_get_e(PyObject *obj, void *closure)
{
	struct dfs_EnumStruct *object = pytalloc_get_ptr(obj);
	PyObject *py_e;
	py_e = pyrpc_import_union(&dfs_EnumInfo_Type, pytalloc_get_mem_ctx(obj), object->level, &object->e, "union dfs_EnumInfo");
	if (py_e == NULL) {
		return NULL;
	}
	return py_e;
}

static int py_dfs_EnumStruct_set_e(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumStruct *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->e");
		return -1;
	}
	{
		union dfs_EnumInfo *e_switch_0;
		e_switch_0 = (union dfs_EnumInfo *)pyrpc_export_union(&dfs_EnumInfo_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union dfs_EnumInfo");
		if (e_switch_0 == NULL) {
			return -1;
		}
		object->e = *e_switch_0;
	}
	return 0;
}

static PyGetSetDef py_dfs_EnumStruct_getsetters[] = {
	{
		.name = discard_const_p(char, "level"),
		.get = py_dfs_EnumStruct_get_level,
		.set = py_dfs_EnumStruct_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "e"),
		.get = py_dfs_EnumStruct_get_e,
		.set = py_dfs_EnumStruct_set_e,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_EnumInfo")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumStruct_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_EnumStruct, type);
}


static PyTypeObject dfs_EnumStruct_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumStruct",
	.tp_getset = py_dfs_EnumStruct_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumStruct_new,
};


static PyObject *py_dfs_UnknownStruct_get_unknown1(PyObject *obj, void *closure)
{
	struct dfs_UnknownStruct *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
	return py_unknown1;
}

static int py_dfs_UnknownStruct_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_UnknownStruct *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown1 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_UnknownStruct_get_unknown2(PyObject *obj, void *closure)
{
	struct dfs_UnknownStruct *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	if (object->unknown2 == NULL) {
		Py_RETURN_NONE;
	}
	if (object->unknown2 == NULL) {
		py_unknown2 = Py_None;
		Py_INCREF(py_unknown2);
	} else {
		if (object->unknown2 == NULL) {
			py_unknown2 = Py_None;
			Py_INCREF(py_unknown2);
		} else {
			py_unknown2 = PyUnicode_Decode(object->unknown2, strlen(object->unknown2), "utf-8", "ignore");
		}
	}
	return py_unknown2;
}

static int py_dfs_UnknownStruct_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_UnknownStruct *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	if (value == Py_None) {
		object->unknown2 = NULL;
	} else {
		object->unknown2 = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->unknown2 = talloc_str;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_UnknownStruct_getsetters[] = {
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_dfs_UnknownStruct_get_unknown1,
		.set = py_dfs_UnknownStruct_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_dfs_UnknownStruct_get_unknown2,
		.set = py_dfs_UnknownStruct_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_UnknownStruct_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct dfs_UnknownStruct, type);
}


static PyTypeObject dfs_UnknownStruct_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.UnknownStruct",
	.tp_getset = py_dfs_UnknownStruct_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_UnknownStruct_new,
};



static PyObject *py_dfs_GetManagerVersion_out_get_version(PyObject *obj, void *closure)
{
	struct dfs_GetManagerVersion *object = pytalloc_get_ptr(obj);
	PyObject *py_version;
	if (object->out.version == NULL) {
		Py_RETURN_NONE;
	}
	py_version = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.version));
	return py_version;
}

static int py_dfs_GetManagerVersion_out_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetManagerVersion *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.version));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.version");
		return -1;
	}
	object->out.version = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.version);
	if (object->out.version == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.version));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.version = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_dfs_GetManagerVersion_getsetters[] = {
	{
		.name = discard_const_p(char, "out_version"),
		.get = py_dfs_GetManagerVersion_out_get_version,
		.set = py_dfs_GetManagerVersion_out_set_version,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_ManagerVersion")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_GetManagerVersion_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_GetManagerVersion, type);
	struct dfs_GetManagerVersion *_self = (struct dfs_GetManagerVersion *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->out.version = talloc_zero(mem_ctx, enum dfs_ManagerVersion);
	return self;
}

static PyObject *py_dfs_GetManagerVersion_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(0);
}

static PyObject *py_dfs_GetManagerVersion_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetManagerVersion *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 1) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetManagerVersion_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[0];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_GetManagerVersion_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_GetManagerVersion_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_GetManagerVersion_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_GetManagerVersion_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_GetManagerVersion_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetManagerVersion *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 1) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetManagerVersion_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[0];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_GetManagerVersion_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_GetManagerVersion_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_GetManagerVersion_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_GetManagerVersion_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_GetManagerVersion_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetManagerVersion *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 1) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetManagerVersion_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[0];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_GetManagerVersion_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_GetManagerVersion_ndr_print(py_obj, args, kwargs, "dfs_GetManagerVersion_in", NDR_IN);
}

static PyObject *py_dfs_GetManagerVersion_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_GetManagerVersion_ndr_print(py_obj, args, kwargs, "dfs_GetManagerVersion_out", NDR_OUT);
}

static PyMethodDef py_dfs_GetManagerVersion_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_GetManagerVersion_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.GetManagerVersion.opnum() -> 0 (0x00) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetManagerVersion_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetManagerVersion_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetManagerVersion_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetManagerVersion_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetManagerVersion_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetManagerVersion_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_GetManagerVersion_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.GetManagerVersion",
	.tp_getset = py_dfs_GetManagerVersion_getsetters,
	.tp_methods = py_dfs_GetManagerVersion_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_GetManagerVersion_new,
};

static bool pack_py_dfs_GetManagerVersion_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetManagerVersion *r)
{
	const char *kwnames[] = {
		NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":dfs_GetManagerVersion", discard_const_p(char *, kwnames))) {
		return false;
	}

	return true;
}

static PyObject *unpack_py_dfs_GetManagerVersion_args_out(struct dfs_GetManagerVersion *r, bool raise_result_exception)
{
	PyObject *py_version = NULL;
	PyObject *result = NULL;

	py_version = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.version));
	result = py_version;

	return result;
}


static PyObject *py_dfs_Add_in_get_path(PyObject *obj, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(obj);
	PyObject *py_path;
	if (object->in.path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.path == NULL) {
		py_path = Py_None;
		Py_INCREF(py_path);
	} else {
		py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
	}
	return py_path;
}

static int py_dfs_Add_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.path");
		return -1;
	}
	object->in.path = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.path);
	if (object->in.path == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.path = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_Add_in_get_server(PyObject *obj, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(obj);
	PyObject *py_server;
	if (object->in.server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server == NULL) {
		py_server = Py_None;
		Py_INCREF(py_server);
	} else {
		py_server = PyUnicode_Decode(object->in.server, strlen(object->in.server), "utf-8", "ignore");
	}
	return py_server;
}

static int py_dfs_Add_in_set_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server");
		return -1;
	}
	object->in.server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server);
	if (object->in.server == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.server = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_Add_in_get_share(PyObject *obj, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(obj);
	PyObject *py_share;
	if (object->in.share == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.share == NULL) {
		py_share = Py_None;
		Py_INCREF(py_share);
	} else {
		if (object->in.share == NULL) {
			py_share = Py_None;
			Py_INCREF(py_share);
		} else {
			py_share = PyUnicode_Decode(object->in.share, strlen(object->in.share), "utf-8", "ignore");
		}
	}
	return py_share;
}

static int py_dfs_Add_in_set_share(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.share");
		return -1;
	}
	if (value == Py_None) {
		object->in.share = NULL;
	} else {
		object->in.share = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.share = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Add_in_get_comment(PyObject *obj, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->in.comment == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->in.comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->in.comment, strlen(object->in.comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_dfs_Add_in_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.comment");
		return -1;
	}
	if (value == Py_None) {
		object->in.comment = NULL;
	} else {
		object->in.comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.comment = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Add_in_get_flags(PyObject *obj, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_dfs_Add_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Add_get_result(PyObject *obj, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_Add_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_Add_getsetters[] = {
	{
		.name = discard_const_p(char, "in_path"),
		.get = py_dfs_Add_in_get_path,
		.set = py_dfs_Add_in_set_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_server"),
		.get = py_dfs_Add_in_get_server,
		.set = py_dfs_Add_in_set_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_share"),
		.get = py_dfs_Add_in_get_share,
		.set = py_dfs_Add_in_set_share,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_comment"),
		.get = py_dfs_Add_in_get_comment,
		.set = py_dfs_Add_in_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_dfs_Add_in_get_flags,
		.set = py_dfs_Add_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_Add_get_result,
		.set = py_dfs_Add_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Add_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_Add, type);
	return self;
}

static PyObject *py_dfs_Add_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(1);
}

static PyObject *py_dfs_Add_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 2) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Add_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[1];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_Add_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_Add_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_Add_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_Add_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_Add_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 2) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Add_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[1];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_Add_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_Add_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_Add_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_Add_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_Add_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Add *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 2) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Add_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[1];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_Add_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_Add_ndr_print(py_obj, args, kwargs, "dfs_Add_in", NDR_IN);
}

static PyObject *py_dfs_Add_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_Add_ndr_print(py_obj, args, kwargs, "dfs_Add_out", NDR_OUT);
}

static PyMethodDef py_dfs_Add_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_Add_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.Add.opnum() -> 1 (0x01) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Add_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Add_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Add_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Add_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Add_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Add_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_Add_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Add",
	.tp_getset = py_dfs_Add_getsetters,
	.tp_methods = py_dfs_Add_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Add_new,
};

static bool pack_py_dfs_Add_args_in(PyObject *args, PyObject *kwargs, struct dfs_Add *r)
{
	PyObject *py_path;
	PyObject *py_server;
	PyObject *py_share;
	PyObject *py_comment;
	PyObject *py_flags;
	const char *kwnames[] = {
		"path", "server", "share", "comment", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:dfs_Add", discard_const_p(char *, kwnames), &py_path, &py_server, &py_share, &py_comment, &py_flags)) {
		return false;
	}

	if (py_path == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.path");
		return false;
	}
	r->in.path = talloc_ptrtype(r, r->in.path);
	if (r->in.path == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_path)) {
			unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_path)) {
			test_str = PyBytes_AS_STRING(py_path);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.path = talloc_str;
	}
	if (py_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server");
		return false;
	}
	r->in.server = talloc_ptrtype(r, r->in.server);
	if (r->in.server == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_server)) {
			unicode = PyUnicode_AsEncodedString(py_server, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_server)) {
			test_str = PyBytes_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.server = talloc_str;
	}
	if (py_share == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.share");
		return false;
	}
	if (py_share == Py_None) {
		r->in.share = NULL;
	} else {
		r->in.share = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_share)) {
				unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_share)) {
				test_str = PyBytes_AS_STRING(py_share);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.share = talloc_str;
		}
	}
	if (py_comment == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.comment");
		return false;
	}
	if (py_comment == Py_None) {
		r->in.comment = NULL;
	} else {
		r->in.comment = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_comment)) {
				unicode = PyUnicode_AsEncodedString(py_comment, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_comment)) {
				test_str = PyBytes_AS_STRING(py_comment);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.comment = talloc_str;
		}
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_Add_args_out(struct dfs_Add *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_Remove_in_get_dfs_entry_path(PyObject *obj, void *closure)
{
	struct dfs_Remove *object = pytalloc_get_ptr(obj);
	PyObject *py_dfs_entry_path;
	if (object->in.dfs_entry_path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.dfs_entry_path == NULL) {
		py_dfs_entry_path = Py_None;
		Py_INCREF(py_dfs_entry_path);
	} else {
		py_dfs_entry_path = PyUnicode_Decode(object->in.dfs_entry_path, strlen(object->in.dfs_entry_path), "utf-8", "ignore");
	}
	return py_dfs_entry_path;
}

static int py_dfs_Remove_in_set_dfs_entry_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Remove *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dfs_entry_path");
		return -1;
	}
	object->in.dfs_entry_path = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dfs_entry_path);
	if (object->in.dfs_entry_path == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dfs_entry_path = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_Remove_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_Remove *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		if (object->in.servername == NULL) {
			py_servername = Py_None;
			Py_INCREF(py_servername);
		} else {
			py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
		}
	}
	return py_servername;
}

static int py_dfs_Remove_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Remove *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	if (value == Py_None) {
		object->in.servername = NULL;
	} else {
		object->in.servername = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.servername = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Remove_in_get_sharename(PyObject *obj, void *closure)
{
	struct dfs_Remove *object = pytalloc_get_ptr(obj);
	PyObject *py_sharename;
	if (object->in.sharename == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.sharename == NULL) {
		py_sharename = Py_None;
		Py_INCREF(py_sharename);
	} else {
		if (object->in.sharename == NULL) {
			py_sharename = Py_None;
			Py_INCREF(py_sharename);
		} else {
			py_sharename = PyUnicode_Decode(object->in.sharename, strlen(object->in.sharename), "utf-8", "ignore");
		}
	}
	return py_sharename;
}

static int py_dfs_Remove_in_set_sharename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Remove *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sharename");
		return -1;
	}
	if (value == Py_None) {
		object->in.sharename = NULL;
	} else {
		object->in.sharename = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.sharename = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_Remove_get_result(PyObject *obj, void *closure)
{
	struct dfs_Remove *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_Remove_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Remove *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_Remove_getsetters[] = {
	{
		.name = discard_const_p(char, "in_dfs_entry_path"),
		.get = py_dfs_Remove_in_get_dfs_entry_path,
		.set = py_dfs_Remove_in_set_dfs_entry_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_Remove_in_get_servername,
		.set = py_dfs_Remove_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_sharename"),
		.get = py_dfs_Remove_in_get_sharename,
		.set = py_dfs_Remove_in_set_sharename,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_Remove_get_result,
		.set = py_dfs_Remove_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Remove_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_Remove, type);
	return self;
}

static PyObject *py_dfs_Remove_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(2);
}

static PyObject *py_dfs_Remove_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Remove *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 3) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Remove_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[2];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_Remove_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_Remove_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_Remove_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_Remove_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_Remove_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Remove *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 3) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Remove_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[2];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_Remove_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_Remove_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_Remove_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_Remove_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_Remove_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Remove *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 3) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Remove_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[2];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_Remove_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_Remove_ndr_print(py_obj, args, kwargs, "dfs_Remove_in", NDR_IN);
}

static PyObject *py_dfs_Remove_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_Remove_ndr_print(py_obj, args, kwargs, "dfs_Remove_out", NDR_OUT);
}

static PyMethodDef py_dfs_Remove_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_Remove_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.Remove.opnum() -> 2 (0x02) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Remove_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Remove_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Remove_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Remove_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Remove_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Remove_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_Remove_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Remove",
	.tp_getset = py_dfs_Remove_getsetters,
	.tp_methods = py_dfs_Remove_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Remove_new,
};

static bool pack_py_dfs_Remove_args_in(PyObject *args, PyObject *kwargs, struct dfs_Remove *r)
{
	PyObject *py_dfs_entry_path;
	PyObject *py_servername;
	PyObject *py_sharename;
	const char *kwnames[] = {
		"dfs_entry_path", "servername", "sharename", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:dfs_Remove", discard_const_p(char *, kwnames), &py_dfs_entry_path, &py_servername, &py_sharename)) {
		return false;
	}

	if (py_dfs_entry_path == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dfs_entry_path");
		return false;
	}
	r->in.dfs_entry_path = talloc_ptrtype(r, r->in.dfs_entry_path);
	if (r->in.dfs_entry_path == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dfs_entry_path)) {
			unicode = PyUnicode_AsEncodedString(py_dfs_entry_path, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dfs_entry_path)) {
			test_str = PyBytes_AS_STRING(py_dfs_entry_path);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dfs_entry_path = talloc_str;
	}
	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_servername)) {
				unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_servername)) {
				test_str = PyBytes_AS_STRING(py_servername);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.servername = talloc_str;
		}
	}
	if (py_sharename == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sharename");
		return false;
	}
	if (py_sharename == Py_None) {
		r->in.sharename = NULL;
	} else {
		r->in.sharename = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_sharename)) {
				unicode = PyUnicode_AsEncodedString(py_sharename, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_sharename)) {
				test_str = PyBytes_AS_STRING(py_sharename);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.sharename = talloc_str;
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_Remove_args_out(struct dfs_Remove *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_SetInfo_in_get_dfs_entry_path(PyObject *obj, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dfs_entry_path;
	if (object->in.dfs_entry_path == NULL) {
		py_dfs_entry_path = Py_None;
		Py_INCREF(py_dfs_entry_path);
	} else {
		py_dfs_entry_path = PyUnicode_Decode(object->in.dfs_entry_path, strlen(object->in.dfs_entry_path), "utf-8", "ignore");
	}
	return py_dfs_entry_path;
}

static int py_dfs_SetInfo_in_set_dfs_entry_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dfs_entry_path");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dfs_entry_path = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_SetInfo_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		if (object->in.servername == NULL) {
			py_servername = Py_None;
			Py_INCREF(py_servername);
		} else {
			py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
		}
	}
	return py_servername;
}

static int py_dfs_SetInfo_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	if (value == Py_None) {
		object->in.servername = NULL;
	} else {
		object->in.servername = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.servername = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_SetInfo_in_get_sharename(PyObject *obj, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_sharename;
	if (object->in.sharename == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.sharename == NULL) {
		py_sharename = Py_None;
		Py_INCREF(py_sharename);
	} else {
		if (object->in.sharename == NULL) {
			py_sharename = Py_None;
			Py_INCREF(py_sharename);
		} else {
			py_sharename = PyUnicode_Decode(object->in.sharename, strlen(object->in.sharename), "utf-8", "ignore");
		}
	}
	return py_sharename;
}

static int py_dfs_SetInfo_in_set_sharename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sharename");
		return -1;
	}
	if (value == Py_None) {
		object->in.sharename = NULL;
	} else {
		object->in.sharename = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.sharename = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_SetInfo_in_get_level(PyObject *obj, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_dfs_SetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_SetInfo_in_get_info(PyObject *obj, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->in.info == NULL) {
		Py_RETURN_NONE;
	}
	py_info = pyrpc_import_union(&dfs_Info_Type, object->in.info, object->in.level, object->in.info, "union dfs_Info");
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_dfs_SetInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
		return -1;
	}
	object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
	if (object->in.info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union dfs_Info *info_switch_1;
		info_switch_1 = (union dfs_Info *)pyrpc_export_union(&dfs_Info_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union dfs_Info");
		if (info_switch_1 == NULL) {
			return -1;
		}
		object->in.info = info_switch_1;
	}
	return 0;
}

static PyObject *py_dfs_SetInfo_get_result(PyObject *obj, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_SetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_SetInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "in_dfs_entry_path"),
		.get = py_dfs_SetInfo_in_get_dfs_entry_path,
		.set = py_dfs_SetInfo_in_set_dfs_entry_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_SetInfo_in_get_servername,
		.set = py_dfs_SetInfo_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_sharename"),
		.get = py_dfs_SetInfo_in_get_sharename,
		.set = py_dfs_SetInfo_in_set_sharename,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_dfs_SetInfo_in_get_level,
		.set = py_dfs_SetInfo_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_info"),
		.get = py_dfs_SetInfo_in_get_info,
		.set = py_dfs_SetInfo_in_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_SetInfo_get_result,
		.set = py_dfs_SetInfo_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_SetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_SetInfo, type);
	struct dfs_SetInfo *_self = (struct dfs_SetInfo *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.info = talloc_zero(mem_ctx, union dfs_Info);
	return self;
}

static PyObject *py_dfs_SetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(3);
}

static PyObject *py_dfs_SetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 4) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_SetInfo_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[3];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_SetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_SetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_SetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_SetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_SetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 4) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_SetInfo_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[3];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_SetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_SetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_SetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_SetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_SetInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_SetInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 4) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_SetInfo_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[3];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_SetInfo_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_SetInfo_ndr_print(py_obj, args, kwargs, "dfs_SetInfo_in", NDR_IN);
}

static PyObject *py_dfs_SetInfo_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_SetInfo_ndr_print(py_obj, args, kwargs, "dfs_SetInfo_out", NDR_OUT);
}

static PyMethodDef py_dfs_SetInfo_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_SetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.SetInfo.opnum() -> 3 (0x03) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetInfo_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetInfo_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_SetInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.SetInfo",
	.tp_getset = py_dfs_SetInfo_getsetters,
	.tp_methods = py_dfs_SetInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_SetInfo_new,
};

static bool pack_py_dfs_SetInfo_args_in(PyObject *args, PyObject *kwargs, struct dfs_SetInfo *r)
{
	PyObject *py_dfs_entry_path;
	PyObject *py_servername;
	PyObject *py_sharename;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"dfs_entry_path", "servername", "sharename", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:dfs_SetInfo", discard_const_p(char *, kwnames), &py_dfs_entry_path, &py_servername, &py_sharename, &py_level, &py_info)) {
		return false;
	}

	if (py_dfs_entry_path == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dfs_entry_path");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dfs_entry_path)) {
			unicode = PyUnicode_AsEncodedString(py_dfs_entry_path, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dfs_entry_path)) {
			test_str = PyBytes_AS_STRING(py_dfs_entry_path);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dfs_entry_path = talloc_str;
	}
	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_servername)) {
				unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_servername)) {
				test_str = PyBytes_AS_STRING(py_servername);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.servername = talloc_str;
		}
	}
	if (py_sharename == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sharename");
		return false;
	}
	if (py_sharename == Py_None) {
		r->in.sharename = NULL;
	} else {
		r->in.sharename = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_sharename)) {
				unicode = PyUnicode_AsEncodedString(py_sharename, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_sharename)) {
				test_str = PyBytes_AS_STRING(py_sharename);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.sharename = talloc_str;
		}
	}
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_info == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
		return false;
	}
	r->in.info = talloc_ptrtype(r, r->in.info);
	if (r->in.info == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		union dfs_Info *info_switch_1;
		info_switch_1 = (union dfs_Info *)pyrpc_export_union(&dfs_Info_Type, r, r->in.level, py_info, "union dfs_Info");
		if (info_switch_1 == NULL) {
			return false;
		}
		r->in.info = info_switch_1;
	}
	return true;
}

static PyObject *unpack_py_dfs_SetInfo_args_out(struct dfs_SetInfo *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_GetInfo_in_get_dfs_entry_path(PyObject *obj, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dfs_entry_path;
	if (object->in.dfs_entry_path == NULL) {
		py_dfs_entry_path = Py_None;
		Py_INCREF(py_dfs_entry_path);
	} else {
		py_dfs_entry_path = PyUnicode_Decode(object->in.dfs_entry_path, strlen(object->in.dfs_entry_path), "utf-8", "ignore");
	}
	return py_dfs_entry_path;
}

static int py_dfs_GetInfo_in_set_dfs_entry_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dfs_entry_path");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dfs_entry_path = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_GetInfo_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		if (object->in.servername == NULL) {
			py_servername = Py_None;
			Py_INCREF(py_servername);
		} else {
			py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
		}
	}
	return py_servername;
}

static int py_dfs_GetInfo_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	if (value == Py_None) {
		object->in.servername = NULL;
	} else {
		object->in.servername = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.servername = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetInfo_in_get_sharename(PyObject *obj, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_sharename;
	if (object->in.sharename == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.sharename == NULL) {
		py_sharename = Py_None;
		Py_INCREF(py_sharename);
	} else {
		if (object->in.sharename == NULL) {
			py_sharename = Py_None;
			Py_INCREF(py_sharename);
		} else {
			py_sharename = PyUnicode_Decode(object->in.sharename, strlen(object->in.sharename), "utf-8", "ignore");
		}
	}
	return py_sharename;
}

static int py_dfs_GetInfo_in_set_sharename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sharename");
		return -1;
	}
	if (value == Py_None) {
		object->in.sharename = NULL;
	} else {
		object->in.sharename = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.sharename = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetInfo_in_get_level(PyObject *obj, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_dfs_GetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetInfo_out_get_info(PyObject *obj, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	py_info = pyrpc_import_union(&dfs_Info_Type, object->out.info, object->in.level, object->out.info, "union dfs_Info");
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_dfs_GetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
	if (object->out.info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union dfs_Info *info_switch_1;
		info_switch_1 = (union dfs_Info *)pyrpc_export_union(&dfs_Info_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union dfs_Info");
		if (info_switch_1 == NULL) {
			return -1;
		}
		object->out.info = info_switch_1;
	}
	return 0;
}

static PyObject *py_dfs_GetInfo_get_result(PyObject *obj, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_GetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_GetInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "in_dfs_entry_path"),
		.get = py_dfs_GetInfo_in_get_dfs_entry_path,
		.set = py_dfs_GetInfo_in_set_dfs_entry_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_GetInfo_in_get_servername,
		.set = py_dfs_GetInfo_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_sharename"),
		.get = py_dfs_GetInfo_in_get_sharename,
		.set = py_dfs_GetInfo_in_set_sharename,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_dfs_GetInfo_in_get_level,
		.set = py_dfs_GetInfo_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_dfs_GetInfo_out_get_info,
		.set = py_dfs_GetInfo_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_Info")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_GetInfo_get_result,
		.set = py_dfs_GetInfo_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_GetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_GetInfo, type);
	struct dfs_GetInfo *_self = (struct dfs_GetInfo *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->out.info = talloc_zero(mem_ctx, union dfs_Info);
	return self;
}

static PyObject *py_dfs_GetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(4);
}

static PyObject *py_dfs_GetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 5) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetInfo_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[4];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_GetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_GetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_GetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_GetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_GetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 5) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetInfo_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[4];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_GetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_GetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_GetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_GetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_GetInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 5) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetInfo_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[4];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_GetInfo_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_GetInfo_ndr_print(py_obj, args, kwargs, "dfs_GetInfo_in", NDR_IN);
}

static PyObject *py_dfs_GetInfo_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_GetInfo_ndr_print(py_obj, args, kwargs, "dfs_GetInfo_out", NDR_OUT);
}

static PyMethodDef py_dfs_GetInfo_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_GetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.GetInfo.opnum() -> 4 (0x04) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetInfo_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetInfo_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_GetInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.GetInfo",
	.tp_getset = py_dfs_GetInfo_getsetters,
	.tp_methods = py_dfs_GetInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_GetInfo_new,
};

static bool pack_py_dfs_GetInfo_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetInfo *r)
{
	PyObject *py_dfs_entry_path;
	PyObject *py_servername;
	PyObject *py_sharename;
	PyObject *py_level;
	const char *kwnames[] = {
		"dfs_entry_path", "servername", "sharename", "level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_GetInfo", discard_const_p(char *, kwnames), &py_dfs_entry_path, &py_servername, &py_sharename, &py_level)) {
		return false;
	}

	if (py_dfs_entry_path == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dfs_entry_path");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dfs_entry_path)) {
			unicode = PyUnicode_AsEncodedString(py_dfs_entry_path, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dfs_entry_path)) {
			test_str = PyBytes_AS_STRING(py_dfs_entry_path);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dfs_entry_path = talloc_str;
	}
	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_servername)) {
				unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_servername)) {
				test_str = PyBytes_AS_STRING(py_servername);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.servername = talloc_str;
		}
	}
	if (py_sharename == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sharename");
		return false;
	}
	if (py_sharename == Py_None) {
		r->in.sharename = NULL;
	} else {
		r->in.sharename = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_sharename)) {
				unicode = PyUnicode_AsEncodedString(py_sharename, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_sharename)) {
				test_str = PyBytes_AS_STRING(py_sharename);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.sharename = talloc_str;
		}
	}
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_GetInfo_args_out(struct dfs_GetInfo *r, bool raise_result_exception)
{
	PyObject *py_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_info = pyrpc_import_union(&dfs_Info_Type, r->out.info, r->in.level, r->out.info, "union dfs_Info");
	if (py_info == NULL) {
		return NULL;
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_info);
	}
	if (result_size == 1) {
		result = py_info;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_dfs_Enum_in_get_level(PyObject *obj, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_dfs_Enum_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Enum_in_get_bufsize(PyObject *obj, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(obj);
	PyObject *py_bufsize;
	py_bufsize = PyLong_FromUnsignedLongLong((uint32_t)(object->in.bufsize));
	return py_bufsize;
}

static int py_dfs_Enum_in_set_bufsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.bufsize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.bufsize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.bufsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_Enum_in_get_info(PyObject *obj, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->in.info == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&dfs_EnumStruct_Type, object->in.info, object->in.info);
	}
	return py_info;
}

static int py_dfs_Enum_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
		return -1;
	}
	if (value == Py_None) {
		object->in.info = NULL;
	} else {
		object->in.info = NULL;
		PY_CHECK_TYPE(&dfs_EnumStruct_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.info = (struct dfs_EnumStruct *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_dfs_Enum_out_get_info(PyObject *obj, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&dfs_EnumStruct_Type, object->out.info, object->out.info);
	}
	return py_info;
}

static int py_dfs_Enum_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	if (value == Py_None) {
		object->out.info = NULL;
	} else {
		object->out.info = NULL;
		PY_CHECK_TYPE(&dfs_EnumStruct_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->out.info = (struct dfs_EnumStruct *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_dfs_Enum_in_get_total(PyObject *obj, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(obj);
	PyObject *py_total;
	if (object->in.total == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.total == NULL) {
		py_total = Py_None;
		Py_INCREF(py_total);
	} else {
		py_total = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.total));
	}
	return py_total;
}

static int py_dfs_Enum_in_set_total(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.total));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.total");
		return -1;
	}
	if (value == Py_None) {
		object->in.total = NULL;
	} else {
		object->in.total = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.total);
		if (object->in.total == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		{
			const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.total));
			if (PyLong_Check(value)) {
				unsigned long long test_var;
				test_var = PyLong_AsUnsignedLongLong(value);
				if (PyErr_Occurred() != NULL) {
					return -1;
				}
				if (test_var > uint_max) {
					PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
					  PyLong_Type.tp_name, uint_max, test_var);
					return -1;
				}
				*object->in.total = test_var;
			} else {
				PyErr_Format(PyExc_TypeError, "Expected type %s",
				  PyLong_Type.tp_name);
				return -1;
			}
		}
	}
	return 0;
}

static PyObject *py_dfs_Enum_out_get_total(PyObject *obj, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(obj);
	PyObject *py_total;
	if (object->out.total == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.total == NULL) {
		py_total = Py_None;
		Py_INCREF(py_total);
	} else {
		py_total = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.total));
	}
	return py_total;
}

static int py_dfs_Enum_out_set_total(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.total");
		return -1;
	}
	if (value == Py_None) {
		object->out.total = NULL;
	} else {
		object->out.total = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total);
		if (object->out.total == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		{
			const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total));
			if (PyLong_Check(value)) {
				unsigned long long test_var;
				test_var = PyLong_AsUnsignedLongLong(value);
				if (PyErr_Occurred() != NULL) {
					return -1;
				}
				if (test_var > uint_max) {
					PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
					  PyLong_Type.tp_name, uint_max, test_var);
					return -1;
				}
				*object->out.total = test_var;
			} else {
				PyErr_Format(PyExc_TypeError, "Expected type %s",
				  PyLong_Type.tp_name);
				return -1;
			}
		}
	}
	return 0;
}

static PyObject *py_dfs_Enum_get_result(PyObject *obj, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_Enum_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_Enum_getsetters[] = {
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_dfs_Enum_in_get_level,
		.set = py_dfs_Enum_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_bufsize"),
		.get = py_dfs_Enum_in_get_bufsize,
		.set = py_dfs_Enum_in_set_bufsize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_info"),
		.get = py_dfs_Enum_in_get_info,
		.set = py_dfs_Enum_in_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_EnumStruct")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_dfs_Enum_out_get_info,
		.set = py_dfs_Enum_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_EnumStruct")
	},
	{
		.name = discard_const_p(char, "in_total"),
		.get = py_dfs_Enum_in_get_total,
		.set = py_dfs_Enum_in_set_total,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_total"),
		.get = py_dfs_Enum_out_get_total,
		.set = py_dfs_Enum_out_set_total,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_Enum_get_result,
		.set = py_dfs_Enum_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_Enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_Enum, type);
	return self;
}

static PyObject *py_dfs_Enum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(5);
}

static PyObject *py_dfs_Enum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 6) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Enum_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[5];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_Enum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_Enum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_Enum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_Enum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_Enum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 6) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Enum_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[5];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_Enum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_Enum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_Enum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_Enum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_Enum_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_Enum *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 6) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_Enum_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[5];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_Enum_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_Enum_ndr_print(py_obj, args, kwargs, "dfs_Enum_in", NDR_IN);
}

static PyObject *py_dfs_Enum_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_Enum_ndr_print(py_obj, args, kwargs, "dfs_Enum_out", NDR_OUT);
}

static PyMethodDef py_dfs_Enum_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_Enum_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.Enum.opnum() -> 5 (0x05) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Enum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Enum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Enum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Enum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Enum_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_Enum_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_Enum_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.Enum",
	.tp_getset = py_dfs_Enum_getsetters,
	.tp_methods = py_dfs_Enum_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_Enum_new,
};

static bool pack_py_dfs_Enum_args_in(PyObject *args, PyObject *kwargs, struct dfs_Enum *r)
{
	PyObject *py_level;
	PyObject *py_bufsize;
	PyObject *py_info;
	PyObject *py_total;
	const char *kwnames[] = {
		"level", "bufsize", "info", "total", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_Enum", discard_const_p(char *, kwnames), &py_level, &py_bufsize, &py_info, &py_total)) {
		return false;
	}

	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_bufsize == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.bufsize");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.bufsize));
		if (PyLong_Check(py_bufsize)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_bufsize);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.bufsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_info == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
		return false;
	}
	if (py_info == Py_None) {
		r->in.info = NULL;
	} else {
		r->in.info = NULL;
		PY_CHECK_TYPE(&dfs_EnumStruct_Type, py_info, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.info = (struct dfs_EnumStruct *)pytalloc_get_ptr(py_info);
	}
	if (py_total == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.total");
		return false;
	}
	if (py_total == Py_None) {
		r->in.total = NULL;
	} else {
		r->in.total = talloc_ptrtype(r, r->in.total);
		if (r->in.total == NULL) {
			PyErr_NoMemory();
			return false;
		}
		{
			const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.total));
			if (PyLong_Check(py_total)) {
				unsigned long long test_var;
				test_var = PyLong_AsUnsignedLongLong(py_total);
				if (PyErr_Occurred() != NULL) {
					return false;
				}
				if (test_var > uint_max) {
					PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
					  PyLong_Type.tp_name, uint_max, test_var);
					return false;
				}
				*r->in.total = test_var;
			} else {
				PyErr_Format(PyExc_TypeError, "Expected type %s",
				  PyLong_Type.tp_name);
				return false;
			}
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_Enum_args_out(struct dfs_Enum *r, bool raise_result_exception)
{
	PyObject *py_info = NULL;
	PyObject *py_total = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&dfs_EnumStruct_Type, r->out.info, r->out.info);
	}
	PyTuple_SetItem(result, 0, py_info);

	if (r->out.total == NULL) {
		py_total = Py_None;
		Py_INCREF(py_total);
	} else {
		py_total = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.total));
	}
	PyTuple_SetItem(result, 1, py_total);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_dfs_AddFtRoot_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_AddFtRoot_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_in_get_dns_servername(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_servername;
	if (object->in.dns_servername == NULL) {
		py_dns_servername = Py_None;
		Py_INCREF(py_dns_servername);
	} else {
		py_dns_servername = PyUnicode_Decode(object->in.dns_servername, strlen(object->in.dns_servername), "utf-8", "ignore");
	}
	return py_dns_servername;
}

static int py_dfs_AddFtRoot_in_set_dns_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dns_servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dns_servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_in_get_dfsname(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_dfsname;
	if (object->in.dfsname == NULL) {
		py_dfsname = Py_None;
		Py_INCREF(py_dfsname);
	} else {
		py_dfsname = PyUnicode_Decode(object->in.dfsname, strlen(object->in.dfsname), "utf-8", "ignore");
	}
	return py_dfsname;
}

static int py_dfs_AddFtRoot_in_set_dfsname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dfsname");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dfsname = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_in_get_rootshare(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_rootshare;
	if (object->in.rootshare == NULL) {
		py_rootshare = Py_None;
		Py_INCREF(py_rootshare);
	} else {
		py_rootshare = PyUnicode_Decode(object->in.rootshare, strlen(object->in.rootshare), "utf-8", "ignore");
	}
	return py_rootshare;
}

static int py_dfs_AddFtRoot_in_set_rootshare(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.rootshare");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.rootshare = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_in_get_comment(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->in.comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		py_comment = PyUnicode_Decode(object->in.comment, strlen(object->in.comment), "utf-8", "ignore");
	}
	return py_comment;
}

static int py_dfs_AddFtRoot_in_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.comment");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.comment = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_in_get_dfs_config_dn(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_dfs_config_dn;
	if (object->in.dfs_config_dn == NULL) {
		py_dfs_config_dn = Py_None;
		Py_INCREF(py_dfs_config_dn);
	} else {
		py_dfs_config_dn = PyUnicode_Decode(object->in.dfs_config_dn, strlen(object->in.dfs_config_dn), "utf-8", "ignore");
	}
	return py_dfs_config_dn;
}

static int py_dfs_AddFtRoot_in_set_dfs_config_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dfs_config_dn");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dfs_config_dn = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_in_get_unknown1(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyLong_FromLong((uint16_t)(object->in.unknown1));
	return py_unknown1;
}

static int py_dfs_AddFtRoot_in_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.unknown1");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.unknown1));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.unknown1 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_in_get_flags(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_dfs_AddFtRoot_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_in_get_unknown2(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	if (object->in.unknown2 == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.unknown2 == NULL) {
		py_unknown2 = Py_None;
		Py_INCREF(py_unknown2);
	} else {
		if (*object->in.unknown2 == NULL) {
			py_unknown2 = Py_None;
			Py_INCREF(py_unknown2);
		} else {
			py_unknown2 = pytalloc_reference_ex(&dfs_UnknownStruct_Type, *object->in.unknown2, *object->in.unknown2);
		}
	}
	{
		PyObject *py_unknown2_level_0 = py_unknown2;
		py_unknown2 = py_dcerpc_ndr_pointer_wrap(ndr_pointer_Type, py_unknown2_level_0);
		Py_XDECREF(py_unknown2_level_0);
	}
	return py_unknown2;
}

static int py_dfs_AddFtRoot_in_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.unknown2));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.unknown2");
		return -1;
	}
	if (value == Py_None) {
		object->in.unknown2 = NULL;
	} else {
		object->in.unknown2 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.unknown2);
		if (object->in.unknown2 == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		value = py_dcerpc_ndr_pointer_deref(ndr_pointer_Type, value);
		if (value == NULL) {
			return -1;
		}
		if (value == Py_None) {
			*object->in.unknown2 = NULL;
		} else {
			*object->in.unknown2 = NULL;
			PY_CHECK_TYPE(&dfs_UnknownStruct_Type, value, return -1;);
			if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->in.unknown2 = (struct dfs_UnknownStruct *)pytalloc_get_ptr(value);
		}
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_out_get_unknown2(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	if (object->out.unknown2 == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.unknown2 == NULL) {
		py_unknown2 = Py_None;
		Py_INCREF(py_unknown2);
	} else {
		if (*object->out.unknown2 == NULL) {
			py_unknown2 = Py_None;
			Py_INCREF(py_unknown2);
		} else {
			py_unknown2 = pytalloc_reference_ex(&dfs_UnknownStruct_Type, *object->out.unknown2, *object->out.unknown2);
		}
	}
	{
		PyObject *py_unknown2_level_0 = py_unknown2;
		py_unknown2 = py_dcerpc_ndr_pointer_wrap(ndr_pointer_Type, py_unknown2_level_0);
		Py_XDECREF(py_unknown2_level_0);
	}
	return py_unknown2;
}

static int py_dfs_AddFtRoot_out_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.unknown2));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.unknown2");
		return -1;
	}
	if (value == Py_None) {
		object->out.unknown2 = NULL;
	} else {
		object->out.unknown2 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.unknown2);
		if (object->out.unknown2 == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		value = py_dcerpc_ndr_pointer_deref(ndr_pointer_Type, value);
		if (value == NULL) {
			return -1;
		}
		if (value == Py_None) {
			*object->out.unknown2 = NULL;
		} else {
			*object->out.unknown2 = NULL;
			PY_CHECK_TYPE(&dfs_UnknownStruct_Type, value, return -1;);
			if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->out.unknown2 = (struct dfs_UnknownStruct *)pytalloc_get_ptr(value);
		}
	}
	return 0;
}

static PyObject *py_dfs_AddFtRoot_get_result(PyObject *obj, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_AddFtRoot_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_AddFtRoot_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_AddFtRoot_in_get_servername,
		.set = py_dfs_AddFtRoot_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_dns_servername"),
		.get = py_dfs_AddFtRoot_in_get_dns_servername,
		.set = py_dfs_AddFtRoot_in_set_dns_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_dfsname"),
		.get = py_dfs_AddFtRoot_in_get_dfsname,
		.set = py_dfs_AddFtRoot_in_set_dfsname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_rootshare"),
		.get = py_dfs_AddFtRoot_in_get_rootshare,
		.set = py_dfs_AddFtRoot_in_set_rootshare,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_comment"),
		.get = py_dfs_AddFtRoot_in_get_comment,
		.set = py_dfs_AddFtRoot_in_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_dfs_config_dn"),
		.get = py_dfs_AddFtRoot_in_get_dfs_config_dn,
		.set = py_dfs_AddFtRoot_in_set_dfs_config_dn,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_unknown1"),
		.get = py_dfs_AddFtRoot_in_get_unknown1,
		.set = py_dfs_AddFtRoot_in_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_dfs_AddFtRoot_in_get_flags,
		.set = py_dfs_AddFtRoot_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_unknown2"),
		.get = py_dfs_AddFtRoot_in_get_unknown2,
		.set = py_dfs_AddFtRoot_in_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_UnknownStruct")
	},
	{
		.name = discard_const_p(char, "out_unknown2"),
		.get = py_dfs_AddFtRoot_out_get_unknown2,
		.set = py_dfs_AddFtRoot_out_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_UnknownStruct")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_AddFtRoot_get_result,
		.set = py_dfs_AddFtRoot_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_AddFtRoot_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_AddFtRoot, type);
	return self;
}

static PyObject *py_dfs_AddFtRoot_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(10);
}

static PyObject *py_dfs_AddFtRoot_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 11) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddFtRoot_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[10];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_AddFtRoot_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_AddFtRoot_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_AddFtRoot_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_AddFtRoot_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_AddFtRoot_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 11) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddFtRoot_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[10];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_AddFtRoot_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_AddFtRoot_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_AddFtRoot_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_AddFtRoot_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_AddFtRoot_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddFtRoot *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 11) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddFtRoot_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[10];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_AddFtRoot_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_AddFtRoot_ndr_print(py_obj, args, kwargs, "dfs_AddFtRoot_in", NDR_IN);
}

static PyObject *py_dfs_AddFtRoot_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_AddFtRoot_ndr_print(py_obj, args, kwargs, "dfs_AddFtRoot_out", NDR_OUT);
}

static PyMethodDef py_dfs_AddFtRoot_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_AddFtRoot_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.AddFtRoot.opnum() -> 10 (0x0a) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddFtRoot_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddFtRoot_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddFtRoot_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddFtRoot_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddFtRoot_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddFtRoot_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_AddFtRoot_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.AddFtRoot",
	.tp_getset = py_dfs_AddFtRoot_getsetters,
	.tp_methods = py_dfs_AddFtRoot_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_AddFtRoot_new,
};

static bool pack_py_dfs_AddFtRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddFtRoot *r)
{
	PyObject *py_servername;
	PyObject *py_dns_servername;
	PyObject *py_dfsname;
	PyObject *py_rootshare;
	PyObject *py_comment;
	PyObject *py_dfs_config_dn;
	PyObject *py_unknown1;
	PyObject *py_flags;
	PyObject *py_unknown2;
	const char *kwnames[] = {
		"servername", "dns_servername", "dfsname", "rootshare", "comment", "dfs_config_dn", "unknown1", "flags", "unknown2", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:dfs_AddFtRoot", discard_const_p(char *, kwnames), &py_servername, &py_dns_servername, &py_dfsname, &py_rootshare, &py_comment, &py_dfs_config_dn, &py_unknown1, &py_flags, &py_unknown2)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_dns_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dns_servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dns_servername)) {
			unicode = PyUnicode_AsEncodedString(py_dns_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dns_servername)) {
			test_str = PyBytes_AS_STRING(py_dns_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dns_servername = talloc_str;
	}
	if (py_dfsname == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dfsname");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dfsname)) {
			unicode = PyUnicode_AsEncodedString(py_dfsname, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dfsname)) {
			test_str = PyBytes_AS_STRING(py_dfsname);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfsname)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dfsname = talloc_str;
	}
	if (py_rootshare == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.rootshare");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_rootshare)) {
			unicode = PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_rootshare)) {
			test_str = PyBytes_AS_STRING(py_rootshare);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.rootshare = talloc_str;
	}
	if (py_comment == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.comment");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_comment)) {
			unicode = PyUnicode_AsEncodedString(py_comment, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_comment)) {
			test_str = PyBytes_AS_STRING(py_comment);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.comment = talloc_str;
	}
	if (py_dfs_config_dn == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dfs_config_dn");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dfs_config_dn)) {
			unicode = PyUnicode_AsEncodedString(py_dfs_config_dn, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dfs_config_dn)) {
			test_str = PyBytes_AS_STRING(py_dfs_config_dn);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_config_dn)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dfs_config_dn = talloc_str;
	}
	if (py_unknown1 == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.unknown1");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.unknown1));
		if (PyLong_Check(py_unknown1)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_unknown1);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.unknown1 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_unknown2 == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.unknown2");
		return false;
	}
	if (py_unknown2 == Py_None) {
		r->in.unknown2 = NULL;
	} else {
		r->in.unknown2 = talloc_ptrtype(r, r->in.unknown2);
		if (r->in.unknown2 == NULL) {
			PyErr_NoMemory();
			return false;
		}
		py_unknown2 = py_dcerpc_ndr_pointer_deref(ndr_pointer_Type, py_unknown2);
		if (py_unknown2 == NULL) {
			return false;
		}
		if (py_unknown2 == Py_None) {
			*r->in.unknown2 = NULL;
		} else {
			*r->in.unknown2 = NULL;
			PY_CHECK_TYPE(&dfs_UnknownStruct_Type, py_unknown2, return false;);
			if (talloc_reference(r, pytalloc_get_mem_ctx(py_unknown2)) == NULL) {
				PyErr_NoMemory();
				return false;
			}
			*r->in.unknown2 = (struct dfs_UnknownStruct *)pytalloc_get_ptr(py_unknown2);
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_AddFtRoot_args_out(struct dfs_AddFtRoot *r, bool raise_result_exception)
{
	PyObject *py_unknown2 = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (r->out.unknown2 == NULL) {
		py_unknown2 = Py_None;
		Py_INCREF(py_unknown2);
	} else {
		if (*r->out.unknown2 == NULL) {
			py_unknown2 = Py_None;
			Py_INCREF(py_unknown2);
		} else {
			py_unknown2 = pytalloc_reference_ex(&dfs_UnknownStruct_Type, *r->out.unknown2, *r->out.unknown2);
		}
	}
	{
		PyObject *py_unknown2_level_0 = py_unknown2;
		py_unknown2 = py_dcerpc_ndr_pointer_wrap(ndr_pointer_Type, py_unknown2_level_0);
		Py_XDECREF(py_unknown2_level_0);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_unknown2);
	}
	if (result_size == 1) {
		result = py_unknown2;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_dfs_RemoveFtRoot_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_RemoveFtRoot_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_RemoveFtRoot_in_get_dns_servername(PyObject *obj, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_servername;
	if (object->in.dns_servername == NULL) {
		py_dns_servername = Py_None;
		Py_INCREF(py_dns_servername);
	} else {
		py_dns_servername = PyUnicode_Decode(object->in.dns_servername, strlen(object->in.dns_servername), "utf-8", "ignore");
	}
	return py_dns_servername;
}

static int py_dfs_RemoveFtRoot_in_set_dns_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dns_servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dns_servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_RemoveFtRoot_in_get_dfsname(PyObject *obj, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_dfsname;
	if (object->in.dfsname == NULL) {
		py_dfsname = Py_None;
		Py_INCREF(py_dfsname);
	} else {
		py_dfsname = PyUnicode_Decode(object->in.dfsname, strlen(object->in.dfsname), "utf-8", "ignore");
	}
	return py_dfsname;
}

static int py_dfs_RemoveFtRoot_in_set_dfsname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dfsname");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dfsname = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_RemoveFtRoot_in_get_rootshare(PyObject *obj, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_rootshare;
	if (object->in.rootshare == NULL) {
		py_rootshare = Py_None;
		Py_INCREF(py_rootshare);
	} else {
		py_rootshare = PyUnicode_Decode(object->in.rootshare, strlen(object->in.rootshare), "utf-8", "ignore");
	}
	return py_rootshare;
}

static int py_dfs_RemoveFtRoot_in_set_rootshare(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.rootshare");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.rootshare = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_RemoveFtRoot_in_get_flags(PyObject *obj, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_dfs_RemoveFtRoot_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_RemoveFtRoot_in_get_unknown(PyObject *obj, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown;
	if (object->in.unknown == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.unknown == NULL) {
		py_unknown = Py_None;
		Py_INCREF(py_unknown);
	} else {
		if (*object->in.unknown == NULL) {
			py_unknown = Py_None;
			Py_INCREF(py_unknown);
		} else {
			py_unknown = pytalloc_reference_ex(&dfs_UnknownStruct_Type, *object->in.unknown, *object->in.unknown);
		}
	}
	{
		PyObject *py_unknown_level_0 = py_unknown;
		py_unknown = py_dcerpc_ndr_pointer_wrap(ndr_pointer_Type, py_unknown_level_0);
		Py_XDECREF(py_unknown_level_0);
	}
	return py_unknown;
}

static int py_dfs_RemoveFtRoot_in_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.unknown));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.unknown");
		return -1;
	}
	if (value == Py_None) {
		object->in.unknown = NULL;
	} else {
		object->in.unknown = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.unknown);
		if (object->in.unknown == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		value = py_dcerpc_ndr_pointer_deref(ndr_pointer_Type, value);
		if (value == NULL) {
			return -1;
		}
		if (value == Py_None) {
			*object->in.unknown = NULL;
		} else {
			*object->in.unknown = NULL;
			PY_CHECK_TYPE(&dfs_UnknownStruct_Type, value, return -1;);
			if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->in.unknown = (struct dfs_UnknownStruct *)pytalloc_get_ptr(value);
		}
	}
	return 0;
}

static PyObject *py_dfs_RemoveFtRoot_out_get_unknown(PyObject *obj, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown;
	if (object->out.unknown == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.unknown == NULL) {
		py_unknown = Py_None;
		Py_INCREF(py_unknown);
	} else {
		if (*object->out.unknown == NULL) {
			py_unknown = Py_None;
			Py_INCREF(py_unknown);
		} else {
			py_unknown = pytalloc_reference_ex(&dfs_UnknownStruct_Type, *object->out.unknown, *object->out.unknown);
		}
	}
	{
		PyObject *py_unknown_level_0 = py_unknown;
		py_unknown = py_dcerpc_ndr_pointer_wrap(ndr_pointer_Type, py_unknown_level_0);
		Py_XDECREF(py_unknown_level_0);
	}
	return py_unknown;
}

static int py_dfs_RemoveFtRoot_out_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.unknown));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.unknown");
		return -1;
	}
	if (value == Py_None) {
		object->out.unknown = NULL;
	} else {
		object->out.unknown = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.unknown);
		if (object->out.unknown == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		value = py_dcerpc_ndr_pointer_deref(ndr_pointer_Type, value);
		if (value == NULL) {
			return -1;
		}
		if (value == Py_None) {
			*object->out.unknown = NULL;
		} else {
			*object->out.unknown = NULL;
			PY_CHECK_TYPE(&dfs_UnknownStruct_Type, value, return -1;);
			if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->out.unknown = (struct dfs_UnknownStruct *)pytalloc_get_ptr(value);
		}
	}
	return 0;
}

static PyObject *py_dfs_RemoveFtRoot_get_result(PyObject *obj, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_RemoveFtRoot_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_RemoveFtRoot_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_RemoveFtRoot_in_get_servername,
		.set = py_dfs_RemoveFtRoot_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_dns_servername"),
		.get = py_dfs_RemoveFtRoot_in_get_dns_servername,
		.set = py_dfs_RemoveFtRoot_in_set_dns_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_dfsname"),
		.get = py_dfs_RemoveFtRoot_in_get_dfsname,
		.set = py_dfs_RemoveFtRoot_in_set_dfsname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_rootshare"),
		.get = py_dfs_RemoveFtRoot_in_get_rootshare,
		.set = py_dfs_RemoveFtRoot_in_set_rootshare,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_dfs_RemoveFtRoot_in_get_flags,
		.set = py_dfs_RemoveFtRoot_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_unknown"),
		.get = py_dfs_RemoveFtRoot_in_get_unknown,
		.set = py_dfs_RemoveFtRoot_in_set_unknown,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_UnknownStruct")
	},
	{
		.name = discard_const_p(char, "out_unknown"),
		.get = py_dfs_RemoveFtRoot_out_get_unknown,
		.set = py_dfs_RemoveFtRoot_out_set_unknown,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_UnknownStruct")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_RemoveFtRoot_get_result,
		.set = py_dfs_RemoveFtRoot_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_RemoveFtRoot_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_RemoveFtRoot, type);
	return self;
}

static PyObject *py_dfs_RemoveFtRoot_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(11);
}

static PyObject *py_dfs_RemoveFtRoot_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 12) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_RemoveFtRoot_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[11];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_RemoveFtRoot_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_RemoveFtRoot_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_RemoveFtRoot_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_RemoveFtRoot_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_RemoveFtRoot_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 12) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_RemoveFtRoot_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[11];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_RemoveFtRoot_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_RemoveFtRoot_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_RemoveFtRoot_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_RemoveFtRoot_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_RemoveFtRoot_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_RemoveFtRoot *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 12) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_RemoveFtRoot_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[11];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_RemoveFtRoot_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_RemoveFtRoot_ndr_print(py_obj, args, kwargs, "dfs_RemoveFtRoot_in", NDR_IN);
}

static PyObject *py_dfs_RemoveFtRoot_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_RemoveFtRoot_ndr_print(py_obj, args, kwargs, "dfs_RemoveFtRoot_out", NDR_OUT);
}

static PyMethodDef py_dfs_RemoveFtRoot_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_RemoveFtRoot_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.RemoveFtRoot.opnum() -> 11 (0x0b) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveFtRoot_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveFtRoot_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveFtRoot_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveFtRoot_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveFtRoot_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveFtRoot_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_RemoveFtRoot_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.RemoveFtRoot",
	.tp_getset = py_dfs_RemoveFtRoot_getsetters,
	.tp_methods = py_dfs_RemoveFtRoot_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_RemoveFtRoot_new,
};

static bool pack_py_dfs_RemoveFtRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_RemoveFtRoot *r)
{
	PyObject *py_servername;
	PyObject *py_dns_servername;
	PyObject *py_dfsname;
	PyObject *py_rootshare;
	PyObject *py_flags;
	PyObject *py_unknown;
	const char *kwnames[] = {
		"servername", "dns_servername", "dfsname", "rootshare", "flags", "unknown", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:dfs_RemoveFtRoot", discard_const_p(char *, kwnames), &py_servername, &py_dns_servername, &py_dfsname, &py_rootshare, &py_flags, &py_unknown)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_dns_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dns_servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dns_servername)) {
			unicode = PyUnicode_AsEncodedString(py_dns_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dns_servername)) {
			test_str = PyBytes_AS_STRING(py_dns_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dns_servername = talloc_str;
	}
	if (py_dfsname == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dfsname");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dfsname)) {
			unicode = PyUnicode_AsEncodedString(py_dfsname, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dfsname)) {
			test_str = PyBytes_AS_STRING(py_dfsname);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfsname)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dfsname = talloc_str;
	}
	if (py_rootshare == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.rootshare");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_rootshare)) {
			unicode = PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_rootshare)) {
			test_str = PyBytes_AS_STRING(py_rootshare);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.rootshare = talloc_str;
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_unknown == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.unknown");
		return false;
	}
	if (py_unknown == Py_None) {
		r->in.unknown = NULL;
	} else {
		r->in.unknown = talloc_ptrtype(r, r->in.unknown);
		if (r->in.unknown == NULL) {
			PyErr_NoMemory();
			return false;
		}
		py_unknown = py_dcerpc_ndr_pointer_deref(ndr_pointer_Type, py_unknown);
		if (py_unknown == NULL) {
			return false;
		}
		if (py_unknown == Py_None) {
			*r->in.unknown = NULL;
		} else {
			*r->in.unknown = NULL;
			PY_CHECK_TYPE(&dfs_UnknownStruct_Type, py_unknown, return false;);
			if (talloc_reference(r, pytalloc_get_mem_ctx(py_unknown)) == NULL) {
				PyErr_NoMemory();
				return false;
			}
			*r->in.unknown = (struct dfs_UnknownStruct *)pytalloc_get_ptr(py_unknown);
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_RemoveFtRoot_args_out(struct dfs_RemoveFtRoot *r, bool raise_result_exception)
{
	PyObject *py_unknown = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (r->out.unknown == NULL) {
		py_unknown = Py_None;
		Py_INCREF(py_unknown);
	} else {
		if (*r->out.unknown == NULL) {
			py_unknown = Py_None;
			Py_INCREF(py_unknown);
		} else {
			py_unknown = pytalloc_reference_ex(&dfs_UnknownStruct_Type, *r->out.unknown, *r->out.unknown);
		}
	}
	{
		PyObject *py_unknown_level_0 = py_unknown;
		py_unknown = py_dcerpc_ndr_pointer_wrap(ndr_pointer_Type, py_unknown_level_0);
		Py_XDECREF(py_unknown_level_0);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_unknown);
	}
	if (result_size == 1) {
		result = py_unknown;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_dfs_AddStdRoot_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_AddStdRoot_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddStdRoot_in_get_rootshare(PyObject *obj, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_rootshare;
	if (object->in.rootshare == NULL) {
		py_rootshare = Py_None;
		Py_INCREF(py_rootshare);
	} else {
		py_rootshare = PyUnicode_Decode(object->in.rootshare, strlen(object->in.rootshare), "utf-8", "ignore");
	}
	return py_rootshare;
}

static int py_dfs_AddStdRoot_in_set_rootshare(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.rootshare");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.rootshare = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddStdRoot_in_get_comment(PyObject *obj, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->in.comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		py_comment = PyUnicode_Decode(object->in.comment, strlen(object->in.comment), "utf-8", "ignore");
	}
	return py_comment;
}

static int py_dfs_AddStdRoot_in_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.comment");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.comment = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddStdRoot_in_get_flags(PyObject *obj, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_dfs_AddStdRoot_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_AddStdRoot_get_result(PyObject *obj, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_AddStdRoot_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_AddStdRoot_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_AddStdRoot_in_get_servername,
		.set = py_dfs_AddStdRoot_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_rootshare"),
		.get = py_dfs_AddStdRoot_in_get_rootshare,
		.set = py_dfs_AddStdRoot_in_set_rootshare,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_comment"),
		.get = py_dfs_AddStdRoot_in_get_comment,
		.set = py_dfs_AddStdRoot_in_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_dfs_AddStdRoot_in_get_flags,
		.set = py_dfs_AddStdRoot_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_AddStdRoot_get_result,
		.set = py_dfs_AddStdRoot_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_AddStdRoot_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_AddStdRoot, type);
	return self;
}

static PyObject *py_dfs_AddStdRoot_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(12);
}

static PyObject *py_dfs_AddStdRoot_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 13) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddStdRoot_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[12];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_AddStdRoot_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_AddStdRoot_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_AddStdRoot_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_AddStdRoot_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_AddStdRoot_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 13) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddStdRoot_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[12];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_AddStdRoot_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_AddStdRoot_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_AddStdRoot_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_AddStdRoot_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_AddStdRoot_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddStdRoot *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 13) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddStdRoot_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[12];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_AddStdRoot_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_AddStdRoot_ndr_print(py_obj, args, kwargs, "dfs_AddStdRoot_in", NDR_IN);
}

static PyObject *py_dfs_AddStdRoot_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_AddStdRoot_ndr_print(py_obj, args, kwargs, "dfs_AddStdRoot_out", NDR_OUT);
}

static PyMethodDef py_dfs_AddStdRoot_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_AddStdRoot_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.AddStdRoot.opnum() -> 12 (0x0c) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRoot_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRoot_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRoot_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRoot_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRoot_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRoot_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_AddStdRoot_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.AddStdRoot",
	.tp_getset = py_dfs_AddStdRoot_getsetters,
	.tp_methods = py_dfs_AddStdRoot_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_AddStdRoot_new,
};

static bool pack_py_dfs_AddStdRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddStdRoot *r)
{
	PyObject *py_servername;
	PyObject *py_rootshare;
	PyObject *py_comment;
	PyObject *py_flags;
	const char *kwnames[] = {
		"servername", "rootshare", "comment", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_AddStdRoot", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_comment, &py_flags)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_rootshare == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.rootshare");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_rootshare)) {
			unicode = PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_rootshare)) {
			test_str = PyBytes_AS_STRING(py_rootshare);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.rootshare = talloc_str;
	}
	if (py_comment == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.comment");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_comment)) {
			unicode = PyUnicode_AsEncodedString(py_comment, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_comment)) {
			test_str = PyBytes_AS_STRING(py_comment);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.comment = talloc_str;
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_AddStdRoot_args_out(struct dfs_AddStdRoot *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_RemoveStdRoot_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_RemoveStdRoot_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_RemoveStdRoot_in_get_rootshare(PyObject *obj, void *closure)
{
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_rootshare;
	if (object->in.rootshare == NULL) {
		py_rootshare = Py_None;
		Py_INCREF(py_rootshare);
	} else {
		py_rootshare = PyUnicode_Decode(object->in.rootshare, strlen(object->in.rootshare), "utf-8", "ignore");
	}
	return py_rootshare;
}

static int py_dfs_RemoveStdRoot_in_set_rootshare(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.rootshare");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.rootshare = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_RemoveStdRoot_in_get_flags(PyObject *obj, void *closure)
{
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_dfs_RemoveStdRoot_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_RemoveStdRoot_get_result(PyObject *obj, void *closure)
{
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_RemoveStdRoot_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_RemoveStdRoot_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_RemoveStdRoot_in_get_servername,
		.set = py_dfs_RemoveStdRoot_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_rootshare"),
		.get = py_dfs_RemoveStdRoot_in_get_rootshare,
		.set = py_dfs_RemoveStdRoot_in_set_rootshare,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_dfs_RemoveStdRoot_in_get_flags,
		.set = py_dfs_RemoveStdRoot_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_RemoveStdRoot_get_result,
		.set = py_dfs_RemoveStdRoot_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_RemoveStdRoot_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_RemoveStdRoot, type);
	return self;
}

static PyObject *py_dfs_RemoveStdRoot_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(13);
}

static PyObject *py_dfs_RemoveStdRoot_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 14) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_RemoveStdRoot_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[13];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_RemoveStdRoot_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_RemoveStdRoot_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_RemoveStdRoot_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_RemoveStdRoot_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_RemoveStdRoot_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 14) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_RemoveStdRoot_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[13];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_RemoveStdRoot_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_RemoveStdRoot_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_RemoveStdRoot_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_RemoveStdRoot_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_RemoveStdRoot_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_RemoveStdRoot *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 14) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_RemoveStdRoot_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[13];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_RemoveStdRoot_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_RemoveStdRoot_ndr_print(py_obj, args, kwargs, "dfs_RemoveStdRoot_in", NDR_IN);
}

static PyObject *py_dfs_RemoveStdRoot_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_RemoveStdRoot_ndr_print(py_obj, args, kwargs, "dfs_RemoveStdRoot_out", NDR_OUT);
}

static PyMethodDef py_dfs_RemoveStdRoot_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_RemoveStdRoot_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.RemoveStdRoot.opnum() -> 13 (0x0d) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveStdRoot_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveStdRoot_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveStdRoot_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveStdRoot_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveStdRoot_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_RemoveStdRoot_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_RemoveStdRoot_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.RemoveStdRoot",
	.tp_getset = py_dfs_RemoveStdRoot_getsetters,
	.tp_methods = py_dfs_RemoveStdRoot_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_RemoveStdRoot_new,
};

static bool pack_py_dfs_RemoveStdRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_RemoveStdRoot *r)
{
	PyObject *py_servername;
	PyObject *py_rootshare;
	PyObject *py_flags;
	const char *kwnames[] = {
		"servername", "rootshare", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:dfs_RemoveStdRoot", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_flags)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_rootshare == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.rootshare");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_rootshare)) {
			unicode = PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_rootshare)) {
			test_str = PyBytes_AS_STRING(py_rootshare);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.rootshare = talloc_str;
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_RemoveStdRoot_args_out(struct dfs_RemoveStdRoot *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_ManagerInitialize_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_ManagerInitialize_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	object->in.servername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.servername);
	if (object->in.servername == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_ManagerInitialize_in_get_flags(PyObject *obj, void *closure)
{
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_dfs_ManagerInitialize_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_ManagerInitialize_get_result(PyObject *obj, void *closure)
{
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_ManagerInitialize_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_ManagerInitialize_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_ManagerInitialize_in_get_servername,
		.set = py_dfs_ManagerInitialize_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_dfs_ManagerInitialize_in_get_flags,
		.set = py_dfs_ManagerInitialize_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_ManagerInitialize_get_result,
		.set = py_dfs_ManagerInitialize_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_ManagerInitialize_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_ManagerInitialize, type);
	return self;
}

static PyObject *py_dfs_ManagerInitialize_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(14);
}

static PyObject *py_dfs_ManagerInitialize_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 15) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_ManagerInitialize_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[14];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_ManagerInitialize_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_ManagerInitialize_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_ManagerInitialize_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_ManagerInitialize_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_ManagerInitialize_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 15) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_ManagerInitialize_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[14];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_ManagerInitialize_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_ManagerInitialize_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_ManagerInitialize_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_ManagerInitialize_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_ManagerInitialize_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_ManagerInitialize *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 15) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_ManagerInitialize_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[14];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_ManagerInitialize_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_ManagerInitialize_ndr_print(py_obj, args, kwargs, "dfs_ManagerInitialize_in", NDR_IN);
}

static PyObject *py_dfs_ManagerInitialize_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_ManagerInitialize_ndr_print(py_obj, args, kwargs, "dfs_ManagerInitialize_out", NDR_OUT);
}

static PyMethodDef py_dfs_ManagerInitialize_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_ManagerInitialize_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.ManagerInitialize.opnum() -> 14 (0x0e) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_ManagerInitialize_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_ManagerInitialize_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_ManagerInitialize_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_ManagerInitialize_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_ManagerInitialize_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_ManagerInitialize_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_ManagerInitialize_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.ManagerInitialize",
	.tp_getset = py_dfs_ManagerInitialize_getsetters,
	.tp_methods = py_dfs_ManagerInitialize_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_ManagerInitialize_new,
};

static bool pack_py_dfs_ManagerInitialize_args_in(PyObject *args, PyObject *kwargs, struct dfs_ManagerInitialize *r)
{
	PyObject *py_servername;
	PyObject *py_flags;
	const char *kwnames[] = {
		"servername", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:dfs_ManagerInitialize", discard_const_p(char *, kwnames), &py_servername, &py_flags)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	r->in.servername = talloc_ptrtype(r, r->in.servername);
	if (r->in.servername == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_ManagerInitialize_args_out(struct dfs_ManagerInitialize *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_AddStdRootForced_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_AddStdRootForced_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddStdRootForced_in_get_rootshare(PyObject *obj, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(obj);
	PyObject *py_rootshare;
	if (object->in.rootshare == NULL) {
		py_rootshare = Py_None;
		Py_INCREF(py_rootshare);
	} else {
		py_rootshare = PyUnicode_Decode(object->in.rootshare, strlen(object->in.rootshare), "utf-8", "ignore");
	}
	return py_rootshare;
}

static int py_dfs_AddStdRootForced_in_set_rootshare(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.rootshare");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.rootshare = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddStdRootForced_in_get_comment(PyObject *obj, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->in.comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		py_comment = PyUnicode_Decode(object->in.comment, strlen(object->in.comment), "utf-8", "ignore");
	}
	return py_comment;
}

static int py_dfs_AddStdRootForced_in_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.comment");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.comment = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddStdRootForced_in_get_store(PyObject *obj, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(obj);
	PyObject *py_store;
	if (object->in.store == NULL) {
		py_store = Py_None;
		Py_INCREF(py_store);
	} else {
		py_store = PyUnicode_Decode(object->in.store, strlen(object->in.store), "utf-8", "ignore");
	}
	return py_store;
}

static int py_dfs_AddStdRootForced_in_set_store(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.store");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.store = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_AddStdRootForced_get_result(PyObject *obj, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_AddStdRootForced_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_AddStdRootForced_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_AddStdRootForced_in_get_servername,
		.set = py_dfs_AddStdRootForced_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_rootshare"),
		.get = py_dfs_AddStdRootForced_in_get_rootshare,
		.set = py_dfs_AddStdRootForced_in_set_rootshare,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_comment"),
		.get = py_dfs_AddStdRootForced_in_get_comment,
		.set = py_dfs_AddStdRootForced_in_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_store"),
		.get = py_dfs_AddStdRootForced_in_get_store,
		.set = py_dfs_AddStdRootForced_in_set_store,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_AddStdRootForced_get_result,
		.set = py_dfs_AddStdRootForced_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_AddStdRootForced_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_AddStdRootForced, type);
	return self;
}

static PyObject *py_dfs_AddStdRootForced_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(15);
}

static PyObject *py_dfs_AddStdRootForced_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 16) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddStdRootForced_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[15];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_AddStdRootForced_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_AddStdRootForced_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_AddStdRootForced_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_AddStdRootForced_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_AddStdRootForced_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 16) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddStdRootForced_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[15];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_AddStdRootForced_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_AddStdRootForced_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_AddStdRootForced_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_AddStdRootForced_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_AddStdRootForced_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_AddStdRootForced *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 16) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_AddStdRootForced_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[15];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_AddStdRootForced_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_AddStdRootForced_ndr_print(py_obj, args, kwargs, "dfs_AddStdRootForced_in", NDR_IN);
}

static PyObject *py_dfs_AddStdRootForced_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_AddStdRootForced_ndr_print(py_obj, args, kwargs, "dfs_AddStdRootForced_out", NDR_OUT);
}

static PyMethodDef py_dfs_AddStdRootForced_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_AddStdRootForced_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.AddStdRootForced.opnum() -> 15 (0x0f) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRootForced_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRootForced_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRootForced_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRootForced_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRootForced_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_AddStdRootForced_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_AddStdRootForced_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.AddStdRootForced",
	.tp_getset = py_dfs_AddStdRootForced_getsetters,
	.tp_methods = py_dfs_AddStdRootForced_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_AddStdRootForced_new,
};

static bool pack_py_dfs_AddStdRootForced_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddStdRootForced *r)
{
	PyObject *py_servername;
	PyObject *py_rootshare;
	PyObject *py_comment;
	PyObject *py_store;
	const char *kwnames[] = {
		"servername", "rootshare", "comment", "store", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_AddStdRootForced", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_comment, &py_store)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_rootshare == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.rootshare");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_rootshare)) {
			unicode = PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_rootshare)) {
			test_str = PyBytes_AS_STRING(py_rootshare);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.rootshare = talloc_str;
	}
	if (py_comment == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.comment");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_comment)) {
			unicode = PyUnicode_AsEncodedString(py_comment, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_comment)) {
			test_str = PyBytes_AS_STRING(py_comment);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.comment = talloc_str;
	}
	if (py_store == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.store");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_store)) {
			unicode = PyUnicode_AsEncodedString(py_store, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_store)) {
			test_str = PyBytes_AS_STRING(py_store);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_store)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.store = talloc_str;
	}
	return true;
}

static PyObject *unpack_py_dfs_AddStdRootForced_args_out(struct dfs_AddStdRootForced *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_GetDcAddress_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_GetDcAddress_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_GetDcAddress_in_get_server_fullname(PyObject *obj, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_server_fullname;
	if (object->in.server_fullname == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->in.server_fullname == NULL) {
		py_server_fullname = Py_None;
		Py_INCREF(py_server_fullname);
	} else {
		if (*object->in.server_fullname == NULL) {
			py_server_fullname = Py_None;
			Py_INCREF(py_server_fullname);
		} else {
			py_server_fullname = PyUnicode_Decode(*object->in.server_fullname, strlen(*object->in.server_fullname), "utf-8", "ignore");
		}
	}
	return py_server_fullname;
}

static int py_dfs_GetDcAddress_in_set_server_fullname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.server_fullname));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_fullname");
		return -1;
	}
	object->in.server_fullname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_fullname);
	if (object->in.server_fullname == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->in.server_fullname = NULL;
	} else {
		*object->in.server_fullname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->in.server_fullname = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetDcAddress_out_get_server_fullname(PyObject *obj, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_server_fullname;
	if (object->out.server_fullname == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.server_fullname == NULL) {
		py_server_fullname = Py_None;
		Py_INCREF(py_server_fullname);
	} else {
		if (*object->out.server_fullname == NULL) {
			py_server_fullname = Py_None;
			Py_INCREF(py_server_fullname);
		} else {
			py_server_fullname = PyUnicode_Decode(*object->out.server_fullname, strlen(*object->out.server_fullname), "utf-8", "ignore");
		}
	}
	return py_server_fullname;
}

static int py_dfs_GetDcAddress_out_set_server_fullname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.server_fullname));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.server_fullname");
		return -1;
	}
	object->out.server_fullname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.server_fullname);
	if (object->out.server_fullname == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.server_fullname = NULL;
	} else {
		*object->out.server_fullname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->out.server_fullname = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetDcAddress_in_get_is_root(PyObject *obj, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_is_root;
	if (object->in.is_root == NULL) {
		Py_RETURN_NONE;
	}
	py_is_root = PyLong_FromLong((uint16_t)(*object->in.is_root));
	return py_is_root;
}

static int py_dfs_GetDcAddress_in_set_is_root(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.is_root));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.is_root");
		return -1;
	}
	object->in.is_root = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.is_root);
	if (object->in.is_root == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.is_root));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.is_root = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetDcAddress_out_get_is_root(PyObject *obj, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_is_root;
	if (object->out.is_root == NULL) {
		Py_RETURN_NONE;
	}
	py_is_root = PyLong_FromLong((uint16_t)(*object->out.is_root));
	return py_is_root;
}

static int py_dfs_GetDcAddress_out_set_is_root(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.is_root));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.is_root");
		return -1;
	}
	object->out.is_root = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.is_root);
	if (object->out.is_root == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.is_root));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.is_root = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetDcAddress_in_get_ttl(PyObject *obj, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_ttl;
	if (object->in.ttl == NULL) {
		Py_RETURN_NONE;
	}
	py_ttl = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.ttl));
	return py_ttl;
}

static int py_dfs_GetDcAddress_in_set_ttl(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.ttl));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.ttl");
		return -1;
	}
	object->in.ttl = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.ttl);
	if (object->in.ttl == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.ttl));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.ttl = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetDcAddress_out_get_ttl(PyObject *obj, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_ttl;
	if (object->out.ttl == NULL) {
		Py_RETURN_NONE;
	}
	py_ttl = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.ttl));
	return py_ttl;
}

static int py_dfs_GetDcAddress_out_set_ttl(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ttl));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ttl");
		return -1;
	}
	object->out.ttl = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ttl);
	if (object->out.ttl == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.ttl));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.ttl = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_GetDcAddress_get_result(PyObject *obj, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_GetDcAddress_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_GetDcAddress_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_GetDcAddress_in_get_servername,
		.set = py_dfs_GetDcAddress_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_server_fullname"),
		.get = py_dfs_GetDcAddress_in_get_server_fullname,
		.set = py_dfs_GetDcAddress_in_set_server_fullname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_server_fullname"),
		.get = py_dfs_GetDcAddress_out_get_server_fullname,
		.set = py_dfs_GetDcAddress_out_set_server_fullname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_is_root"),
		.get = py_dfs_GetDcAddress_in_get_is_root,
		.set = py_dfs_GetDcAddress_in_set_is_root,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "out_is_root"),
		.get = py_dfs_GetDcAddress_out_get_is_root,
		.set = py_dfs_GetDcAddress_out_set_is_root,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "in_ttl"),
		.get = py_dfs_GetDcAddress_in_get_ttl,
		.set = py_dfs_GetDcAddress_in_set_ttl,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_ttl"),
		.get = py_dfs_GetDcAddress_out_get_ttl,
		.set = py_dfs_GetDcAddress_out_set_ttl,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_GetDcAddress_get_result,
		.set = py_dfs_GetDcAddress_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_GetDcAddress_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_GetDcAddress, type);
	struct dfs_GetDcAddress *_self = (struct dfs_GetDcAddress *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.is_root = talloc_zero(mem_ctx, uint8_t);
	_self->out.is_root = talloc_zero(mem_ctx, uint8_t);
	_self->in.ttl = talloc_zero(mem_ctx, uint32_t);
	_self->out.ttl = talloc_zero(mem_ctx, uint32_t);
	return self;
}

static PyObject *py_dfs_GetDcAddress_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(16);
}

static PyObject *py_dfs_GetDcAddress_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 17) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetDcAddress_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[16];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_GetDcAddress_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_GetDcAddress_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_GetDcAddress_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_GetDcAddress_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_GetDcAddress_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 17) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetDcAddress_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[16];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_GetDcAddress_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_GetDcAddress_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_GetDcAddress_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_GetDcAddress_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_GetDcAddress_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_GetDcAddress *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 17) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_GetDcAddress_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[16];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_GetDcAddress_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_GetDcAddress_ndr_print(py_obj, args, kwargs, "dfs_GetDcAddress_in", NDR_IN);
}

static PyObject *py_dfs_GetDcAddress_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_GetDcAddress_ndr_print(py_obj, args, kwargs, "dfs_GetDcAddress_out", NDR_OUT);
}

static PyMethodDef py_dfs_GetDcAddress_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_GetDcAddress_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.GetDcAddress.opnum() -> 16 (0x10) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetDcAddress_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetDcAddress_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetDcAddress_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetDcAddress_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetDcAddress_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_GetDcAddress_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_GetDcAddress_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.GetDcAddress",
	.tp_getset = py_dfs_GetDcAddress_getsetters,
	.tp_methods = py_dfs_GetDcAddress_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_GetDcAddress_new,
};

static bool pack_py_dfs_GetDcAddress_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetDcAddress *r)
{
	PyObject *py_servername;
	PyObject *py_server_fullname;
	PyObject *py_is_root;
	PyObject *py_ttl;
	const char *kwnames[] = {
		"servername", "server_fullname", "is_root", "ttl", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_GetDcAddress", discard_const_p(char *, kwnames), &py_servername, &py_server_fullname, &py_is_root, &py_ttl)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_server_fullname == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_fullname");
		return false;
	}
	r->in.server_fullname = talloc_ptrtype(r, r->in.server_fullname);
	if (r->in.server_fullname == NULL) {
		PyErr_NoMemory();
		return false;
	}
	if (py_server_fullname == Py_None) {
		*r->in.server_fullname = NULL;
	} else {
		*r->in.server_fullname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_fullname)) {
				unicode = PyUnicode_AsEncodedString(py_server_fullname, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_fullname)) {
				test_str = PyBytes_AS_STRING(py_server_fullname);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_fullname)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			*r->in.server_fullname = talloc_str;
		}
	}
	if (py_is_root == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.is_root");
		return false;
	}
	r->in.is_root = talloc_ptrtype(r, r->in.is_root);
	if (r->in.is_root == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.is_root));
		if (PyLong_Check(py_is_root)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_is_root);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.is_root = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_ttl == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.ttl");
		return false;
	}
	r->in.ttl = talloc_ptrtype(r, r->in.ttl);
	if (r->in.ttl == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.ttl));
		if (PyLong_Check(py_ttl)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_ttl);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.ttl = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_GetDcAddress_args_out(struct dfs_GetDcAddress *r, bool raise_result_exception)
{
	PyObject *py_server_fullname = NULL;
	PyObject *py_is_root = NULL;
	PyObject *py_ttl = NULL;
	PyObject *result = NULL;
	size_t result_size = 3;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.server_fullname == NULL) {
		py_server_fullname = Py_None;
		Py_INCREF(py_server_fullname);
	} else {
		if (*r->out.server_fullname == NULL) {
			py_server_fullname = Py_None;
			Py_INCREF(py_server_fullname);
		} else {
			py_server_fullname = PyUnicode_Decode(*r->out.server_fullname, strlen(*r->out.server_fullname), "utf-8", "ignore");
		}
	}
	PyTuple_SetItem(result, 0, py_server_fullname);

	py_is_root = PyLong_FromLong((uint16_t)(*r->out.is_root));
	PyTuple_SetItem(result, 1, py_is_root);

	py_ttl = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.ttl));
	PyTuple_SetItem(result, 2, py_ttl);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 3, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_dfs_SetDcAddress_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_SetDcAddress_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_SetDcAddress_in_get_server_fullname(PyObject *obj, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_server_fullname;
	if (object->in.server_fullname == NULL) {
		py_server_fullname = Py_None;
		Py_INCREF(py_server_fullname);
	} else {
		py_server_fullname = PyUnicode_Decode(object->in.server_fullname, strlen(object->in.server_fullname), "utf-8", "ignore");
	}
	return py_server_fullname;
}

static int py_dfs_SetDcAddress_in_set_server_fullname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_fullname");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.server_fullname = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_SetDcAddress_in_get_flags(PyObject *obj, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_dfs_SetDcAddress_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_SetDcAddress_in_get_ttl(PyObject *obj, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_ttl;
	py_ttl = PyLong_FromUnsignedLongLong((uint32_t)(object->in.ttl));
	return py_ttl;
}

static int py_dfs_SetDcAddress_in_set_ttl(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.ttl");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.ttl));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.ttl = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_SetDcAddress_get_result(PyObject *obj, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_SetDcAddress_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_SetDcAddress_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_SetDcAddress_in_get_servername,
		.set = py_dfs_SetDcAddress_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_server_fullname"),
		.get = py_dfs_SetDcAddress_in_get_server_fullname,
		.set = py_dfs_SetDcAddress_in_set_server_fullname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_dfs_SetDcAddress_in_get_flags,
		.set = py_dfs_SetDcAddress_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_ttl"),
		.get = py_dfs_SetDcAddress_in_get_ttl,
		.set = py_dfs_SetDcAddress_in_set_ttl,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_SetDcAddress_get_result,
		.set = py_dfs_SetDcAddress_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_SetDcAddress_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_SetDcAddress, type);
	return self;
}

static PyObject *py_dfs_SetDcAddress_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(17);
}

static PyObject *py_dfs_SetDcAddress_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 18) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_SetDcAddress_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[17];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_SetDcAddress_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_SetDcAddress_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_SetDcAddress_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_SetDcAddress_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_SetDcAddress_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 18) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_SetDcAddress_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[17];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_SetDcAddress_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_SetDcAddress_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_SetDcAddress_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_SetDcAddress_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_SetDcAddress_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_SetDcAddress *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 18) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_SetDcAddress_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[17];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_SetDcAddress_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_SetDcAddress_ndr_print(py_obj, args, kwargs, "dfs_SetDcAddress_in", NDR_IN);
}

static PyObject *py_dfs_SetDcAddress_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_SetDcAddress_ndr_print(py_obj, args, kwargs, "dfs_SetDcAddress_out", NDR_OUT);
}

static PyMethodDef py_dfs_SetDcAddress_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_SetDcAddress_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.SetDcAddress.opnum() -> 17 (0x11) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetDcAddress_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetDcAddress_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetDcAddress_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetDcAddress_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetDcAddress_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_SetDcAddress_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_SetDcAddress_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.SetDcAddress",
	.tp_getset = py_dfs_SetDcAddress_getsetters,
	.tp_methods = py_dfs_SetDcAddress_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_SetDcAddress_new,
};

static bool pack_py_dfs_SetDcAddress_args_in(PyObject *args, PyObject *kwargs, struct dfs_SetDcAddress *r)
{
	PyObject *py_servername;
	PyObject *py_server_fullname;
	PyObject *py_flags;
	PyObject *py_ttl;
	const char *kwnames[] = {
		"servername", "server_fullname", "flags", "ttl", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_SetDcAddress", discard_const_p(char *, kwnames), &py_servername, &py_server_fullname, &py_flags, &py_ttl)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_server_fullname == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_fullname");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_server_fullname)) {
			unicode = PyUnicode_AsEncodedString(py_server_fullname, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_server_fullname)) {
			test_str = PyBytes_AS_STRING(py_server_fullname);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_fullname)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.server_fullname = talloc_str;
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_ttl == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.ttl");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.ttl));
		if (PyLong_Check(py_ttl)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_ttl);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.ttl = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_SetDcAddress_args_out(struct dfs_SetDcAddress *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_FlushFtTable_in_get_servername(PyObject *obj, void *closure)
{
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->in.servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyUnicode_Decode(object->in.servername, strlen(object->in.servername), "utf-8", "ignore");
	}
	return py_servername;
}

static int py_dfs_FlushFtTable_in_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servername");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.servername = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_FlushFtTable_in_get_rootshare(PyObject *obj, void *closure)
{
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(obj);
	PyObject *py_rootshare;
	if (object->in.rootshare == NULL) {
		py_rootshare = Py_None;
		Py_INCREF(py_rootshare);
	} else {
		py_rootshare = PyUnicode_Decode(object->in.rootshare, strlen(object->in.rootshare), "utf-8", "ignore");
	}
	return py_rootshare;
}

static int py_dfs_FlushFtTable_in_set_rootshare(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.rootshare");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.rootshare = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_FlushFtTable_get_result(PyObject *obj, void *closure)
{
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_FlushFtTable_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_FlushFtTable_getsetters[] = {
	{
		.name = discard_const_p(char, "in_servername"),
		.get = py_dfs_FlushFtTable_in_get_servername,
		.set = py_dfs_FlushFtTable_in_set_servername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_rootshare"),
		.get = py_dfs_FlushFtTable_in_get_rootshare,
		.set = py_dfs_FlushFtTable_in_set_rootshare,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_FlushFtTable_get_result,
		.set = py_dfs_FlushFtTable_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_FlushFtTable_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_FlushFtTable, type);
	return self;
}

static PyObject *py_dfs_FlushFtTable_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(18);
}

static PyObject *py_dfs_FlushFtTable_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 19) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_FlushFtTable_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[18];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_FlushFtTable_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_FlushFtTable_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_FlushFtTable_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_FlushFtTable_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_FlushFtTable_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 19) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_FlushFtTable_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[18];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_FlushFtTable_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_FlushFtTable_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_FlushFtTable_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_FlushFtTable_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_FlushFtTable_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_FlushFtTable *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 19) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_FlushFtTable_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[18];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_FlushFtTable_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_FlushFtTable_ndr_print(py_obj, args, kwargs, "dfs_FlushFtTable_in", NDR_IN);
}

static PyObject *py_dfs_FlushFtTable_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_FlushFtTable_ndr_print(py_obj, args, kwargs, "dfs_FlushFtTable_out", NDR_OUT);
}

static PyMethodDef py_dfs_FlushFtTable_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_FlushFtTable_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.FlushFtTable.opnum() -> 18 (0x12) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_FlushFtTable_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_FlushFtTable_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_FlushFtTable_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_FlushFtTable_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_FlushFtTable_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_FlushFtTable_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_FlushFtTable_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.FlushFtTable",
	.tp_getset = py_dfs_FlushFtTable_getsetters,
	.tp_methods = py_dfs_FlushFtTable_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_FlushFtTable_new,
};

static bool pack_py_dfs_FlushFtTable_args_in(PyObject *args, PyObject *kwargs, struct dfs_FlushFtTable *r)
{
	PyObject *py_servername;
	PyObject *py_rootshare;
	const char *kwnames[] = {
		"servername", "rootshare", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:dfs_FlushFtTable", discard_const_p(char *, kwnames), &py_servername, &py_rootshare)) {
		return false;
	}

	if (py_servername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servername");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_servername)) {
			unicode = PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_servername)) {
			test_str = PyBytes_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.servername = talloc_str;
	}
	if (py_rootshare == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.rootshare");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_rootshare)) {
			unicode = PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_rootshare)) {
			test_str = PyBytes_AS_STRING(py_rootshare);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.rootshare = talloc_str;
	}
	return true;
}

static PyObject *unpack_py_dfs_FlushFtTable_args_out(struct dfs_FlushFtTable *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_dfs_EnumEx_in_get_dfs_name(PyObject *obj, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(obj);
	PyObject *py_dfs_name;
	if (object->in.dfs_name == NULL) {
		py_dfs_name = Py_None;
		Py_INCREF(py_dfs_name);
	} else {
		py_dfs_name = PyUnicode_Decode(object->in.dfs_name, strlen(object->in.dfs_name), "utf-8", "ignore");
	}
	return py_dfs_name;
}

static int py_dfs_EnumEx_in_set_dfs_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dfs_name");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dfs_name = talloc_str;
	}
	return 0;
}

static PyObject *py_dfs_EnumEx_in_get_level(PyObject *obj, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_dfs_EnumEx_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumEx_in_get_bufsize(PyObject *obj, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(obj);
	PyObject *py_bufsize;
	py_bufsize = PyLong_FromUnsignedLongLong((uint32_t)(object->in.bufsize));
	return py_bufsize;
}

static int py_dfs_EnumEx_in_set_bufsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.bufsize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.bufsize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.bufsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumEx_in_get_info(PyObject *obj, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->in.info == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&dfs_EnumStruct_Type, object->in.info, object->in.info);
	}
	return py_info;
}

static int py_dfs_EnumEx_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
		return -1;
	}
	if (value == Py_None) {
		object->in.info = NULL;
	} else {
		object->in.info = NULL;
		PY_CHECK_TYPE(&dfs_EnumStruct_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.info = (struct dfs_EnumStruct *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_dfs_EnumEx_out_get_info(PyObject *obj, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&dfs_EnumStruct_Type, object->out.info, object->out.info);
	}
	return py_info;
}

static int py_dfs_EnumEx_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	if (value == Py_None) {
		object->out.info = NULL;
	} else {
		object->out.info = NULL;
		PY_CHECK_TYPE(&dfs_EnumStruct_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->out.info = (struct dfs_EnumStruct *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_dfs_EnumEx_in_get_total(PyObject *obj, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(obj);
	PyObject *py_total;
	if (object->in.total == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.total == NULL) {
		py_total = Py_None;
		Py_INCREF(py_total);
	} else {
		py_total = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.total));
	}
	return py_total;
}

static int py_dfs_EnumEx_in_set_total(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.total));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.total");
		return -1;
	}
	if (value == Py_None) {
		object->in.total = NULL;
	} else {
		object->in.total = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.total);
		if (object->in.total == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		{
			const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.total));
			if (PyLong_Check(value)) {
				unsigned long long test_var;
				test_var = PyLong_AsUnsignedLongLong(value);
				if (PyErr_Occurred() != NULL) {
					return -1;
				}
				if (test_var > uint_max) {
					PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
					  PyLong_Type.tp_name, uint_max, test_var);
					return -1;
				}
				*object->in.total = test_var;
			} else {
				PyErr_Format(PyExc_TypeError, "Expected type %s",
				  PyLong_Type.tp_name);
				return -1;
			}
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumEx_out_get_total(PyObject *obj, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(obj);
	PyObject *py_total;
	if (object->out.total == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.total == NULL) {
		py_total = Py_None;
		Py_INCREF(py_total);
	} else {
		py_total = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.total));
	}
	return py_total;
}

static int py_dfs_EnumEx_out_set_total(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.total");
		return -1;
	}
	if (value == Py_None) {
		object->out.total = NULL;
	} else {
		object->out.total = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total);
		if (object->out.total == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		{
			const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total));
			if (PyLong_Check(value)) {
				unsigned long long test_var;
				test_var = PyLong_AsUnsignedLongLong(value);
				if (PyErr_Occurred() != NULL) {
					return -1;
				}
				if (test_var > uint_max) {
					PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
					  PyLong_Type.tp_name, uint_max, test_var);
					return -1;
				}
				*object->out.total = test_var;
			} else {
				PyErr_Format(PyExc_TypeError, "Expected type %s",
				  PyLong_Type.tp_name);
				return -1;
			}
		}
	}
	return 0;
}

static PyObject *py_dfs_EnumEx_get_result(PyObject *obj, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_dfs_EnumEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_dfs_EnumEx_getsetters[] = {
	{
		.name = discard_const_p(char, "in_dfs_name"),
		.get = py_dfs_EnumEx_in_get_dfs_name,
		.set = py_dfs_EnumEx_in_set_dfs_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_dfs_EnumEx_in_get_level,
		.set = py_dfs_EnumEx_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_bufsize"),
		.get = py_dfs_EnumEx_in_get_bufsize,
		.set = py_dfs_EnumEx_in_set_bufsize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_info"),
		.get = py_dfs_EnumEx_in_get_info,
		.set = py_dfs_EnumEx_in_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_EnumStruct")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_dfs_EnumEx_out_get_info,
		.set = py_dfs_EnumEx_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type dfs_EnumStruct")
	},
	{
		.name = discard_const_p(char, "in_total"),
		.get = py_dfs_EnumEx_in_get_total,
		.set = py_dfs_EnumEx_in_set_total,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_total"),
		.get = py_dfs_EnumEx_out_get_total,
		.set = py_dfs_EnumEx_out_set_total,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_dfs_EnumEx_get_result,
		.set = py_dfs_EnumEx_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_dfs_EnumEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct dfs_EnumEx, type);
	return self;
}

static PyObject *py_dfs_EnumEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(21);
}

static PyObject *py_dfs_EnumEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 22) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_EnumEx_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[21];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_dfs_EnumEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_EnumEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_dfs_EnumEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_dfs_EnumEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_dfs_EnumEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netdfs.num_calls < 22) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_EnumEx_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[21];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_dfs_EnumEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_EnumEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_EnumEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	return py_dfs_EnumEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_dfs_EnumEx_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct dfs_EnumEx *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netdfs.num_calls < 22) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_dfs_EnumEx_ndr_print");
		return NULL;
	}
	call = &ndr_table_netdfs.calls[21];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_dfs_EnumEx_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_EnumEx_ndr_print(py_obj, args, kwargs, "dfs_EnumEx_in", NDR_IN);
}

static PyObject *py_dfs_EnumEx_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_dfs_EnumEx_ndr_print(py_obj, args, kwargs, "dfs_EnumEx_out", NDR_OUT);
}

static PyMethodDef py_dfs_EnumEx_methods[] = {
	{ "opnum", (PyCFunction)py_dfs_EnumEx_ndr_opnum, METH_NOARGS|METH_CLASS,
		"dfs.EnumEx.opnum() -> 21 (0x15) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_EnumEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_EnumEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_EnumEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_EnumEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_EnumEx_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dfs_EnumEx_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject dfs_EnumEx_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.EnumEx",
	.tp_getset = py_dfs_EnumEx_getsetters,
	.tp_methods = py_dfs_EnumEx_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_dfs_EnumEx_new,
};

static bool pack_py_dfs_EnumEx_args_in(PyObject *args, PyObject *kwargs, struct dfs_EnumEx *r)
{
	PyObject *py_dfs_name;
	PyObject *py_level;
	PyObject *py_bufsize;
	PyObject *py_info;
	PyObject *py_total;
	const char *kwnames[] = {
		"dfs_name", "level", "bufsize", "info", "total", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:dfs_EnumEx", discard_const_p(char *, kwnames), &py_dfs_name, &py_level, &py_bufsize, &py_info, &py_total)) {
		return false;
	}

	if (py_dfs_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dfs_name");
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dfs_name)) {
			unicode = PyUnicode_AsEncodedString(py_dfs_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dfs_name)) {
			test_str = PyBytes_AS_STRING(py_dfs_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dfs_name = talloc_str;
	}
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_bufsize == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.bufsize");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.bufsize));
		if (PyLong_Check(py_bufsize)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_bufsize);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.bufsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_info == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
		return false;
	}
	if (py_info == Py_None) {
		r->in.info = NULL;
	} else {
		r->in.info = NULL;
		PY_CHECK_TYPE(&dfs_EnumStruct_Type, py_info, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.info = (struct dfs_EnumStruct *)pytalloc_get_ptr(py_info);
	}
	if (py_total == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.total");
		return false;
	}
	if (py_total == Py_None) {
		r->in.total = NULL;
	} else {
		r->in.total = talloc_ptrtype(r, r->in.total);
		if (r->in.total == NULL) {
			PyErr_NoMemory();
			return false;
		}
		{
			const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.total));
			if (PyLong_Check(py_total)) {
				unsigned long long test_var;
				test_var = PyLong_AsUnsignedLongLong(py_total);
				if (PyErr_Occurred() != NULL) {
					return false;
				}
				if (test_var > uint_max) {
					PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
					  PyLong_Type.tp_name, uint_max, test_var);
					return false;
				}
				*r->in.total = test_var;
			} else {
				PyErr_Format(PyExc_TypeError, "Expected type %s",
				  PyLong_Type.tp_name);
				return false;
			}
		}
	}
	return true;
}

static PyObject *unpack_py_dfs_EnumEx_args_out(struct dfs_EnumEx *r, bool raise_result_exception)
{
	PyObject *py_info = NULL;
	PyObject *py_total = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&dfs_EnumStruct_Type, r->out.info, r->out.info);
	}
	PyTuple_SetItem(result, 0, py_info);

	if (r->out.total == NULL) {
		py_total = Py_None;
		Py_INCREF(py_total);
	} else {
		py_total = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.total));
	}
	PyTuple_SetItem(result, 1, py_total);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromWERROR(r->out.result));
	}

	return result;
}

const struct PyNdrRpcMethodDef py_ndr_netdfs_methods[] = {
	{
		.name = "GetManagerVersion",
		.doc = "S.GetManagerVersion() -> version",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_GetManagerVersion_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_GetManagerVersion_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_GetManagerVersion_args_out,
		.opnum = 0,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "Add",
		.doc = "S.Add(path, server, share, comment, flags) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_Add_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_Add_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_Add_args_out,
		.opnum = 1,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "Remove",
		.doc = "S.Remove(dfs_entry_path, servername, sharename) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_Remove_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_Remove_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_Remove_args_out,
		.opnum = 2,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "SetInfo",
		.doc = "S.SetInfo(dfs_entry_path, servername, sharename, level, info) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_SetInfo_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_SetInfo_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_SetInfo_args_out,
		.opnum = 3,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "GetInfo",
		.doc = "S.GetInfo(dfs_entry_path, servername, sharename, level) -> info",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_GetInfo_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_GetInfo_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_GetInfo_args_out,
		.opnum = 4,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "Enum",
		.doc = "S.Enum(level, bufsize, info, total) -> (info, total)",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_Enum_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_Enum_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_Enum_args_out,
		.opnum = 5,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "AddFtRoot",
		.doc = "S.AddFtRoot(servername, dns_servername, dfsname, rootshare, comment, dfs_config_dn, unknown1, flags, unknown2) -> unknown2",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_AddFtRoot_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_AddFtRoot_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_AddFtRoot_args_out,
		.opnum = 10,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "RemoveFtRoot",
		.doc = "S.RemoveFtRoot(servername, dns_servername, dfsname, rootshare, flags, unknown) -> unknown",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_RemoveFtRoot_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_RemoveFtRoot_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_RemoveFtRoot_args_out,
		.opnum = 11,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "AddStdRoot",
		.doc = "S.AddStdRoot(servername, rootshare, comment, flags) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_AddStdRoot_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_AddStdRoot_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_AddStdRoot_args_out,
		.opnum = 12,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "RemoveStdRoot",
		.doc = "S.RemoveStdRoot(servername, rootshare, flags) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_RemoveStdRoot_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_RemoveStdRoot_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_RemoveStdRoot_args_out,
		.opnum = 13,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "ManagerInitialize",
		.doc = "S.ManagerInitialize(servername, flags) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_ManagerInitialize_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_ManagerInitialize_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_ManagerInitialize_args_out,
		.opnum = 14,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "AddStdRootForced",
		.doc = "S.AddStdRootForced(servername, rootshare, comment, store) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_AddStdRootForced_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_AddStdRootForced_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_AddStdRootForced_args_out,
		.opnum = 15,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "GetDcAddress",
		.doc = "S.GetDcAddress(servername, server_fullname, is_root, ttl) -> (server_fullname, is_root, ttl)",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_GetDcAddress_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_GetDcAddress_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_GetDcAddress_args_out,
		.opnum = 16,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "SetDcAddress",
		.doc = "S.SetDcAddress(servername, server_fullname, flags, ttl) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_SetDcAddress_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_SetDcAddress_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_SetDcAddress_args_out,
		.opnum = 17,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "FlushFtTable",
		.doc = "S.FlushFtTable(servername, rootshare) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_FlushFtTable_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_FlushFtTable_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_FlushFtTable_args_out,
		.opnum = 18,
		.table = &ndr_table_netdfs,
	},
	{
		.name = "EnumEx",
		.doc = "S.EnumEx(dfs_name, level, bufsize, info, total) -> (info, total)",
		.call = (py_dcerpc_call_fn)dcerpc_dfs_EnumEx_r,
		.pack_in_data = (py_data_pack_fn)pack_py_dfs_EnumEx_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_dfs_EnumEx_args_out,
		.opnum = 21,
		.table = &ndr_table_netdfs,
	},
	{
		.name = NULL,
	},
};

static PyObject *interface_netdfs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_netdfs);
}

#define PY_DOC_NETDFS "Settings for Microsoft Distributed File System"
static PyTypeObject netdfs_InterfaceType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.netdfs",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "netdfs(binding, lp_ctx=None, credentials=None, basis_connection=None) -> connection\n"
"\n\n"
"Parameters\n"
"----------\n"
"binding : str\n"
"    A DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
"lp_ctx : param.LoadParm\n"
"    Should be a path to a smb.conf file or a param.LoadParm object\n"
"credentials : credentials.Credentials, optional\n"
"    A credentials.Credentials object (default is None).\n"
"basis_connection : samba.dcerpc.ClientConnection, optional\n"
"    A netdfs client connection object (default is None).\n"
"\n\n"
"Returns\n"
"-------\n"
"samba.dcerpc.ClientConnection\n"
"    A ClientConnection object\n"
"\n\n"
"Raises\n"
"------\n"
"samba.NTSTATUSError\n"
"    An NTSTATUS error\n"
"\n"PY_DOC_NETDFS,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_netdfs_new,
};

static PyObject *syntax_netdfs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_netdfs.syntax_id);
}

#define PY_DOC_NETDFS_SYNTAX "Settings for Microsoft Distributed File System"
static PyTypeObject netdfs_SyntaxType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "dfs.netdfs_abstract_syntax",
	.tp_doc = "netdfs_abstract_syntax()\n"PY_DOC_NETDFS_SYNTAX,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = syntax_netdfs_new,
};

static PyMethodDef dfs_methods[] = {
	{ NULL, NULL, 0, NULL }
};

static struct PyModuleDef moduledef = {
	PyModuleDef_HEAD_INIT,
	.m_name = "dfs",
	.m_doc = "dfs DCE/RPC",
	.m_size = -1,
	.m_methods = dfs_methods,
};
MODULE_INIT_FUNC(dfs)
{
	PyObject *m = NULL;
	PyObject *dep_samba_dcerpc_misc = NULL;
	PyObject *dep_talloc = NULL;
	PyObject *dep_samba_dcerpc_base = NULL;

	dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
	if (dep_samba_dcerpc_misc == NULL)
		goto out;

	dep_talloc = PyImport_ImportModule("talloc");
	if (dep_talloc == NULL)
		goto out;

	dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
	if (dep_samba_dcerpc_base == NULL)
		goto out;

	BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
	if (BaseObject_Type == NULL)
		goto out;

	GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
	if (GUID_Type == NULL)
		goto out;

	ndr_pointer_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ndr_pointer");
	if (ndr_pointer_Type == NULL)
		goto out;

	ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
	if (ClientConnection_Type == NULL)
		goto out;

	ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
	if (ndr_syntax_id_Type == NULL)
		goto out;

	dfs_Info0_Type.tp_base = BaseObject_Type;
	dfs_Info0_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info1_Type.tp_base = BaseObject_Type;
	dfs_Info1_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info2_Type.tp_base = BaseObject_Type;
	dfs_Info2_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_StorageInfo_Type.tp_base = BaseObject_Type;
	dfs_StorageInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info3_Type.tp_base = BaseObject_Type;
	dfs_Info3_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info4_Type.tp_base = BaseObject_Type;
	dfs_Info4_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info5_Type.tp_base = BaseObject_Type;
	dfs_Info5_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Target_Priority_Type.tp_base = BaseObject_Type;
	dfs_Target_Priority_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_StorageInfo2_Type.tp_base = BaseObject_Type;
	dfs_StorageInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info6_Type.tp_base = BaseObject_Type;
	dfs_Info6_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info7_Type.tp_base = BaseObject_Type;
	dfs_Info7_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info100_Type.tp_base = BaseObject_Type;
	dfs_Info100_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info101_Type.tp_base = BaseObject_Type;
	dfs_Info101_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info102_Type.tp_base = BaseObject_Type;
	dfs_Info102_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info103_Type.tp_base = BaseObject_Type;
	dfs_Info103_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info104_Type.tp_base = BaseObject_Type;
	dfs_Info104_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info105_Type.tp_base = BaseObject_Type;
	dfs_Info105_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info106_Type.tp_base = BaseObject_Type;
	dfs_Info106_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info200_Type.tp_base = BaseObject_Type;
	dfs_Info200_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info300_Type.tp_base = BaseObject_Type;
	dfs_Info300_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Info_Type.tp_base = BaseObject_Type;
	dfs_Info_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumArray1_Type.tp_base = BaseObject_Type;
	dfs_EnumArray1_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumArray2_Type.tp_base = BaseObject_Type;
	dfs_EnumArray2_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumArray3_Type.tp_base = BaseObject_Type;
	dfs_EnumArray3_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumArray4_Type.tp_base = BaseObject_Type;
	dfs_EnumArray4_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumArray5_Type.tp_base = BaseObject_Type;
	dfs_EnumArray5_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumArray6_Type.tp_base = BaseObject_Type;
	dfs_EnumArray6_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumArray200_Type.tp_base = BaseObject_Type;
	dfs_EnumArray200_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumArray300_Type.tp_base = BaseObject_Type;
	dfs_EnumArray300_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumInfo_Type.tp_base = BaseObject_Type;
	dfs_EnumInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumStruct_Type.tp_base = BaseObject_Type;
	dfs_EnumStruct_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_UnknownStruct_Type.tp_base = BaseObject_Type;
	dfs_UnknownStruct_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_GetManagerVersion_Type.tp_base = BaseObject_Type;
	dfs_GetManagerVersion_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Add_Type.tp_base = BaseObject_Type;
	dfs_Add_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Remove_Type.tp_base = BaseObject_Type;
	dfs_Remove_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_SetInfo_Type.tp_base = BaseObject_Type;
	dfs_SetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_GetInfo_Type.tp_base = BaseObject_Type;
	dfs_GetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_Enum_Type.tp_base = BaseObject_Type;
	dfs_Enum_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_AddFtRoot_Type.tp_base = BaseObject_Type;
	dfs_AddFtRoot_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_RemoveFtRoot_Type.tp_base = BaseObject_Type;
	dfs_RemoveFtRoot_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_AddStdRoot_Type.tp_base = BaseObject_Type;
	dfs_AddStdRoot_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_RemoveStdRoot_Type.tp_base = BaseObject_Type;
	dfs_RemoveStdRoot_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_ManagerInitialize_Type.tp_base = BaseObject_Type;
	dfs_ManagerInitialize_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_AddStdRootForced_Type.tp_base = BaseObject_Type;
	dfs_AddStdRootForced_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_GetDcAddress_Type.tp_base = BaseObject_Type;
	dfs_GetDcAddress_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_SetDcAddress_Type.tp_base = BaseObject_Type;
	dfs_SetDcAddress_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_FlushFtTable_Type.tp_base = BaseObject_Type;
	dfs_FlushFtTable_Type.tp_basicsize = pytalloc_BaseObject_size();

	dfs_EnumEx_Type.tp_base = BaseObject_Type;
	dfs_EnumEx_Type.tp_basicsize = pytalloc_BaseObject_size();

	netdfs_InterfaceType.tp_base = ClientConnection_Type;

	netdfs_SyntaxType.tp_base = ndr_syntax_id_Type;
	netdfs_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();

	if (PyType_Ready(&dfs_Info0_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info1_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info2_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_StorageInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info3_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info4_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info5_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Target_Priority_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_StorageInfo2_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info6_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info7_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info100_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info101_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info102_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info103_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info104_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info105_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info106_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info200_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info300_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Info_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumArray1_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumArray2_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumArray3_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumArray4_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumArray5_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumArray6_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumArray200_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumArray300_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumStruct_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_UnknownStruct_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_GetManagerVersion_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Add_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Remove_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_SetInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_GetInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_Enum_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_AddFtRoot_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_RemoveFtRoot_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_AddStdRoot_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_RemoveStdRoot_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_ManagerInitialize_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_AddStdRootForced_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_GetDcAddress_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_SetDcAddress_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_FlushFtTable_Type) < 0)
		goto out;
	if (PyType_Ready(&dfs_EnumEx_Type) < 0)
		goto out;
	if (PyType_Ready(&netdfs_InterfaceType) < 0)
		goto out;
	if (PyType_Ready(&netdfs_SyntaxType) < 0)
		goto out;
	if (!PyInterface_AddNdrRpcMethods(&netdfs_InterfaceType, py_ndr_netdfs_methods))
		return NULL;

#ifdef PY_INFO0_PATCH
	PY_INFO0_PATCH(&dfs_Info0_Type);
#endif
#ifdef PY_INFO1_PATCH
	PY_INFO1_PATCH(&dfs_Info1_Type);
#endif
#ifdef PY_INFO2_PATCH
	PY_INFO2_PATCH(&dfs_Info2_Type);
#endif
#ifdef PY_STORAGEINFO_PATCH
	PY_STORAGEINFO_PATCH(&dfs_StorageInfo_Type);
#endif
#ifdef PY_INFO3_PATCH
	PY_INFO3_PATCH(&dfs_Info3_Type);
#endif
#ifdef PY_INFO4_PATCH
	PY_INFO4_PATCH(&dfs_Info4_Type);
#endif
#ifdef PY_INFO5_PATCH
	PY_INFO5_PATCH(&dfs_Info5_Type);
#endif
#ifdef PY_TARGET_PRIORITY_PATCH
	PY_TARGET_PRIORITY_PATCH(&dfs_Target_Priority_Type);
#endif
#ifdef PY_STORAGEINFO2_PATCH
	PY_STORAGEINFO2_PATCH(&dfs_StorageInfo2_Type);
#endif
#ifdef PY_INFO6_PATCH
	PY_INFO6_PATCH(&dfs_Info6_Type);
#endif
#ifdef PY_INFO7_PATCH
	PY_INFO7_PATCH(&dfs_Info7_Type);
#endif
#ifdef PY_INFO100_PATCH
	PY_INFO100_PATCH(&dfs_Info100_Type);
#endif
#ifdef PY_INFO101_PATCH
	PY_INFO101_PATCH(&dfs_Info101_Type);
#endif
#ifdef PY_INFO102_PATCH
	PY_INFO102_PATCH(&dfs_Info102_Type);
#endif
#ifdef PY_INFO103_PATCH
	PY_INFO103_PATCH(&dfs_Info103_Type);
#endif
#ifdef PY_INFO104_PATCH
	PY_INFO104_PATCH(&dfs_Info104_Type);
#endif
#ifdef PY_INFO105_PATCH
	PY_INFO105_PATCH(&dfs_Info105_Type);
#endif
#ifdef PY_INFO106_PATCH
	PY_INFO106_PATCH(&dfs_Info106_Type);
#endif
#ifdef PY_INFO200_PATCH
	PY_INFO200_PATCH(&dfs_Info200_Type);
#endif
#ifdef PY_INFO300_PATCH
	PY_INFO300_PATCH(&dfs_Info300_Type);
#endif
#ifdef PY_INFO_PATCH
	PY_INFO_PATCH(&dfs_Info_Type);
#endif
#ifdef PY_ENUMARRAY1_PATCH
	PY_ENUMARRAY1_PATCH(&dfs_EnumArray1_Type);
#endif
#ifdef PY_ENUMARRAY2_PATCH
	PY_ENUMARRAY2_PATCH(&dfs_EnumArray2_Type);
#endif
#ifdef PY_ENUMARRAY3_PATCH
	PY_ENUMARRAY3_PATCH(&dfs_EnumArray3_Type);
#endif
#ifdef PY_ENUMARRAY4_PATCH
	PY_ENUMARRAY4_PATCH(&dfs_EnumArray4_Type);
#endif
#ifdef PY_ENUMARRAY5_PATCH
	PY_ENUMARRAY5_PATCH(&dfs_EnumArray5_Type);
#endif
#ifdef PY_ENUMARRAY6_PATCH
	PY_ENUMARRAY6_PATCH(&dfs_EnumArray6_Type);
#endif
#ifdef PY_ENUMARRAY200_PATCH
	PY_ENUMARRAY200_PATCH(&dfs_EnumArray200_Type);
#endif
#ifdef PY_ENUMARRAY300_PATCH
	PY_ENUMARRAY300_PATCH(&dfs_EnumArray300_Type);
#endif
#ifdef PY_ENUMINFO_PATCH
	PY_ENUMINFO_PATCH(&dfs_EnumInfo_Type);
#endif
#ifdef PY_ENUMSTRUCT_PATCH
	PY_ENUMSTRUCT_PATCH(&dfs_EnumStruct_Type);
#endif
#ifdef PY_UNKNOWNSTRUCT_PATCH
	PY_UNKNOWNSTRUCT_PATCH(&dfs_UnknownStruct_Type);
#endif
#ifdef PY_GETMANAGERVERSION_PATCH
	PY_GETMANAGERVERSION_PATCH(&dfs_GetManagerVersion_Type);
#endif
#ifdef PY_ADD_PATCH
	PY_ADD_PATCH(&dfs_Add_Type);
#endif
#ifdef PY_REMOVE_PATCH
	PY_REMOVE_PATCH(&dfs_Remove_Type);
#endif
#ifdef PY_SETINFO_PATCH
	PY_SETINFO_PATCH(&dfs_SetInfo_Type);
#endif
#ifdef PY_GETINFO_PATCH
	PY_GETINFO_PATCH(&dfs_GetInfo_Type);
#endif
#ifdef PY_ENUM_PATCH
	PY_ENUM_PATCH(&dfs_Enum_Type);
#endif
#ifdef PY_ADDFTROOT_PATCH
	PY_ADDFTROOT_PATCH(&dfs_AddFtRoot_Type);
#endif
#ifdef PY_REMOVEFTROOT_PATCH
	PY_REMOVEFTROOT_PATCH(&dfs_RemoveFtRoot_Type);
#endif
#ifdef PY_ADDSTDROOT_PATCH
	PY_ADDSTDROOT_PATCH(&dfs_AddStdRoot_Type);
#endif
#ifdef PY_REMOVESTDROOT_PATCH
	PY_REMOVESTDROOT_PATCH(&dfs_RemoveStdRoot_Type);
#endif
#ifdef PY_MANAGERINITIALIZE_PATCH
	PY_MANAGERINITIALIZE_PATCH(&dfs_ManagerInitialize_Type);
#endif
#ifdef PY_ADDSTDROOTFORCED_PATCH
	PY_ADDSTDROOTFORCED_PATCH(&dfs_AddStdRootForced_Type);
#endif
#ifdef PY_GETDCADDRESS_PATCH
	PY_GETDCADDRESS_PATCH(&dfs_GetDcAddress_Type);
#endif
#ifdef PY_SETDCADDRESS_PATCH
	PY_SETDCADDRESS_PATCH(&dfs_SetDcAddress_Type);
#endif
#ifdef PY_FLUSHFTTABLE_PATCH
	PY_FLUSHFTTABLE_PATCH(&dfs_FlushFtTable_Type);
#endif
#ifdef PY_ENUMEX_PATCH
	PY_ENUMEX_PATCH(&dfs_EnumEx_Type);
#endif
#ifdef PY_NETDFS_PATCH
	PY_NETDFS_PATCH(&netdfs_InterfaceType);
#endif
#ifdef PY_NETDFS_ABSTRACT_SYNTAX_PATCH
	PY_NETDFS_ABSTRACT_SYNTAX_PATCH(&netdfs_SyntaxType);
#endif
#ifdef PY_ABSTRACT_SYNTAX_PATCH
	PY_ABSTRACT_SYNTAX_PATCH(&netdfs_SyntaxType);
#endif

	m = PyModule_Create(&moduledef);
	if (m == NULL)
		goto out;

	PyModule_AddObject(m, "DFS_STORAGE_STATES", PyLong_FromUnsignedLongLong(0xf));
	PyModule_AddObject(m, "DFS_MANAGER_VERSION_NT4", PyLong_FromUnsignedLongLong((uint32_t)(DFS_MANAGER_VERSION_NT4)));
	PyModule_AddObject(m, "DFS_MANAGER_VERSION_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DFS_MANAGER_VERSION_W2K)));
	PyModule_AddObject(m, "DFS_MANAGER_VERSION_W2K3", PyLong_FromUnsignedLongLong((uint32_t)(DFS_MANAGER_VERSION_W2K3)));
	PyModule_AddObject(m, "DFS_MANAGER_VERSION_W2K8", PyLong_FromUnsignedLongLong((uint32_t)(DFS_MANAGER_VERSION_W2K8)));
	PyModule_AddObject(m, "DFS_VOLUME_STATE_OK", PyLong_FromUnsignedLongLong((uint32_t)(DFS_VOLUME_STATE_OK)));
	PyModule_AddObject(m, "DFS_VOLUME_STATE_INCONSISTENT", PyLong_FromUnsignedLongLong((uint32_t)(DFS_VOLUME_STATE_INCONSISTENT)));
	PyModule_AddObject(m, "DFS_VOLUME_STATE_OFFLINE", PyLong_FromUnsignedLongLong((uint32_t)(DFS_VOLUME_STATE_OFFLINE)));
	PyModule_AddObject(m, "DFS_VOLUME_STATE_ONLINE", PyLong_FromUnsignedLongLong((uint32_t)(DFS_VOLUME_STATE_ONLINE)));
	PyModule_AddObject(m, "DFS_VOLUME_STATE_STANDALONE", PyLong_FromUnsignedLongLong((uint32_t)(DFS_VOLUME_STATE_STANDALONE)));
	PyModule_AddObject(m, "DFS_VOLUME_STATE_AD_BLOB", PyLong_FromUnsignedLongLong((uint32_t)(DFS_VOLUME_STATE_AD_BLOB)));
	PyModule_AddObject(m, "DFS_STORAGE_STATE_OFFLINE", PyLong_FromUnsignedLongLong((uint32_t)(DFS_STORAGE_STATE_OFFLINE)));
	PyModule_AddObject(m, "DFS_STORAGE_STATE_ONLINE", PyLong_FromUnsignedLongLong((uint32_t)(DFS_STORAGE_STATE_ONLINE)));
	PyModule_AddObject(m, "DFS_STORAGE_STATE_ACTIVE", PyLong_FromUnsignedLongLong((uint32_t)(DFS_STORAGE_STATE_ACTIVE)));
	PyModule_AddObject(m, "DFS_PROPERTY_FLAG_INSITE_REFERRALS", PyLong_FromUnsignedLongLong((uint32_t)(DFS_PROPERTY_FLAG_INSITE_REFERRALS)));
	PyModule_AddObject(m, "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", PyLong_FromUnsignedLongLong((uint32_t)(DFS_PROPERTY_FLAG_ROOT_SCALABILITY)));
	PyModule_AddObject(m, "DFS_PROPERTY_FLAG_SITE_COSTING", PyLong_FromUnsignedLongLong((uint32_t)(DFS_PROPERTY_FLAG_SITE_COSTING)));
	PyModule_AddObject(m, "DFS_PROPERTY_FLAG_TARGET_FAILBACK", PyLong_FromUnsignedLongLong((uint32_t)(DFS_PROPERTY_FLAG_TARGET_FAILBACK)));
	PyModule_AddObject(m, "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", PyLong_FromUnsignedLongLong((uint32_t)(DFS_PROPERTY_FLAG_CLUSTER_ENABLED)));
	PyModule_AddObject(m, "DFS_INVALID_PRIORITY_CLASS", PyLong_FromUnsignedLongLong((uint32_t)(DFS_INVALID_PRIORITY_CLASS)));
	PyModule_AddObject(m, "DFS_SITE_COST_NORMAL_PRIORITY_CLASS", PyLong_FromUnsignedLongLong((uint32_t)(DFS_SITE_COST_NORMAL_PRIORITY_CLASS)));
	PyModule_AddObject(m, "DFS_GLOBAL_HIGH_PRIORITY_CLASS", PyLong_FromUnsignedLongLong((uint32_t)(DFS_GLOBAL_HIGH_PRIORITY_CLASS)));
	PyModule_AddObject(m, "DFS_SITE_COST_HIGH_PRIORITY_CLASS", PyLong_FromUnsignedLongLong((uint32_t)(DFS_SITE_COST_HIGH_PRIORITY_CLASS)));
	PyModule_AddObject(m, "DFS_SITE_COST_LOW_PRIORITY_CLASS", PyLong_FromUnsignedLongLong((uint32_t)(DFS_SITE_COST_LOW_PRIORITY_CLASS)));
	PyModule_AddObject(m, "DFS_GLOBAL_LOW_PRIORITY_CLASS", PyLong_FromUnsignedLongLong((uint32_t)(DFS_GLOBAL_LOW_PRIORITY_CLASS)));
	PyModule_AddObject(m, "DFS_VOLUME_FLAVOR_STANDALONE", PyLong_FromLong((uint16_t)(DFS_VOLUME_FLAVOR_STANDALONE)));
	PyModule_AddObject(m, "DFS_VOLUME_FLAVOR_AD_BLOB", PyLong_FromLong((uint16_t)(DFS_VOLUME_FLAVOR_AD_BLOB)));
	Py_INCREF((PyObject *)(void *)&dfs_Info0_Type);
	PyModule_AddObject(m, "Info0", (PyObject *)(void *)&dfs_Info0_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info1_Type);
	PyModule_AddObject(m, "Info1", (PyObject *)(void *)&dfs_Info1_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info2_Type);
	PyModule_AddObject(m, "Info2", (PyObject *)(void *)&dfs_Info2_Type);
	Py_INCREF((PyObject *)(void *)&dfs_StorageInfo_Type);
	PyModule_AddObject(m, "StorageInfo", (PyObject *)(void *)&dfs_StorageInfo_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info3_Type);
	PyModule_AddObject(m, "Info3", (PyObject *)(void *)&dfs_Info3_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info4_Type);
	PyModule_AddObject(m, "Info4", (PyObject *)(void *)&dfs_Info4_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info5_Type);
	PyModule_AddObject(m, "Info5", (PyObject *)(void *)&dfs_Info5_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Target_Priority_Type);
	PyModule_AddObject(m, "Target_Priority", (PyObject *)(void *)&dfs_Target_Priority_Type);
	Py_INCREF((PyObject *)(void *)&dfs_StorageInfo2_Type);
	PyModule_AddObject(m, "StorageInfo2", (PyObject *)(void *)&dfs_StorageInfo2_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info6_Type);
	PyModule_AddObject(m, "Info6", (PyObject *)(void *)&dfs_Info6_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info7_Type);
	PyModule_AddObject(m, "Info7", (PyObject *)(void *)&dfs_Info7_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info100_Type);
	PyModule_AddObject(m, "Info100", (PyObject *)(void *)&dfs_Info100_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info101_Type);
	PyModule_AddObject(m, "Info101", (PyObject *)(void *)&dfs_Info101_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info102_Type);
	PyModule_AddObject(m, "Info102", (PyObject *)(void *)&dfs_Info102_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info103_Type);
	PyModule_AddObject(m, "Info103", (PyObject *)(void *)&dfs_Info103_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info104_Type);
	PyModule_AddObject(m, "Info104", (PyObject *)(void *)&dfs_Info104_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info105_Type);
	PyModule_AddObject(m, "Info105", (PyObject *)(void *)&dfs_Info105_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info106_Type);
	PyModule_AddObject(m, "Info106", (PyObject *)(void *)&dfs_Info106_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info200_Type);
	PyModule_AddObject(m, "Info200", (PyObject *)(void *)&dfs_Info200_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info300_Type);
	PyModule_AddObject(m, "Info300", (PyObject *)(void *)&dfs_Info300_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Info_Type);
	PyModule_AddObject(m, "Info", (PyObject *)(void *)&dfs_Info_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumArray1_Type);
	PyModule_AddObject(m, "EnumArray1", (PyObject *)(void *)&dfs_EnumArray1_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumArray2_Type);
	PyModule_AddObject(m, "EnumArray2", (PyObject *)(void *)&dfs_EnumArray2_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumArray3_Type);
	PyModule_AddObject(m, "EnumArray3", (PyObject *)(void *)&dfs_EnumArray3_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumArray4_Type);
	PyModule_AddObject(m, "EnumArray4", (PyObject *)(void *)&dfs_EnumArray4_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumArray5_Type);
	PyModule_AddObject(m, "EnumArray5", (PyObject *)(void *)&dfs_EnumArray5_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumArray6_Type);
	PyModule_AddObject(m, "EnumArray6", (PyObject *)(void *)&dfs_EnumArray6_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumArray200_Type);
	PyModule_AddObject(m, "EnumArray200", (PyObject *)(void *)&dfs_EnumArray200_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumArray300_Type);
	PyModule_AddObject(m, "EnumArray300", (PyObject *)(void *)&dfs_EnumArray300_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumInfo_Type);
	PyModule_AddObject(m, "EnumInfo", (PyObject *)(void *)&dfs_EnumInfo_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumStruct_Type);
	PyModule_AddObject(m, "EnumStruct", (PyObject *)(void *)&dfs_EnumStruct_Type);
	Py_INCREF((PyObject *)(void *)&dfs_UnknownStruct_Type);
	PyModule_AddObject(m, "UnknownStruct", (PyObject *)(void *)&dfs_UnknownStruct_Type);
	Py_INCREF((PyObject *)(void *)&dfs_GetManagerVersion_Type);
	PyModule_AddObject(m, "GetManagerVersion", (PyObject *)(void *)&dfs_GetManagerVersion_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Add_Type);
	PyModule_AddObject(m, "Add", (PyObject *)(void *)&dfs_Add_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Remove_Type);
	PyModule_AddObject(m, "Remove", (PyObject *)(void *)&dfs_Remove_Type);
	Py_INCREF((PyObject *)(void *)&dfs_SetInfo_Type);
	PyModule_AddObject(m, "SetInfo", (PyObject *)(void *)&dfs_SetInfo_Type);
	Py_INCREF((PyObject *)(void *)&dfs_GetInfo_Type);
	PyModule_AddObject(m, "GetInfo", (PyObject *)(void *)&dfs_GetInfo_Type);
	Py_INCREF((PyObject *)(void *)&dfs_Enum_Type);
	PyModule_AddObject(m, "Enum", (PyObject *)(void *)&dfs_Enum_Type);
	Py_INCREF((PyObject *)(void *)&dfs_AddFtRoot_Type);
	PyModule_AddObject(m, "AddFtRoot", (PyObject *)(void *)&dfs_AddFtRoot_Type);
	Py_INCREF((PyObject *)(void *)&dfs_RemoveFtRoot_Type);
	PyModule_AddObject(m, "RemoveFtRoot", (PyObject *)(void *)&dfs_RemoveFtRoot_Type);
	Py_INCREF((PyObject *)(void *)&dfs_AddStdRoot_Type);
	PyModule_AddObject(m, "AddStdRoot", (PyObject *)(void *)&dfs_AddStdRoot_Type);
	Py_INCREF((PyObject *)(void *)&dfs_RemoveStdRoot_Type);
	PyModule_AddObject(m, "RemoveStdRoot", (PyObject *)(void *)&dfs_RemoveStdRoot_Type);
	Py_INCREF((PyObject *)(void *)&dfs_ManagerInitialize_Type);
	PyModule_AddObject(m, "ManagerInitialize", (PyObject *)(void *)&dfs_ManagerInitialize_Type);
	Py_INCREF((PyObject *)(void *)&dfs_AddStdRootForced_Type);
	PyModule_AddObject(m, "AddStdRootForced", (PyObject *)(void *)&dfs_AddStdRootForced_Type);
	Py_INCREF((PyObject *)(void *)&dfs_GetDcAddress_Type);
	PyModule_AddObject(m, "GetDcAddress", (PyObject *)(void *)&dfs_GetDcAddress_Type);
	Py_INCREF((PyObject *)(void *)&dfs_SetDcAddress_Type);
	PyModule_AddObject(m, "SetDcAddress", (PyObject *)(void *)&dfs_SetDcAddress_Type);
	Py_INCREF((PyObject *)(void *)&dfs_FlushFtTable_Type);
	PyModule_AddObject(m, "FlushFtTable", (PyObject *)(void *)&dfs_FlushFtTable_Type);
	Py_INCREF((PyObject *)(void *)&dfs_EnumEx_Type);
	PyModule_AddObject(m, "EnumEx", (PyObject *)(void *)&dfs_EnumEx_Type);
	Py_INCREF((PyObject *)(void *)&netdfs_InterfaceType);
	PyModule_AddObject(m, "netdfs", (PyObject *)(void *)&netdfs_InterfaceType);
	Py_INCREF((PyObject *)(void *)&netdfs_SyntaxType);
	PyModule_AddObject(m, "netdfs_abstract_syntax", (PyObject *)(void *)&netdfs_SyntaxType);
	Py_INCREF((PyObject *)(void *)&netdfs_SyntaxType);
	PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&netdfs_SyntaxType);
#ifdef PY_MOD_DFS_PATCH
	PY_MOD_DFS_PATCH(m);
#endif
	out:
	Py_XDECREF(dep_samba_dcerpc_misc);
	Py_XDECREF(dep_talloc);
	Py_XDECREF(dep_samba_dcerpc_base);
	return m;

}
