
/* Python wrapper functions auto-generated by pidl */
#include <Python.h>
#include "includes.h"
#include <pytalloc.h>
#include "librpc/rpc/pyrpc.h"
#include "librpc/rpc/pyrpc_util.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "librpc/gen_ndr/ndr_samr_c.h"

#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/lsa.h"
#include "librpc/gen_ndr/security.h"
staticforward PyTypeObject samr_SamEntry_Type;
staticforward PyTypeObject samr_SamArray_Type;
staticforward PyTypeObject samr_DomInfo1_Type;
staticforward PyTypeObject samr_DomGeneralInformation_Type;
staticforward PyTypeObject samr_DomInfo3_Type;
staticforward PyTypeObject samr_DomOEMInformation_Type;
staticforward PyTypeObject samr_DomInfo5_Type;
staticforward PyTypeObject samr_DomInfo6_Type;
staticforward PyTypeObject samr_DomInfo7_Type;
staticforward PyTypeObject samr_DomInfo8_Type;
staticforward PyTypeObject samr_DomInfo9_Type;
staticforward PyTypeObject samr_DomGeneralInformation2_Type;
staticforward PyTypeObject samr_DomInfo12_Type;
staticforward PyTypeObject samr_DomInfo13_Type;
staticforward PyTypeObject samr_Ids_Type;
staticforward PyTypeObject samr_GroupInfoAll_Type;
staticforward PyTypeObject samr_GroupInfoAttributes_Type;
staticforward PyTypeObject samr_GroupInfoDescription_Type;
staticforward PyTypeObject samr_RidAttrArray_Type;
staticforward PyTypeObject samr_AliasInfoAll_Type;
staticforward PyTypeObject samr_UserInfo1_Type;
staticforward PyTypeObject samr_UserInfo2_Type;
staticforward PyTypeObject samr_LogonHours_Type;
staticforward PyTypeObject samr_UserInfo3_Type;
staticforward PyTypeObject samr_UserInfo4_Type;
staticforward PyTypeObject samr_UserInfo5_Type;
staticforward PyTypeObject samr_UserInfo6_Type;
staticforward PyTypeObject samr_UserInfo7_Type;
staticforward PyTypeObject samr_UserInfo8_Type;
staticforward PyTypeObject samr_UserInfo9_Type;
staticforward PyTypeObject samr_UserInfo10_Type;
staticforward PyTypeObject samr_UserInfo11_Type;
staticforward PyTypeObject samr_UserInfo12_Type;
staticforward PyTypeObject samr_UserInfo13_Type;
staticforward PyTypeObject samr_UserInfo14_Type;
staticforward PyTypeObject samr_UserInfo16_Type;
staticforward PyTypeObject samr_UserInfo17_Type;
staticforward PyTypeObject samr_Password_Type;
staticforward PyTypeObject samr_UserInfo18_Type;
staticforward PyTypeObject samr_UserInfo20_Type;
staticforward PyTypeObject samr_UserInfo21_Type;
staticforward PyTypeObject samr_CryptPassword_Type;
staticforward PyTypeObject samr_UserInfo23_Type;
staticforward PyTypeObject samr_UserInfo24_Type;
staticforward PyTypeObject samr_CryptPasswordEx_Type;
staticforward PyTypeObject samr_UserInfo25_Type;
staticforward PyTypeObject samr_UserInfo26_Type;
staticforward PyTypeObject samr_RidWithAttribute_Type;
staticforward PyTypeObject samr_RidWithAttributeArray_Type;
staticforward PyTypeObject samr_DispEntryGeneral_Type;
staticforward PyTypeObject samr_DispInfoGeneral_Type;
staticforward PyTypeObject samr_DispEntryFull_Type;
staticforward PyTypeObject samr_DispInfoFull_Type;
staticforward PyTypeObject samr_DispEntryFullGroup_Type;
staticforward PyTypeObject samr_DispInfoFullGroups_Type;
staticforward PyTypeObject samr_DispEntryAscii_Type;
staticforward PyTypeObject samr_DispInfoAscii_Type;
staticforward PyTypeObject samr_PwInfo_Type;
staticforward PyTypeObject userPwdChangeFailureInformation_Type;
staticforward PyTypeObject samr_ConnectInfo1_Type;
staticforward PyTypeObject samr_ValidationBlob_Type;
staticforward PyTypeObject samr_ValidatePasswordInfo_Type;
staticforward PyTypeObject samr_ValidatePasswordRepCtr_Type;
staticforward PyTypeObject samr_ValidatePasswordReq3_Type;
staticforward PyTypeObject samr_ValidatePasswordReq2_Type;
staticforward PyTypeObject samr_ValidatePasswordReq1_Type;
staticforward PyTypeObject samr_InterfaceType;

void initsamr(void);static PyTypeObject *dom_sid_Type;
static PyTypeObject *lsa_BinaryString_Type;
static PyTypeObject *lsa_AsciiString_Type;
static PyTypeObject *lsa_Strings_Type;
static PyTypeObject *ClientConnection_Type;
static PyTypeObject *lsa_String_Type;
static PyTypeObject *lsa_AsciiStringLarge_Type;
static PyTypeObject *lsa_StringLarge_Type;
static PyTypeObject *sec_desc_buf_Type;
static PyTypeObject *lsa_SidArray_Type;
static PyTypeObject *policy_handle_Type;
static PyTypeObject *Object_Type;

static PyObject *py_samr_SamEntry_get_idx(PyObject *obj, void *closure)
{
	struct samr_SamEntry *object = (struct samr_SamEntry *)py_talloc_get_ptr(obj);
	PyObject *py_idx;
	py_idx = PyInt_FromLong(object->idx);
	return py_idx;
}

static int py_samr_SamEntry_set_idx(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_SamEntry *object = (struct samr_SamEntry *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->idx = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_SamEntry_get_name(PyObject *obj, void *closure)
{
	struct samr_SamEntry *object = (struct samr_SamEntry *)py_talloc_get_ptr(obj);
	PyObject *py_name;
	py_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->name);
	return py_name;
}

static int py_samr_SamEntry_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_SamEntry *object = (struct samr_SamEntry *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_SamEntry_getsetters[] = {
	{ discard_const_p(char, "idx"), py_samr_SamEntry_get_idx, py_samr_SamEntry_set_idx },
	{ discard_const_p(char, "name"), py_samr_SamEntry_get_name, py_samr_SamEntry_set_name },
	{ NULL }
};

static PyObject *py_samr_SamEntry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_SamEntry, type);
}


static PyTypeObject samr_SamEntry_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.SamEntry",
	.tp_getset = py_samr_SamEntry_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_SamEntry_new,
};


static PyObject *py_samr_SamArray_get_count(PyObject *obj, void *closure)
{
	struct samr_SamArray *object = (struct samr_SamArray *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_samr_SamArray_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_SamArray *object = (struct samr_SamArray *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_SamArray_get_entries(PyObject *obj, void *closure)
{
	struct samr_SamArray *object = (struct samr_SamArray *)py_talloc_get_ptr(obj);
	PyObject *py_entries;
	if (object->entries == NULL) {
		py_entries = Py_None;
		Py_INCREF(py_entries);
	} else {
		py_entries = PyList_New(object->count);
		if (py_entries == NULL) {
			return NULL;
		}
		{
			int entries_cntr_1;
			for (entries_cntr_1 = 0; entries_cntr_1 < object->count; entries_cntr_1++) {
				PyObject *py_entries_1;
				py_entries_1 = py_talloc_reference_ex(&samr_SamEntry_Type, object->entries, &object->entries[entries_cntr_1]);
				PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
			}
		}
	}
	return py_entries;
}

static int py_samr_SamArray_set_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_SamArray *object = (struct samr_SamArray *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->entries);
	if (value == Py_None) {
		object->entries = NULL;
	} else {
		object->entries = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int entries_cntr_1;
			object->entries = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
			if (!object->entries) { return -1;; }
			talloc_set_name_const(object->entries, "ARRAY: object->entries");
			for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
				PY_CHECK_TYPE(&samr_SamEntry_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
				if (talloc_reference(object->entries, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->entries[entries_cntr_1] = *(struct samr_SamEntry *)py_talloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_SamArray_getsetters[] = {
	{ discard_const_p(char, "count"), py_samr_SamArray_get_count, py_samr_SamArray_set_count },
	{ discard_const_p(char, "entries"), py_samr_SamArray_get_entries, py_samr_SamArray_set_entries },
	{ NULL }
};

static PyObject *py_samr_SamArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_SamArray, type);
}


static PyTypeObject samr_SamArray_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.SamArray",
	.tp_getset = py_samr_SamArray_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_SamArray_new,
};


static PyObject *py_samr_DomInfo1_get_min_password_length(PyObject *obj, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_min_password_length;
	py_min_password_length = PyInt_FromLong(object->min_password_length);
	return py_min_password_length;
}

static int py_samr_DomInfo1_set_min_password_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->min_password_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DomInfo1_get_password_history_length(PyObject *obj, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_password_history_length;
	py_password_history_length = PyInt_FromLong(object->password_history_length);
	return py_password_history_length;
}

static int py_samr_DomInfo1_set_password_history_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->password_history_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DomInfo1_get_password_properties(PyObject *obj, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_password_properties;
	py_password_properties = PyInt_FromLong(object->password_properties);
	return py_password_properties;
}

static int py_samr_DomInfo1_set_password_properties(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->password_properties = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->password_properties = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomInfo1_get_max_password_age(PyObject *obj, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_max_password_age;
	py_max_password_age = PyLong_FromLongLong(object->max_password_age);
	return py_max_password_age;
}

static int py_samr_DomInfo1_set_max_password_age(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->max_password_age = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->max_password_age = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomInfo1_get_min_password_age(PyObject *obj, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_min_password_age;
	py_min_password_age = PyLong_FromLongLong(object->min_password_age);
	return py_min_password_age;
}

static int py_samr_DomInfo1_set_min_password_age(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo1 *object = (struct samr_DomInfo1 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->min_password_age = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->min_password_age = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_DomInfo1_getsetters[] = {
	{ discard_const_p(char, "min_password_length"), py_samr_DomInfo1_get_min_password_length, py_samr_DomInfo1_set_min_password_length },
	{ discard_const_p(char, "password_history_length"), py_samr_DomInfo1_get_password_history_length, py_samr_DomInfo1_set_password_history_length },
	{ discard_const_p(char, "password_properties"), py_samr_DomInfo1_get_password_properties, py_samr_DomInfo1_set_password_properties },
	{ discard_const_p(char, "max_password_age"), py_samr_DomInfo1_get_max_password_age, py_samr_DomInfo1_set_max_password_age },
	{ discard_const_p(char, "min_password_age"), py_samr_DomInfo1_get_min_password_age, py_samr_DomInfo1_set_min_password_age },
	{ NULL }
};

static PyObject *py_samr_DomInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo1, type);
}


static PyTypeObject samr_DomInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo1",
	.tp_getset = py_samr_DomInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo1_new,
};


static PyObject *py_samr_DomGeneralInformation_get_force_logoff_time(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_force_logoff_time;
	py_force_logoff_time = PyLong_FromLongLong(object->force_logoff_time);
	return py_force_logoff_time;
}

static int py_samr_DomGeneralInformation_set_force_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->force_logoff_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->force_logoff_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_oem_information(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_oem_information;
	py_oem_information = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->oem_information);
	return py_oem_information;
}

static int py_samr_DomGeneralInformation_set_oem_information(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->oem_information = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_domain_name(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_domain_name;
	py_domain_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->domain_name);
	return py_domain_name;
}

static int py_samr_DomGeneralInformation_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->domain_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_primary(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_primary;
	py_primary = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->primary);
	return py_primary;
}

static int py_samr_DomGeneralInformation_set_primary(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->primary = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_sequence_num(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_sequence_num;
	py_sequence_num = PyLong_FromLongLong(object->sequence_num);
	return py_sequence_num;
}

static int py_samr_DomGeneralInformation_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->sequence_num = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->sequence_num = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_domain_server_state(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_domain_server_state;
	py_domain_server_state = PyInt_FromLong(object->domain_server_state);
	return py_domain_server_state;
}

static int py_samr_DomGeneralInformation_set_domain_server_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->domain_server_state = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->domain_server_state = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_role(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_role;
	py_role = PyInt_FromLong(object->role);
	return py_role;
}

static int py_samr_DomGeneralInformation_set_role(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->role = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->role = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_unknown3(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = PyInt_FromLong(object->unknown3);
	return py_unknown3;
}

static int py_samr_DomGeneralInformation_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_num_users(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_num_users;
	py_num_users = PyInt_FromLong(object->num_users);
	return py_num_users;
}

static int py_samr_DomGeneralInformation_set_num_users(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_users = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_num_groups(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_num_groups;
	py_num_groups = PyInt_FromLong(object->num_groups);
	return py_num_groups;
}

static int py_samr_DomGeneralInformation_set_num_groups(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_groups = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DomGeneralInformation_get_num_aliases(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(obj);
	PyObject *py_num_aliases;
	py_num_aliases = PyInt_FromLong(object->num_aliases);
	return py_num_aliases;
}

static int py_samr_DomGeneralInformation_set_num_aliases(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation *object = (struct samr_DomGeneralInformation *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_aliases = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_DomGeneralInformation_getsetters[] = {
	{ discard_const_p(char, "force_logoff_time"), py_samr_DomGeneralInformation_get_force_logoff_time, py_samr_DomGeneralInformation_set_force_logoff_time },
	{ discard_const_p(char, "oem_information"), py_samr_DomGeneralInformation_get_oem_information, py_samr_DomGeneralInformation_set_oem_information },
	{ discard_const_p(char, "domain_name"), py_samr_DomGeneralInformation_get_domain_name, py_samr_DomGeneralInformation_set_domain_name },
	{ discard_const_p(char, "primary"), py_samr_DomGeneralInformation_get_primary, py_samr_DomGeneralInformation_set_primary },
	{ discard_const_p(char, "sequence_num"), py_samr_DomGeneralInformation_get_sequence_num, py_samr_DomGeneralInformation_set_sequence_num },
	{ discard_const_p(char, "domain_server_state"), py_samr_DomGeneralInformation_get_domain_server_state, py_samr_DomGeneralInformation_set_domain_server_state },
	{ discard_const_p(char, "role"), py_samr_DomGeneralInformation_get_role, py_samr_DomGeneralInformation_set_role },
	{ discard_const_p(char, "unknown3"), py_samr_DomGeneralInformation_get_unknown3, py_samr_DomGeneralInformation_set_unknown3 },
	{ discard_const_p(char, "num_users"), py_samr_DomGeneralInformation_get_num_users, py_samr_DomGeneralInformation_set_num_users },
	{ discard_const_p(char, "num_groups"), py_samr_DomGeneralInformation_get_num_groups, py_samr_DomGeneralInformation_set_num_groups },
	{ discard_const_p(char, "num_aliases"), py_samr_DomGeneralInformation_get_num_aliases, py_samr_DomGeneralInformation_set_num_aliases },
	{ NULL }
};

static PyObject *py_samr_DomGeneralInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomGeneralInformation, type);
}


static PyTypeObject samr_DomGeneralInformation_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomGeneralInformation",
	.tp_getset = py_samr_DomGeneralInformation_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomGeneralInformation_new,
};


static PyObject *py_samr_DomInfo3_get_force_logoff_time(PyObject *obj, void *closure)
{
	struct samr_DomInfo3 *object = (struct samr_DomInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_force_logoff_time;
	py_force_logoff_time = PyLong_FromLongLong(object->force_logoff_time);
	return py_force_logoff_time;
}

static int py_samr_DomInfo3_set_force_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo3 *object = (struct samr_DomInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->force_logoff_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->force_logoff_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_DomInfo3_getsetters[] = {
	{ discard_const_p(char, "force_logoff_time"), py_samr_DomInfo3_get_force_logoff_time, py_samr_DomInfo3_set_force_logoff_time },
	{ NULL }
};

static PyObject *py_samr_DomInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo3, type);
}


static PyTypeObject samr_DomInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo3",
	.tp_getset = py_samr_DomInfo3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo3_new,
};


static PyObject *py_samr_DomOEMInformation_get_oem_information(PyObject *obj, void *closure)
{
	struct samr_DomOEMInformation *object = (struct samr_DomOEMInformation *)py_talloc_get_ptr(obj);
	PyObject *py_oem_information;
	py_oem_information = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->oem_information);
	return py_oem_information;
}

static int py_samr_DomOEMInformation_set_oem_information(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomOEMInformation *object = (struct samr_DomOEMInformation *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->oem_information = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_DomOEMInformation_getsetters[] = {
	{ discard_const_p(char, "oem_information"), py_samr_DomOEMInformation_get_oem_information, py_samr_DomOEMInformation_set_oem_information },
	{ NULL }
};

static PyObject *py_samr_DomOEMInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomOEMInformation, type);
}


static PyTypeObject samr_DomOEMInformation_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomOEMInformation",
	.tp_getset = py_samr_DomOEMInformation_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomOEMInformation_new,
};


static PyObject *py_samr_DomInfo5_get_domain_name(PyObject *obj, void *closure)
{
	struct samr_DomInfo5 *object = (struct samr_DomInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_domain_name;
	py_domain_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->domain_name);
	return py_domain_name;
}

static int py_samr_DomInfo5_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo5 *object = (struct samr_DomInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->domain_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_DomInfo5_getsetters[] = {
	{ discard_const_p(char, "domain_name"), py_samr_DomInfo5_get_domain_name, py_samr_DomInfo5_set_domain_name },
	{ NULL }
};

static PyObject *py_samr_DomInfo5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo5, type);
}


static PyTypeObject samr_DomInfo5_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo5",
	.tp_getset = py_samr_DomInfo5_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo5_new,
};


static PyObject *py_samr_DomInfo6_get_primary(PyObject *obj, void *closure)
{
	struct samr_DomInfo6 *object = (struct samr_DomInfo6 *)py_talloc_get_ptr(obj);
	PyObject *py_primary;
	py_primary = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->primary);
	return py_primary;
}

static int py_samr_DomInfo6_set_primary(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo6 *object = (struct samr_DomInfo6 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->primary = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_DomInfo6_getsetters[] = {
	{ discard_const_p(char, "primary"), py_samr_DomInfo6_get_primary, py_samr_DomInfo6_set_primary },
	{ NULL }
};

static PyObject *py_samr_DomInfo6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo6, type);
}


static PyTypeObject samr_DomInfo6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo6",
	.tp_getset = py_samr_DomInfo6_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo6_new,
};


static PyObject *py_samr_DomInfo7_get_role(PyObject *obj, void *closure)
{
	struct samr_DomInfo7 *object = (struct samr_DomInfo7 *)py_talloc_get_ptr(obj);
	PyObject *py_role;
	py_role = PyInt_FromLong(object->role);
	return py_role;
}

static int py_samr_DomInfo7_set_role(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo7 *object = (struct samr_DomInfo7 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->role = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->role = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_DomInfo7_getsetters[] = {
	{ discard_const_p(char, "role"), py_samr_DomInfo7_get_role, py_samr_DomInfo7_set_role },
	{ NULL }
};

static PyObject *py_samr_DomInfo7_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo7, type);
}


static PyTypeObject samr_DomInfo7_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo7",
	.tp_getset = py_samr_DomInfo7_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo7_new,
};


static PyObject *py_samr_DomInfo8_get_sequence_num(PyObject *obj, void *closure)
{
	struct samr_DomInfo8 *object = (struct samr_DomInfo8 *)py_talloc_get_ptr(obj);
	PyObject *py_sequence_num;
	py_sequence_num = PyLong_FromLongLong(object->sequence_num);
	return py_sequence_num;
}

static int py_samr_DomInfo8_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo8 *object = (struct samr_DomInfo8 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->sequence_num = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->sequence_num = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomInfo8_get_domain_create_time(PyObject *obj, void *closure)
{
	struct samr_DomInfo8 *object = (struct samr_DomInfo8 *)py_talloc_get_ptr(obj);
	PyObject *py_domain_create_time;
	py_domain_create_time = PyLong_FromLongLong(object->domain_create_time);
	return py_domain_create_time;
}

static int py_samr_DomInfo8_set_domain_create_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo8 *object = (struct samr_DomInfo8 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->domain_create_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->domain_create_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_DomInfo8_getsetters[] = {
	{ discard_const_p(char, "sequence_num"), py_samr_DomInfo8_get_sequence_num, py_samr_DomInfo8_set_sequence_num },
	{ discard_const_p(char, "domain_create_time"), py_samr_DomInfo8_get_domain_create_time, py_samr_DomInfo8_set_domain_create_time },
	{ NULL }
};

static PyObject *py_samr_DomInfo8_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo8, type);
}


static PyTypeObject samr_DomInfo8_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo8",
	.tp_getset = py_samr_DomInfo8_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo8_new,
};


static PyObject *py_samr_DomInfo9_get_domain_server_state(PyObject *obj, void *closure)
{
	struct samr_DomInfo9 *object = (struct samr_DomInfo9 *)py_talloc_get_ptr(obj);
	PyObject *py_domain_server_state;
	py_domain_server_state = PyInt_FromLong(object->domain_server_state);
	return py_domain_server_state;
}

static int py_samr_DomInfo9_set_domain_server_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo9 *object = (struct samr_DomInfo9 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->domain_server_state = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->domain_server_state = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_DomInfo9_getsetters[] = {
	{ discard_const_p(char, "domain_server_state"), py_samr_DomInfo9_get_domain_server_state, py_samr_DomInfo9_set_domain_server_state },
	{ NULL }
};

static PyObject *py_samr_DomInfo9_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo9, type);
}


static PyTypeObject samr_DomInfo9_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo9",
	.tp_getset = py_samr_DomInfo9_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo9_new,
};


static PyObject *py_samr_DomGeneralInformation2_get_general(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation2 *object = (struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(obj);
	PyObject *py_general;
	py_general = py_talloc_reference_ex(&samr_DomGeneralInformation_Type, py_talloc_get_mem_ctx(obj), &object->general);
	return py_general;
}

static int py_samr_DomGeneralInformation2_set_general(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation2 *object = (struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_DomGeneralInformation_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->general = *(struct samr_DomGeneralInformation *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_DomGeneralInformation2_get_lockout_duration(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation2 *object = (struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(obj);
	PyObject *py_lockout_duration;
	py_lockout_duration = PyLong_FromLongLong(object->lockout_duration);
	return py_lockout_duration;
}

static int py_samr_DomGeneralInformation2_set_lockout_duration(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation2 *object = (struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->lockout_duration = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->lockout_duration = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomGeneralInformation2_get_lockout_window(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation2 *object = (struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(obj);
	PyObject *py_lockout_window;
	py_lockout_window = PyLong_FromLongLong(object->lockout_window);
	return py_lockout_window;
}

static int py_samr_DomGeneralInformation2_set_lockout_window(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation2 *object = (struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->lockout_window = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->lockout_window = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomGeneralInformation2_get_lockout_threshold(PyObject *obj, void *closure)
{
	struct samr_DomGeneralInformation2 *object = (struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(obj);
	PyObject *py_lockout_threshold;
	py_lockout_threshold = PyInt_FromLong(object->lockout_threshold);
	return py_lockout_threshold;
}

static int py_samr_DomGeneralInformation2_set_lockout_threshold(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomGeneralInformation2 *object = (struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->lockout_threshold = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_DomGeneralInformation2_getsetters[] = {
	{ discard_const_p(char, "general"), py_samr_DomGeneralInformation2_get_general, py_samr_DomGeneralInformation2_set_general },
	{ discard_const_p(char, "lockout_duration"), py_samr_DomGeneralInformation2_get_lockout_duration, py_samr_DomGeneralInformation2_set_lockout_duration },
	{ discard_const_p(char, "lockout_window"), py_samr_DomGeneralInformation2_get_lockout_window, py_samr_DomGeneralInformation2_set_lockout_window },
	{ discard_const_p(char, "lockout_threshold"), py_samr_DomGeneralInformation2_get_lockout_threshold, py_samr_DomGeneralInformation2_set_lockout_threshold },
	{ NULL }
};

static PyObject *py_samr_DomGeneralInformation2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomGeneralInformation2, type);
}


static PyTypeObject samr_DomGeneralInformation2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomGeneralInformation2",
	.tp_getset = py_samr_DomGeneralInformation2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomGeneralInformation2_new,
};


static PyObject *py_samr_DomInfo12_get_lockout_duration(PyObject *obj, void *closure)
{
	struct samr_DomInfo12 *object = (struct samr_DomInfo12 *)py_talloc_get_ptr(obj);
	PyObject *py_lockout_duration;
	py_lockout_duration = PyLong_FromLongLong(object->lockout_duration);
	return py_lockout_duration;
}

static int py_samr_DomInfo12_set_lockout_duration(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo12 *object = (struct samr_DomInfo12 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->lockout_duration = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->lockout_duration = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomInfo12_get_lockout_window(PyObject *obj, void *closure)
{
	struct samr_DomInfo12 *object = (struct samr_DomInfo12 *)py_talloc_get_ptr(obj);
	PyObject *py_lockout_window;
	py_lockout_window = PyLong_FromLongLong(object->lockout_window);
	return py_lockout_window;
}

static int py_samr_DomInfo12_set_lockout_window(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo12 *object = (struct samr_DomInfo12 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->lockout_window = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->lockout_window = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomInfo12_get_lockout_threshold(PyObject *obj, void *closure)
{
	struct samr_DomInfo12 *object = (struct samr_DomInfo12 *)py_talloc_get_ptr(obj);
	PyObject *py_lockout_threshold;
	py_lockout_threshold = PyInt_FromLong(object->lockout_threshold);
	return py_lockout_threshold;
}

static int py_samr_DomInfo12_set_lockout_threshold(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo12 *object = (struct samr_DomInfo12 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->lockout_threshold = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_DomInfo12_getsetters[] = {
	{ discard_const_p(char, "lockout_duration"), py_samr_DomInfo12_get_lockout_duration, py_samr_DomInfo12_set_lockout_duration },
	{ discard_const_p(char, "lockout_window"), py_samr_DomInfo12_get_lockout_window, py_samr_DomInfo12_set_lockout_window },
	{ discard_const_p(char, "lockout_threshold"), py_samr_DomInfo12_get_lockout_threshold, py_samr_DomInfo12_set_lockout_threshold },
	{ NULL }
};

static PyObject *py_samr_DomInfo12_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo12, type);
}


static PyTypeObject samr_DomInfo12_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo12",
	.tp_getset = py_samr_DomInfo12_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo12_new,
};


static PyObject *py_samr_DomInfo13_get_sequence_num(PyObject *obj, void *closure)
{
	struct samr_DomInfo13 *object = (struct samr_DomInfo13 *)py_talloc_get_ptr(obj);
	PyObject *py_sequence_num;
	py_sequence_num = PyLong_FromLongLong(object->sequence_num);
	return py_sequence_num;
}

static int py_samr_DomInfo13_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo13 *object = (struct samr_DomInfo13 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->sequence_num = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->sequence_num = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomInfo13_get_domain_create_time(PyObject *obj, void *closure)
{
	struct samr_DomInfo13 *object = (struct samr_DomInfo13 *)py_talloc_get_ptr(obj);
	PyObject *py_domain_create_time;
	py_domain_create_time = PyLong_FromLongLong(object->domain_create_time);
	return py_domain_create_time;
}

static int py_samr_DomInfo13_set_domain_create_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo13 *object = (struct samr_DomInfo13 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->domain_create_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->domain_create_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DomInfo13_get_modified_count_at_last_promotion(PyObject *obj, void *closure)
{
	struct samr_DomInfo13 *object = (struct samr_DomInfo13 *)py_talloc_get_ptr(obj);
	PyObject *py_modified_count_at_last_promotion;
	py_modified_count_at_last_promotion = PyLong_FromLongLong(object->modified_count_at_last_promotion);
	return py_modified_count_at_last_promotion;
}

static int py_samr_DomInfo13_set_modified_count_at_last_promotion(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DomInfo13 *object = (struct samr_DomInfo13 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->modified_count_at_last_promotion = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->modified_count_at_last_promotion = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_DomInfo13_getsetters[] = {
	{ discard_const_p(char, "sequence_num"), py_samr_DomInfo13_get_sequence_num, py_samr_DomInfo13_set_sequence_num },
	{ discard_const_p(char, "domain_create_time"), py_samr_DomInfo13_get_domain_create_time, py_samr_DomInfo13_set_domain_create_time },
	{ discard_const_p(char, "modified_count_at_last_promotion"), py_samr_DomInfo13_get_modified_count_at_last_promotion, py_samr_DomInfo13_set_modified_count_at_last_promotion },
	{ NULL }
};

static PyObject *py_samr_DomInfo13_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DomInfo13, type);
}


static PyTypeObject samr_DomInfo13_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DomInfo13",
	.tp_getset = py_samr_DomInfo13_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DomInfo13_new,
};

PyObject *py_import_samr_DomainInfo(TALLOC_CTX *mem_ctx, int level, union samr_DomainInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = py_talloc_reference_ex(&samr_DomInfo1_Type, mem_ctx, &in->info1);
			return ret;

		case 2:
			ret = py_talloc_reference_ex(&samr_DomGeneralInformation_Type, mem_ctx, &in->general);
			return ret;

		case 3:
			ret = py_talloc_reference_ex(&samr_DomInfo3_Type, mem_ctx, &in->info3);
			return ret;

		case 4:
			ret = py_talloc_reference_ex(&samr_DomOEMInformation_Type, mem_ctx, &in->oem);
			return ret;

		case 5:
			ret = py_talloc_reference_ex(&samr_DomInfo5_Type, mem_ctx, &in->info5);
			return ret;

		case 6:
			ret = py_talloc_reference_ex(&samr_DomInfo6_Type, mem_ctx, &in->info6);
			return ret;

		case 7:
			ret = py_talloc_reference_ex(&samr_DomInfo7_Type, mem_ctx, &in->info7);
			return ret;

		case 8:
			ret = py_talloc_reference_ex(&samr_DomInfo8_Type, mem_ctx, &in->info8);
			return ret;

		case 9:
			ret = py_talloc_reference_ex(&samr_DomInfo9_Type, mem_ctx, &in->info9);
			return ret;

		case 11:
			ret = py_talloc_reference_ex(&samr_DomGeneralInformation2_Type, mem_ctx, &in->general2);
			return ret;

		case 12:
			ret = py_talloc_reference_ex(&samr_DomInfo12_Type, mem_ctx, &in->info12);
			return ret;

		case 13:
			ret = py_talloc_reference_ex(&samr_DomInfo13_Type, mem_ctx, &in->info13);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union samr_DomainInfo *py_export_samr_DomainInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union samr_DomainInfo *ret = talloc_zero(mem_ctx, union samr_DomainInfo);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&samr_DomInfo1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info1 = *(struct samr_DomInfo1 *)py_talloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&samr_DomGeneralInformation_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->general = *(struct samr_DomGeneralInformation *)py_talloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&samr_DomInfo3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info3 = *(struct samr_DomInfo3 *)py_talloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&samr_DomOEMInformation_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->oem = *(struct samr_DomOEMInformation *)py_talloc_get_ptr(in);
			break;

		case 5:
			PY_CHECK_TYPE(&samr_DomInfo5_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info5 = *(struct samr_DomInfo5 *)py_talloc_get_ptr(in);
			break;

		case 6:
			PY_CHECK_TYPE(&samr_DomInfo6_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info6 = *(struct samr_DomInfo6 *)py_talloc_get_ptr(in);
			break;

		case 7:
			PY_CHECK_TYPE(&samr_DomInfo7_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info7 = *(struct samr_DomInfo7 *)py_talloc_get_ptr(in);
			break;

		case 8:
			PY_CHECK_TYPE(&samr_DomInfo8_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info8 = *(struct samr_DomInfo8 *)py_talloc_get_ptr(in);
			break;

		case 9:
			PY_CHECK_TYPE(&samr_DomInfo9_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info9 = *(struct samr_DomInfo9 *)py_talloc_get_ptr(in);
			break;

		case 11:
			PY_CHECK_TYPE(&samr_DomGeneralInformation2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->general2 = *(struct samr_DomGeneralInformation2 *)py_talloc_get_ptr(in);
			break;

		case 12:
			PY_CHECK_TYPE(&samr_DomInfo12_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info12 = *(struct samr_DomInfo12 *)py_talloc_get_ptr(in);
			break;

		case 13:
			PY_CHECK_TYPE(&samr_DomInfo13_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info13 = *(struct samr_DomInfo13 *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_samr_Ids_get_count(PyObject *obj, void *closure)
{
	struct samr_Ids *object = (struct samr_Ids *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_samr_Ids_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_Ids *object = (struct samr_Ids *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_Ids_get_ids(PyObject *obj, void *closure)
{
	struct samr_Ids *object = (struct samr_Ids *)py_talloc_get_ptr(obj);
	PyObject *py_ids;
	if (object->ids == NULL) {
		py_ids = Py_None;
		Py_INCREF(py_ids);
	} else {
		py_ids = PyList_New(object->count);
		if (py_ids == NULL) {
			return NULL;
		}
		{
			int ids_cntr_1;
			for (ids_cntr_1 = 0; ids_cntr_1 < object->count; ids_cntr_1++) {
				PyObject *py_ids_1;
				py_ids_1 = PyInt_FromLong(object->ids[ids_cntr_1]);
				PyList_SetItem(py_ids, ids_cntr_1, py_ids_1);
			}
		}
	}
	return py_ids;
}

static int py_samr_Ids_set_ids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_Ids *object = (struct samr_Ids *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->ids);
	if (value == Py_None) {
		object->ids = NULL;
	} else {
		object->ids = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int ids_cntr_1;
			object->ids = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->ids, PyList_GET_SIZE(value));
			if (!object->ids) { return -1;; }
			talloc_set_name_const(object->ids, "ARRAY: object->ids");
			for (ids_cntr_1 = 0; ids_cntr_1 < PyList_GET_SIZE(value); ids_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, ids_cntr_1), return -1;);
				object->ids[ids_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, ids_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_Ids_getsetters[] = {
	{ discard_const_p(char, "count"), py_samr_Ids_get_count, py_samr_Ids_set_count },
	{ discard_const_p(char, "ids"), py_samr_Ids_get_ids, py_samr_Ids_set_ids },
	{ NULL }
};

static PyObject *py_samr_Ids_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_Ids, type);
}


static PyTypeObject samr_Ids_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.Ids",
	.tp_getset = py_samr_Ids_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_Ids_new,
};


static PyObject *py_samr_GroupInfoAll_get_name(PyObject *obj, void *closure)
{
	struct samr_GroupInfoAll *object = (struct samr_GroupInfoAll *)py_talloc_get_ptr(obj);
	PyObject *py_name;
	py_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->name);
	return py_name;
}

static int py_samr_GroupInfoAll_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_GroupInfoAll *object = (struct samr_GroupInfoAll *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_GroupInfoAll_get_attributes(PyObject *obj, void *closure)
{
	struct samr_GroupInfoAll *object = (struct samr_GroupInfoAll *)py_talloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

static int py_samr_GroupInfoAll_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_GroupInfoAll *object = (struct samr_GroupInfoAll *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->attributes = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->attributes = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_GroupInfoAll_get_num_members(PyObject *obj, void *closure)
{
	struct samr_GroupInfoAll *object = (struct samr_GroupInfoAll *)py_talloc_get_ptr(obj);
	PyObject *py_num_members;
	py_num_members = PyInt_FromLong(object->num_members);
	return py_num_members;
}

static int py_samr_GroupInfoAll_set_num_members(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_GroupInfoAll *object = (struct samr_GroupInfoAll *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_members = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_GroupInfoAll_get_description(PyObject *obj, void *closure)
{
	struct samr_GroupInfoAll *object = (struct samr_GroupInfoAll *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_GroupInfoAll_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_GroupInfoAll *object = (struct samr_GroupInfoAll *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_GroupInfoAll_getsetters[] = {
	{ discard_const_p(char, "name"), py_samr_GroupInfoAll_get_name, py_samr_GroupInfoAll_set_name },
	{ discard_const_p(char, "attributes"), py_samr_GroupInfoAll_get_attributes, py_samr_GroupInfoAll_set_attributes },
	{ discard_const_p(char, "num_members"), py_samr_GroupInfoAll_get_num_members, py_samr_GroupInfoAll_set_num_members },
	{ discard_const_p(char, "description"), py_samr_GroupInfoAll_get_description, py_samr_GroupInfoAll_set_description },
	{ NULL }
};

static PyObject *py_samr_GroupInfoAll_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_GroupInfoAll, type);
}


static PyTypeObject samr_GroupInfoAll_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.GroupInfoAll",
	.tp_getset = py_samr_GroupInfoAll_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_GroupInfoAll_new,
};


static PyObject *py_samr_GroupInfoAttributes_get_attributes(PyObject *obj, void *closure)
{
	struct samr_GroupInfoAttributes *object = (struct samr_GroupInfoAttributes *)py_talloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

static int py_samr_GroupInfoAttributes_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_GroupInfoAttributes *object = (struct samr_GroupInfoAttributes *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->attributes = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->attributes = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_GroupInfoAttributes_getsetters[] = {
	{ discard_const_p(char, "attributes"), py_samr_GroupInfoAttributes_get_attributes, py_samr_GroupInfoAttributes_set_attributes },
	{ NULL }
};

static PyObject *py_samr_GroupInfoAttributes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_GroupInfoAttributes, type);
}


static PyTypeObject samr_GroupInfoAttributes_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.GroupInfoAttributes",
	.tp_getset = py_samr_GroupInfoAttributes_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_GroupInfoAttributes_new,
};


static PyObject *py_samr_GroupInfoDescription_get_description(PyObject *obj, void *closure)
{
	struct samr_GroupInfoDescription *object = (struct samr_GroupInfoDescription *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_GroupInfoDescription_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_GroupInfoDescription *object = (struct samr_GroupInfoDescription *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_GroupInfoDescription_getsetters[] = {
	{ discard_const_p(char, "description"), py_samr_GroupInfoDescription_get_description, py_samr_GroupInfoDescription_set_description },
	{ NULL }
};

static PyObject *py_samr_GroupInfoDescription_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_GroupInfoDescription, type);
}


static PyTypeObject samr_GroupInfoDescription_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.GroupInfoDescription",
	.tp_getset = py_samr_GroupInfoDescription_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_GroupInfoDescription_new,
};

PyObject *py_import_samr_GroupInfo(TALLOC_CTX *mem_ctx, int level, union samr_GroupInfo *in)
{
	PyObject *ret;

	switch (level) {
		case GROUPINFOALL:
			ret = py_talloc_reference_ex(&samr_GroupInfoAll_Type, mem_ctx, &in->all);
			return ret;

		case GROUPINFONAME:
			ret = py_talloc_reference_ex(lsa_String_Type, mem_ctx, &in->name);
			return ret;

		case GROUPINFOATTRIBUTES:
			ret = py_talloc_reference_ex(&samr_GroupInfoAttributes_Type, mem_ctx, &in->attributes);
			return ret;

		case GROUPINFODESCRIPTION:
			ret = py_talloc_reference_ex(lsa_String_Type, mem_ctx, &in->description);
			return ret;

		case GROUPINFOALL2:
			ret = py_talloc_reference_ex(&samr_GroupInfoAll_Type, mem_ctx, &in->all2);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union samr_GroupInfo *py_export_samr_GroupInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union samr_GroupInfo *ret = talloc_zero(mem_ctx, union samr_GroupInfo);
	switch (level) {
		case GROUPINFOALL:
			PY_CHECK_TYPE(&samr_GroupInfoAll_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->all = *(struct samr_GroupInfoAll *)py_talloc_get_ptr(in);
			break;

		case GROUPINFONAME:
			PY_CHECK_TYPE(lsa_String_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->name = *(struct lsa_String *)py_talloc_get_ptr(in);
			break;

		case GROUPINFOATTRIBUTES:
			PY_CHECK_TYPE(&samr_GroupInfoAttributes_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->attributes = *(struct samr_GroupInfoAttributes *)py_talloc_get_ptr(in);
			break;

		case GROUPINFODESCRIPTION:
			PY_CHECK_TYPE(lsa_String_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->description = *(struct lsa_String *)py_talloc_get_ptr(in);
			break;

		case GROUPINFOALL2:
			PY_CHECK_TYPE(&samr_GroupInfoAll_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->all2 = *(struct samr_GroupInfoAll *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_samr_RidAttrArray_get_count(PyObject *obj, void *closure)
{
	struct samr_RidAttrArray *object = (struct samr_RidAttrArray *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_samr_RidAttrArray_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_RidAttrArray *object = (struct samr_RidAttrArray *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_RidAttrArray_get_rids(PyObject *obj, void *closure)
{
	struct samr_RidAttrArray *object = (struct samr_RidAttrArray *)py_talloc_get_ptr(obj);
	PyObject *py_rids;
	if (object->rids == NULL) {
		py_rids = Py_None;
		Py_INCREF(py_rids);
	} else {
		py_rids = PyList_New(object->count);
		if (py_rids == NULL) {
			return NULL;
		}
		{
			int rids_cntr_1;
			for (rids_cntr_1 = 0; rids_cntr_1 < object->count; rids_cntr_1++) {
				PyObject *py_rids_1;
				py_rids_1 = PyInt_FromLong(object->rids[rids_cntr_1]);
				PyList_SetItem(py_rids, rids_cntr_1, py_rids_1);
			}
		}
	}
	return py_rids;
}

static int py_samr_RidAttrArray_set_rids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_RidAttrArray *object = (struct samr_RidAttrArray *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->rids);
	if (value == Py_None) {
		object->rids = NULL;
	} else {
		object->rids = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int rids_cntr_1;
			object->rids = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->rids, PyList_GET_SIZE(value));
			if (!object->rids) { return -1;; }
			talloc_set_name_const(object->rids, "ARRAY: object->rids");
			for (rids_cntr_1 = 0; rids_cntr_1 < PyList_GET_SIZE(value); rids_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, rids_cntr_1), return -1;);
				object->rids[rids_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, rids_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_samr_RidAttrArray_get_attributes(PyObject *obj, void *closure)
{
	struct samr_RidAttrArray *object = (struct samr_RidAttrArray *)py_talloc_get_ptr(obj);
	PyObject *py_attributes;
	if (object->attributes == NULL) {
		py_attributes = Py_None;
		Py_INCREF(py_attributes);
	} else {
		py_attributes = PyList_New(object->count);
		if (py_attributes == NULL) {
			return NULL;
		}
		{
			int attributes_cntr_1;
			for (attributes_cntr_1 = 0; attributes_cntr_1 < object->count; attributes_cntr_1++) {
				PyObject *py_attributes_1;
				py_attributes_1 = PyInt_FromLong(object->attributes[attributes_cntr_1]);
				PyList_SetItem(py_attributes, attributes_cntr_1, py_attributes_1);
			}
		}
	}
	return py_attributes;
}

static int py_samr_RidAttrArray_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_RidAttrArray *object = (struct samr_RidAttrArray *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->attributes);
	if (value == Py_None) {
		object->attributes = NULL;
	} else {
		object->attributes = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int attributes_cntr_1;
			object->attributes = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->attributes, PyList_GET_SIZE(value));
			if (!object->attributes) { return -1;; }
			talloc_set_name_const(object->attributes, "ARRAY: object->attributes");
			for (attributes_cntr_1 = 0; attributes_cntr_1 < PyList_GET_SIZE(value); attributes_cntr_1++) {
				if (PyLong_Check(PyList_GET_ITEM(value, attributes_cntr_1))) {
					object->attributes[attributes_cntr_1] = PyLong_AsLongLong(PyList_GET_ITEM(value, attributes_cntr_1));
				} else if (PyInt_Check(PyList_GET_ITEM(value, attributes_cntr_1))) {
					object->attributes[attributes_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, attributes_cntr_1));
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
					  PyInt_Type.tp_name, PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_RidAttrArray_getsetters[] = {
	{ discard_const_p(char, "count"), py_samr_RidAttrArray_get_count, py_samr_RidAttrArray_set_count },
	{ discard_const_p(char, "rids"), py_samr_RidAttrArray_get_rids, py_samr_RidAttrArray_set_rids },
	{ discard_const_p(char, "attributes"), py_samr_RidAttrArray_get_attributes, py_samr_RidAttrArray_set_attributes },
	{ NULL }
};

static PyObject *py_samr_RidAttrArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_RidAttrArray, type);
}


static PyTypeObject samr_RidAttrArray_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.RidAttrArray",
	.tp_getset = py_samr_RidAttrArray_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_RidAttrArray_new,
};


static PyObject *py_samr_AliasInfoAll_get_name(PyObject *obj, void *closure)
{
	struct samr_AliasInfoAll *object = (struct samr_AliasInfoAll *)py_talloc_get_ptr(obj);
	PyObject *py_name;
	py_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->name);
	return py_name;
}

static int py_samr_AliasInfoAll_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_AliasInfoAll *object = (struct samr_AliasInfoAll *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_AliasInfoAll_get_num_members(PyObject *obj, void *closure)
{
	struct samr_AliasInfoAll *object = (struct samr_AliasInfoAll *)py_talloc_get_ptr(obj);
	PyObject *py_num_members;
	py_num_members = PyInt_FromLong(object->num_members);
	return py_num_members;
}

static int py_samr_AliasInfoAll_set_num_members(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_AliasInfoAll *object = (struct samr_AliasInfoAll *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_members = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_AliasInfoAll_get_description(PyObject *obj, void *closure)
{
	struct samr_AliasInfoAll *object = (struct samr_AliasInfoAll *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_AliasInfoAll_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_AliasInfoAll *object = (struct samr_AliasInfoAll *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_AliasInfoAll_getsetters[] = {
	{ discard_const_p(char, "name"), py_samr_AliasInfoAll_get_name, py_samr_AliasInfoAll_set_name },
	{ discard_const_p(char, "num_members"), py_samr_AliasInfoAll_get_num_members, py_samr_AliasInfoAll_set_num_members },
	{ discard_const_p(char, "description"), py_samr_AliasInfoAll_get_description, py_samr_AliasInfoAll_set_description },
	{ NULL }
};

static PyObject *py_samr_AliasInfoAll_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_AliasInfoAll, type);
}


static PyTypeObject samr_AliasInfoAll_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.AliasInfoAll",
	.tp_getset = py_samr_AliasInfoAll_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_AliasInfoAll_new,
};

PyObject *py_import_samr_AliasInfo(TALLOC_CTX *mem_ctx, int level, union samr_AliasInfo *in)
{
	PyObject *ret;

	switch (level) {
		case ALIASINFOALL:
			ret = py_talloc_reference_ex(&samr_AliasInfoAll_Type, mem_ctx, &in->all);
			return ret;

		case ALIASINFONAME:
			ret = py_talloc_reference_ex(lsa_String_Type, mem_ctx, &in->name);
			return ret;

		case ALIASINFODESCRIPTION:
			ret = py_talloc_reference_ex(lsa_String_Type, mem_ctx, &in->description);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union samr_AliasInfo *py_export_samr_AliasInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union samr_AliasInfo *ret = talloc_zero(mem_ctx, union samr_AliasInfo);
	switch (level) {
		case ALIASINFOALL:
			PY_CHECK_TYPE(&samr_AliasInfoAll_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->all = *(struct samr_AliasInfoAll *)py_talloc_get_ptr(in);
			break;

		case ALIASINFONAME:
			PY_CHECK_TYPE(lsa_String_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->name = *(struct lsa_String *)py_talloc_get_ptr(in);
			break;

		case ALIASINFODESCRIPTION:
			PY_CHECK_TYPE(lsa_String_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->description = *(struct lsa_String *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_samr_UserInfo1_get_account_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_UserInfo1_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo1_get_full_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_samr_UserInfo1_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo1_get_primary_gid(PyObject *obj, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_primary_gid;
	py_primary_gid = PyInt_FromLong(object->primary_gid);
	return py_primary_gid;
}

static int py_samr_UserInfo1_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->primary_gid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo1_get_description(PyObject *obj, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_UserInfo1_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo1_get_comment(PyObject *obj, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_comment;
	py_comment = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->comment);
	return py_comment;
}

static int py_samr_UserInfo1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo1 *object = (struct samr_UserInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->comment = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo1_getsetters[] = {
	{ discard_const_p(char, "account_name"), py_samr_UserInfo1_get_account_name, py_samr_UserInfo1_set_account_name },
	{ discard_const_p(char, "full_name"), py_samr_UserInfo1_get_full_name, py_samr_UserInfo1_set_full_name },
	{ discard_const_p(char, "primary_gid"), py_samr_UserInfo1_get_primary_gid, py_samr_UserInfo1_set_primary_gid },
	{ discard_const_p(char, "description"), py_samr_UserInfo1_get_description, py_samr_UserInfo1_set_description },
	{ discard_const_p(char, "comment"), py_samr_UserInfo1_get_comment, py_samr_UserInfo1_set_comment },
	{ NULL }
};

static PyObject *py_samr_UserInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo1, type);
}


static PyTypeObject samr_UserInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo1",
	.tp_getset = py_samr_UserInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo1_new,
};


static PyObject *py_samr_UserInfo2_get_comment(PyObject *obj, void *closure)
{
	struct samr_UserInfo2 *object = (struct samr_UserInfo2 *)py_talloc_get_ptr(obj);
	PyObject *py_comment;
	py_comment = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->comment);
	return py_comment;
}

static int py_samr_UserInfo2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo2 *object = (struct samr_UserInfo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->comment = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo2_get_reserved(PyObject *obj, void *closure)
{
	struct samr_UserInfo2 *object = (struct samr_UserInfo2 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->reserved);
	return py_reserved;
}

static int py_samr_UserInfo2_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo2 *object = (struct samr_UserInfo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->reserved = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo2_get_country_code(PyObject *obj, void *closure)
{
	struct samr_UserInfo2 *object = (struct samr_UserInfo2 *)py_talloc_get_ptr(obj);
	PyObject *py_country_code;
	py_country_code = PyInt_FromLong(object->country_code);
	return py_country_code;
}

static int py_samr_UserInfo2_set_country_code(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo2 *object = (struct samr_UserInfo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->country_code = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo2_get_code_page(PyObject *obj, void *closure)
{
	struct samr_UserInfo2 *object = (struct samr_UserInfo2 *)py_talloc_get_ptr(obj);
	PyObject *py_code_page;
	py_code_page = PyInt_FromLong(object->code_page);
	return py_code_page;
}

static int py_samr_UserInfo2_set_code_page(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo2 *object = (struct samr_UserInfo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->code_page = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo2_getsetters[] = {
	{ discard_const_p(char, "comment"), py_samr_UserInfo2_get_comment, py_samr_UserInfo2_set_comment },
	{ discard_const_p(char, "reserved"), py_samr_UserInfo2_get_reserved, py_samr_UserInfo2_set_reserved },
	{ discard_const_p(char, "country_code"), py_samr_UserInfo2_get_country_code, py_samr_UserInfo2_set_country_code },
	{ discard_const_p(char, "code_page"), py_samr_UserInfo2_get_code_page, py_samr_UserInfo2_set_code_page },
	{ NULL }
};

static PyObject *py_samr_UserInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo2, type);
}


static PyTypeObject samr_UserInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo2",
	.tp_getset = py_samr_UserInfo2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo2_new,
};


static PyObject *py_samr_LogonHours_get_units_per_week(PyObject *obj, void *closure)
{
	struct samr_LogonHours *object = (struct samr_LogonHours *)py_talloc_get_ptr(obj);
	PyObject *py_units_per_week;
	py_units_per_week = PyInt_FromLong(object->units_per_week);
	return py_units_per_week;
}

static int py_samr_LogonHours_set_units_per_week(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_LogonHours *object = (struct samr_LogonHours *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->units_per_week = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_LogonHours_get_bits(PyObject *obj, void *closure)
{
	struct samr_LogonHours *object = (struct samr_LogonHours *)py_talloc_get_ptr(obj);
	PyObject *py_bits;
	if (object->bits == NULL) {
		py_bits = Py_None;
		Py_INCREF(py_bits);
	} else {
		py_bits = PyList_New(object->units_per_week / 8);
		if (py_bits == NULL) {
			return NULL;
		}
		{
			int bits_cntr_1;
			for (bits_cntr_1 = 0; bits_cntr_1 < object->units_per_week / 8; bits_cntr_1++) {
				PyObject *py_bits_1;
				py_bits_1 = PyInt_FromLong(object->bits[bits_cntr_1]);
				PyList_SetItem(py_bits, bits_cntr_1, py_bits_1);
			}
		}
	}
	return py_bits;
}

static int py_samr_LogonHours_set_bits(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_LogonHours *object = (struct samr_LogonHours *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->bits);
	if (value == Py_None) {
		object->bits = NULL;
	} else {
		object->bits = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int bits_cntr_1;
			object->bits = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->bits, PyList_GET_SIZE(value));
			if (!object->bits) { return -1;; }
			talloc_set_name_const(object->bits, "ARRAY: object->bits");
			for (bits_cntr_1 = 0; bits_cntr_1 < PyList_GET_SIZE(value); bits_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, bits_cntr_1), return -1;);
				object->bits[bits_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, bits_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_LogonHours_getsetters[] = {
	{ discard_const_p(char, "units_per_week"), py_samr_LogonHours_get_units_per_week, py_samr_LogonHours_set_units_per_week },
	{ discard_const_p(char, "bits"), py_samr_LogonHours_get_bits, py_samr_LogonHours_set_bits },
	{ NULL }
};

static PyObject *py_samr_LogonHours_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_LogonHours, type);
}

static PyObject *py_samr_LogonHours_ndr_pack(PyObject *py_obj)
{
	struct samr_LogonHours *object = (struct samr_LogonHours *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_samr_LogonHours);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_samr_LogonHours_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct samr_LogonHours *object = (struct samr_LogonHours *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_samr_LogonHours);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_samr_LogonHours_ndr_print(PyObject *py_obj)
{
	struct samr_LogonHours *object = (struct samr_LogonHours *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_samr_LogonHours, "samr_LogonHours", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_samr_LogonHours_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_samr_LogonHours_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_samr_LogonHours_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_samr_LogonHours_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject samr_LogonHours_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.LogonHours",
	.tp_getset = py_samr_LogonHours_getsetters,
	.tp_methods = py_samr_LogonHours_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_LogonHours_new,
};


static PyObject *py_samr_UserInfo3_get_account_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_UserInfo3_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_full_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_samr_UserInfo3_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_rid(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyInt_FromLong(object->rid);
	return py_rid;
}

static int py_samr_UserInfo3_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_primary_gid(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_primary_gid;
	py_primary_gid = PyInt_FromLong(object->primary_gid);
	return py_primary_gid;
}

static int py_samr_UserInfo3_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->primary_gid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_home_directory(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_home_directory;
	py_home_directory = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->home_directory);
	return py_home_directory;
}

static int py_samr_UserInfo3_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_directory = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_home_drive(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_home_drive;
	py_home_drive = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->home_drive);
	return py_home_drive;
}

static int py_samr_UserInfo3_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_drive = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_logon_script(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_script;
	py_logon_script = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->logon_script);
	return py_logon_script;
}

static int py_samr_UserInfo3_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_script = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_profile_path(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_profile_path;
	py_profile_path = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->profile_path);
	return py_profile_path;
}

static int py_samr_UserInfo3_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->profile_path = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_workstations(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_workstations;
	py_workstations = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->workstations);
	return py_workstations;
}

static int py_samr_UserInfo3_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->workstations = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_last_logon(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_last_logon;
	py_last_logon = PyLong_FromLongLong(object->last_logon);
	return py_last_logon;
}

static int py_samr_UserInfo3_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_logon = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_logon = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo3_get_last_logoff(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_last_logoff;
	py_last_logoff = PyLong_FromLongLong(object->last_logoff);
	return py_last_logoff;
}

static int py_samr_UserInfo3_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_logoff = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_logoff = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo3_get_last_password_change(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_last_password_change;
	py_last_password_change = PyLong_FromLongLong(object->last_password_change);
	return py_last_password_change;
}

static int py_samr_UserInfo3_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_password_change = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_password_change = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo3_get_allow_password_change(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_allow_password_change;
	py_allow_password_change = PyLong_FromLongLong(object->allow_password_change);
	return py_allow_password_change;
}

static int py_samr_UserInfo3_set_allow_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->allow_password_change = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->allow_password_change = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo3_get_force_password_change(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_force_password_change;
	py_force_password_change = PyLong_FromLongLong(object->force_password_change);
	return py_force_password_change;
}

static int py_samr_UserInfo3_set_force_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->force_password_change = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->force_password_change = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo3_get_logon_hours(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_hours;
	py_logon_hours = py_talloc_reference_ex(&samr_LogonHours_Type, py_talloc_get_mem_ctx(obj), &object->logon_hours);
	return py_logon_hours;
}

static int py_samr_UserInfo3_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_LogonHours_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_hours = *(struct samr_LogonHours *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_bad_password_count(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_bad_password_count;
	py_bad_password_count = PyInt_FromLong(object->bad_password_count);
	return py_bad_password_count;
}

static int py_samr_UserInfo3_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->bad_password_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_logon_count(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_count;
	py_logon_count = PyInt_FromLong(object->logon_count);
	return py_logon_count;
}

static int py_samr_UserInfo3_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->logon_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo3_get_acct_flags(PyObject *obj, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyInt_FromLong(object->acct_flags);
	return py_acct_flags;
}

static int py_samr_UserInfo3_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo3 *object = (struct samr_UserInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_UserInfo3_getsetters[] = {
	{ discard_const_p(char, "account_name"), py_samr_UserInfo3_get_account_name, py_samr_UserInfo3_set_account_name },
	{ discard_const_p(char, "full_name"), py_samr_UserInfo3_get_full_name, py_samr_UserInfo3_set_full_name },
	{ discard_const_p(char, "rid"), py_samr_UserInfo3_get_rid, py_samr_UserInfo3_set_rid },
	{ discard_const_p(char, "primary_gid"), py_samr_UserInfo3_get_primary_gid, py_samr_UserInfo3_set_primary_gid },
	{ discard_const_p(char, "home_directory"), py_samr_UserInfo3_get_home_directory, py_samr_UserInfo3_set_home_directory },
	{ discard_const_p(char, "home_drive"), py_samr_UserInfo3_get_home_drive, py_samr_UserInfo3_set_home_drive },
	{ discard_const_p(char, "logon_script"), py_samr_UserInfo3_get_logon_script, py_samr_UserInfo3_set_logon_script },
	{ discard_const_p(char, "profile_path"), py_samr_UserInfo3_get_profile_path, py_samr_UserInfo3_set_profile_path },
	{ discard_const_p(char, "workstations"), py_samr_UserInfo3_get_workstations, py_samr_UserInfo3_set_workstations },
	{ discard_const_p(char, "last_logon"), py_samr_UserInfo3_get_last_logon, py_samr_UserInfo3_set_last_logon },
	{ discard_const_p(char, "last_logoff"), py_samr_UserInfo3_get_last_logoff, py_samr_UserInfo3_set_last_logoff },
	{ discard_const_p(char, "last_password_change"), py_samr_UserInfo3_get_last_password_change, py_samr_UserInfo3_set_last_password_change },
	{ discard_const_p(char, "allow_password_change"), py_samr_UserInfo3_get_allow_password_change, py_samr_UserInfo3_set_allow_password_change },
	{ discard_const_p(char, "force_password_change"), py_samr_UserInfo3_get_force_password_change, py_samr_UserInfo3_set_force_password_change },
	{ discard_const_p(char, "logon_hours"), py_samr_UserInfo3_get_logon_hours, py_samr_UserInfo3_set_logon_hours },
	{ discard_const_p(char, "bad_password_count"), py_samr_UserInfo3_get_bad_password_count, py_samr_UserInfo3_set_bad_password_count },
	{ discard_const_p(char, "logon_count"), py_samr_UserInfo3_get_logon_count, py_samr_UserInfo3_set_logon_count },
	{ discard_const_p(char, "acct_flags"), py_samr_UserInfo3_get_acct_flags, py_samr_UserInfo3_set_acct_flags },
	{ NULL }
};

static PyObject *py_samr_UserInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo3, type);
}


static PyTypeObject samr_UserInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo3",
	.tp_getset = py_samr_UserInfo3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo3_new,
};


static PyObject *py_samr_UserInfo4_get_logon_hours(PyObject *obj, void *closure)
{
	struct samr_UserInfo4 *object = (struct samr_UserInfo4 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_hours;
	py_logon_hours = py_talloc_reference_ex(&samr_LogonHours_Type, py_talloc_get_mem_ctx(obj), &object->logon_hours);
	return py_logon_hours;
}

static int py_samr_UserInfo4_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo4 *object = (struct samr_UserInfo4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_LogonHours_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_hours = *(struct samr_LogonHours *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo4_getsetters[] = {
	{ discard_const_p(char, "logon_hours"), py_samr_UserInfo4_get_logon_hours, py_samr_UserInfo4_set_logon_hours },
	{ NULL }
};

static PyObject *py_samr_UserInfo4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo4, type);
}


static PyTypeObject samr_UserInfo4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo4",
	.tp_getset = py_samr_UserInfo4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo4_new,
};


static PyObject *py_samr_UserInfo5_get_account_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_UserInfo5_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_full_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_samr_UserInfo5_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_rid(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyInt_FromLong(object->rid);
	return py_rid;
}

static int py_samr_UserInfo5_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_primary_gid(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_primary_gid;
	py_primary_gid = PyInt_FromLong(object->primary_gid);
	return py_primary_gid;
}

static int py_samr_UserInfo5_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->primary_gid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_home_directory(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_home_directory;
	py_home_directory = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->home_directory);
	return py_home_directory;
}

static int py_samr_UserInfo5_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_directory = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_home_drive(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_home_drive;
	py_home_drive = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->home_drive);
	return py_home_drive;
}

static int py_samr_UserInfo5_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_drive = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_logon_script(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_script;
	py_logon_script = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->logon_script);
	return py_logon_script;
}

static int py_samr_UserInfo5_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_script = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_profile_path(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_profile_path;
	py_profile_path = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->profile_path);
	return py_profile_path;
}

static int py_samr_UserInfo5_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->profile_path = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_description(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_UserInfo5_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_workstations(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_workstations;
	py_workstations = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->workstations);
	return py_workstations;
}

static int py_samr_UserInfo5_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->workstations = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_last_logon(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_last_logon;
	py_last_logon = PyLong_FromLongLong(object->last_logon);
	return py_last_logon;
}

static int py_samr_UserInfo5_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_logon = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_logon = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo5_get_last_logoff(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_last_logoff;
	py_last_logoff = PyLong_FromLongLong(object->last_logoff);
	return py_last_logoff;
}

static int py_samr_UserInfo5_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_logoff = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_logoff = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo5_get_logon_hours(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_hours;
	py_logon_hours = py_talloc_reference_ex(&samr_LogonHours_Type, py_talloc_get_mem_ctx(obj), &object->logon_hours);
	return py_logon_hours;
}

static int py_samr_UserInfo5_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_LogonHours_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_hours = *(struct samr_LogonHours *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_bad_password_count(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_bad_password_count;
	py_bad_password_count = PyInt_FromLong(object->bad_password_count);
	return py_bad_password_count;
}

static int py_samr_UserInfo5_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->bad_password_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_logon_count(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_count;
	py_logon_count = PyInt_FromLong(object->logon_count);
	return py_logon_count;
}

static int py_samr_UserInfo5_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->logon_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo5_get_last_password_change(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_last_password_change;
	py_last_password_change = PyLong_FromLongLong(object->last_password_change);
	return py_last_password_change;
}

static int py_samr_UserInfo5_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_password_change = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_password_change = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo5_get_acct_expiry(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_acct_expiry;
	py_acct_expiry = PyLong_FromLongLong(object->acct_expiry);
	return py_acct_expiry;
}

static int py_samr_UserInfo5_set_acct_expiry(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_expiry = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_expiry = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo5_get_acct_flags(PyObject *obj, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyInt_FromLong(object->acct_flags);
	return py_acct_flags;
}

static int py_samr_UserInfo5_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo5 *object = (struct samr_UserInfo5 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_UserInfo5_getsetters[] = {
	{ discard_const_p(char, "account_name"), py_samr_UserInfo5_get_account_name, py_samr_UserInfo5_set_account_name },
	{ discard_const_p(char, "full_name"), py_samr_UserInfo5_get_full_name, py_samr_UserInfo5_set_full_name },
	{ discard_const_p(char, "rid"), py_samr_UserInfo5_get_rid, py_samr_UserInfo5_set_rid },
	{ discard_const_p(char, "primary_gid"), py_samr_UserInfo5_get_primary_gid, py_samr_UserInfo5_set_primary_gid },
	{ discard_const_p(char, "home_directory"), py_samr_UserInfo5_get_home_directory, py_samr_UserInfo5_set_home_directory },
	{ discard_const_p(char, "home_drive"), py_samr_UserInfo5_get_home_drive, py_samr_UserInfo5_set_home_drive },
	{ discard_const_p(char, "logon_script"), py_samr_UserInfo5_get_logon_script, py_samr_UserInfo5_set_logon_script },
	{ discard_const_p(char, "profile_path"), py_samr_UserInfo5_get_profile_path, py_samr_UserInfo5_set_profile_path },
	{ discard_const_p(char, "description"), py_samr_UserInfo5_get_description, py_samr_UserInfo5_set_description },
	{ discard_const_p(char, "workstations"), py_samr_UserInfo5_get_workstations, py_samr_UserInfo5_set_workstations },
	{ discard_const_p(char, "last_logon"), py_samr_UserInfo5_get_last_logon, py_samr_UserInfo5_set_last_logon },
	{ discard_const_p(char, "last_logoff"), py_samr_UserInfo5_get_last_logoff, py_samr_UserInfo5_set_last_logoff },
	{ discard_const_p(char, "logon_hours"), py_samr_UserInfo5_get_logon_hours, py_samr_UserInfo5_set_logon_hours },
	{ discard_const_p(char, "bad_password_count"), py_samr_UserInfo5_get_bad_password_count, py_samr_UserInfo5_set_bad_password_count },
	{ discard_const_p(char, "logon_count"), py_samr_UserInfo5_get_logon_count, py_samr_UserInfo5_set_logon_count },
	{ discard_const_p(char, "last_password_change"), py_samr_UserInfo5_get_last_password_change, py_samr_UserInfo5_set_last_password_change },
	{ discard_const_p(char, "acct_expiry"), py_samr_UserInfo5_get_acct_expiry, py_samr_UserInfo5_set_acct_expiry },
	{ discard_const_p(char, "acct_flags"), py_samr_UserInfo5_get_acct_flags, py_samr_UserInfo5_set_acct_flags },
	{ NULL }
};

static PyObject *py_samr_UserInfo5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo5, type);
}


static PyTypeObject samr_UserInfo5_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo5",
	.tp_getset = py_samr_UserInfo5_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo5_new,
};


static PyObject *py_samr_UserInfo6_get_account_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo6 *object = (struct samr_UserInfo6 *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_UserInfo6_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo6 *object = (struct samr_UserInfo6 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo6_get_full_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo6 *object = (struct samr_UserInfo6 *)py_talloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_samr_UserInfo6_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo6 *object = (struct samr_UserInfo6 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo6_getsetters[] = {
	{ discard_const_p(char, "account_name"), py_samr_UserInfo6_get_account_name, py_samr_UserInfo6_set_account_name },
	{ discard_const_p(char, "full_name"), py_samr_UserInfo6_get_full_name, py_samr_UserInfo6_set_full_name },
	{ NULL }
};

static PyObject *py_samr_UserInfo6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo6, type);
}


static PyTypeObject samr_UserInfo6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo6",
	.tp_getset = py_samr_UserInfo6_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo6_new,
};


static PyObject *py_samr_UserInfo7_get_account_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo7 *object = (struct samr_UserInfo7 *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_UserInfo7_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo7 *object = (struct samr_UserInfo7 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo7_getsetters[] = {
	{ discard_const_p(char, "account_name"), py_samr_UserInfo7_get_account_name, py_samr_UserInfo7_set_account_name },
	{ NULL }
};

static PyObject *py_samr_UserInfo7_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo7, type);
}


static PyTypeObject samr_UserInfo7_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo7",
	.tp_getset = py_samr_UserInfo7_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo7_new,
};


static PyObject *py_samr_UserInfo8_get_full_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo8 *object = (struct samr_UserInfo8 *)py_talloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_samr_UserInfo8_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo8 *object = (struct samr_UserInfo8 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo8_getsetters[] = {
	{ discard_const_p(char, "full_name"), py_samr_UserInfo8_get_full_name, py_samr_UserInfo8_set_full_name },
	{ NULL }
};

static PyObject *py_samr_UserInfo8_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo8, type);
}


static PyTypeObject samr_UserInfo8_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo8",
	.tp_getset = py_samr_UserInfo8_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo8_new,
};


static PyObject *py_samr_UserInfo9_get_primary_gid(PyObject *obj, void *closure)
{
	struct samr_UserInfo9 *object = (struct samr_UserInfo9 *)py_talloc_get_ptr(obj);
	PyObject *py_primary_gid;
	py_primary_gid = PyInt_FromLong(object->primary_gid);
	return py_primary_gid;
}

static int py_samr_UserInfo9_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo9 *object = (struct samr_UserInfo9 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->primary_gid = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo9_getsetters[] = {
	{ discard_const_p(char, "primary_gid"), py_samr_UserInfo9_get_primary_gid, py_samr_UserInfo9_set_primary_gid },
	{ NULL }
};

static PyObject *py_samr_UserInfo9_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo9, type);
}


static PyTypeObject samr_UserInfo9_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo9",
	.tp_getset = py_samr_UserInfo9_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo9_new,
};


static PyObject *py_samr_UserInfo10_get_home_directory(PyObject *obj, void *closure)
{
	struct samr_UserInfo10 *object = (struct samr_UserInfo10 *)py_talloc_get_ptr(obj);
	PyObject *py_home_directory;
	py_home_directory = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->home_directory);
	return py_home_directory;
}

static int py_samr_UserInfo10_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo10 *object = (struct samr_UserInfo10 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_directory = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo10_get_home_drive(PyObject *obj, void *closure)
{
	struct samr_UserInfo10 *object = (struct samr_UserInfo10 *)py_talloc_get_ptr(obj);
	PyObject *py_home_drive;
	py_home_drive = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->home_drive);
	return py_home_drive;
}

static int py_samr_UserInfo10_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo10 *object = (struct samr_UserInfo10 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_drive = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo10_getsetters[] = {
	{ discard_const_p(char, "home_directory"), py_samr_UserInfo10_get_home_directory, py_samr_UserInfo10_set_home_directory },
	{ discard_const_p(char, "home_drive"), py_samr_UserInfo10_get_home_drive, py_samr_UserInfo10_set_home_drive },
	{ NULL }
};

static PyObject *py_samr_UserInfo10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo10, type);
}


static PyTypeObject samr_UserInfo10_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo10",
	.tp_getset = py_samr_UserInfo10_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo10_new,
};


static PyObject *py_samr_UserInfo11_get_logon_script(PyObject *obj, void *closure)
{
	struct samr_UserInfo11 *object = (struct samr_UserInfo11 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_script;
	py_logon_script = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->logon_script);
	return py_logon_script;
}

static int py_samr_UserInfo11_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo11 *object = (struct samr_UserInfo11 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_script = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo11_getsetters[] = {
	{ discard_const_p(char, "logon_script"), py_samr_UserInfo11_get_logon_script, py_samr_UserInfo11_set_logon_script },
	{ NULL }
};

static PyObject *py_samr_UserInfo11_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo11, type);
}


static PyTypeObject samr_UserInfo11_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo11",
	.tp_getset = py_samr_UserInfo11_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo11_new,
};


static PyObject *py_samr_UserInfo12_get_profile_path(PyObject *obj, void *closure)
{
	struct samr_UserInfo12 *object = (struct samr_UserInfo12 *)py_talloc_get_ptr(obj);
	PyObject *py_profile_path;
	py_profile_path = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->profile_path);
	return py_profile_path;
}

static int py_samr_UserInfo12_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo12 *object = (struct samr_UserInfo12 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->profile_path = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo12_getsetters[] = {
	{ discard_const_p(char, "profile_path"), py_samr_UserInfo12_get_profile_path, py_samr_UserInfo12_set_profile_path },
	{ NULL }
};

static PyObject *py_samr_UserInfo12_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo12, type);
}


static PyTypeObject samr_UserInfo12_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo12",
	.tp_getset = py_samr_UserInfo12_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo12_new,
};


static PyObject *py_samr_UserInfo13_get_description(PyObject *obj, void *closure)
{
	struct samr_UserInfo13 *object = (struct samr_UserInfo13 *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_UserInfo13_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo13 *object = (struct samr_UserInfo13 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo13_getsetters[] = {
	{ discard_const_p(char, "description"), py_samr_UserInfo13_get_description, py_samr_UserInfo13_set_description },
	{ NULL }
};

static PyObject *py_samr_UserInfo13_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo13, type);
}


static PyTypeObject samr_UserInfo13_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo13",
	.tp_getset = py_samr_UserInfo13_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo13_new,
};


static PyObject *py_samr_UserInfo14_get_workstations(PyObject *obj, void *closure)
{
	struct samr_UserInfo14 *object = (struct samr_UserInfo14 *)py_talloc_get_ptr(obj);
	PyObject *py_workstations;
	py_workstations = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->workstations);
	return py_workstations;
}

static int py_samr_UserInfo14_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo14 *object = (struct samr_UserInfo14 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->workstations = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo14_getsetters[] = {
	{ discard_const_p(char, "workstations"), py_samr_UserInfo14_get_workstations, py_samr_UserInfo14_set_workstations },
	{ NULL }
};

static PyObject *py_samr_UserInfo14_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo14, type);
}


static PyTypeObject samr_UserInfo14_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo14",
	.tp_getset = py_samr_UserInfo14_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo14_new,
};


static PyObject *py_samr_UserInfo16_get_acct_flags(PyObject *obj, void *closure)
{
	struct samr_UserInfo16 *object = (struct samr_UserInfo16 *)py_talloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyInt_FromLong(object->acct_flags);
	return py_acct_flags;
}

static int py_samr_UserInfo16_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo16 *object = (struct samr_UserInfo16 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_UserInfo16_getsetters[] = {
	{ discard_const_p(char, "acct_flags"), py_samr_UserInfo16_get_acct_flags, py_samr_UserInfo16_set_acct_flags },
	{ NULL }
};

static PyObject *py_samr_UserInfo16_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo16, type);
}


static PyTypeObject samr_UserInfo16_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo16",
	.tp_getset = py_samr_UserInfo16_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo16_new,
};


static PyObject *py_samr_UserInfo17_get_acct_expiry(PyObject *obj, void *closure)
{
	struct samr_UserInfo17 *object = (struct samr_UserInfo17 *)py_talloc_get_ptr(obj);
	PyObject *py_acct_expiry;
	py_acct_expiry = PyLong_FromLongLong(object->acct_expiry);
	return py_acct_expiry;
}

static int py_samr_UserInfo17_set_acct_expiry(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo17 *object = (struct samr_UserInfo17 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_expiry = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_expiry = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_UserInfo17_getsetters[] = {
	{ discard_const_p(char, "acct_expiry"), py_samr_UserInfo17_get_acct_expiry, py_samr_UserInfo17_set_acct_expiry },
	{ NULL }
};

static PyObject *py_samr_UserInfo17_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo17, type);
}


static PyTypeObject samr_UserInfo17_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo17",
	.tp_getset = py_samr_UserInfo17_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo17_new,
};


static PyObject *py_samr_Password_get_hash(PyObject *obj, void *closure)
{
	struct samr_Password *object = (struct samr_Password *)py_talloc_get_ptr(obj);
	PyObject *py_hash;
	py_hash = PyList_New(16);
	if (py_hash == NULL) {
		return NULL;
	}
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < 16; hash_cntr_0++) {
			PyObject *py_hash_0;
			py_hash_0 = PyInt_FromLong(object->hash[hash_cntr_0]);
			PyList_SetItem(py_hash, hash_cntr_0, py_hash_0);
		}
	}
	return py_hash;
}

static int py_samr_Password_set_hash(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_Password *object = (struct samr_Password *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < PyList_GET_SIZE(value); hash_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, hash_cntr_0), return -1;);
			object->hash[hash_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, hash_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_samr_Password_getsetters[] = {
	{ discard_const_p(char, "hash"), py_samr_Password_get_hash, py_samr_Password_set_hash },
	{ NULL }
};

static PyObject *py_samr_Password_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_Password, type);
}

static PyObject *py_samr_Password_ndr_pack(PyObject *py_obj)
{
	struct samr_Password *object = (struct samr_Password *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_samr_Password);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_samr_Password_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct samr_Password *object = (struct samr_Password *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_samr_Password);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_samr_Password_ndr_print(PyObject *py_obj)
{
	struct samr_Password *object = (struct samr_Password *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_samr_Password, "samr_Password", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_samr_Password_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_samr_Password_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_samr_Password_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_samr_Password_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject samr_Password_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.Password",
	.tp_getset = py_samr_Password_getsetters,
	.tp_methods = py_samr_Password_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_Password_new,
};


static PyObject *py_samr_UserInfo18_get_nt_pwd(PyObject *obj, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(obj);
	PyObject *py_nt_pwd;
	py_nt_pwd = py_talloc_reference_ex(&samr_Password_Type, py_talloc_get_mem_ctx(obj), &object->nt_pwd);
	return py_nt_pwd;
}

static int py_samr_UserInfo18_set_nt_pwd(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_Password_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->nt_pwd = *(struct samr_Password *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo18_get_lm_pwd(PyObject *obj, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(obj);
	PyObject *py_lm_pwd;
	py_lm_pwd = py_talloc_reference_ex(&samr_Password_Type, py_talloc_get_mem_ctx(obj), &object->lm_pwd);
	return py_lm_pwd;
}

static int py_samr_UserInfo18_set_lm_pwd(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_Password_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->lm_pwd = *(struct samr_Password *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo18_get_nt_pwd_active(PyObject *obj, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(obj);
	PyObject *py_nt_pwd_active;
	py_nt_pwd_active = PyInt_FromLong(object->nt_pwd_active);
	return py_nt_pwd_active;
}

static int py_samr_UserInfo18_set_nt_pwd_active(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->nt_pwd_active = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo18_get_lm_pwd_active(PyObject *obj, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(obj);
	PyObject *py_lm_pwd_active;
	py_lm_pwd_active = PyInt_FromLong(object->lm_pwd_active);
	return py_lm_pwd_active;
}

static int py_samr_UserInfo18_set_lm_pwd_active(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->lm_pwd_active = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo18_get_password_expired(PyObject *obj, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(obj);
	PyObject *py_password_expired;
	py_password_expired = PyInt_FromLong(object->password_expired);
	return py_password_expired;
}

static int py_samr_UserInfo18_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo18 *object = (struct samr_UserInfo18 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->password_expired = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo18_getsetters[] = {
	{ discard_const_p(char, "nt_pwd"), py_samr_UserInfo18_get_nt_pwd, py_samr_UserInfo18_set_nt_pwd },
	{ discard_const_p(char, "lm_pwd"), py_samr_UserInfo18_get_lm_pwd, py_samr_UserInfo18_set_lm_pwd },
	{ discard_const_p(char, "nt_pwd_active"), py_samr_UserInfo18_get_nt_pwd_active, py_samr_UserInfo18_set_nt_pwd_active },
	{ discard_const_p(char, "lm_pwd_active"), py_samr_UserInfo18_get_lm_pwd_active, py_samr_UserInfo18_set_lm_pwd_active },
	{ discard_const_p(char, "password_expired"), py_samr_UserInfo18_get_password_expired, py_samr_UserInfo18_set_password_expired },
	{ NULL }
};

static PyObject *py_samr_UserInfo18_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo18, type);
}


static PyTypeObject samr_UserInfo18_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo18",
	.tp_getset = py_samr_UserInfo18_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo18_new,
};


static PyObject *py_samr_UserInfo20_get_parameters(PyObject *obj, void *closure)
{
	struct samr_UserInfo20 *object = (struct samr_UserInfo20 *)py_talloc_get_ptr(obj);
	PyObject *py_parameters;
	py_parameters = py_talloc_reference_ex(lsa_BinaryString_Type, py_talloc_get_mem_ctx(obj), &object->parameters);
	return py_parameters;
}

static int py_samr_UserInfo20_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo20 *object = (struct samr_UserInfo20 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->parameters = *(struct lsa_BinaryString *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo20_getsetters[] = {
	{ discard_const_p(char, "parameters"), py_samr_UserInfo20_get_parameters, py_samr_UserInfo20_set_parameters },
	{ NULL }
};

static PyObject *py_samr_UserInfo20_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo20, type);
}


static PyTypeObject samr_UserInfo20_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo20",
	.tp_getset = py_samr_UserInfo20_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo20_new,
};


static PyObject *py_samr_UserInfo21_get_last_logon(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_last_logon;
	py_last_logon = PyLong_FromLongLong(object->last_logon);
	return py_last_logon;
}

static int py_samr_UserInfo21_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_logon = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_logon = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_last_logoff(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_last_logoff;
	py_last_logoff = PyLong_FromLongLong(object->last_logoff);
	return py_last_logoff;
}

static int py_samr_UserInfo21_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_logoff = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_logoff = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_last_password_change(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_last_password_change;
	py_last_password_change = PyLong_FromLongLong(object->last_password_change);
	return py_last_password_change;
}

static int py_samr_UserInfo21_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_password_change = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_password_change = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_acct_expiry(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_acct_expiry;
	py_acct_expiry = PyLong_FromLongLong(object->acct_expiry);
	return py_acct_expiry;
}

static int py_samr_UserInfo21_set_acct_expiry(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_expiry = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_expiry = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_allow_password_change(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_allow_password_change;
	py_allow_password_change = PyLong_FromLongLong(object->allow_password_change);
	return py_allow_password_change;
}

static int py_samr_UserInfo21_set_allow_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->allow_password_change = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->allow_password_change = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_force_password_change(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_force_password_change;
	py_force_password_change = PyLong_FromLongLong(object->force_password_change);
	return py_force_password_change;
}

static int py_samr_UserInfo21_set_force_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->force_password_change = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->force_password_change = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_account_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_UserInfo21_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_full_name(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_samr_UserInfo21_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_home_directory(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_home_directory;
	py_home_directory = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->home_directory);
	return py_home_directory;
}

static int py_samr_UserInfo21_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_directory = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_home_drive(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_home_drive;
	py_home_drive = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->home_drive);
	return py_home_drive;
}

static int py_samr_UserInfo21_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_drive = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_logon_script(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_script;
	py_logon_script = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->logon_script);
	return py_logon_script;
}

static int py_samr_UserInfo21_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_script = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_profile_path(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_profile_path;
	py_profile_path = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->profile_path);
	return py_profile_path;
}

static int py_samr_UserInfo21_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->profile_path = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_description(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_UserInfo21_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_workstations(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_workstations;
	py_workstations = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->workstations);
	return py_workstations;
}

static int py_samr_UserInfo21_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->workstations = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_comment(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_comment;
	py_comment = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->comment);
	return py_comment;
}

static int py_samr_UserInfo21_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->comment = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_parameters(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_parameters;
	py_parameters = py_talloc_reference_ex(lsa_BinaryString_Type, py_talloc_get_mem_ctx(obj), &object->parameters);
	return py_parameters;
}

static int py_samr_UserInfo21_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->parameters = *(struct lsa_BinaryString *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_lm_owf_password(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_lm_owf_password;
	py_lm_owf_password = py_talloc_reference_ex(lsa_BinaryString_Type, py_talloc_get_mem_ctx(obj), &object->lm_owf_password);
	return py_lm_owf_password;
}

static int py_samr_UserInfo21_set_lm_owf_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->lm_owf_password = *(struct lsa_BinaryString *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_nt_owf_password(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_nt_owf_password;
	py_nt_owf_password = py_talloc_reference_ex(lsa_BinaryString_Type, py_talloc_get_mem_ctx(obj), &object->nt_owf_password);
	return py_nt_owf_password;
}

static int py_samr_UserInfo21_set_nt_owf_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->nt_owf_password = *(struct lsa_BinaryString *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_private_data(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_private_data;
	py_private_data = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->private_data);
	return py_private_data;
}

static int py_samr_UserInfo21_set_private_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->private_data = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_buf_count(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_buf_count;
	py_buf_count = PyInt_FromLong(object->buf_count);
	return py_buf_count;
}

static int py_samr_UserInfo21_set_buf_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->buf_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_buffer(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_buffer;
	if (object->buffer == NULL) {
		py_buffer = Py_None;
		Py_INCREF(py_buffer);
	} else {
		py_buffer = PyList_New(object->buf_count);
		if (py_buffer == NULL) {
			return NULL;
		}
		{
			int buffer_cntr_1;
			for (buffer_cntr_1 = 0; buffer_cntr_1 < object->buf_count; buffer_cntr_1++) {
				PyObject *py_buffer_1;
				py_buffer_1 = PyInt_FromLong(object->buffer[buffer_cntr_1]);
				PyList_SetItem(py_buffer, buffer_cntr_1, py_buffer_1);
			}
		}
	}
	return py_buffer;
}

static int py_samr_UserInfo21_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->buffer);
	if (value == Py_None) {
		object->buffer = NULL;
	} else {
		object->buffer = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int buffer_cntr_1;
			object->buffer = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->buffer, PyList_GET_SIZE(value));
			if (!object->buffer) { return -1;; }
			talloc_set_name_const(object->buffer, "ARRAY: object->buffer");
			for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(value); buffer_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, buffer_cntr_1), return -1;);
				object->buffer[buffer_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, buffer_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_rid(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyInt_FromLong(object->rid);
	return py_rid;
}

static int py_samr_UserInfo21_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_primary_gid(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_primary_gid;
	py_primary_gid = PyInt_FromLong(object->primary_gid);
	return py_primary_gid;
}

static int py_samr_UserInfo21_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->primary_gid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_acct_flags(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyInt_FromLong(object->acct_flags);
	return py_acct_flags;
}

static int py_samr_UserInfo21_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_fields_present(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_fields_present;
	py_fields_present = PyInt_FromLong(object->fields_present);
	return py_fields_present;
}

static int py_samr_UserInfo21_set_fields_present(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->fields_present = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->fields_present = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_UserInfo21_get_logon_hours(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_hours;
	py_logon_hours = py_talloc_reference_ex(&samr_LogonHours_Type, py_talloc_get_mem_ctx(obj), &object->logon_hours);
	return py_logon_hours;
}

static int py_samr_UserInfo21_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_LogonHours_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_hours = *(struct samr_LogonHours *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_bad_password_count(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_bad_password_count;
	py_bad_password_count = PyInt_FromLong(object->bad_password_count);
	return py_bad_password_count;
}

static int py_samr_UserInfo21_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->bad_password_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_logon_count(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_logon_count;
	py_logon_count = PyInt_FromLong(object->logon_count);
	return py_logon_count;
}

static int py_samr_UserInfo21_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->logon_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_country_code(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_country_code;
	py_country_code = PyInt_FromLong(object->country_code);
	return py_country_code;
}

static int py_samr_UserInfo21_set_country_code(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->country_code = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_code_page(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_code_page;
	py_code_page = PyInt_FromLong(object->code_page);
	return py_code_page;
}

static int py_samr_UserInfo21_set_code_page(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->code_page = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_lm_password_set(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_lm_password_set;
	py_lm_password_set = PyInt_FromLong(object->lm_password_set);
	return py_lm_password_set;
}

static int py_samr_UserInfo21_set_lm_password_set(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->lm_password_set = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_nt_password_set(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_nt_password_set;
	py_nt_password_set = PyInt_FromLong(object->nt_password_set);
	return py_nt_password_set;
}

static int py_samr_UserInfo21_set_nt_password_set(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->nt_password_set = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_password_expired(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_password_expired;
	py_password_expired = PyInt_FromLong(object->password_expired);
	return py_password_expired;
}

static int py_samr_UserInfo21_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->password_expired = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_UserInfo21_get_private_data_sensitive(PyObject *obj, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(obj);
	PyObject *py_private_data_sensitive;
	py_private_data_sensitive = PyInt_FromLong(object->private_data_sensitive);
	return py_private_data_sensitive;
}

static int py_samr_UserInfo21_set_private_data_sensitive(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo21 *object = (struct samr_UserInfo21 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->private_data_sensitive = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo21_getsetters[] = {
	{ discard_const_p(char, "last_logon"), py_samr_UserInfo21_get_last_logon, py_samr_UserInfo21_set_last_logon },
	{ discard_const_p(char, "last_logoff"), py_samr_UserInfo21_get_last_logoff, py_samr_UserInfo21_set_last_logoff },
	{ discard_const_p(char, "last_password_change"), py_samr_UserInfo21_get_last_password_change, py_samr_UserInfo21_set_last_password_change },
	{ discard_const_p(char, "acct_expiry"), py_samr_UserInfo21_get_acct_expiry, py_samr_UserInfo21_set_acct_expiry },
	{ discard_const_p(char, "allow_password_change"), py_samr_UserInfo21_get_allow_password_change, py_samr_UserInfo21_set_allow_password_change },
	{ discard_const_p(char, "force_password_change"), py_samr_UserInfo21_get_force_password_change, py_samr_UserInfo21_set_force_password_change },
	{ discard_const_p(char, "account_name"), py_samr_UserInfo21_get_account_name, py_samr_UserInfo21_set_account_name },
	{ discard_const_p(char, "full_name"), py_samr_UserInfo21_get_full_name, py_samr_UserInfo21_set_full_name },
	{ discard_const_p(char, "home_directory"), py_samr_UserInfo21_get_home_directory, py_samr_UserInfo21_set_home_directory },
	{ discard_const_p(char, "home_drive"), py_samr_UserInfo21_get_home_drive, py_samr_UserInfo21_set_home_drive },
	{ discard_const_p(char, "logon_script"), py_samr_UserInfo21_get_logon_script, py_samr_UserInfo21_set_logon_script },
	{ discard_const_p(char, "profile_path"), py_samr_UserInfo21_get_profile_path, py_samr_UserInfo21_set_profile_path },
	{ discard_const_p(char, "description"), py_samr_UserInfo21_get_description, py_samr_UserInfo21_set_description },
	{ discard_const_p(char, "workstations"), py_samr_UserInfo21_get_workstations, py_samr_UserInfo21_set_workstations },
	{ discard_const_p(char, "comment"), py_samr_UserInfo21_get_comment, py_samr_UserInfo21_set_comment },
	{ discard_const_p(char, "parameters"), py_samr_UserInfo21_get_parameters, py_samr_UserInfo21_set_parameters },
	{ discard_const_p(char, "lm_owf_password"), py_samr_UserInfo21_get_lm_owf_password, py_samr_UserInfo21_set_lm_owf_password },
	{ discard_const_p(char, "nt_owf_password"), py_samr_UserInfo21_get_nt_owf_password, py_samr_UserInfo21_set_nt_owf_password },
	{ discard_const_p(char, "private_data"), py_samr_UserInfo21_get_private_data, py_samr_UserInfo21_set_private_data },
	{ discard_const_p(char, "buf_count"), py_samr_UserInfo21_get_buf_count, py_samr_UserInfo21_set_buf_count },
	{ discard_const_p(char, "buffer"), py_samr_UserInfo21_get_buffer, py_samr_UserInfo21_set_buffer },
	{ discard_const_p(char, "rid"), py_samr_UserInfo21_get_rid, py_samr_UserInfo21_set_rid },
	{ discard_const_p(char, "primary_gid"), py_samr_UserInfo21_get_primary_gid, py_samr_UserInfo21_set_primary_gid },
	{ discard_const_p(char, "acct_flags"), py_samr_UserInfo21_get_acct_flags, py_samr_UserInfo21_set_acct_flags },
	{ discard_const_p(char, "fields_present"), py_samr_UserInfo21_get_fields_present, py_samr_UserInfo21_set_fields_present },
	{ discard_const_p(char, "logon_hours"), py_samr_UserInfo21_get_logon_hours, py_samr_UserInfo21_set_logon_hours },
	{ discard_const_p(char, "bad_password_count"), py_samr_UserInfo21_get_bad_password_count, py_samr_UserInfo21_set_bad_password_count },
	{ discard_const_p(char, "logon_count"), py_samr_UserInfo21_get_logon_count, py_samr_UserInfo21_set_logon_count },
	{ discard_const_p(char, "country_code"), py_samr_UserInfo21_get_country_code, py_samr_UserInfo21_set_country_code },
	{ discard_const_p(char, "code_page"), py_samr_UserInfo21_get_code_page, py_samr_UserInfo21_set_code_page },
	{ discard_const_p(char, "lm_password_set"), py_samr_UserInfo21_get_lm_password_set, py_samr_UserInfo21_set_lm_password_set },
	{ discard_const_p(char, "nt_password_set"), py_samr_UserInfo21_get_nt_password_set, py_samr_UserInfo21_set_nt_password_set },
	{ discard_const_p(char, "password_expired"), py_samr_UserInfo21_get_password_expired, py_samr_UserInfo21_set_password_expired },
	{ discard_const_p(char, "private_data_sensitive"), py_samr_UserInfo21_get_private_data_sensitive, py_samr_UserInfo21_set_private_data_sensitive },
	{ NULL }
};

static PyObject *py_samr_UserInfo21_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo21, type);
}


static PyTypeObject samr_UserInfo21_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo21",
	.tp_getset = py_samr_UserInfo21_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo21_new,
};


static PyObject *py_samr_CryptPassword_get_data(PyObject *obj, void *closure)
{
	struct samr_CryptPassword *object = (struct samr_CryptPassword *)py_talloc_get_ptr(obj);
	PyObject *py_data;
	py_data = PyList_New(516);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_0;
		for (data_cntr_0 = 0; data_cntr_0 < 516; data_cntr_0++) {
			PyObject *py_data_0;
			py_data_0 = PyInt_FromLong(object->data[data_cntr_0]);
			PyList_SetItem(py_data, data_cntr_0, py_data_0);
		}
	}
	return py_data;
}

static int py_samr_CryptPassword_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_CryptPassword *object = (struct samr_CryptPassword *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int data_cntr_0;
		for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, data_cntr_0), return -1;);
			object->data[data_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, data_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_samr_CryptPassword_getsetters[] = {
	{ discard_const_p(char, "data"), py_samr_CryptPassword_get_data, py_samr_CryptPassword_set_data },
	{ NULL }
};

static PyObject *py_samr_CryptPassword_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_CryptPassword, type);
}

static PyObject *py_samr_CryptPassword_ndr_pack(PyObject *py_obj)
{
	struct samr_CryptPassword *object = (struct samr_CryptPassword *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_samr_CryptPassword);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_samr_CryptPassword_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct samr_CryptPassword *object = (struct samr_CryptPassword *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_samr_CryptPassword);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_samr_CryptPassword_ndr_print(PyObject *py_obj)
{
	struct samr_CryptPassword *object = (struct samr_CryptPassword *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_samr_CryptPassword, "samr_CryptPassword", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_samr_CryptPassword_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_samr_CryptPassword_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_samr_CryptPassword_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_samr_CryptPassword_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject samr_CryptPassword_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.CryptPassword",
	.tp_getset = py_samr_CryptPassword_getsetters,
	.tp_methods = py_samr_CryptPassword_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_CryptPassword_new,
};


static PyObject *py_samr_UserInfo23_get_info(PyObject *obj, void *closure)
{
	struct samr_UserInfo23 *object = (struct samr_UserInfo23 *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_talloc_reference_ex(&samr_UserInfo21_Type, py_talloc_get_mem_ctx(obj), &object->info);
	return py_info;
}

static int py_samr_UserInfo23_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo23 *object = (struct samr_UserInfo23 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_UserInfo21_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->info = *(struct samr_UserInfo21 *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo23_get_password(PyObject *obj, void *closure)
{
	struct samr_UserInfo23 *object = (struct samr_UserInfo23 *)py_talloc_get_ptr(obj);
	PyObject *py_password;
	py_password = py_talloc_reference_ex(&samr_CryptPassword_Type, py_talloc_get_mem_ctx(obj), &object->password);
	return py_password;
}

static int py_samr_UserInfo23_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo23 *object = (struct samr_UserInfo23 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_CryptPassword_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->password = *(struct samr_CryptPassword *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo23_getsetters[] = {
	{ discard_const_p(char, "info"), py_samr_UserInfo23_get_info, py_samr_UserInfo23_set_info },
	{ discard_const_p(char, "password"), py_samr_UserInfo23_get_password, py_samr_UserInfo23_set_password },
	{ NULL }
};

static PyObject *py_samr_UserInfo23_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo23, type);
}


static PyTypeObject samr_UserInfo23_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo23",
	.tp_getset = py_samr_UserInfo23_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo23_new,
};


static PyObject *py_samr_UserInfo24_get_password(PyObject *obj, void *closure)
{
	struct samr_UserInfo24 *object = (struct samr_UserInfo24 *)py_talloc_get_ptr(obj);
	PyObject *py_password;
	py_password = py_talloc_reference_ex(&samr_CryptPassword_Type, py_talloc_get_mem_ctx(obj), &object->password);
	return py_password;
}

static int py_samr_UserInfo24_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo24 *object = (struct samr_UserInfo24 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_CryptPassword_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->password = *(struct samr_CryptPassword *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo24_get_password_expired(PyObject *obj, void *closure)
{
	struct samr_UserInfo24 *object = (struct samr_UserInfo24 *)py_talloc_get_ptr(obj);
	PyObject *py_password_expired;
	py_password_expired = PyInt_FromLong(object->password_expired);
	return py_password_expired;
}

static int py_samr_UserInfo24_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo24 *object = (struct samr_UserInfo24 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->password_expired = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo24_getsetters[] = {
	{ discard_const_p(char, "password"), py_samr_UserInfo24_get_password, py_samr_UserInfo24_set_password },
	{ discard_const_p(char, "password_expired"), py_samr_UserInfo24_get_password_expired, py_samr_UserInfo24_set_password_expired },
	{ NULL }
};

static PyObject *py_samr_UserInfo24_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo24, type);
}


static PyTypeObject samr_UserInfo24_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo24",
	.tp_getset = py_samr_UserInfo24_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo24_new,
};


static PyObject *py_samr_CryptPasswordEx_get_data(PyObject *obj, void *closure)
{
	struct samr_CryptPasswordEx *object = (struct samr_CryptPasswordEx *)py_talloc_get_ptr(obj);
	PyObject *py_data;
	py_data = PyList_New(532);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_0;
		for (data_cntr_0 = 0; data_cntr_0 < 532; data_cntr_0++) {
			PyObject *py_data_0;
			py_data_0 = PyInt_FromLong(object->data[data_cntr_0]);
			PyList_SetItem(py_data, data_cntr_0, py_data_0);
		}
	}
	return py_data;
}

static int py_samr_CryptPasswordEx_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_CryptPasswordEx *object = (struct samr_CryptPasswordEx *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int data_cntr_0;
		for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, data_cntr_0), return -1;);
			object->data[data_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, data_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_samr_CryptPasswordEx_getsetters[] = {
	{ discard_const_p(char, "data"), py_samr_CryptPasswordEx_get_data, py_samr_CryptPasswordEx_set_data },
	{ NULL }
};

static PyObject *py_samr_CryptPasswordEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_CryptPasswordEx, type);
}


static PyTypeObject samr_CryptPasswordEx_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.CryptPasswordEx",
	.tp_getset = py_samr_CryptPasswordEx_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_CryptPasswordEx_new,
};


static PyObject *py_samr_UserInfo25_get_info(PyObject *obj, void *closure)
{
	struct samr_UserInfo25 *object = (struct samr_UserInfo25 *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_talloc_reference_ex(&samr_UserInfo21_Type, py_talloc_get_mem_ctx(obj), &object->info);
	return py_info;
}

static int py_samr_UserInfo25_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo25 *object = (struct samr_UserInfo25 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_UserInfo21_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->info = *(struct samr_UserInfo21 *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo25_get_password(PyObject *obj, void *closure)
{
	struct samr_UserInfo25 *object = (struct samr_UserInfo25 *)py_talloc_get_ptr(obj);
	PyObject *py_password;
	py_password = py_talloc_reference_ex(&samr_CryptPasswordEx_Type, py_talloc_get_mem_ctx(obj), &object->password);
	return py_password;
}

static int py_samr_UserInfo25_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo25 *object = (struct samr_UserInfo25 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_CryptPasswordEx_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->password = *(struct samr_CryptPasswordEx *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo25_getsetters[] = {
	{ discard_const_p(char, "info"), py_samr_UserInfo25_get_info, py_samr_UserInfo25_set_info },
	{ discard_const_p(char, "password"), py_samr_UserInfo25_get_password, py_samr_UserInfo25_set_password },
	{ NULL }
};

static PyObject *py_samr_UserInfo25_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo25, type);
}


static PyTypeObject samr_UserInfo25_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo25",
	.tp_getset = py_samr_UserInfo25_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo25_new,
};


static PyObject *py_samr_UserInfo26_get_password(PyObject *obj, void *closure)
{
	struct samr_UserInfo26 *object = (struct samr_UserInfo26 *)py_talloc_get_ptr(obj);
	PyObject *py_password;
	py_password = py_talloc_reference_ex(&samr_CryptPasswordEx_Type, py_talloc_get_mem_ctx(obj), &object->password);
	return py_password;
}

static int py_samr_UserInfo26_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo26 *object = (struct samr_UserInfo26 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_CryptPasswordEx_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->password = *(struct samr_CryptPasswordEx *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_UserInfo26_get_password_expired(PyObject *obj, void *closure)
{
	struct samr_UserInfo26 *object = (struct samr_UserInfo26 *)py_talloc_get_ptr(obj);
	PyObject *py_password_expired;
	py_password_expired = PyInt_FromLong(object->password_expired);
	return py_password_expired;
}

static int py_samr_UserInfo26_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_UserInfo26 *object = (struct samr_UserInfo26 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->password_expired = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_UserInfo26_getsetters[] = {
	{ discard_const_p(char, "password"), py_samr_UserInfo26_get_password, py_samr_UserInfo26_set_password },
	{ discard_const_p(char, "password_expired"), py_samr_UserInfo26_get_password_expired, py_samr_UserInfo26_set_password_expired },
	{ NULL }
};

static PyObject *py_samr_UserInfo26_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_UserInfo26, type);
}


static PyTypeObject samr_UserInfo26_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.UserInfo26",
	.tp_getset = py_samr_UserInfo26_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_UserInfo26_new,
};

PyObject *py_import_samr_UserInfo(TALLOC_CTX *mem_ctx, int level, union samr_UserInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = py_talloc_reference_ex(&samr_UserInfo1_Type, mem_ctx, &in->info1);
			return ret;

		case 2:
			ret = py_talloc_reference_ex(&samr_UserInfo2_Type, mem_ctx, &in->info2);
			return ret;

		case 3:
			ret = py_talloc_reference_ex(&samr_UserInfo3_Type, mem_ctx, &in->info3);
			return ret;

		case 4:
			ret = py_talloc_reference_ex(&samr_UserInfo4_Type, mem_ctx, &in->info4);
			return ret;

		case 5:
			ret = py_talloc_reference_ex(&samr_UserInfo5_Type, mem_ctx, &in->info5);
			return ret;

		case 6:
			ret = py_talloc_reference_ex(&samr_UserInfo6_Type, mem_ctx, &in->info6);
			return ret;

		case 7:
			ret = py_talloc_reference_ex(&samr_UserInfo7_Type, mem_ctx, &in->info7);
			return ret;

		case 8:
			ret = py_talloc_reference_ex(&samr_UserInfo8_Type, mem_ctx, &in->info8);
			return ret;

		case 9:
			ret = py_talloc_reference_ex(&samr_UserInfo9_Type, mem_ctx, &in->info9);
			return ret;

		case 10:
			ret = py_talloc_reference_ex(&samr_UserInfo10_Type, mem_ctx, &in->info10);
			return ret;

		case 11:
			ret = py_talloc_reference_ex(&samr_UserInfo11_Type, mem_ctx, &in->info11);
			return ret;

		case 12:
			ret = py_talloc_reference_ex(&samr_UserInfo12_Type, mem_ctx, &in->info12);
			return ret;

		case 13:
			ret = py_talloc_reference_ex(&samr_UserInfo13_Type, mem_ctx, &in->info13);
			return ret;

		case 14:
			ret = py_talloc_reference_ex(&samr_UserInfo14_Type, mem_ctx, &in->info14);
			return ret;

		case 16:
			ret = py_talloc_reference_ex(&samr_UserInfo16_Type, mem_ctx, &in->info16);
			return ret;

		case 17:
			ret = py_talloc_reference_ex(&samr_UserInfo17_Type, mem_ctx, &in->info17);
			return ret;

		case 18:
			ret = py_talloc_reference_ex(&samr_UserInfo18_Type, mem_ctx, &in->info18);
			return ret;

		case 20:
			ret = py_talloc_reference_ex(&samr_UserInfo20_Type, mem_ctx, &in->info20);
			return ret;

		case 21:
			ret = py_talloc_reference_ex(&samr_UserInfo21_Type, mem_ctx, &in->info21);
			return ret;

		case 23:
			ret = py_talloc_reference_ex(&samr_UserInfo23_Type, mem_ctx, &in->info23);
			return ret;

		case 24:
			ret = py_talloc_reference_ex(&samr_UserInfo24_Type, mem_ctx, &in->info24);
			return ret;

		case 25:
			ret = py_talloc_reference_ex(&samr_UserInfo25_Type, mem_ctx, &in->info25);
			return ret;

		case 26:
			ret = py_talloc_reference_ex(&samr_UserInfo26_Type, mem_ctx, &in->info26);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union samr_UserInfo *py_export_samr_UserInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union samr_UserInfo *ret = talloc_zero(mem_ctx, union samr_UserInfo);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&samr_UserInfo1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info1 = *(struct samr_UserInfo1 *)py_talloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&samr_UserInfo2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info2 = *(struct samr_UserInfo2 *)py_talloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&samr_UserInfo3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info3 = *(struct samr_UserInfo3 *)py_talloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&samr_UserInfo4_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info4 = *(struct samr_UserInfo4 *)py_talloc_get_ptr(in);
			break;

		case 5:
			PY_CHECK_TYPE(&samr_UserInfo5_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info5 = *(struct samr_UserInfo5 *)py_talloc_get_ptr(in);
			break;

		case 6:
			PY_CHECK_TYPE(&samr_UserInfo6_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info6 = *(struct samr_UserInfo6 *)py_talloc_get_ptr(in);
			break;

		case 7:
			PY_CHECK_TYPE(&samr_UserInfo7_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info7 = *(struct samr_UserInfo7 *)py_talloc_get_ptr(in);
			break;

		case 8:
			PY_CHECK_TYPE(&samr_UserInfo8_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info8 = *(struct samr_UserInfo8 *)py_talloc_get_ptr(in);
			break;

		case 9:
			PY_CHECK_TYPE(&samr_UserInfo9_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info9 = *(struct samr_UserInfo9 *)py_talloc_get_ptr(in);
			break;

		case 10:
			PY_CHECK_TYPE(&samr_UserInfo10_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info10 = *(struct samr_UserInfo10 *)py_talloc_get_ptr(in);
			break;

		case 11:
			PY_CHECK_TYPE(&samr_UserInfo11_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info11 = *(struct samr_UserInfo11 *)py_talloc_get_ptr(in);
			break;

		case 12:
			PY_CHECK_TYPE(&samr_UserInfo12_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info12 = *(struct samr_UserInfo12 *)py_talloc_get_ptr(in);
			break;

		case 13:
			PY_CHECK_TYPE(&samr_UserInfo13_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info13 = *(struct samr_UserInfo13 *)py_talloc_get_ptr(in);
			break;

		case 14:
			PY_CHECK_TYPE(&samr_UserInfo14_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info14 = *(struct samr_UserInfo14 *)py_talloc_get_ptr(in);
			break;

		case 16:
			PY_CHECK_TYPE(&samr_UserInfo16_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info16 = *(struct samr_UserInfo16 *)py_talloc_get_ptr(in);
			break;

		case 17:
			PY_CHECK_TYPE(&samr_UserInfo17_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info17 = *(struct samr_UserInfo17 *)py_talloc_get_ptr(in);
			break;

		case 18:
			PY_CHECK_TYPE(&samr_UserInfo18_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info18 = *(struct samr_UserInfo18 *)py_talloc_get_ptr(in);
			break;

		case 20:
			PY_CHECK_TYPE(&samr_UserInfo20_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info20 = *(struct samr_UserInfo20 *)py_talloc_get_ptr(in);
			break;

		case 21:
			PY_CHECK_TYPE(&samr_UserInfo21_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info21 = *(struct samr_UserInfo21 *)py_talloc_get_ptr(in);
			break;

		case 23:
			PY_CHECK_TYPE(&samr_UserInfo23_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info23 = *(struct samr_UserInfo23 *)py_talloc_get_ptr(in);
			break;

		case 24:
			PY_CHECK_TYPE(&samr_UserInfo24_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info24 = *(struct samr_UserInfo24 *)py_talloc_get_ptr(in);
			break;

		case 25:
			PY_CHECK_TYPE(&samr_UserInfo25_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info25 = *(struct samr_UserInfo25 *)py_talloc_get_ptr(in);
			break;

		case 26:
			PY_CHECK_TYPE(&samr_UserInfo26_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info26 = *(struct samr_UserInfo26 *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_samr_RidWithAttribute_get_rid(PyObject *obj, void *closure)
{
	struct samr_RidWithAttribute *object = (struct samr_RidWithAttribute *)py_talloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyInt_FromLong(object->rid);
	return py_rid;
}

static int py_samr_RidWithAttribute_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_RidWithAttribute *object = (struct samr_RidWithAttribute *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_RidWithAttribute_get_attributes(PyObject *obj, void *closure)
{
	struct samr_RidWithAttribute *object = (struct samr_RidWithAttribute *)py_talloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

static int py_samr_RidWithAttribute_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_RidWithAttribute *object = (struct samr_RidWithAttribute *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->attributes = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->attributes = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_RidWithAttribute_getsetters[] = {
	{ discard_const_p(char, "rid"), py_samr_RidWithAttribute_get_rid, py_samr_RidWithAttribute_set_rid },
	{ discard_const_p(char, "attributes"), py_samr_RidWithAttribute_get_attributes, py_samr_RidWithAttribute_set_attributes },
	{ NULL }
};

static PyObject *py_samr_RidWithAttribute_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_RidWithAttribute, type);
}

static PyObject *py_samr_RidWithAttribute_ndr_pack(PyObject *py_obj)
{
	struct samr_RidWithAttribute *object = (struct samr_RidWithAttribute *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_samr_RidWithAttribute);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_samr_RidWithAttribute_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct samr_RidWithAttribute *object = (struct samr_RidWithAttribute *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_samr_RidWithAttribute);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_samr_RidWithAttribute_ndr_print(PyObject *py_obj)
{
	struct samr_RidWithAttribute *object = (struct samr_RidWithAttribute *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_samr_RidWithAttribute, "samr_RidWithAttribute", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_samr_RidWithAttribute_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_samr_RidWithAttribute_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_samr_RidWithAttribute_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_samr_RidWithAttribute_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject samr_RidWithAttribute_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.RidWithAttribute",
	.tp_getset = py_samr_RidWithAttribute_getsetters,
	.tp_methods = py_samr_RidWithAttribute_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_RidWithAttribute_new,
};


static PyObject *py_samr_RidWithAttributeArray_get_count(PyObject *obj, void *closure)
{
	struct samr_RidWithAttributeArray *object = (struct samr_RidWithAttributeArray *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_samr_RidWithAttributeArray_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_RidWithAttributeArray *object = (struct samr_RidWithAttributeArray *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_RidWithAttributeArray_get_rids(PyObject *obj, void *closure)
{
	struct samr_RidWithAttributeArray *object = (struct samr_RidWithAttributeArray *)py_talloc_get_ptr(obj);
	PyObject *py_rids;
	if (object->rids == NULL) {
		py_rids = Py_None;
		Py_INCREF(py_rids);
	} else {
		py_rids = PyList_New(object->count);
		if (py_rids == NULL) {
			return NULL;
		}
		{
			int rids_cntr_1;
			for (rids_cntr_1 = 0; rids_cntr_1 < object->count; rids_cntr_1++) {
				PyObject *py_rids_1;
				py_rids_1 = py_talloc_reference_ex(&samr_RidWithAttribute_Type, object->rids, &object->rids[rids_cntr_1]);
				PyList_SetItem(py_rids, rids_cntr_1, py_rids_1);
			}
		}
	}
	return py_rids;
}

static int py_samr_RidWithAttributeArray_set_rids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_RidWithAttributeArray *object = (struct samr_RidWithAttributeArray *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->rids);
	if (value == Py_None) {
		object->rids = NULL;
	} else {
		object->rids = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int rids_cntr_1;
			object->rids = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->rids, PyList_GET_SIZE(value));
			if (!object->rids) { return -1;; }
			talloc_set_name_const(object->rids, "ARRAY: object->rids");
			for (rids_cntr_1 = 0; rids_cntr_1 < PyList_GET_SIZE(value); rids_cntr_1++) {
				PY_CHECK_TYPE(&samr_RidWithAttribute_Type, PyList_GET_ITEM(value, rids_cntr_1), return -1;);
				if (talloc_reference(object->rids, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, rids_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->rids[rids_cntr_1] = *(struct samr_RidWithAttribute *)py_talloc_get_ptr(PyList_GET_ITEM(value, rids_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_RidWithAttributeArray_getsetters[] = {
	{ discard_const_p(char, "count"), py_samr_RidWithAttributeArray_get_count, py_samr_RidWithAttributeArray_set_count },
	{ discard_const_p(char, "rids"), py_samr_RidWithAttributeArray_get_rids, py_samr_RidWithAttributeArray_set_rids },
	{ NULL }
};

static PyObject *py_samr_RidWithAttributeArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_RidWithAttributeArray, type);
}

static PyObject *py_samr_RidWithAttributeArray_ndr_pack(PyObject *py_obj)
{
	struct samr_RidWithAttributeArray *object = (struct samr_RidWithAttributeArray *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_samr_RidWithAttributeArray);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_samr_RidWithAttributeArray_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct samr_RidWithAttributeArray *object = (struct samr_RidWithAttributeArray *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_samr_RidWithAttributeArray);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_samr_RidWithAttributeArray_ndr_print(PyObject *py_obj)
{
	struct samr_RidWithAttributeArray *object = (struct samr_RidWithAttributeArray *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_samr_RidWithAttributeArray, "samr_RidWithAttributeArray", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_samr_RidWithAttributeArray_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_samr_RidWithAttributeArray_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_samr_RidWithAttributeArray_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_samr_RidWithAttributeArray_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject samr_RidWithAttributeArray_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.RidWithAttributeArray",
	.tp_getset = py_samr_RidWithAttributeArray_getsetters,
	.tp_methods = py_samr_RidWithAttributeArray_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_RidWithAttributeArray_new,
};


static PyObject *py_samr_DispEntryGeneral_get_idx(PyObject *obj, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(obj);
	PyObject *py_idx;
	py_idx = PyInt_FromLong(object->idx);
	return py_idx;
}

static int py_samr_DispEntryGeneral_set_idx(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->idx = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispEntryGeneral_get_rid(PyObject *obj, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyInt_FromLong(object->rid);
	return py_rid;
}

static int py_samr_DispEntryGeneral_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispEntryGeneral_get_acct_flags(PyObject *obj, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyInt_FromLong(object->acct_flags);
	return py_acct_flags;
}

static int py_samr_DispEntryGeneral_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DispEntryGeneral_get_account_name(PyObject *obj, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_DispEntryGeneral_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_DispEntryGeneral_get_description(PyObject *obj, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_DispEntryGeneral_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_DispEntryGeneral_get_full_name(PyObject *obj, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_samr_DispEntryGeneral_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryGeneral *object = (struct samr_DispEntryGeneral *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_DispEntryGeneral_getsetters[] = {
	{ discard_const_p(char, "idx"), py_samr_DispEntryGeneral_get_idx, py_samr_DispEntryGeneral_set_idx },
	{ discard_const_p(char, "rid"), py_samr_DispEntryGeneral_get_rid, py_samr_DispEntryGeneral_set_rid },
	{ discard_const_p(char, "acct_flags"), py_samr_DispEntryGeneral_get_acct_flags, py_samr_DispEntryGeneral_set_acct_flags },
	{ discard_const_p(char, "account_name"), py_samr_DispEntryGeneral_get_account_name, py_samr_DispEntryGeneral_set_account_name },
	{ discard_const_p(char, "description"), py_samr_DispEntryGeneral_get_description, py_samr_DispEntryGeneral_set_description },
	{ discard_const_p(char, "full_name"), py_samr_DispEntryGeneral_get_full_name, py_samr_DispEntryGeneral_set_full_name },
	{ NULL }
};

static PyObject *py_samr_DispEntryGeneral_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DispEntryGeneral, type);
}


static PyTypeObject samr_DispEntryGeneral_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DispEntryGeneral",
	.tp_getset = py_samr_DispEntryGeneral_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DispEntryGeneral_new,
};


static PyObject *py_samr_DispInfoGeneral_get_count(PyObject *obj, void *closure)
{
	struct samr_DispInfoGeneral *object = (struct samr_DispInfoGeneral *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_samr_DispInfoGeneral_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispInfoGeneral *object = (struct samr_DispInfoGeneral *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispInfoGeneral_get_entries(PyObject *obj, void *closure)
{
	struct samr_DispInfoGeneral *object = (struct samr_DispInfoGeneral *)py_talloc_get_ptr(obj);
	PyObject *py_entries;
	if (object->entries == NULL) {
		py_entries = Py_None;
		Py_INCREF(py_entries);
	} else {
		py_entries = PyList_New(object->count);
		if (py_entries == NULL) {
			return NULL;
		}
		{
			int entries_cntr_1;
			for (entries_cntr_1 = 0; entries_cntr_1 < object->count; entries_cntr_1++) {
				PyObject *py_entries_1;
				py_entries_1 = py_talloc_reference_ex(&samr_DispEntryGeneral_Type, object->entries, &object->entries[entries_cntr_1]);
				PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
			}
		}
	}
	return py_entries;
}

static int py_samr_DispInfoGeneral_set_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispInfoGeneral *object = (struct samr_DispInfoGeneral *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->entries);
	if (value == Py_None) {
		object->entries = NULL;
	} else {
		object->entries = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int entries_cntr_1;
			object->entries = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
			if (!object->entries) { return -1;; }
			talloc_set_name_const(object->entries, "ARRAY: object->entries");
			for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
				PY_CHECK_TYPE(&samr_DispEntryGeneral_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
				if (talloc_reference(object->entries, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->entries[entries_cntr_1] = *(struct samr_DispEntryGeneral *)py_talloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_DispInfoGeneral_getsetters[] = {
	{ discard_const_p(char, "count"), py_samr_DispInfoGeneral_get_count, py_samr_DispInfoGeneral_set_count },
	{ discard_const_p(char, "entries"), py_samr_DispInfoGeneral_get_entries, py_samr_DispInfoGeneral_set_entries },
	{ NULL }
};

static PyObject *py_samr_DispInfoGeneral_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DispInfoGeneral, type);
}


static PyTypeObject samr_DispInfoGeneral_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DispInfoGeneral",
	.tp_getset = py_samr_DispInfoGeneral_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DispInfoGeneral_new,
};


static PyObject *py_samr_DispEntryFull_get_idx(PyObject *obj, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(obj);
	PyObject *py_idx;
	py_idx = PyInt_FromLong(object->idx);
	return py_idx;
}

static int py_samr_DispEntryFull_set_idx(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->idx = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispEntryFull_get_rid(PyObject *obj, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyInt_FromLong(object->rid);
	return py_rid;
}

static int py_samr_DispEntryFull_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispEntryFull_get_acct_flags(PyObject *obj, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyInt_FromLong(object->acct_flags);
	return py_acct_flags;
}

static int py_samr_DispEntryFull_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DispEntryFull_get_account_name(PyObject *obj, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_DispEntryFull_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_DispEntryFull_get_description(PyObject *obj, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_DispEntryFull_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFull *object = (struct samr_DispEntryFull *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_DispEntryFull_getsetters[] = {
	{ discard_const_p(char, "idx"), py_samr_DispEntryFull_get_idx, py_samr_DispEntryFull_set_idx },
	{ discard_const_p(char, "rid"), py_samr_DispEntryFull_get_rid, py_samr_DispEntryFull_set_rid },
	{ discard_const_p(char, "acct_flags"), py_samr_DispEntryFull_get_acct_flags, py_samr_DispEntryFull_set_acct_flags },
	{ discard_const_p(char, "account_name"), py_samr_DispEntryFull_get_account_name, py_samr_DispEntryFull_set_account_name },
	{ discard_const_p(char, "description"), py_samr_DispEntryFull_get_description, py_samr_DispEntryFull_set_description },
	{ NULL }
};

static PyObject *py_samr_DispEntryFull_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DispEntryFull, type);
}


static PyTypeObject samr_DispEntryFull_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DispEntryFull",
	.tp_getset = py_samr_DispEntryFull_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DispEntryFull_new,
};


static PyObject *py_samr_DispInfoFull_get_count(PyObject *obj, void *closure)
{
	struct samr_DispInfoFull *object = (struct samr_DispInfoFull *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_samr_DispInfoFull_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispInfoFull *object = (struct samr_DispInfoFull *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispInfoFull_get_entries(PyObject *obj, void *closure)
{
	struct samr_DispInfoFull *object = (struct samr_DispInfoFull *)py_talloc_get_ptr(obj);
	PyObject *py_entries;
	if (object->entries == NULL) {
		py_entries = Py_None;
		Py_INCREF(py_entries);
	} else {
		py_entries = PyList_New(object->count);
		if (py_entries == NULL) {
			return NULL;
		}
		{
			int entries_cntr_1;
			for (entries_cntr_1 = 0; entries_cntr_1 < object->count; entries_cntr_1++) {
				PyObject *py_entries_1;
				py_entries_1 = py_talloc_reference_ex(&samr_DispEntryFull_Type, object->entries, &object->entries[entries_cntr_1]);
				PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
			}
		}
	}
	return py_entries;
}

static int py_samr_DispInfoFull_set_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispInfoFull *object = (struct samr_DispInfoFull *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->entries);
	if (value == Py_None) {
		object->entries = NULL;
	} else {
		object->entries = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int entries_cntr_1;
			object->entries = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
			if (!object->entries) { return -1;; }
			talloc_set_name_const(object->entries, "ARRAY: object->entries");
			for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
				PY_CHECK_TYPE(&samr_DispEntryFull_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
				if (talloc_reference(object->entries, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->entries[entries_cntr_1] = *(struct samr_DispEntryFull *)py_talloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_DispInfoFull_getsetters[] = {
	{ discard_const_p(char, "count"), py_samr_DispInfoFull_get_count, py_samr_DispInfoFull_set_count },
	{ discard_const_p(char, "entries"), py_samr_DispInfoFull_get_entries, py_samr_DispInfoFull_set_entries },
	{ NULL }
};

static PyObject *py_samr_DispInfoFull_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DispInfoFull, type);
}


static PyTypeObject samr_DispInfoFull_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DispInfoFull",
	.tp_getset = py_samr_DispInfoFull_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DispInfoFull_new,
};


static PyObject *py_samr_DispEntryFullGroup_get_idx(PyObject *obj, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(obj);
	PyObject *py_idx;
	py_idx = PyInt_FromLong(object->idx);
	return py_idx;
}

static int py_samr_DispEntryFullGroup_set_idx(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->idx = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispEntryFullGroup_get_rid(PyObject *obj, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyInt_FromLong(object->rid);
	return py_rid;
}

static int py_samr_DispEntryFullGroup_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispEntryFullGroup_get_acct_flags(PyObject *obj, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyInt_FromLong(object->acct_flags);
	return py_acct_flags;
}

static int py_samr_DispEntryFullGroup_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->acct_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->acct_flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_DispEntryFullGroup_get_account_name(PyObject *obj, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_DispEntryFullGroup_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_DispEntryFullGroup_get_description(PyObject *obj, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(obj);
	PyObject *py_description;
	py_description = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_samr_DispEntryFullGroup_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryFullGroup *object = (struct samr_DispEntryFullGroup *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_DispEntryFullGroup_getsetters[] = {
	{ discard_const_p(char, "idx"), py_samr_DispEntryFullGroup_get_idx, py_samr_DispEntryFullGroup_set_idx },
	{ discard_const_p(char, "rid"), py_samr_DispEntryFullGroup_get_rid, py_samr_DispEntryFullGroup_set_rid },
	{ discard_const_p(char, "acct_flags"), py_samr_DispEntryFullGroup_get_acct_flags, py_samr_DispEntryFullGroup_set_acct_flags },
	{ discard_const_p(char, "account_name"), py_samr_DispEntryFullGroup_get_account_name, py_samr_DispEntryFullGroup_set_account_name },
	{ discard_const_p(char, "description"), py_samr_DispEntryFullGroup_get_description, py_samr_DispEntryFullGroup_set_description },
	{ NULL }
};

static PyObject *py_samr_DispEntryFullGroup_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DispEntryFullGroup, type);
}


static PyTypeObject samr_DispEntryFullGroup_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DispEntryFullGroup",
	.tp_getset = py_samr_DispEntryFullGroup_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DispEntryFullGroup_new,
};


static PyObject *py_samr_DispInfoFullGroups_get_count(PyObject *obj, void *closure)
{
	struct samr_DispInfoFullGroups *object = (struct samr_DispInfoFullGroups *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_samr_DispInfoFullGroups_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispInfoFullGroups *object = (struct samr_DispInfoFullGroups *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispInfoFullGroups_get_entries(PyObject *obj, void *closure)
{
	struct samr_DispInfoFullGroups *object = (struct samr_DispInfoFullGroups *)py_talloc_get_ptr(obj);
	PyObject *py_entries;
	if (object->entries == NULL) {
		py_entries = Py_None;
		Py_INCREF(py_entries);
	} else {
		py_entries = PyList_New(object->count);
		if (py_entries == NULL) {
			return NULL;
		}
		{
			int entries_cntr_1;
			for (entries_cntr_1 = 0; entries_cntr_1 < object->count; entries_cntr_1++) {
				PyObject *py_entries_1;
				py_entries_1 = py_talloc_reference_ex(&samr_DispEntryFullGroup_Type, object->entries, &object->entries[entries_cntr_1]);
				PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
			}
		}
	}
	return py_entries;
}

static int py_samr_DispInfoFullGroups_set_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispInfoFullGroups *object = (struct samr_DispInfoFullGroups *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->entries);
	if (value == Py_None) {
		object->entries = NULL;
	} else {
		object->entries = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int entries_cntr_1;
			object->entries = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
			if (!object->entries) { return -1;; }
			talloc_set_name_const(object->entries, "ARRAY: object->entries");
			for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
				PY_CHECK_TYPE(&samr_DispEntryFullGroup_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
				if (talloc_reference(object->entries, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->entries[entries_cntr_1] = *(struct samr_DispEntryFullGroup *)py_talloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_DispInfoFullGroups_getsetters[] = {
	{ discard_const_p(char, "count"), py_samr_DispInfoFullGroups_get_count, py_samr_DispInfoFullGroups_set_count },
	{ discard_const_p(char, "entries"), py_samr_DispInfoFullGroups_get_entries, py_samr_DispInfoFullGroups_set_entries },
	{ NULL }
};

static PyObject *py_samr_DispInfoFullGroups_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DispInfoFullGroups, type);
}


static PyTypeObject samr_DispInfoFullGroups_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DispInfoFullGroups",
	.tp_getset = py_samr_DispInfoFullGroups_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DispInfoFullGroups_new,
};


static PyObject *py_samr_DispEntryAscii_get_idx(PyObject *obj, void *closure)
{
	struct samr_DispEntryAscii *object = (struct samr_DispEntryAscii *)py_talloc_get_ptr(obj);
	PyObject *py_idx;
	py_idx = PyInt_FromLong(object->idx);
	return py_idx;
}

static int py_samr_DispEntryAscii_set_idx(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryAscii *object = (struct samr_DispEntryAscii *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->idx = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispEntryAscii_get_account_name(PyObject *obj, void *closure)
{
	struct samr_DispEntryAscii *object = (struct samr_DispEntryAscii *)py_talloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = py_talloc_reference_ex(lsa_AsciiStringLarge_Type, py_talloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_samr_DispEntryAscii_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispEntryAscii *object = (struct samr_DispEntryAscii *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_AsciiStringLarge_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_AsciiStringLarge *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_samr_DispEntryAscii_getsetters[] = {
	{ discard_const_p(char, "idx"), py_samr_DispEntryAscii_get_idx, py_samr_DispEntryAscii_set_idx },
	{ discard_const_p(char, "account_name"), py_samr_DispEntryAscii_get_account_name, py_samr_DispEntryAscii_set_account_name },
	{ NULL }
};

static PyObject *py_samr_DispEntryAscii_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DispEntryAscii, type);
}


static PyTypeObject samr_DispEntryAscii_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DispEntryAscii",
	.tp_getset = py_samr_DispEntryAscii_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DispEntryAscii_new,
};


static PyObject *py_samr_DispInfoAscii_get_count(PyObject *obj, void *closure)
{
	struct samr_DispInfoAscii *object = (struct samr_DispInfoAscii *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_samr_DispInfoAscii_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispInfoAscii *object = (struct samr_DispInfoAscii *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_DispInfoAscii_get_entries(PyObject *obj, void *closure)
{
	struct samr_DispInfoAscii *object = (struct samr_DispInfoAscii *)py_talloc_get_ptr(obj);
	PyObject *py_entries;
	if (object->entries == NULL) {
		py_entries = Py_None;
		Py_INCREF(py_entries);
	} else {
		py_entries = PyList_New(object->count);
		if (py_entries == NULL) {
			return NULL;
		}
		{
			int entries_cntr_1;
			for (entries_cntr_1 = 0; entries_cntr_1 < object->count; entries_cntr_1++) {
				PyObject *py_entries_1;
				py_entries_1 = py_talloc_reference_ex(&samr_DispEntryAscii_Type, object->entries, &object->entries[entries_cntr_1]);
				PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
			}
		}
	}
	return py_entries;
}

static int py_samr_DispInfoAscii_set_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_DispInfoAscii *object = (struct samr_DispInfoAscii *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->entries);
	if (value == Py_None) {
		object->entries = NULL;
	} else {
		object->entries = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int entries_cntr_1;
			object->entries = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
			if (!object->entries) { return -1;; }
			talloc_set_name_const(object->entries, "ARRAY: object->entries");
			for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
				PY_CHECK_TYPE(&samr_DispEntryAscii_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
				if (talloc_reference(object->entries, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->entries[entries_cntr_1] = *(struct samr_DispEntryAscii *)py_talloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_DispInfoAscii_getsetters[] = {
	{ discard_const_p(char, "count"), py_samr_DispInfoAscii_get_count, py_samr_DispInfoAscii_set_count },
	{ discard_const_p(char, "entries"), py_samr_DispInfoAscii_get_entries, py_samr_DispInfoAscii_set_entries },
	{ NULL }
};

static PyObject *py_samr_DispInfoAscii_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_DispInfoAscii, type);
}


static PyTypeObject samr_DispInfoAscii_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.DispInfoAscii",
	.tp_getset = py_samr_DispInfoAscii_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_DispInfoAscii_new,
};

PyObject *py_import_samr_DispInfo(TALLOC_CTX *mem_ctx, int level, union samr_DispInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = py_talloc_reference_ex(&samr_DispInfoGeneral_Type, mem_ctx, &in->info1);
			return ret;

		case 2:
			ret = py_talloc_reference_ex(&samr_DispInfoFull_Type, mem_ctx, &in->info2);
			return ret;

		case 3:
			ret = py_talloc_reference_ex(&samr_DispInfoFullGroups_Type, mem_ctx, &in->info3);
			return ret;

		case 4:
			ret = py_talloc_reference_ex(&samr_DispInfoAscii_Type, mem_ctx, &in->info4);
			return ret;

		case 5:
			ret = py_talloc_reference_ex(&samr_DispInfoAscii_Type, mem_ctx, &in->info5);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union samr_DispInfo *py_export_samr_DispInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union samr_DispInfo *ret = talloc_zero(mem_ctx, union samr_DispInfo);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&samr_DispInfoGeneral_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info1 = *(struct samr_DispInfoGeneral *)py_talloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&samr_DispInfoFull_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info2 = *(struct samr_DispInfoFull *)py_talloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&samr_DispInfoFullGroups_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info3 = *(struct samr_DispInfoFullGroups *)py_talloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&samr_DispInfoAscii_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info4 = *(struct samr_DispInfoAscii *)py_talloc_get_ptr(in);
			break;

		case 5:
			PY_CHECK_TYPE(&samr_DispInfoAscii_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info5 = *(struct samr_DispInfoAscii *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_samr_PwInfo_get_min_password_length(PyObject *obj, void *closure)
{
	struct samr_PwInfo *object = (struct samr_PwInfo *)py_talloc_get_ptr(obj);
	PyObject *py_min_password_length;
	py_min_password_length = PyInt_FromLong(object->min_password_length);
	return py_min_password_length;
}

static int py_samr_PwInfo_set_min_password_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_PwInfo *object = (struct samr_PwInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->min_password_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_PwInfo_get_password_properties(PyObject *obj, void *closure)
{
	struct samr_PwInfo *object = (struct samr_PwInfo *)py_talloc_get_ptr(obj);
	PyObject *py_password_properties;
	py_password_properties = PyInt_FromLong(object->password_properties);
	return py_password_properties;
}

static int py_samr_PwInfo_set_password_properties(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_PwInfo *object = (struct samr_PwInfo *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->password_properties = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->password_properties = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_PwInfo_getsetters[] = {
	{ discard_const_p(char, "min_password_length"), py_samr_PwInfo_get_min_password_length, py_samr_PwInfo_set_min_password_length },
	{ discard_const_p(char, "password_properties"), py_samr_PwInfo_get_password_properties, py_samr_PwInfo_set_password_properties },
	{ NULL }
};

static PyObject *py_samr_PwInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_PwInfo, type);
}


static PyTypeObject samr_PwInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.PwInfo",
	.tp_getset = py_samr_PwInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_PwInfo_new,
};


static PyObject *py_userPwdChangeFailureInformation_get_extendedFailureReason(PyObject *obj, void *closure)
{
	struct userPwdChangeFailureInformation *object = (struct userPwdChangeFailureInformation *)py_talloc_get_ptr(obj);
	PyObject *py_extendedFailureReason;
	py_extendedFailureReason = PyInt_FromLong(object->extendedFailureReason);
	return py_extendedFailureReason;
}

static int py_userPwdChangeFailureInformation_set_extendedFailureReason(PyObject *py_obj, PyObject *value, void *closure)
{
	struct userPwdChangeFailureInformation *object = (struct userPwdChangeFailureInformation *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->extendedFailureReason = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->extendedFailureReason = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_userPwdChangeFailureInformation_get_filterModuleName(PyObject *obj, void *closure)
{
	struct userPwdChangeFailureInformation *object = (struct userPwdChangeFailureInformation *)py_talloc_get_ptr(obj);
	PyObject *py_filterModuleName;
	if (object->filterModuleName == NULL) {
		py_filterModuleName = Py_None;
		Py_INCREF(py_filterModuleName);
	} else {
		if (object->filterModuleName == NULL) {
			py_filterModuleName = Py_None;
			Py_INCREF(py_filterModuleName);
		} else {
			py_filterModuleName = PyUnicode_Decode(object->filterModuleName, strlen(object->filterModuleName), "utf-8", "ignore");
		}
	}
	return py_filterModuleName;
}

static int py_userPwdChangeFailureInformation_set_filterModuleName(PyObject *py_obj, PyObject *value, void *closure)
{
	struct userPwdChangeFailureInformation *object = (struct userPwdChangeFailureInformation *)py_talloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->filterModuleName = NULL;
	} else {
		object->filterModuleName = NULL;
		if (PyUnicode_Check(value)) {
			object->filterModuleName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->filterModuleName = PyString_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_userPwdChangeFailureInformation_getsetters[] = {
	{ discard_const_p(char, "extendedFailureReason"), py_userPwdChangeFailureInformation_get_extendedFailureReason, py_userPwdChangeFailureInformation_set_extendedFailureReason },
	{ discard_const_p(char, "filterModuleName"), py_userPwdChangeFailureInformation_get_filterModuleName, py_userPwdChangeFailureInformation_set_filterModuleName },
	{ NULL }
};

static PyObject *py_userPwdChangeFailureInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct userPwdChangeFailureInformation, type);
}


static PyTypeObject userPwdChangeFailureInformation_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.userPwdChangeFailureInformation",
	.tp_getset = py_userPwdChangeFailureInformation_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_userPwdChangeFailureInformation_new,
};


static PyObject *py_samr_ConnectInfo1_get_client_version(PyObject *obj, void *closure)
{
	struct samr_ConnectInfo1 *object = (struct samr_ConnectInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_client_version;
	py_client_version = PyInt_FromLong(object->client_version);
	return py_client_version;
}

static int py_samr_ConnectInfo1_set_client_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ConnectInfo1 *object = (struct samr_ConnectInfo1 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->client_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->client_version = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_ConnectInfo1_get_unknown2(PyObject *obj, void *closure)
{
	struct samr_ConnectInfo1 *object = (struct samr_ConnectInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = PyInt_FromLong(object->unknown2);
	return py_unknown2;
}

static int py_samr_ConnectInfo1_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ConnectInfo1 *object = (struct samr_ConnectInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown2 = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_ConnectInfo1_getsetters[] = {
	{ discard_const_p(char, "client_version"), py_samr_ConnectInfo1_get_client_version, py_samr_ConnectInfo1_set_client_version },
	{ discard_const_p(char, "unknown2"), py_samr_ConnectInfo1_get_unknown2, py_samr_ConnectInfo1_set_unknown2 },
	{ NULL }
};

static PyObject *py_samr_ConnectInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_ConnectInfo1, type);
}


static PyTypeObject samr_ConnectInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.ConnectInfo1",
	.tp_getset = py_samr_ConnectInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_ConnectInfo1_new,
};

PyObject *py_import_samr_ConnectInfo(TALLOC_CTX *mem_ctx, int level, union samr_ConnectInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = py_talloc_reference_ex(&samr_ConnectInfo1_Type, mem_ctx, &in->info1);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union samr_ConnectInfo *py_export_samr_ConnectInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union samr_ConnectInfo *ret = talloc_zero(mem_ctx, union samr_ConnectInfo);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&samr_ConnectInfo1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info1 = *(struct samr_ConnectInfo1 *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_samr_ValidationBlob_get_length(PyObject *obj, void *closure)
{
	struct samr_ValidationBlob *object = (struct samr_ValidationBlob *)py_talloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyInt_FromLong(object->length);
	return py_length;
}

static int py_samr_ValidationBlob_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidationBlob *object = (struct samr_ValidationBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_ValidationBlob_get_data(PyObject *obj, void *closure)
{
	struct samr_ValidationBlob *object = (struct samr_ValidationBlob *)py_talloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyList_New(object->length);
		if (py_data == NULL) {
			return NULL;
		}
		{
			int data_cntr_1;
			for (data_cntr_1 = 0; data_cntr_1 < object->length; data_cntr_1++) {
				PyObject *py_data_1;
				py_data_1 = PyInt_FromLong(object->data[data_cntr_1]);
				PyList_SetItem(py_data, data_cntr_1, py_data_1);
			}
		}
	}
	return py_data;
}

static int py_samr_ValidationBlob_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidationBlob *object = (struct samr_ValidationBlob *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
	if (value == Py_None) {
		object->data = NULL;
	} else {
		object->data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int data_cntr_1;
			object->data = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
			if (!object->data) { return -1;; }
			talloc_set_name_const(object->data, "ARRAY: object->data");
			for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, data_cntr_1), return -1;);
				object->data[data_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, data_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_ValidationBlob_getsetters[] = {
	{ discard_const_p(char, "length"), py_samr_ValidationBlob_get_length, py_samr_ValidationBlob_set_length },
	{ discard_const_p(char, "data"), py_samr_ValidationBlob_get_data, py_samr_ValidationBlob_set_data },
	{ NULL }
};

static PyObject *py_samr_ValidationBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_ValidationBlob, type);
}


static PyTypeObject samr_ValidationBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.ValidationBlob",
	.tp_getset = py_samr_ValidationBlob_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_ValidationBlob_new,
};


static PyObject *py_samr_ValidatePasswordInfo_get_fields_present(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(obj);
	PyObject *py_fields_present;
	py_fields_present = PyInt_FromLong(object->fields_present);
	return py_fields_present;
}

static int py_samr_ValidatePasswordInfo_set_fields_present(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->fields_present = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->fields_present = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_ValidatePasswordInfo_get_last_password_change(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(obj);
	PyObject *py_last_password_change;
	py_last_password_change = PyLong_FromLongLong(object->last_password_change);
	return py_last_password_change;
}

static int py_samr_ValidatePasswordInfo_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_password_change = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_password_change = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_ValidatePasswordInfo_get_bad_password_time(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(obj);
	PyObject *py_bad_password_time;
	py_bad_password_time = PyLong_FromLongLong(object->bad_password_time);
	return py_bad_password_time;
}

static int py_samr_ValidatePasswordInfo_set_bad_password_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->bad_password_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->bad_password_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_ValidatePasswordInfo_get_lockout_time(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(obj);
	PyObject *py_lockout_time;
	py_lockout_time = PyLong_FromLongLong(object->lockout_time);
	return py_lockout_time;
}

static int py_samr_ValidatePasswordInfo_set_lockout_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->lockout_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->lockout_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_samr_ValidatePasswordInfo_get_bad_pwd_count(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(obj);
	PyObject *py_bad_pwd_count;
	py_bad_pwd_count = PyInt_FromLong(object->bad_pwd_count);
	return py_bad_pwd_count;
}

static int py_samr_ValidatePasswordInfo_set_bad_pwd_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->bad_pwd_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordInfo_get_pwd_history_len(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(obj);
	PyObject *py_pwd_history_len;
	py_pwd_history_len = PyInt_FromLong(object->pwd_history_len);
	return py_pwd_history_len;
}

static int py_samr_ValidatePasswordInfo_set_pwd_history_len(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->pwd_history_len = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordInfo_get_pwd_history(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(obj);
	PyObject *py_pwd_history;
	if (object->pwd_history == NULL) {
		py_pwd_history = Py_None;
		Py_INCREF(py_pwd_history);
	} else {
		py_pwd_history = PyList_New(object->pwd_history_len);
		if (py_pwd_history == NULL) {
			return NULL;
		}
		{
			int pwd_history_cntr_1;
			for (pwd_history_cntr_1 = 0; pwd_history_cntr_1 < object->pwd_history_len; pwd_history_cntr_1++) {
				PyObject *py_pwd_history_1;
				py_pwd_history_1 = py_talloc_reference_ex(&samr_ValidationBlob_Type, object->pwd_history, &object->pwd_history[pwd_history_cntr_1]);
				PyList_SetItem(py_pwd_history, pwd_history_cntr_1, py_pwd_history_1);
			}
		}
	}
	return py_pwd_history;
}

static int py_samr_ValidatePasswordInfo_set_pwd_history(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordInfo *object = (struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->pwd_history);
	if (value == Py_None) {
		object->pwd_history = NULL;
	} else {
		object->pwd_history = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int pwd_history_cntr_1;
			object->pwd_history = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->pwd_history, PyList_GET_SIZE(value));
			if (!object->pwd_history) { return -1;; }
			talloc_set_name_const(object->pwd_history, "ARRAY: object->pwd_history");
			for (pwd_history_cntr_1 = 0; pwd_history_cntr_1 < PyList_GET_SIZE(value); pwd_history_cntr_1++) {
				PY_CHECK_TYPE(&samr_ValidationBlob_Type, PyList_GET_ITEM(value, pwd_history_cntr_1), return -1;);
				if (talloc_reference(object->pwd_history, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, pwd_history_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->pwd_history[pwd_history_cntr_1] = *(struct samr_ValidationBlob *)py_talloc_get_ptr(PyList_GET_ITEM(value, pwd_history_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_samr_ValidatePasswordInfo_getsetters[] = {
	{ discard_const_p(char, "fields_present"), py_samr_ValidatePasswordInfo_get_fields_present, py_samr_ValidatePasswordInfo_set_fields_present },
	{ discard_const_p(char, "last_password_change"), py_samr_ValidatePasswordInfo_get_last_password_change, py_samr_ValidatePasswordInfo_set_last_password_change },
	{ discard_const_p(char, "bad_password_time"), py_samr_ValidatePasswordInfo_get_bad_password_time, py_samr_ValidatePasswordInfo_set_bad_password_time },
	{ discard_const_p(char, "lockout_time"), py_samr_ValidatePasswordInfo_get_lockout_time, py_samr_ValidatePasswordInfo_set_lockout_time },
	{ discard_const_p(char, "bad_pwd_count"), py_samr_ValidatePasswordInfo_get_bad_pwd_count, py_samr_ValidatePasswordInfo_set_bad_pwd_count },
	{ discard_const_p(char, "pwd_history_len"), py_samr_ValidatePasswordInfo_get_pwd_history_len, py_samr_ValidatePasswordInfo_set_pwd_history_len },
	{ discard_const_p(char, "pwd_history"), py_samr_ValidatePasswordInfo_get_pwd_history, py_samr_ValidatePasswordInfo_set_pwd_history },
	{ NULL }
};

static PyObject *py_samr_ValidatePasswordInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_ValidatePasswordInfo, type);
}


static PyTypeObject samr_ValidatePasswordInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.ValidatePasswordInfo",
	.tp_getset = py_samr_ValidatePasswordInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_ValidatePasswordInfo_new,
};


static PyObject *py_samr_ValidatePasswordRepCtr_get_info(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordRepCtr *object = (struct samr_ValidatePasswordRepCtr *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_talloc_reference_ex(&samr_ValidatePasswordInfo_Type, py_talloc_get_mem_ctx(obj), &object->info);
	return py_info;
}

static int py_samr_ValidatePasswordRepCtr_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordRepCtr *object = (struct samr_ValidatePasswordRepCtr *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_ValidatePasswordInfo_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->info = *(struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordRepCtr_get_status(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordRepCtr *object = (struct samr_ValidatePasswordRepCtr *)py_talloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

static int py_samr_ValidatePasswordRepCtr_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordRepCtr *object = (struct samr_ValidatePasswordRepCtr *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->status = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->status = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_samr_ValidatePasswordRepCtr_getsetters[] = {
	{ discard_const_p(char, "info"), py_samr_ValidatePasswordRepCtr_get_info, py_samr_ValidatePasswordRepCtr_set_info },
	{ discard_const_p(char, "status"), py_samr_ValidatePasswordRepCtr_get_status, py_samr_ValidatePasswordRepCtr_set_status },
	{ NULL }
};

static PyObject *py_samr_ValidatePasswordRepCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_ValidatePasswordRepCtr, type);
}


static PyTypeObject samr_ValidatePasswordRepCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.ValidatePasswordRepCtr",
	.tp_getset = py_samr_ValidatePasswordRepCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_ValidatePasswordRepCtr_new,
};

PyObject *py_import_samr_ValidatePasswordRep(TALLOC_CTX *mem_ctx, int level, union samr_ValidatePasswordRep *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = py_talloc_reference_ex(&samr_ValidatePasswordRepCtr_Type, mem_ctx, &in->ctr1);
			return ret;

		case 2:
			ret = py_talloc_reference_ex(&samr_ValidatePasswordRepCtr_Type, mem_ctx, &in->ctr2);
			return ret;

		case 3:
			ret = py_talloc_reference_ex(&samr_ValidatePasswordRepCtr_Type, mem_ctx, &in->ctr3);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union samr_ValidatePasswordRep *py_export_samr_ValidatePasswordRep(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union samr_ValidatePasswordRep *ret = talloc_zero(mem_ctx, union samr_ValidatePasswordRep);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&samr_ValidatePasswordRepCtr_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct samr_ValidatePasswordRepCtr *)py_talloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&samr_ValidatePasswordRepCtr_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr2 = *(struct samr_ValidatePasswordRepCtr *)py_talloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&samr_ValidatePasswordRepCtr_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr3 = *(struct samr_ValidatePasswordRepCtr *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_samr_ValidatePasswordReq3_get_info(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_talloc_reference_ex(&samr_ValidatePasswordInfo_Type, py_talloc_get_mem_ctx(obj), &object->info);
	return py_info;
}

static int py_samr_ValidatePasswordReq3_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_ValidatePasswordInfo_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->info = *(struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq3_get_password(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(obj);
	PyObject *py_password;
	py_password = py_talloc_reference_ex(lsa_StringLarge_Type, py_talloc_get_mem_ctx(obj), &object->password);
	return py_password;
}

static int py_samr_ValidatePasswordReq3_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->password = *(struct lsa_StringLarge *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq3_get_account(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(obj);
	PyObject *py_account;
	py_account = py_talloc_reference_ex(lsa_StringLarge_Type, py_talloc_get_mem_ctx(obj), &object->account);
	return py_account;
}

static int py_samr_ValidatePasswordReq3_set_account(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account = *(struct lsa_StringLarge *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq3_get_hash(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(obj);
	PyObject *py_hash;
	py_hash = py_talloc_reference_ex(&samr_ValidationBlob_Type, py_talloc_get_mem_ctx(obj), &object->hash);
	return py_hash;
}

static int py_samr_ValidatePasswordReq3_set_hash(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_ValidationBlob_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->hash = *(struct samr_ValidationBlob *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq3_get_pwd_must_change_at_next_logon(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(obj);
	PyObject *py_pwd_must_change_at_next_logon;
	py_pwd_must_change_at_next_logon = PyInt_FromLong(object->pwd_must_change_at_next_logon);
	return py_pwd_must_change_at_next_logon;
}

static int py_samr_ValidatePasswordReq3_set_pwd_must_change_at_next_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->pwd_must_change_at_next_logon = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq3_get_clear_lockout(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(obj);
	PyObject *py_clear_lockout;
	py_clear_lockout = PyInt_FromLong(object->clear_lockout);
	return py_clear_lockout;
}

static int py_samr_ValidatePasswordReq3_set_clear_lockout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq3 *object = (struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->clear_lockout = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_ValidatePasswordReq3_getsetters[] = {
	{ discard_const_p(char, "info"), py_samr_ValidatePasswordReq3_get_info, py_samr_ValidatePasswordReq3_set_info },
	{ discard_const_p(char, "password"), py_samr_ValidatePasswordReq3_get_password, py_samr_ValidatePasswordReq3_set_password },
	{ discard_const_p(char, "account"), py_samr_ValidatePasswordReq3_get_account, py_samr_ValidatePasswordReq3_set_account },
	{ discard_const_p(char, "hash"), py_samr_ValidatePasswordReq3_get_hash, py_samr_ValidatePasswordReq3_set_hash },
	{ discard_const_p(char, "pwd_must_change_at_next_logon"), py_samr_ValidatePasswordReq3_get_pwd_must_change_at_next_logon, py_samr_ValidatePasswordReq3_set_pwd_must_change_at_next_logon },
	{ discard_const_p(char, "clear_lockout"), py_samr_ValidatePasswordReq3_get_clear_lockout, py_samr_ValidatePasswordReq3_set_clear_lockout },
	{ NULL }
};

static PyObject *py_samr_ValidatePasswordReq3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_ValidatePasswordReq3, type);
}


static PyTypeObject samr_ValidatePasswordReq3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.ValidatePasswordReq3",
	.tp_getset = py_samr_ValidatePasswordReq3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_ValidatePasswordReq3_new,
};


static PyObject *py_samr_ValidatePasswordReq2_get_info(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_talloc_reference_ex(&samr_ValidatePasswordInfo_Type, py_talloc_get_mem_ctx(obj), &object->info);
	return py_info;
}

static int py_samr_ValidatePasswordReq2_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_ValidatePasswordInfo_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->info = *(struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq2_get_password(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(obj);
	PyObject *py_password;
	py_password = py_talloc_reference_ex(lsa_StringLarge_Type, py_talloc_get_mem_ctx(obj), &object->password);
	return py_password;
}

static int py_samr_ValidatePasswordReq2_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->password = *(struct lsa_StringLarge *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq2_get_account(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(obj);
	PyObject *py_account;
	py_account = py_talloc_reference_ex(lsa_StringLarge_Type, py_talloc_get_mem_ctx(obj), &object->account);
	return py_account;
}

static int py_samr_ValidatePasswordReq2_set_account(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account = *(struct lsa_StringLarge *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq2_get_hash(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(obj);
	PyObject *py_hash;
	py_hash = py_talloc_reference_ex(&samr_ValidationBlob_Type, py_talloc_get_mem_ctx(obj), &object->hash);
	return py_hash;
}

static int py_samr_ValidatePasswordReq2_set_hash(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_ValidationBlob_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->hash = *(struct samr_ValidationBlob *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq2_get_password_matched(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(obj);
	PyObject *py_password_matched;
	py_password_matched = PyInt_FromLong(object->password_matched);
	return py_password_matched;
}

static int py_samr_ValidatePasswordReq2_set_password_matched(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq2 *object = (struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->password_matched = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_ValidatePasswordReq2_getsetters[] = {
	{ discard_const_p(char, "info"), py_samr_ValidatePasswordReq2_get_info, py_samr_ValidatePasswordReq2_set_info },
	{ discard_const_p(char, "password"), py_samr_ValidatePasswordReq2_get_password, py_samr_ValidatePasswordReq2_set_password },
	{ discard_const_p(char, "account"), py_samr_ValidatePasswordReq2_get_account, py_samr_ValidatePasswordReq2_set_account },
	{ discard_const_p(char, "hash"), py_samr_ValidatePasswordReq2_get_hash, py_samr_ValidatePasswordReq2_set_hash },
	{ discard_const_p(char, "password_matched"), py_samr_ValidatePasswordReq2_get_password_matched, py_samr_ValidatePasswordReq2_set_password_matched },
	{ NULL }
};

static PyObject *py_samr_ValidatePasswordReq2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_ValidatePasswordReq2, type);
}


static PyTypeObject samr_ValidatePasswordReq2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.ValidatePasswordReq2",
	.tp_getset = py_samr_ValidatePasswordReq2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_ValidatePasswordReq2_new,
};


static PyObject *py_samr_ValidatePasswordReq1_get_info(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq1 *object = (struct samr_ValidatePasswordReq1 *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_talloc_reference_ex(&samr_ValidatePasswordInfo_Type, py_talloc_get_mem_ctx(obj), &object->info);
	return py_info;
}

static int py_samr_ValidatePasswordReq1_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq1 *object = (struct samr_ValidatePasswordReq1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&samr_ValidatePasswordInfo_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->info = *(struct samr_ValidatePasswordInfo *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_samr_ValidatePasswordReq1_get_password_matched(PyObject *obj, void *closure)
{
	struct samr_ValidatePasswordReq1 *object = (struct samr_ValidatePasswordReq1 *)py_talloc_get_ptr(obj);
	PyObject *py_password_matched;
	py_password_matched = PyInt_FromLong(object->password_matched);
	return py_password_matched;
}

static int py_samr_ValidatePasswordReq1_set_password_matched(PyObject *py_obj, PyObject *value, void *closure)
{
	struct samr_ValidatePasswordReq1 *object = (struct samr_ValidatePasswordReq1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->password_matched = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_samr_ValidatePasswordReq1_getsetters[] = {
	{ discard_const_p(char, "info"), py_samr_ValidatePasswordReq1_get_info, py_samr_ValidatePasswordReq1_set_info },
	{ discard_const_p(char, "password_matched"), py_samr_ValidatePasswordReq1_get_password_matched, py_samr_ValidatePasswordReq1_set_password_matched },
	{ NULL }
};

static PyObject *py_samr_ValidatePasswordReq1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct samr_ValidatePasswordReq1, type);
}


static PyTypeObject samr_ValidatePasswordReq1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.ValidatePasswordReq1",
	.tp_getset = py_samr_ValidatePasswordReq1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_samr_ValidatePasswordReq1_new,
};

PyObject *py_import_samr_ValidatePasswordReq(TALLOC_CTX *mem_ctx, int level, union samr_ValidatePasswordReq *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = py_talloc_reference_ex(&samr_ValidatePasswordReq1_Type, mem_ctx, &in->req1);
			return ret;

		case 2:
			ret = py_talloc_reference_ex(&samr_ValidatePasswordReq2_Type, mem_ctx, &in->req2);
			return ret;

		case 3:
			ret = py_talloc_reference_ex(&samr_ValidatePasswordReq3_Type, mem_ctx, &in->req3);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union samr_ValidatePasswordReq *py_export_samr_ValidatePasswordReq(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union samr_ValidatePasswordReq *ret = talloc_zero(mem_ctx, union samr_ValidatePasswordReq);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&samr_ValidatePasswordReq1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct samr_ValidatePasswordReq1 *)py_talloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&samr_ValidatePasswordReq2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req2 = *(struct samr_ValidatePasswordReq2 *)py_talloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&samr_ValidatePasswordReq3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req3 = *(struct samr_ValidatePasswordReq3 *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static bool pack_py_samr_Connect_args_in(PyObject *args, PyObject *kwargs, struct samr_Connect *r)
{
	PyObject *py_system_name;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"system_name", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_Connect", discard_const_p(char *, kwnames), &py_system_name, &py_access_mask)) {
		return false;
	}

	if (py_system_name == Py_None) {
		r->in.system_name = NULL;
	} else {
		r->in.system_name = talloc_ptrtype(r, r->in.system_name);
		PY_CHECK_TYPE(&PyInt_Type, py_system_name, return false;);
		*r->in.system_name = PyInt_AsLong(py_system_name);
	}
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_Connect_args_out(struct samr_Connect *r)
{
	PyObject *result;
	PyObject *py_connect_handle;
	py_connect_handle = py_talloc_reference_ex(policy_handle_Type, r->out.connect_handle, r->out.connect_handle);
	result = py_connect_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_Close_args_in(PyObject *args, PyObject *kwargs, struct samr_Close *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_Close", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)py_talloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_samr_Close_args_out(struct samr_Close *r)
{
	PyObject *result;
	PyObject *py_handle;
	py_handle = py_talloc_reference_ex(policy_handle_Type, r->out.handle, r->out.handle);
	result = py_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetSecurity_args_in(PyObject *args, PyObject *kwargs, struct samr_SetSecurity *r)
{
	PyObject *py_handle;
	PyObject *py_sec_info;
	PyObject *py_sdbuf;
	const char *kwnames[] = {
		"handle", "sec_info", "sdbuf", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_SetSecurity", discard_const_p(char *, kwnames), &py_handle, &py_sec_info, &py_sdbuf)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)py_talloc_get_ptr(py_handle);
	if (PyLong_Check(py_sec_info)) {
		r->in.sec_info = PyLong_AsLongLong(py_sec_info);
	} else if (PyInt_Check(py_sec_info)) {
		r->in.sec_info = PyInt_AsLong(py_sec_info);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.sdbuf = talloc_ptrtype(r, r->in.sdbuf);
	PY_CHECK_TYPE(sec_desc_buf_Type, py_sdbuf, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_sdbuf)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.sdbuf = (struct sec_desc_buf *)py_talloc_get_ptr(py_sdbuf);
	return true;
}

static PyObject *unpack_py_samr_SetSecurity_args_out(struct samr_SetSecurity *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QuerySecurity_args_in(PyObject *args, PyObject *kwargs, struct samr_QuerySecurity *r)
{
	PyObject *py_handle;
	PyObject *py_sec_info;
	const char *kwnames[] = {
		"handle", "sec_info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_QuerySecurity", discard_const_p(char *, kwnames), &py_handle, &py_sec_info)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)py_talloc_get_ptr(py_handle);
	if (PyLong_Check(py_sec_info)) {
		r->in.sec_info = PyLong_AsLongLong(py_sec_info);
	} else if (PyInt_Check(py_sec_info)) {
		r->in.sec_info = PyInt_AsLong(py_sec_info);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_QuerySecurity_args_out(struct samr_QuerySecurity *r)
{
	PyObject *result;
	PyObject *py_sdbuf;
	if (*r->out.sdbuf == NULL) {
		py_sdbuf = Py_None;
		Py_INCREF(py_sdbuf);
	} else {
		py_sdbuf = py_talloc_reference_ex(sec_desc_buf_Type, *r->out.sdbuf, *r->out.sdbuf);
	}
	result = py_sdbuf;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_Shutdown_args_in(PyObject *args, PyObject *kwargs, struct samr_Shutdown *r)
{
	PyObject *py_connect_handle;
	const char *kwnames[] = {
		"connect_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_Shutdown", discard_const_p(char *, kwnames), &py_connect_handle)) {
		return false;
	}

	r->in.connect_handle = talloc_ptrtype(r, r->in.connect_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_connect_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_connect_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.connect_handle = (struct policy_handle *)py_talloc_get_ptr(py_connect_handle);
	return true;
}

static PyObject *unpack_py_samr_Shutdown_args_out(struct samr_Shutdown *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_LookupDomain_args_in(PyObject *args, PyObject *kwargs, struct samr_LookupDomain *r)
{
	PyObject *py_connect_handle;
	PyObject *py_domain_name;
	const char *kwnames[] = {
		"connect_handle", "domain_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_LookupDomain", discard_const_p(char *, kwnames), &py_connect_handle, &py_domain_name)) {
		return false;
	}

	r->in.connect_handle = talloc_ptrtype(r, r->in.connect_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_connect_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_connect_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.connect_handle = (struct policy_handle *)py_talloc_get_ptr(py_connect_handle);
	r->in.domain_name = talloc_ptrtype(r, r->in.domain_name);
	PY_CHECK_TYPE(lsa_String_Type, py_domain_name, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_name)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_name = (struct lsa_String *)py_talloc_get_ptr(py_domain_name);
	return true;
}

static PyObject *unpack_py_samr_LookupDomain_args_out(struct samr_LookupDomain *r)
{
	PyObject *result;
	PyObject *py_sid;
	if (*r->out.sid == NULL) {
		py_sid = Py_None;
		Py_INCREF(py_sid);
	} else {
		py_sid = py_talloc_reference_ex(dom_sid_Type, *r->out.sid, *r->out.sid);
	}
	result = py_sid;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_EnumDomains_args_in(PyObject *args, PyObject *kwargs, struct samr_EnumDomains *r)
{
	PyObject *py_connect_handle;
	PyObject *py_resume_handle;
	PyObject *py_buf_size;
	const char *kwnames[] = {
		"connect_handle", "resume_handle", "buf_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_EnumDomains", discard_const_p(char *, kwnames), &py_connect_handle, &py_resume_handle, &py_buf_size)) {
		return false;
	}

	r->in.connect_handle = talloc_ptrtype(r, r->in.connect_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_connect_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_connect_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.connect_handle = (struct policy_handle *)py_talloc_get_ptr(py_connect_handle);
	r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
	*r->in.resume_handle = PyInt_AsLong(py_resume_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_buf_size, return false;);
	r->in.buf_size = PyInt_AsLong(py_buf_size);
	return true;
}

static PyObject *unpack_py_samr_EnumDomains_args_out(struct samr_EnumDomains *r)
{
	PyObject *result;
	PyObject *py_resume_handle;
	PyObject *py_sam;
	PyObject *py_num_entries;
	result = PyTuple_New(3);
	py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
	PyTuple_SetItem(result, 0, py_resume_handle);
	if (*r->out.sam == NULL) {
		py_sam = Py_None;
		Py_INCREF(py_sam);
	} else {
		py_sam = py_talloc_reference_ex(&samr_SamArray_Type, *r->out.sam, *r->out.sam);
	}
	PyTuple_SetItem(result, 1, py_sam);
	py_num_entries = PyInt_FromLong(*r->out.num_entries);
	PyTuple_SetItem(result, 2, py_num_entries);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_OpenDomain_args_in(PyObject *args, PyObject *kwargs, struct samr_OpenDomain *r)
{
	PyObject *py_connect_handle;
	PyObject *py_access_mask;
	PyObject *py_sid;
	const char *kwnames[] = {
		"connect_handle", "access_mask", "sid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_OpenDomain", discard_const_p(char *, kwnames), &py_connect_handle, &py_access_mask, &py_sid)) {
		return false;
	}

	r->in.connect_handle = talloc_ptrtype(r, r->in.connect_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_connect_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_connect_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.connect_handle = (struct policy_handle *)py_talloc_get_ptr(py_connect_handle);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.sid = talloc_ptrtype(r, r->in.sid);
	PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_sid)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.sid = (struct dom_sid *)py_talloc_get_ptr(py_sid);
	return true;
}

static PyObject *unpack_py_samr_OpenDomain_args_out(struct samr_OpenDomain *r)
{
	PyObject *result;
	PyObject *py_domain_handle;
	py_domain_handle = py_talloc_reference_ex(policy_handle_Type, r->out.domain_handle, r->out.domain_handle);
	result = py_domain_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryDomainInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryDomainInfo *r)
{
	PyObject *py_domain_handle;
	PyObject *py_level;
	const char *kwnames[] = {
		"domain_handle", "level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_QueryDomainInfo", discard_const_p(char *, kwnames), &py_domain_handle, &py_level)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_QueryDomainInfo_args_out(struct samr_QueryDomainInfo *r)
{
	PyObject *result;
	PyObject *py_info;
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_samr_DomainInfo(*r->out.info, r->in.level, *r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	result = py_info;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetDomainInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_SetDomainInfo *r)
{
	PyObject *py_domain_handle;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"domain_handle", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_SetDomainInfo", discard_const_p(char *, kwnames), &py_domain_handle, &py_level, &py_info)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.info = talloc_ptrtype(r, r->in.info);
	{
		union samr_DomainInfo *info_switch_1;
		info_switch_1 = py_export_samr_DomainInfo(r, r->in.level, py_info);
		if (info_switch_1 == NULL) {
			return false;
		}
		r->in.info = info_switch_1;
	}
	return true;
}

static PyObject *unpack_py_samr_SetDomainInfo_args_out(struct samr_SetDomainInfo *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_CreateDomainGroup_args_in(PyObject *args, PyObject *kwargs, struct samr_CreateDomainGroup *r)
{
	PyObject *py_domain_handle;
	PyObject *py_name;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"domain_handle", "name", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_CreateDomainGroup", discard_const_p(char *, kwnames), &py_domain_handle, &py_name, &py_access_mask)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.name = talloc_ptrtype(r, r->in.name);
	PY_CHECK_TYPE(lsa_String_Type, py_name, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_name)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.name = (struct lsa_String *)py_talloc_get_ptr(py_name);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_CreateDomainGroup_args_out(struct samr_CreateDomainGroup *r)
{
	PyObject *result;
	PyObject *py_group_handle;
	PyObject *py_rid;
	result = PyTuple_New(2);
	py_group_handle = py_talloc_reference_ex(policy_handle_Type, r->out.group_handle, r->out.group_handle);
	PyTuple_SetItem(result, 0, py_group_handle);
	py_rid = PyInt_FromLong(*r->out.rid);
	PyTuple_SetItem(result, 1, py_rid);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_EnumDomainGroups_args_in(PyObject *args, PyObject *kwargs, struct samr_EnumDomainGroups *r)
{
	PyObject *py_domain_handle;
	PyObject *py_resume_handle;
	PyObject *py_max_size;
	const char *kwnames[] = {
		"domain_handle", "resume_handle", "max_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_EnumDomainGroups", discard_const_p(char *, kwnames), &py_domain_handle, &py_resume_handle, &py_max_size)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
	*r->in.resume_handle = PyInt_AsLong(py_resume_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_max_size, return false;);
	r->in.max_size = PyInt_AsLong(py_max_size);
	return true;
}

static PyObject *unpack_py_samr_EnumDomainGroups_args_out(struct samr_EnumDomainGroups *r)
{
	PyObject *result;
	PyObject *py_resume_handle;
	PyObject *py_sam;
	PyObject *py_num_entries;
	result = PyTuple_New(3);
	py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
	PyTuple_SetItem(result, 0, py_resume_handle);
	if (*r->out.sam == NULL) {
		py_sam = Py_None;
		Py_INCREF(py_sam);
	} else {
		py_sam = py_talloc_reference_ex(&samr_SamArray_Type, *r->out.sam, *r->out.sam);
	}
	PyTuple_SetItem(result, 1, py_sam);
	py_num_entries = PyInt_FromLong(*r->out.num_entries);
	PyTuple_SetItem(result, 2, py_num_entries);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_CreateUser_args_in(PyObject *args, PyObject *kwargs, struct samr_CreateUser *r)
{
	PyObject *py_domain_handle;
	PyObject *py_account_name;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"domain_handle", "account_name", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_CreateUser", discard_const_p(char *, kwnames), &py_domain_handle, &py_account_name, &py_access_mask)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	PY_CHECK_TYPE(lsa_String_Type, py_account_name, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_account_name)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.account_name = (struct lsa_String *)py_talloc_get_ptr(py_account_name);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_CreateUser_args_out(struct samr_CreateUser *r)
{
	PyObject *result;
	PyObject *py_user_handle;
	PyObject *py_rid;
	result = PyTuple_New(2);
	py_user_handle = py_talloc_reference_ex(policy_handle_Type, r->out.user_handle, r->out.user_handle);
	PyTuple_SetItem(result, 0, py_user_handle);
	py_rid = PyInt_FromLong(*r->out.rid);
	PyTuple_SetItem(result, 1, py_rid);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_EnumDomainUsers_args_in(PyObject *args, PyObject *kwargs, struct samr_EnumDomainUsers *r)
{
	PyObject *py_domain_handle;
	PyObject *py_resume_handle;
	PyObject *py_acct_flags;
	PyObject *py_max_size;
	const char *kwnames[] = {
		"domain_handle", "resume_handle", "acct_flags", "max_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:samr_EnumDomainUsers", discard_const_p(char *, kwnames), &py_domain_handle, &py_resume_handle, &py_acct_flags, &py_max_size)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
	*r->in.resume_handle = PyInt_AsLong(py_resume_handle);
	if (PyLong_Check(py_acct_flags)) {
		r->in.acct_flags = PyLong_AsLongLong(py_acct_flags);
	} else if (PyInt_Check(py_acct_flags)) {
		r->in.acct_flags = PyInt_AsLong(py_acct_flags);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_max_size, return false;);
	r->in.max_size = PyInt_AsLong(py_max_size);
	return true;
}

static PyObject *unpack_py_samr_EnumDomainUsers_args_out(struct samr_EnumDomainUsers *r)
{
	PyObject *result;
	PyObject *py_resume_handle;
	PyObject *py_sam;
	PyObject *py_num_entries;
	result = PyTuple_New(3);
	py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
	PyTuple_SetItem(result, 0, py_resume_handle);
	if (*r->out.sam == NULL) {
		py_sam = Py_None;
		Py_INCREF(py_sam);
	} else {
		py_sam = py_talloc_reference_ex(&samr_SamArray_Type, *r->out.sam, *r->out.sam);
	}
	PyTuple_SetItem(result, 1, py_sam);
	py_num_entries = PyInt_FromLong(*r->out.num_entries);
	PyTuple_SetItem(result, 2, py_num_entries);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_CreateDomAlias_args_in(PyObject *args, PyObject *kwargs, struct samr_CreateDomAlias *r)
{
	PyObject *py_domain_handle;
	PyObject *py_alias_name;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"domain_handle", "alias_name", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_CreateDomAlias", discard_const_p(char *, kwnames), &py_domain_handle, &py_alias_name, &py_access_mask)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.alias_name = talloc_ptrtype(r, r->in.alias_name);
	PY_CHECK_TYPE(lsa_String_Type, py_alias_name, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_name)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_name = (struct lsa_String *)py_talloc_get_ptr(py_alias_name);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_CreateDomAlias_args_out(struct samr_CreateDomAlias *r)
{
	PyObject *result;
	PyObject *py_alias_handle;
	PyObject *py_rid;
	result = PyTuple_New(2);
	py_alias_handle = py_talloc_reference_ex(policy_handle_Type, r->out.alias_handle, r->out.alias_handle);
	PyTuple_SetItem(result, 0, py_alias_handle);
	py_rid = PyInt_FromLong(*r->out.rid);
	PyTuple_SetItem(result, 1, py_rid);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_EnumDomainAliases_args_in(PyObject *args, PyObject *kwargs, struct samr_EnumDomainAliases *r)
{
	PyObject *py_domain_handle;
	PyObject *py_resume_handle;
	PyObject *py_max_size;
	const char *kwnames[] = {
		"domain_handle", "resume_handle", "max_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_EnumDomainAliases", discard_const_p(char *, kwnames), &py_domain_handle, &py_resume_handle, &py_max_size)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
	*r->in.resume_handle = PyInt_AsLong(py_resume_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_max_size, return false;);
	r->in.max_size = PyInt_AsLong(py_max_size);
	return true;
}

static PyObject *unpack_py_samr_EnumDomainAliases_args_out(struct samr_EnumDomainAliases *r)
{
	PyObject *result;
	PyObject *py_resume_handle;
	PyObject *py_sam;
	PyObject *py_num_entries;
	result = PyTuple_New(3);
	py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
	PyTuple_SetItem(result, 0, py_resume_handle);
	if (*r->out.sam == NULL) {
		py_sam = Py_None;
		Py_INCREF(py_sam);
	} else {
		py_sam = py_talloc_reference_ex(&samr_SamArray_Type, *r->out.sam, *r->out.sam);
	}
	PyTuple_SetItem(result, 1, py_sam);
	py_num_entries = PyInt_FromLong(*r->out.num_entries);
	PyTuple_SetItem(result, 2, py_num_entries);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_GetAliasMembership_args_in(PyObject *args, PyObject *kwargs, struct samr_GetAliasMembership *r)
{
	PyObject *py_domain_handle;
	PyObject *py_sids;
	const char *kwnames[] = {
		"domain_handle", "sids", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_GetAliasMembership", discard_const_p(char *, kwnames), &py_domain_handle, &py_sids)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.sids = talloc_ptrtype(r, r->in.sids);
	PY_CHECK_TYPE(lsa_SidArray_Type, py_sids, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_sids)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.sids = (struct lsa_SidArray *)py_talloc_get_ptr(py_sids);
	return true;
}

static PyObject *unpack_py_samr_GetAliasMembership_args_out(struct samr_GetAliasMembership *r)
{
	PyObject *result;
	PyObject *py_rids;
	py_rids = py_talloc_reference_ex(&samr_Ids_Type, r->out.rids, r->out.rids);
	result = py_rids;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_LookupNames_args_in(PyObject *args, PyObject *kwargs, struct samr_LookupNames *r)
{
	PyObject *py_domain_handle;
	PyObject *py_names;
	const char *kwnames[] = {
		"domain_handle", "names", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_LookupNames", discard_const_p(char *, kwnames), &py_domain_handle, &py_names)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	PY_CHECK_TYPE(&PyList_Type, py_names, return false;);
	r->in.num_names = PyList_GET_SIZE(py_names);
	PY_CHECK_TYPE(&PyList_Type, py_names, return false;);
	{
		int names_cntr_0;
		r->in.names = talloc_array_ptrtype(r, r->in.names, PyList_GET_SIZE(py_names));
		if (!r->in.names) { return false;; }
		talloc_set_name_const(r->in.names, "ARRAY: r->in.names");
		for (names_cntr_0 = 0; names_cntr_0 < PyList_GET_SIZE(py_names); names_cntr_0++) {
			PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(py_names, names_cntr_0), return false;);
			if (talloc_reference(r->in.names, py_talloc_get_mem_ctx(PyList_GET_ITEM(py_names, names_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.names[names_cntr_0] = *(struct lsa_String *)py_talloc_get_ptr(PyList_GET_ITEM(py_names, names_cntr_0));
		}
	}
	return true;
}

static PyObject *unpack_py_samr_LookupNames_args_out(struct samr_LookupNames *r)
{
	PyObject *result;
	PyObject *py_rids;
	PyObject *py_types;
	result = PyTuple_New(2);
	py_rids = py_talloc_reference_ex(&samr_Ids_Type, r->out.rids, r->out.rids);
	PyTuple_SetItem(result, 0, py_rids);
	py_types = py_talloc_reference_ex(&samr_Ids_Type, r->out.types, r->out.types);
	PyTuple_SetItem(result, 1, py_types);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_LookupRids_args_in(PyObject *args, PyObject *kwargs, struct samr_LookupRids *r)
{
	PyObject *py_domain_handle;
	PyObject *py_rids;
	const char *kwnames[] = {
		"domain_handle", "rids", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_LookupRids", discard_const_p(char *, kwnames), &py_domain_handle, &py_rids)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	PY_CHECK_TYPE(&PyList_Type, py_rids, return false;);
	r->in.num_rids = PyList_GET_SIZE(py_rids);
	PY_CHECK_TYPE(&PyList_Type, py_rids, return false;);
	{
		int rids_cntr_0;
		r->in.rids = talloc_array_ptrtype(r, r->in.rids, PyList_GET_SIZE(py_rids));
		if (!r->in.rids) { return false;; }
		talloc_set_name_const(r->in.rids, "ARRAY: r->in.rids");
		for (rids_cntr_0 = 0; rids_cntr_0 < PyList_GET_SIZE(py_rids); rids_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_rids, rids_cntr_0), return false;);
			r->in.rids[rids_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(py_rids, rids_cntr_0));
		}
	}
	return true;
}

static PyObject *unpack_py_samr_LookupRids_args_out(struct samr_LookupRids *r)
{
	PyObject *result;
	PyObject *py_names;
	PyObject *py_types;
	result = PyTuple_New(2);
	py_names = py_talloc_reference_ex(lsa_Strings_Type, r->out.names, r->out.names);
	PyTuple_SetItem(result, 0, py_names);
	py_types = py_talloc_reference_ex(&samr_Ids_Type, r->out.types, r->out.types);
	PyTuple_SetItem(result, 1, py_types);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_OpenGroup_args_in(PyObject *args, PyObject *kwargs, struct samr_OpenGroup *r)
{
	PyObject *py_domain_handle;
	PyObject *py_access_mask;
	PyObject *py_rid;
	const char *kwnames[] = {
		"domain_handle", "access_mask", "rid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_OpenGroup", discard_const_p(char *, kwnames), &py_domain_handle, &py_access_mask, &py_rid)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_rid, return false;);
	r->in.rid = PyInt_AsLong(py_rid);
	return true;
}

static PyObject *unpack_py_samr_OpenGroup_args_out(struct samr_OpenGroup *r)
{
	PyObject *result;
	PyObject *py_group_handle;
	py_group_handle = py_talloc_reference_ex(policy_handle_Type, r->out.group_handle, r->out.group_handle);
	result = py_group_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryGroupInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryGroupInfo *r)
{
	PyObject *py_group_handle;
	PyObject *py_level;
	const char *kwnames[] = {
		"group_handle", "level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_QueryGroupInfo", discard_const_p(char *, kwnames), &py_group_handle, &py_level)) {
		return false;
	}

	r->in.group_handle = talloc_ptrtype(r, r->in.group_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_group_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_group_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.group_handle = (struct policy_handle *)py_talloc_get_ptr(py_group_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_QueryGroupInfo_args_out(struct samr_QueryGroupInfo *r)
{
	PyObject *result;
	PyObject *py_info;
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_samr_GroupInfo(*r->out.info, r->in.level, *r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	result = py_info;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetGroupInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_SetGroupInfo *r)
{
	PyObject *py_group_handle;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"group_handle", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_SetGroupInfo", discard_const_p(char *, kwnames), &py_group_handle, &py_level, &py_info)) {
		return false;
	}

	r->in.group_handle = talloc_ptrtype(r, r->in.group_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_group_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_group_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.group_handle = (struct policy_handle *)py_talloc_get_ptr(py_group_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.info = talloc_ptrtype(r, r->in.info);
	{
		union samr_GroupInfo *info_switch_1;
		info_switch_1 = py_export_samr_GroupInfo(r, r->in.level, py_info);
		if (info_switch_1 == NULL) {
			return false;
		}
		r->in.info = info_switch_1;
	}
	return true;
}

static PyObject *unpack_py_samr_SetGroupInfo_args_out(struct samr_SetGroupInfo *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_AddGroupMember_args_in(PyObject *args, PyObject *kwargs, struct samr_AddGroupMember *r)
{
	PyObject *py_group_handle;
	PyObject *py_rid;
	PyObject *py_flags;
	const char *kwnames[] = {
		"group_handle", "rid", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_AddGroupMember", discard_const_p(char *, kwnames), &py_group_handle, &py_rid, &py_flags)) {
		return false;
	}

	r->in.group_handle = talloc_ptrtype(r, r->in.group_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_group_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_group_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.group_handle = (struct policy_handle *)py_talloc_get_ptr(py_group_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_rid, return false;);
	r->in.rid = PyInt_AsLong(py_rid);
	PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
	r->in.flags = PyInt_AsLong(py_flags);
	return true;
}

static PyObject *unpack_py_samr_AddGroupMember_args_out(struct samr_AddGroupMember *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_DeleteDomainGroup_args_in(PyObject *args, PyObject *kwargs, struct samr_DeleteDomainGroup *r)
{
	PyObject *py_group_handle;
	const char *kwnames[] = {
		"group_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_DeleteDomainGroup", discard_const_p(char *, kwnames), &py_group_handle)) {
		return false;
	}

	r->in.group_handle = talloc_ptrtype(r, r->in.group_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_group_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_group_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.group_handle = (struct policy_handle *)py_talloc_get_ptr(py_group_handle);
	return true;
}

static PyObject *unpack_py_samr_DeleteDomainGroup_args_out(struct samr_DeleteDomainGroup *r)
{
	PyObject *result;
	PyObject *py_group_handle;
	py_group_handle = py_talloc_reference_ex(policy_handle_Type, r->out.group_handle, r->out.group_handle);
	result = py_group_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_DeleteGroupMember_args_in(PyObject *args, PyObject *kwargs, struct samr_DeleteGroupMember *r)
{
	PyObject *py_group_handle;
	PyObject *py_rid;
	const char *kwnames[] = {
		"group_handle", "rid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_DeleteGroupMember", discard_const_p(char *, kwnames), &py_group_handle, &py_rid)) {
		return false;
	}

	r->in.group_handle = talloc_ptrtype(r, r->in.group_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_group_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_group_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.group_handle = (struct policy_handle *)py_talloc_get_ptr(py_group_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_rid, return false;);
	r->in.rid = PyInt_AsLong(py_rid);
	return true;
}

static PyObject *unpack_py_samr_DeleteGroupMember_args_out(struct samr_DeleteGroupMember *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryGroupMember_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryGroupMember *r)
{
	PyObject *py_group_handle;
	const char *kwnames[] = {
		"group_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_QueryGroupMember", discard_const_p(char *, kwnames), &py_group_handle)) {
		return false;
	}

	r->in.group_handle = talloc_ptrtype(r, r->in.group_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_group_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_group_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.group_handle = (struct policy_handle *)py_talloc_get_ptr(py_group_handle);
	return true;
}

static PyObject *unpack_py_samr_QueryGroupMember_args_out(struct samr_QueryGroupMember *r)
{
	PyObject *result;
	PyObject *py_rids;
	if (*r->out.rids == NULL) {
		py_rids = Py_None;
		Py_INCREF(py_rids);
	} else {
		py_rids = py_talloc_reference_ex(&samr_RidAttrArray_Type, *r->out.rids, *r->out.rids);
	}
	result = py_rids;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetMemberAttributesOfGroup_args_in(PyObject *args, PyObject *kwargs, struct samr_SetMemberAttributesOfGroup *r)
{
	PyObject *py_group_handle;
	PyObject *py_unknown1;
	PyObject *py_unknown2;
	const char *kwnames[] = {
		"group_handle", "unknown1", "unknown2", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_SetMemberAttributesOfGroup", discard_const_p(char *, kwnames), &py_group_handle, &py_unknown1, &py_unknown2)) {
		return false;
	}

	r->in.group_handle = talloc_ptrtype(r, r->in.group_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_group_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_group_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.group_handle = (struct policy_handle *)py_talloc_get_ptr(py_group_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_unknown1, return false;);
	r->in.unknown1 = PyInt_AsLong(py_unknown1);
	PY_CHECK_TYPE(&PyInt_Type, py_unknown2, return false;);
	r->in.unknown2 = PyInt_AsLong(py_unknown2);
	return true;
}

static PyObject *unpack_py_samr_SetMemberAttributesOfGroup_args_out(struct samr_SetMemberAttributesOfGroup *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_OpenAlias_args_in(PyObject *args, PyObject *kwargs, struct samr_OpenAlias *r)
{
	PyObject *py_domain_handle;
	PyObject *py_access_mask;
	PyObject *py_rid;
	const char *kwnames[] = {
		"domain_handle", "access_mask", "rid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_OpenAlias", discard_const_p(char *, kwnames), &py_domain_handle, &py_access_mask, &py_rid)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_rid, return false;);
	r->in.rid = PyInt_AsLong(py_rid);
	return true;
}

static PyObject *unpack_py_samr_OpenAlias_args_out(struct samr_OpenAlias *r)
{
	PyObject *result;
	PyObject *py_alias_handle;
	py_alias_handle = py_talloc_reference_ex(policy_handle_Type, r->out.alias_handle, r->out.alias_handle);
	result = py_alias_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryAliasInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryAliasInfo *r)
{
	PyObject *py_alias_handle;
	PyObject *py_level;
	const char *kwnames[] = {
		"alias_handle", "level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_QueryAliasInfo", discard_const_p(char *, kwnames), &py_alias_handle, &py_level)) {
		return false;
	}

	r->in.alias_handle = talloc_ptrtype(r, r->in.alias_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_alias_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_handle = (struct policy_handle *)py_talloc_get_ptr(py_alias_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_QueryAliasInfo_args_out(struct samr_QueryAliasInfo *r)
{
	PyObject *result;
	PyObject *py_info;
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_samr_AliasInfo(*r->out.info, r->in.level, *r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	result = py_info;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetAliasInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_SetAliasInfo *r)
{
	PyObject *py_alias_handle;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"alias_handle", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_SetAliasInfo", discard_const_p(char *, kwnames), &py_alias_handle, &py_level, &py_info)) {
		return false;
	}

	r->in.alias_handle = talloc_ptrtype(r, r->in.alias_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_alias_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_handle = (struct policy_handle *)py_talloc_get_ptr(py_alias_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.info = talloc_ptrtype(r, r->in.info);
	{
		union samr_AliasInfo *info_switch_1;
		info_switch_1 = py_export_samr_AliasInfo(r, r->in.level, py_info);
		if (info_switch_1 == NULL) {
			return false;
		}
		r->in.info = info_switch_1;
	}
	return true;
}

static PyObject *unpack_py_samr_SetAliasInfo_args_out(struct samr_SetAliasInfo *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_DeleteDomAlias_args_in(PyObject *args, PyObject *kwargs, struct samr_DeleteDomAlias *r)
{
	PyObject *py_alias_handle;
	const char *kwnames[] = {
		"alias_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_DeleteDomAlias", discard_const_p(char *, kwnames), &py_alias_handle)) {
		return false;
	}

	r->in.alias_handle = talloc_ptrtype(r, r->in.alias_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_alias_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_handle = (struct policy_handle *)py_talloc_get_ptr(py_alias_handle);
	return true;
}

static PyObject *unpack_py_samr_DeleteDomAlias_args_out(struct samr_DeleteDomAlias *r)
{
	PyObject *result;
	PyObject *py_alias_handle;
	py_alias_handle = py_talloc_reference_ex(policy_handle_Type, r->out.alias_handle, r->out.alias_handle);
	result = py_alias_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_AddAliasMember_args_in(PyObject *args, PyObject *kwargs, struct samr_AddAliasMember *r)
{
	PyObject *py_alias_handle;
	PyObject *py_sid;
	const char *kwnames[] = {
		"alias_handle", "sid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_AddAliasMember", discard_const_p(char *, kwnames), &py_alias_handle, &py_sid)) {
		return false;
	}

	r->in.alias_handle = talloc_ptrtype(r, r->in.alias_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_alias_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_handle = (struct policy_handle *)py_talloc_get_ptr(py_alias_handle);
	r->in.sid = talloc_ptrtype(r, r->in.sid);
	PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_sid)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.sid = (struct dom_sid *)py_talloc_get_ptr(py_sid);
	return true;
}

static PyObject *unpack_py_samr_AddAliasMember_args_out(struct samr_AddAliasMember *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_DeleteAliasMember_args_in(PyObject *args, PyObject *kwargs, struct samr_DeleteAliasMember *r)
{
	PyObject *py_alias_handle;
	PyObject *py_sid;
	const char *kwnames[] = {
		"alias_handle", "sid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_DeleteAliasMember", discard_const_p(char *, kwnames), &py_alias_handle, &py_sid)) {
		return false;
	}

	r->in.alias_handle = talloc_ptrtype(r, r->in.alias_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_alias_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_handle = (struct policy_handle *)py_talloc_get_ptr(py_alias_handle);
	r->in.sid = talloc_ptrtype(r, r->in.sid);
	PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_sid)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.sid = (struct dom_sid *)py_talloc_get_ptr(py_sid);
	return true;
}

static PyObject *unpack_py_samr_DeleteAliasMember_args_out(struct samr_DeleteAliasMember *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_GetMembersInAlias_args_in(PyObject *args, PyObject *kwargs, struct samr_GetMembersInAlias *r)
{
	PyObject *py_alias_handle;
	const char *kwnames[] = {
		"alias_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_GetMembersInAlias", discard_const_p(char *, kwnames), &py_alias_handle)) {
		return false;
	}

	r->in.alias_handle = talloc_ptrtype(r, r->in.alias_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_alias_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_handle = (struct policy_handle *)py_talloc_get_ptr(py_alias_handle);
	return true;
}

static PyObject *unpack_py_samr_GetMembersInAlias_args_out(struct samr_GetMembersInAlias *r)
{
	PyObject *result;
	PyObject *py_sids;
	py_sids = py_talloc_reference_ex(lsa_SidArray_Type, r->out.sids, r->out.sids);
	result = py_sids;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_OpenUser_args_in(PyObject *args, PyObject *kwargs, struct samr_OpenUser *r)
{
	PyObject *py_domain_handle;
	PyObject *py_access_mask;
	PyObject *py_rid;
	const char *kwnames[] = {
		"domain_handle", "access_mask", "rid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_OpenUser", discard_const_p(char *, kwnames), &py_domain_handle, &py_access_mask, &py_rid)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_rid, return false;);
	r->in.rid = PyInt_AsLong(py_rid);
	return true;
}

static PyObject *unpack_py_samr_OpenUser_args_out(struct samr_OpenUser *r)
{
	PyObject *result;
	PyObject *py_user_handle;
	py_user_handle = py_talloc_reference_ex(policy_handle_Type, r->out.user_handle, r->out.user_handle);
	result = py_user_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_DeleteUser_args_in(PyObject *args, PyObject *kwargs, struct samr_DeleteUser *r)
{
	PyObject *py_user_handle;
	const char *kwnames[] = {
		"user_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_DeleteUser", discard_const_p(char *, kwnames), &py_user_handle)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	return true;
}

static PyObject *unpack_py_samr_DeleteUser_args_out(struct samr_DeleteUser *r)
{
	PyObject *result;
	PyObject *py_user_handle;
	py_user_handle = py_talloc_reference_ex(policy_handle_Type, r->out.user_handle, r->out.user_handle);
	result = py_user_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryUserInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryUserInfo *r)
{
	PyObject *py_user_handle;
	PyObject *py_level;
	const char *kwnames[] = {
		"user_handle", "level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_QueryUserInfo", discard_const_p(char *, kwnames), &py_user_handle, &py_level)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_QueryUserInfo_args_out(struct samr_QueryUserInfo *r)
{
	PyObject *result;
	PyObject *py_info;
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_samr_UserInfo(*r->out.info, r->in.level, *r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	result = py_info;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetUserInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_SetUserInfo *r)
{
	PyObject *py_user_handle;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"user_handle", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_SetUserInfo", discard_const_p(char *, kwnames), &py_user_handle, &py_level, &py_info)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.info = talloc_ptrtype(r, r->in.info);
	{
		union samr_UserInfo *info_switch_1;
		info_switch_1 = py_export_samr_UserInfo(r, r->in.level, py_info);
		if (info_switch_1 == NULL) {
			return false;
		}
		r->in.info = info_switch_1;
	}
	return true;
}

static PyObject *unpack_py_samr_SetUserInfo_args_out(struct samr_SetUserInfo *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_ChangePasswordUser_args_in(PyObject *args, PyObject *kwargs, struct samr_ChangePasswordUser *r)
{
	PyObject *py_user_handle;
	PyObject *py_lm_present;
	PyObject *py_old_lm_crypted;
	PyObject *py_new_lm_crypted;
	PyObject *py_nt_present;
	PyObject *py_old_nt_crypted;
	PyObject *py_new_nt_crypted;
	PyObject *py_cross1_present;
	PyObject *py_nt_cross;
	PyObject *py_cross2_present;
	PyObject *py_lm_cross;
	const char *kwnames[] = {
		"user_handle", "lm_present", "old_lm_crypted", "new_lm_crypted", "nt_present", "old_nt_crypted", "new_nt_crypted", "cross1_present", "nt_cross", "cross2_present", "lm_cross", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOO:samr_ChangePasswordUser", discard_const_p(char *, kwnames), &py_user_handle, &py_lm_present, &py_old_lm_crypted, &py_new_lm_crypted, &py_nt_present, &py_old_nt_crypted, &py_new_nt_crypted, &py_cross1_present, &py_nt_cross, &py_cross2_present, &py_lm_cross)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_lm_present, return false;);
	r->in.lm_present = PyInt_AsLong(py_lm_present);
	if (py_old_lm_crypted == Py_None) {
		r->in.old_lm_crypted = NULL;
	} else {
		r->in.old_lm_crypted = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_old_lm_crypted, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_old_lm_crypted)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.old_lm_crypted = (struct samr_Password *)py_talloc_get_ptr(py_old_lm_crypted);
	}
	if (py_new_lm_crypted == Py_None) {
		r->in.new_lm_crypted = NULL;
	} else {
		r->in.new_lm_crypted = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_new_lm_crypted, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_new_lm_crypted)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.new_lm_crypted = (struct samr_Password *)py_talloc_get_ptr(py_new_lm_crypted);
	}
	PY_CHECK_TYPE(&PyInt_Type, py_nt_present, return false;);
	r->in.nt_present = PyInt_AsLong(py_nt_present);
	if (py_old_nt_crypted == Py_None) {
		r->in.old_nt_crypted = NULL;
	} else {
		r->in.old_nt_crypted = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_old_nt_crypted, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_old_nt_crypted)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.old_nt_crypted = (struct samr_Password *)py_talloc_get_ptr(py_old_nt_crypted);
	}
	if (py_new_nt_crypted == Py_None) {
		r->in.new_nt_crypted = NULL;
	} else {
		r->in.new_nt_crypted = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_new_nt_crypted, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_new_nt_crypted)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.new_nt_crypted = (struct samr_Password *)py_talloc_get_ptr(py_new_nt_crypted);
	}
	PY_CHECK_TYPE(&PyInt_Type, py_cross1_present, return false;);
	r->in.cross1_present = PyInt_AsLong(py_cross1_present);
	if (py_nt_cross == Py_None) {
		r->in.nt_cross = NULL;
	} else {
		r->in.nt_cross = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_nt_cross, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_nt_cross)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.nt_cross = (struct samr_Password *)py_talloc_get_ptr(py_nt_cross);
	}
	PY_CHECK_TYPE(&PyInt_Type, py_cross2_present, return false;);
	r->in.cross2_present = PyInt_AsLong(py_cross2_present);
	if (py_lm_cross == Py_None) {
		r->in.lm_cross = NULL;
	} else {
		r->in.lm_cross = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_lm_cross, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_lm_cross)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.lm_cross = (struct samr_Password *)py_talloc_get_ptr(py_lm_cross);
	}
	return true;
}

static PyObject *unpack_py_samr_ChangePasswordUser_args_out(struct samr_ChangePasswordUser *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_GetGroupsForUser_args_in(PyObject *args, PyObject *kwargs, struct samr_GetGroupsForUser *r)
{
	PyObject *py_user_handle;
	const char *kwnames[] = {
		"user_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_GetGroupsForUser", discard_const_p(char *, kwnames), &py_user_handle)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	return true;
}

static PyObject *unpack_py_samr_GetGroupsForUser_args_out(struct samr_GetGroupsForUser *r)
{
	PyObject *result;
	PyObject *py_rids;
	if (*r->out.rids == NULL) {
		py_rids = Py_None;
		Py_INCREF(py_rids);
	} else {
		py_rids = py_talloc_reference_ex(&samr_RidWithAttributeArray_Type, *r->out.rids, *r->out.rids);
	}
	result = py_rids;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryDisplayInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryDisplayInfo *r)
{
	PyObject *py_domain_handle;
	PyObject *py_level;
	PyObject *py_start_idx;
	PyObject *py_max_entries;
	PyObject *py_buf_size;
	const char *kwnames[] = {
		"domain_handle", "level", "start_idx", "max_entries", "buf_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:samr_QueryDisplayInfo", discard_const_p(char *, kwnames), &py_domain_handle, &py_level, &py_start_idx, &py_max_entries, &py_buf_size)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	PY_CHECK_TYPE(&PyInt_Type, py_start_idx, return false;);
	r->in.start_idx = PyInt_AsLong(py_start_idx);
	PY_CHECK_TYPE(&PyInt_Type, py_max_entries, return false;);
	r->in.max_entries = PyInt_AsLong(py_max_entries);
	PY_CHECK_TYPE(&PyInt_Type, py_buf_size, return false;);
	r->in.buf_size = PyInt_AsLong(py_buf_size);
	return true;
}

static PyObject *unpack_py_samr_QueryDisplayInfo_args_out(struct samr_QueryDisplayInfo *r)
{
	PyObject *result;
	PyObject *py_total_size;
	PyObject *py_returned_size;
	PyObject *py_info;
	result = PyTuple_New(3);
	py_total_size = PyInt_FromLong(*r->out.total_size);
	PyTuple_SetItem(result, 0, py_total_size);
	py_returned_size = PyInt_FromLong(*r->out.returned_size);
	PyTuple_SetItem(result, 1, py_returned_size);
	py_info = py_import_samr_DispInfo(r->out.info, r->in.level, r->out.info);
	if (py_info == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 2, py_info);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_GetDisplayEnumerationIndex_args_in(PyObject *args, PyObject *kwargs, struct samr_GetDisplayEnumerationIndex *r)
{
	PyObject *py_domain_handle;
	PyObject *py_level;
	PyObject *py_name;
	const char *kwnames[] = {
		"domain_handle", "level", "name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_GetDisplayEnumerationIndex", discard_const_p(char *, kwnames), &py_domain_handle, &py_level, &py_name)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.name = talloc_ptrtype(r, r->in.name);
	PY_CHECK_TYPE(lsa_String_Type, py_name, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_name)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.name = (struct lsa_String *)py_talloc_get_ptr(py_name);
	return true;
}

static PyObject *unpack_py_samr_GetDisplayEnumerationIndex_args_out(struct samr_GetDisplayEnumerationIndex *r)
{
	PyObject *result;
	PyObject *py_idx;
	py_idx = PyInt_FromLong(*r->out.idx);
	result = py_idx;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_TestPrivateFunctionsDomain_args_in(PyObject *args, PyObject *kwargs, struct samr_TestPrivateFunctionsDomain *r)
{
	PyObject *py_domain_handle;
	const char *kwnames[] = {
		"domain_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_TestPrivateFunctionsDomain", discard_const_p(char *, kwnames), &py_domain_handle)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	return true;
}

static PyObject *unpack_py_samr_TestPrivateFunctionsDomain_args_out(struct samr_TestPrivateFunctionsDomain *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_TestPrivateFunctionsUser_args_in(PyObject *args, PyObject *kwargs, struct samr_TestPrivateFunctionsUser *r)
{
	PyObject *py_user_handle;
	const char *kwnames[] = {
		"user_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_TestPrivateFunctionsUser", discard_const_p(char *, kwnames), &py_user_handle)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	return true;
}

static PyObject *unpack_py_samr_TestPrivateFunctionsUser_args_out(struct samr_TestPrivateFunctionsUser *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_GetUserPwInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_GetUserPwInfo *r)
{
	PyObject *py_user_handle;
	const char *kwnames[] = {
		"user_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_GetUserPwInfo", discard_const_p(char *, kwnames), &py_user_handle)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	return true;
}

static PyObject *unpack_py_samr_GetUserPwInfo_args_out(struct samr_GetUserPwInfo *r)
{
	PyObject *result;
	PyObject *py_info;
	py_info = py_talloc_reference_ex(&samr_PwInfo_Type, r->out.info, r->out.info);
	result = py_info;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_RemoveMemberFromForeignDomain_args_in(PyObject *args, PyObject *kwargs, struct samr_RemoveMemberFromForeignDomain *r)
{
	PyObject *py_domain_handle;
	PyObject *py_sid;
	const char *kwnames[] = {
		"domain_handle", "sid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_RemoveMemberFromForeignDomain", discard_const_p(char *, kwnames), &py_domain_handle, &py_sid)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.sid = talloc_ptrtype(r, r->in.sid);
	PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_sid)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.sid = (struct dom_sid *)py_talloc_get_ptr(py_sid);
	return true;
}

static PyObject *unpack_py_samr_RemoveMemberFromForeignDomain_args_out(struct samr_RemoveMemberFromForeignDomain *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryDomainInfo2_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryDomainInfo2 *r)
{
	PyObject *py_domain_handle;
	PyObject *py_level;
	const char *kwnames[] = {
		"domain_handle", "level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_QueryDomainInfo2", discard_const_p(char *, kwnames), &py_domain_handle, &py_level)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_QueryDomainInfo2_args_out(struct samr_QueryDomainInfo2 *r)
{
	PyObject *result;
	PyObject *py_info;
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_samr_DomainInfo(*r->out.info, r->in.level, *r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	result = py_info;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryUserInfo2_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryUserInfo2 *r)
{
	PyObject *py_user_handle;
	PyObject *py_level;
	const char *kwnames[] = {
		"user_handle", "level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_QueryUserInfo2", discard_const_p(char *, kwnames), &py_user_handle, &py_level)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_QueryUserInfo2_args_out(struct samr_QueryUserInfo2 *r)
{
	PyObject *result;
	PyObject *py_info;
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_samr_UserInfo(*r->out.info, r->in.level, *r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	result = py_info;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryDisplayInfo2_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryDisplayInfo2 *r)
{
	PyObject *py_domain_handle;
	PyObject *py_level;
	PyObject *py_start_idx;
	PyObject *py_max_entries;
	PyObject *py_buf_size;
	const char *kwnames[] = {
		"domain_handle", "level", "start_idx", "max_entries", "buf_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:samr_QueryDisplayInfo2", discard_const_p(char *, kwnames), &py_domain_handle, &py_level, &py_start_idx, &py_max_entries, &py_buf_size)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	PY_CHECK_TYPE(&PyInt_Type, py_start_idx, return false;);
	r->in.start_idx = PyInt_AsLong(py_start_idx);
	PY_CHECK_TYPE(&PyInt_Type, py_max_entries, return false;);
	r->in.max_entries = PyInt_AsLong(py_max_entries);
	PY_CHECK_TYPE(&PyInt_Type, py_buf_size, return false;);
	r->in.buf_size = PyInt_AsLong(py_buf_size);
	return true;
}

static PyObject *unpack_py_samr_QueryDisplayInfo2_args_out(struct samr_QueryDisplayInfo2 *r)
{
	PyObject *result;
	PyObject *py_total_size;
	PyObject *py_returned_size;
	PyObject *py_info;
	result = PyTuple_New(3);
	py_total_size = PyInt_FromLong(*r->out.total_size);
	PyTuple_SetItem(result, 0, py_total_size);
	py_returned_size = PyInt_FromLong(*r->out.returned_size);
	PyTuple_SetItem(result, 1, py_returned_size);
	py_info = py_import_samr_DispInfo(r->out.info, r->in.level, r->out.info);
	if (py_info == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 2, py_info);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_GetDisplayEnumerationIndex2_args_in(PyObject *args, PyObject *kwargs, struct samr_GetDisplayEnumerationIndex2 *r)
{
	PyObject *py_domain_handle;
	PyObject *py_level;
	PyObject *py_name;
	const char *kwnames[] = {
		"domain_handle", "level", "name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_GetDisplayEnumerationIndex2", discard_const_p(char *, kwnames), &py_domain_handle, &py_level, &py_name)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.name = talloc_ptrtype(r, r->in.name);
	PY_CHECK_TYPE(lsa_String_Type, py_name, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_name)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.name = (struct lsa_String *)py_talloc_get_ptr(py_name);
	return true;
}

static PyObject *unpack_py_samr_GetDisplayEnumerationIndex2_args_out(struct samr_GetDisplayEnumerationIndex2 *r)
{
	PyObject *result;
	PyObject *py_idx;
	py_idx = PyInt_FromLong(*r->out.idx);
	result = py_idx;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_CreateUser2_args_in(PyObject *args, PyObject *kwargs, struct samr_CreateUser2 *r)
{
	PyObject *py_domain_handle;
	PyObject *py_account_name;
	PyObject *py_acct_flags;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"domain_handle", "account_name", "acct_flags", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:samr_CreateUser2", discard_const_p(char *, kwnames), &py_domain_handle, &py_account_name, &py_acct_flags, &py_access_mask)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	PY_CHECK_TYPE(lsa_String_Type, py_account_name, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_account_name)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.account_name = (struct lsa_String *)py_talloc_get_ptr(py_account_name);
	if (PyLong_Check(py_acct_flags)) {
		r->in.acct_flags = PyLong_AsLongLong(py_acct_flags);
	} else if (PyInt_Check(py_acct_flags)) {
		r->in.acct_flags = PyInt_AsLong(py_acct_flags);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_CreateUser2_args_out(struct samr_CreateUser2 *r)
{
	PyObject *result;
	PyObject *py_user_handle;
	PyObject *py_access_granted;
	PyObject *py_rid;
	result = PyTuple_New(3);
	py_user_handle = py_talloc_reference_ex(policy_handle_Type, r->out.user_handle, r->out.user_handle);
	PyTuple_SetItem(result, 0, py_user_handle);
	py_access_granted = PyInt_FromLong(*r->out.access_granted);
	PyTuple_SetItem(result, 1, py_access_granted);
	py_rid = PyInt_FromLong(*r->out.rid);
	PyTuple_SetItem(result, 2, py_rid);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_QueryDisplayInfo3_args_in(PyObject *args, PyObject *kwargs, struct samr_QueryDisplayInfo3 *r)
{
	PyObject *py_domain_handle;
	PyObject *py_level;
	PyObject *py_start_idx;
	PyObject *py_max_entries;
	PyObject *py_buf_size;
	const char *kwnames[] = {
		"domain_handle", "level", "start_idx", "max_entries", "buf_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:samr_QueryDisplayInfo3", discard_const_p(char *, kwnames), &py_domain_handle, &py_level, &py_start_idx, &py_max_entries, &py_buf_size)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	PY_CHECK_TYPE(&PyInt_Type, py_start_idx, return false;);
	r->in.start_idx = PyInt_AsLong(py_start_idx);
	PY_CHECK_TYPE(&PyInt_Type, py_max_entries, return false;);
	r->in.max_entries = PyInt_AsLong(py_max_entries);
	PY_CHECK_TYPE(&PyInt_Type, py_buf_size, return false;);
	r->in.buf_size = PyInt_AsLong(py_buf_size);
	return true;
}

static PyObject *unpack_py_samr_QueryDisplayInfo3_args_out(struct samr_QueryDisplayInfo3 *r)
{
	PyObject *result;
	PyObject *py_total_size;
	PyObject *py_returned_size;
	PyObject *py_info;
	result = PyTuple_New(3);
	py_total_size = PyInt_FromLong(*r->out.total_size);
	PyTuple_SetItem(result, 0, py_total_size);
	py_returned_size = PyInt_FromLong(*r->out.returned_size);
	PyTuple_SetItem(result, 1, py_returned_size);
	py_info = py_import_samr_DispInfo(r->out.info, r->in.level, r->out.info);
	if (py_info == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 2, py_info);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_AddMultipleMembersToAlias_args_in(PyObject *args, PyObject *kwargs, struct samr_AddMultipleMembersToAlias *r)
{
	PyObject *py_alias_handle;
	PyObject *py_sids;
	const char *kwnames[] = {
		"alias_handle", "sids", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_AddMultipleMembersToAlias", discard_const_p(char *, kwnames), &py_alias_handle, &py_sids)) {
		return false;
	}

	r->in.alias_handle = talloc_ptrtype(r, r->in.alias_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_alias_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_handle = (struct policy_handle *)py_talloc_get_ptr(py_alias_handle);
	r->in.sids = talloc_ptrtype(r, r->in.sids);
	PY_CHECK_TYPE(lsa_SidArray_Type, py_sids, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_sids)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.sids = (struct lsa_SidArray *)py_talloc_get_ptr(py_sids);
	return true;
}

static PyObject *unpack_py_samr_AddMultipleMembersToAlias_args_out(struct samr_AddMultipleMembersToAlias *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_RemoveMultipleMembersFromAlias_args_in(PyObject *args, PyObject *kwargs, struct samr_RemoveMultipleMembersFromAlias *r)
{
	PyObject *py_alias_handle;
	PyObject *py_sids;
	const char *kwnames[] = {
		"alias_handle", "sids", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_RemoveMultipleMembersFromAlias", discard_const_p(char *, kwnames), &py_alias_handle, &py_sids)) {
		return false;
	}

	r->in.alias_handle = talloc_ptrtype(r, r->in.alias_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_alias_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_alias_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.alias_handle = (struct policy_handle *)py_talloc_get_ptr(py_alias_handle);
	r->in.sids = talloc_ptrtype(r, r->in.sids);
	PY_CHECK_TYPE(lsa_SidArray_Type, py_sids, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_sids)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.sids = (struct lsa_SidArray *)py_talloc_get_ptr(py_sids);
	return true;
}

static PyObject *unpack_py_samr_RemoveMultipleMembersFromAlias_args_out(struct samr_RemoveMultipleMembersFromAlias *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_OemChangePasswordUser2_args_in(PyObject *args, PyObject *kwargs, struct samr_OemChangePasswordUser2 *r)
{
	PyObject *py_server;
	PyObject *py_account;
	PyObject *py_password;
	PyObject *py_hash;
	const char *kwnames[] = {
		"server", "account", "password", "hash", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:samr_OemChangePasswordUser2", discard_const_p(char *, kwnames), &py_server, &py_account, &py_password, &py_hash)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		PY_CHECK_TYPE(lsa_AsciiString_Type, py_server, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_server)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.server = (struct lsa_AsciiString *)py_talloc_get_ptr(py_server);
	}
	r->in.account = talloc_ptrtype(r, r->in.account);
	PY_CHECK_TYPE(lsa_AsciiString_Type, py_account, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_account)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.account = (struct lsa_AsciiString *)py_talloc_get_ptr(py_account);
	if (py_password == Py_None) {
		r->in.password = NULL;
	} else {
		r->in.password = NULL;
		PY_CHECK_TYPE(&samr_CryptPassword_Type, py_password, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_password)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.password = (struct samr_CryptPassword *)py_talloc_get_ptr(py_password);
	}
	if (py_hash == Py_None) {
		r->in.hash = NULL;
	} else {
		r->in.hash = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_hash, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_hash)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.hash = (struct samr_Password *)py_talloc_get_ptr(py_hash);
	}
	return true;
}

static PyObject *unpack_py_samr_OemChangePasswordUser2_args_out(struct samr_OemChangePasswordUser2 *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_ChangePasswordUser2_args_in(PyObject *args, PyObject *kwargs, struct samr_ChangePasswordUser2 *r)
{
	PyObject *py_server;
	PyObject *py_account;
	PyObject *py_nt_password;
	PyObject *py_nt_verifier;
	PyObject *py_lm_change;
	PyObject *py_lm_password;
	PyObject *py_lm_verifier;
	const char *kwnames[] = {
		"server", "account", "nt_password", "nt_verifier", "lm_change", "lm_password", "lm_verifier", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:samr_ChangePasswordUser2", discard_const_p(char *, kwnames), &py_server, &py_account, &py_nt_password, &py_nt_verifier, &py_lm_change, &py_lm_password, &py_lm_verifier)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		PY_CHECK_TYPE(lsa_String_Type, py_server, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_server)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.server = (struct lsa_String *)py_talloc_get_ptr(py_server);
	}
	r->in.account = talloc_ptrtype(r, r->in.account);
	PY_CHECK_TYPE(lsa_String_Type, py_account, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_account)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.account = (struct lsa_String *)py_talloc_get_ptr(py_account);
	if (py_nt_password == Py_None) {
		r->in.nt_password = NULL;
	} else {
		r->in.nt_password = NULL;
		PY_CHECK_TYPE(&samr_CryptPassword_Type, py_nt_password, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_nt_password)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.nt_password = (struct samr_CryptPassword *)py_talloc_get_ptr(py_nt_password);
	}
	if (py_nt_verifier == Py_None) {
		r->in.nt_verifier = NULL;
	} else {
		r->in.nt_verifier = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_nt_verifier, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_nt_verifier)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.nt_verifier = (struct samr_Password *)py_talloc_get_ptr(py_nt_verifier);
	}
	PY_CHECK_TYPE(&PyInt_Type, py_lm_change, return false;);
	r->in.lm_change = PyInt_AsLong(py_lm_change);
	if (py_lm_password == Py_None) {
		r->in.lm_password = NULL;
	} else {
		r->in.lm_password = NULL;
		PY_CHECK_TYPE(&samr_CryptPassword_Type, py_lm_password, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_lm_password)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.lm_password = (struct samr_CryptPassword *)py_talloc_get_ptr(py_lm_password);
	}
	if (py_lm_verifier == Py_None) {
		r->in.lm_verifier = NULL;
	} else {
		r->in.lm_verifier = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_lm_verifier, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_lm_verifier)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.lm_verifier = (struct samr_Password *)py_talloc_get_ptr(py_lm_verifier);
	}
	return true;
}

static PyObject *unpack_py_samr_ChangePasswordUser2_args_out(struct samr_ChangePasswordUser2 *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_GetDomPwInfo_args_in(PyObject *args, PyObject *kwargs, struct samr_GetDomPwInfo *r)
{
	PyObject *py_domain_name;
	const char *kwnames[] = {
		"domain_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_GetDomPwInfo", discard_const_p(char *, kwnames), &py_domain_name)) {
		return false;
	}

	if (py_domain_name == Py_None) {
		r->in.domain_name = NULL;
	} else {
		r->in.domain_name = NULL;
		PY_CHECK_TYPE(lsa_String_Type, py_domain_name, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_name)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.domain_name = (struct lsa_String *)py_talloc_get_ptr(py_domain_name);
	}
	return true;
}

static PyObject *unpack_py_samr_GetDomPwInfo_args_out(struct samr_GetDomPwInfo *r)
{
	PyObject *result;
	PyObject *py_info;
	py_info = py_talloc_reference_ex(&samr_PwInfo_Type, r->out.info, r->out.info);
	result = py_info;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_Connect2_args_in(PyObject *args, PyObject *kwargs, struct samr_Connect2 *r)
{
	PyObject *py_system_name;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"system_name", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_Connect2", discard_const_p(char *, kwnames), &py_system_name, &py_access_mask)) {
		return false;
	}

	if (py_system_name == Py_None) {
		r->in.system_name = NULL;
	} else {
		r->in.system_name = NULL;
		if (PyUnicode_Check(py_system_name)) {
			r->in.system_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_system_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_system_name)) {
			r->in.system_name = PyString_AS_STRING(py_system_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_system_name)->tp_name);
			return false;
		}
	}
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_Connect2_args_out(struct samr_Connect2 *r)
{
	PyObject *result;
	PyObject *py_connect_handle;
	py_connect_handle = py_talloc_reference_ex(policy_handle_Type, r->out.connect_handle, r->out.connect_handle);
	result = py_connect_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetUserInfo2_args_in(PyObject *args, PyObject *kwargs, struct samr_SetUserInfo2 *r)
{
	PyObject *py_user_handle;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"user_handle", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_SetUserInfo2", discard_const_p(char *, kwnames), &py_user_handle, &py_level, &py_info)) {
		return false;
	}

	r->in.user_handle = talloc_ptrtype(r, r->in.user_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_user_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_user_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.user_handle = (struct policy_handle *)py_talloc_get_ptr(py_user_handle);
	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.info = talloc_ptrtype(r, r->in.info);
	{
		union samr_UserInfo *info_switch_1;
		info_switch_1 = py_export_samr_UserInfo(r, r->in.level, py_info);
		if (info_switch_1 == NULL) {
			return false;
		}
		r->in.info = info_switch_1;
	}
	return true;
}

static PyObject *unpack_py_samr_SetUserInfo2_args_out(struct samr_SetUserInfo2 *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetBootKeyInformation_args_in(PyObject *args, PyObject *kwargs, struct samr_SetBootKeyInformation *r)
{
	PyObject *py_connect_handle;
	PyObject *py_unknown1;
	PyObject *py_unknown2;
	PyObject *py_unknown3;
	const char *kwnames[] = {
		"connect_handle", "unknown1", "unknown2", "unknown3", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:samr_SetBootKeyInformation", discard_const_p(char *, kwnames), &py_connect_handle, &py_unknown1, &py_unknown2, &py_unknown3)) {
		return false;
	}

	r->in.connect_handle = talloc_ptrtype(r, r->in.connect_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_connect_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_connect_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.connect_handle = (struct policy_handle *)py_talloc_get_ptr(py_connect_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_unknown1, return false;);
	r->in.unknown1 = PyInt_AsLong(py_unknown1);
	PY_CHECK_TYPE(&PyInt_Type, py_unknown2, return false;);
	r->in.unknown2 = PyInt_AsLong(py_unknown2);
	PY_CHECK_TYPE(&PyInt_Type, py_unknown3, return false;);
	r->in.unknown3 = PyInt_AsLong(py_unknown3);
	return true;
}

static PyObject *unpack_py_samr_SetBootKeyInformation_args_out(struct samr_SetBootKeyInformation *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_GetBootKeyInformation_args_in(PyObject *args, PyObject *kwargs, struct samr_GetBootKeyInformation *r)
{
	PyObject *py_domain_handle;
	const char *kwnames[] = {
		"domain_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:samr_GetBootKeyInformation", discard_const_p(char *, kwnames), &py_domain_handle)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	return true;
}

static PyObject *unpack_py_samr_GetBootKeyInformation_args_out(struct samr_GetBootKeyInformation *r)
{
	PyObject *result;
	PyObject *py_unknown;
	py_unknown = PyInt_FromLong(*r->out.unknown);
	result = py_unknown;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_Connect3_args_in(PyObject *args, PyObject *kwargs, struct samr_Connect3 *r)
{
	PyObject *py_system_name;
	PyObject *py_unknown;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"system_name", "unknown", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_Connect3", discard_const_p(char *, kwnames), &py_system_name, &py_unknown, &py_access_mask)) {
		return false;
	}

	if (py_system_name == Py_None) {
		r->in.system_name = NULL;
	} else {
		r->in.system_name = NULL;
		if (PyUnicode_Check(py_system_name)) {
			r->in.system_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_system_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_system_name)) {
			r->in.system_name = PyString_AS_STRING(py_system_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_system_name)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_unknown, return false;);
	r->in.unknown = PyInt_AsLong(py_unknown);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_Connect3_args_out(struct samr_Connect3 *r)
{
	PyObject *result;
	PyObject *py_connect_handle;
	py_connect_handle = py_talloc_reference_ex(policy_handle_Type, r->out.connect_handle, r->out.connect_handle);
	result = py_connect_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_Connect4_args_in(PyObject *args, PyObject *kwargs, struct samr_Connect4 *r)
{
	PyObject *py_system_name;
	PyObject *py_client_version;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"system_name", "client_version", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_Connect4", discard_const_p(char *, kwnames), &py_system_name, &py_client_version, &py_access_mask)) {
		return false;
	}

	if (py_system_name == Py_None) {
		r->in.system_name = NULL;
	} else {
		r->in.system_name = NULL;
		if (PyUnicode_Check(py_system_name)) {
			r->in.system_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_system_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_system_name)) {
			r->in.system_name = PyString_AS_STRING(py_system_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_system_name)->tp_name);
			return false;
		}
	}
	if (PyLong_Check(py_client_version)) {
		r->in.client_version = PyLong_AsLongLong(py_client_version);
	} else if (PyInt_Check(py_client_version)) {
		r->in.client_version = PyInt_AsLong(py_client_version);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_samr_Connect4_args_out(struct samr_Connect4 *r)
{
	PyObject *result;
	PyObject *py_connect_handle;
	py_connect_handle = py_talloc_reference_ex(policy_handle_Type, r->out.connect_handle, r->out.connect_handle);
	result = py_connect_handle;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_ChangePasswordUser3_args_in(PyObject *args, PyObject *kwargs, struct samr_ChangePasswordUser3 *r)
{
	PyObject *py_server;
	PyObject *py_account;
	PyObject *py_nt_password;
	PyObject *py_nt_verifier;
	PyObject *py_lm_change;
	PyObject *py_lm_password;
	PyObject *py_lm_verifier;
	PyObject *py_password3;
	const char *kwnames[] = {
		"server", "account", "nt_password", "nt_verifier", "lm_change", "lm_password", "lm_verifier", "password3", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:samr_ChangePasswordUser3", discard_const_p(char *, kwnames), &py_server, &py_account, &py_nt_password, &py_nt_verifier, &py_lm_change, &py_lm_password, &py_lm_verifier, &py_password3)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		PY_CHECK_TYPE(lsa_String_Type, py_server, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_server)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.server = (struct lsa_String *)py_talloc_get_ptr(py_server);
	}
	r->in.account = talloc_ptrtype(r, r->in.account);
	PY_CHECK_TYPE(lsa_String_Type, py_account, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_account)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.account = (struct lsa_String *)py_talloc_get_ptr(py_account);
	if (py_nt_password == Py_None) {
		r->in.nt_password = NULL;
	} else {
		r->in.nt_password = NULL;
		PY_CHECK_TYPE(&samr_CryptPassword_Type, py_nt_password, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_nt_password)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.nt_password = (struct samr_CryptPassword *)py_talloc_get_ptr(py_nt_password);
	}
	if (py_nt_verifier == Py_None) {
		r->in.nt_verifier = NULL;
	} else {
		r->in.nt_verifier = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_nt_verifier, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_nt_verifier)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.nt_verifier = (struct samr_Password *)py_talloc_get_ptr(py_nt_verifier);
	}
	PY_CHECK_TYPE(&PyInt_Type, py_lm_change, return false;);
	r->in.lm_change = PyInt_AsLong(py_lm_change);
	if (py_lm_password == Py_None) {
		r->in.lm_password = NULL;
	} else {
		r->in.lm_password = NULL;
		PY_CHECK_TYPE(&samr_CryptPassword_Type, py_lm_password, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_lm_password)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.lm_password = (struct samr_CryptPassword *)py_talloc_get_ptr(py_lm_password);
	}
	if (py_lm_verifier == Py_None) {
		r->in.lm_verifier = NULL;
	} else {
		r->in.lm_verifier = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_lm_verifier, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_lm_verifier)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.lm_verifier = (struct samr_Password *)py_talloc_get_ptr(py_lm_verifier);
	}
	if (py_password3 == Py_None) {
		r->in.password3 = NULL;
	} else {
		r->in.password3 = NULL;
		PY_CHECK_TYPE(&samr_CryptPassword_Type, py_password3, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_password3)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.password3 = (struct samr_CryptPassword *)py_talloc_get_ptr(py_password3);
	}
	return true;
}

static PyObject *unpack_py_samr_ChangePasswordUser3_args_out(struct samr_ChangePasswordUser3 *r)
{
	PyObject *result;
	PyObject *py_dominfo;
	PyObject *py_reject;
	result = PyTuple_New(2);
	if (*r->out.dominfo == NULL) {
		py_dominfo = Py_None;
		Py_INCREF(py_dominfo);
	} else {
		py_dominfo = py_talloc_reference_ex(&samr_DomInfo1_Type, *r->out.dominfo, *r->out.dominfo);
	}
	PyTuple_SetItem(result, 0, py_dominfo);
	if (*r->out.reject == NULL) {
		py_reject = Py_None;
		Py_INCREF(py_reject);
	} else {
		py_reject = py_talloc_reference_ex(&userPwdChangeFailureInformation_Type, *r->out.reject, *r->out.reject);
	}
	PyTuple_SetItem(result, 1, py_reject);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_Connect5_args_in(PyObject *args, PyObject *kwargs, struct samr_Connect5 *r)
{
	PyObject *py_system_name;
	PyObject *py_access_mask;
	PyObject *py_level_in;
	PyObject *py_info_in;
	const char *kwnames[] = {
		"system_name", "access_mask", "level_in", "info_in", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:samr_Connect5", discard_const_p(char *, kwnames), &py_system_name, &py_access_mask, &py_level_in, &py_info_in)) {
		return false;
	}

	if (py_system_name == Py_None) {
		r->in.system_name = NULL;
	} else {
		r->in.system_name = NULL;
		if (PyUnicode_Check(py_system_name)) {
			r->in.system_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_system_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_system_name)) {
			r->in.system_name = PyString_AS_STRING(py_system_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_system_name)->tp_name);
			return false;
		}
	}
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level_in, return false;);
	r->in.level_in = PyInt_AsLong(py_level_in);
	r->in.info_in = talloc_ptrtype(r, r->in.info_in);
	{
		union samr_ConnectInfo *info_in_switch_1;
		info_in_switch_1 = py_export_samr_ConnectInfo(r, r->in.level_in, py_info_in);
		if (info_in_switch_1 == NULL) {
			return false;
		}
		r->in.info_in = info_in_switch_1;
	}
	return true;
}

static PyObject *unpack_py_samr_Connect5_args_out(struct samr_Connect5 *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_info_out;
	PyObject *py_connect_handle;
	result = PyTuple_New(3);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_info_out = py_import_samr_ConnectInfo(r->out.info_out, *r->out.level_out, r->out.info_out);
	if (py_info_out == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_info_out);
	py_connect_handle = py_talloc_reference_ex(policy_handle_Type, r->out.connect_handle, r->out.connect_handle);
	PyTuple_SetItem(result, 2, py_connect_handle);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_RidToSid_args_in(PyObject *args, PyObject *kwargs, struct samr_RidToSid *r)
{
	PyObject *py_domain_handle;
	PyObject *py_rid;
	const char *kwnames[] = {
		"domain_handle", "rid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_RidToSid", discard_const_p(char *, kwnames), &py_domain_handle, &py_rid)) {
		return false;
	}

	r->in.domain_handle = talloc_ptrtype(r, r->in.domain_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_domain_handle, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_domain_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.domain_handle = (struct policy_handle *)py_talloc_get_ptr(py_domain_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_rid, return false;);
	r->in.rid = PyInt_AsLong(py_rid);
	return true;
}

static PyObject *unpack_py_samr_RidToSid_args_out(struct samr_RidToSid *r)
{
	PyObject *result;
	PyObject *py_sid;
	if (*r->out.sid == NULL) {
		py_sid = Py_None;
		Py_INCREF(py_sid);
	} else {
		py_sid = py_talloc_reference_ex(dom_sid_Type, *r->out.sid, *r->out.sid);
	}
	result = py_sid;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_SetDsrmPassword_args_in(PyObject *args, PyObject *kwargs, struct samr_SetDsrmPassword *r)
{
	PyObject *py_name;
	PyObject *py_unknown;
	PyObject *py_hash;
	const char *kwnames[] = {
		"name", "unknown", "hash", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:samr_SetDsrmPassword", discard_const_p(char *, kwnames), &py_name, &py_unknown, &py_hash)) {
		return false;
	}

	if (py_name == Py_None) {
		r->in.name = NULL;
	} else {
		r->in.name = NULL;
		PY_CHECK_TYPE(lsa_String_Type, py_name, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_name)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.name = (struct lsa_String *)py_talloc_get_ptr(py_name);
	}
	PY_CHECK_TYPE(&PyInt_Type, py_unknown, return false;);
	r->in.unknown = PyInt_AsLong(py_unknown);
	if (py_hash == Py_None) {
		r->in.hash = NULL;
	} else {
		r->in.hash = NULL;
		PY_CHECK_TYPE(&samr_Password_Type, py_hash, return false;);
		if (talloc_reference(r, py_talloc_get_mem_ctx(py_hash)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.hash = (struct samr_Password *)py_talloc_get_ptr(py_hash);
	}
	return true;
}

static PyObject *unpack_py_samr_SetDsrmPassword_args_out(struct samr_SetDsrmPassword *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_samr_ValidatePassword_args_in(PyObject *args, PyObject *kwargs, struct samr_ValidatePassword *r)
{
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:samr_ValidatePassword", discard_const_p(char *, kwnames), &py_level, &py_req)) {
		return false;
	}

	if (PyLong_Check(py_level)) {
		r->in.level = PyLong_AsLongLong(py_level);
	} else if (PyInt_Check(py_level)) {
		r->in.level = PyInt_AsLong(py_level);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union samr_ValidatePasswordReq *req_switch_1;
		req_switch_1 = py_export_samr_ValidatePasswordReq(r, r->in.level, py_req);
		if (req_switch_1 == NULL) {
			return false;
		}
		r->in.req = req_switch_1;
	}
	return true;
}

static PyObject *unpack_py_samr_ValidatePassword_args_out(struct samr_ValidatePassword *r)
{
	PyObject *result;
	PyObject *py_rep;
	if (*r->out.rep == NULL) {
		py_rep = Py_None;
		Py_INCREF(py_rep);
	} else {
		py_rep = py_import_samr_ValidatePasswordRep(*r->out.rep, r->in.level, *r->out.rep);
		if (py_rep == NULL) {
			return NULL;
		}
	}
	result = py_rep;
	if (NT_STATUS_IS_ERR(r->out.result)) {
		PyErr_SetNTSTATUS(r->out.result);
		return NULL;
	}

	return result;
}

const struct PyNdrRpcMethodDef py_ndr_samr_methods[] = {
	{ "Connect", "S.Connect(system_name, access_mask) -> connect_handle", (py_dcerpc_call_fn)dcerpc_samr_Connect_r, (py_data_pack_fn)pack_py_samr_Connect_args_in, (py_data_unpack_fn)unpack_py_samr_Connect_args_out, 0, &ndr_table_samr },
	{ "Close", "S.Close(handle) -> handle", (py_dcerpc_call_fn)dcerpc_samr_Close_r, (py_data_pack_fn)pack_py_samr_Close_args_in, (py_data_unpack_fn)unpack_py_samr_Close_args_out, 1, &ndr_table_samr },
	{ "SetSecurity", "S.SetSecurity(handle, sec_info, sdbuf) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetSecurity_r, (py_data_pack_fn)pack_py_samr_SetSecurity_args_in, (py_data_unpack_fn)unpack_py_samr_SetSecurity_args_out, 2, &ndr_table_samr },
	{ "QuerySecurity", "S.QuerySecurity(handle, sec_info) -> sdbuf", (py_dcerpc_call_fn)dcerpc_samr_QuerySecurity_r, (py_data_pack_fn)pack_py_samr_QuerySecurity_args_in, (py_data_unpack_fn)unpack_py_samr_QuerySecurity_args_out, 3, &ndr_table_samr },
	{ "Shutdown", "S.Shutdown(connect_handle) -> None", (py_dcerpc_call_fn)dcerpc_samr_Shutdown_r, (py_data_pack_fn)pack_py_samr_Shutdown_args_in, (py_data_unpack_fn)unpack_py_samr_Shutdown_args_out, 4, &ndr_table_samr },
	{ "LookupDomain", "S.LookupDomain(connect_handle, domain_name) -> sid", (py_dcerpc_call_fn)dcerpc_samr_LookupDomain_r, (py_data_pack_fn)pack_py_samr_LookupDomain_args_in, (py_data_unpack_fn)unpack_py_samr_LookupDomain_args_out, 5, &ndr_table_samr },
	{ "EnumDomains", "S.EnumDomains(connect_handle, resume_handle, buf_size) -> (resume_handle, sam, num_entries)", (py_dcerpc_call_fn)dcerpc_samr_EnumDomains_r, (py_data_pack_fn)pack_py_samr_EnumDomains_args_in, (py_data_unpack_fn)unpack_py_samr_EnumDomains_args_out, 6, &ndr_table_samr },
	{ "OpenDomain", "S.OpenDomain(connect_handle, access_mask, sid) -> domain_handle", (py_dcerpc_call_fn)dcerpc_samr_OpenDomain_r, (py_data_pack_fn)pack_py_samr_OpenDomain_args_in, (py_data_unpack_fn)unpack_py_samr_OpenDomain_args_out, 7, &ndr_table_samr },
	{ "QueryDomainInfo", "S.QueryDomainInfo(domain_handle, level) -> info", (py_dcerpc_call_fn)dcerpc_samr_QueryDomainInfo_r, (py_data_pack_fn)pack_py_samr_QueryDomainInfo_args_in, (py_data_unpack_fn)unpack_py_samr_QueryDomainInfo_args_out, 8, &ndr_table_samr },
	{ "SetDomainInfo", "S.SetDomainInfo(domain_handle, level, info) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetDomainInfo_r, (py_data_pack_fn)pack_py_samr_SetDomainInfo_args_in, (py_data_unpack_fn)unpack_py_samr_SetDomainInfo_args_out, 9, &ndr_table_samr },
	{ "CreateDomainGroup", "S.CreateDomainGroup(domain_handle, name, access_mask) -> (group_handle, rid)", (py_dcerpc_call_fn)dcerpc_samr_CreateDomainGroup_r, (py_data_pack_fn)pack_py_samr_CreateDomainGroup_args_in, (py_data_unpack_fn)unpack_py_samr_CreateDomainGroup_args_out, 10, &ndr_table_samr },
	{ "EnumDomainGroups", "S.EnumDomainGroups(domain_handle, resume_handle, max_size) -> (resume_handle, sam, num_entries)", (py_dcerpc_call_fn)dcerpc_samr_EnumDomainGroups_r, (py_data_pack_fn)pack_py_samr_EnumDomainGroups_args_in, (py_data_unpack_fn)unpack_py_samr_EnumDomainGroups_args_out, 11, &ndr_table_samr },
	{ "CreateUser", "S.CreateUser(domain_handle, account_name, access_mask) -> (user_handle, rid)", (py_dcerpc_call_fn)dcerpc_samr_CreateUser_r, (py_data_pack_fn)pack_py_samr_CreateUser_args_in, (py_data_unpack_fn)unpack_py_samr_CreateUser_args_out, 12, &ndr_table_samr },
	{ "EnumDomainUsers", "S.EnumDomainUsers(domain_handle, resume_handle, acct_flags, max_size) -> (resume_handle, sam, num_entries)", (py_dcerpc_call_fn)dcerpc_samr_EnumDomainUsers_r, (py_data_pack_fn)pack_py_samr_EnumDomainUsers_args_in, (py_data_unpack_fn)unpack_py_samr_EnumDomainUsers_args_out, 13, &ndr_table_samr },
	{ "CreateDomAlias", "S.CreateDomAlias(domain_handle, alias_name, access_mask) -> (alias_handle, rid)", (py_dcerpc_call_fn)dcerpc_samr_CreateDomAlias_r, (py_data_pack_fn)pack_py_samr_CreateDomAlias_args_in, (py_data_unpack_fn)unpack_py_samr_CreateDomAlias_args_out, 14, &ndr_table_samr },
	{ "EnumDomainAliases", "S.EnumDomainAliases(domain_handle, resume_handle, max_size) -> (resume_handle, sam, num_entries)", (py_dcerpc_call_fn)dcerpc_samr_EnumDomainAliases_r, (py_data_pack_fn)pack_py_samr_EnumDomainAliases_args_in, (py_data_unpack_fn)unpack_py_samr_EnumDomainAliases_args_out, 15, &ndr_table_samr },
	{ "GetAliasMembership", "S.GetAliasMembership(domain_handle, sids) -> rids", (py_dcerpc_call_fn)dcerpc_samr_GetAliasMembership_r, (py_data_pack_fn)pack_py_samr_GetAliasMembership_args_in, (py_data_unpack_fn)unpack_py_samr_GetAliasMembership_args_out, 16, &ndr_table_samr },
	{ "LookupNames", "S.LookupNames(domain_handle, names) -> (rids, types)", (py_dcerpc_call_fn)dcerpc_samr_LookupNames_r, (py_data_pack_fn)pack_py_samr_LookupNames_args_in, (py_data_unpack_fn)unpack_py_samr_LookupNames_args_out, 17, &ndr_table_samr },
	{ "LookupRids", "S.LookupRids(domain_handle, rids) -> (names, types)", (py_dcerpc_call_fn)dcerpc_samr_LookupRids_r, (py_data_pack_fn)pack_py_samr_LookupRids_args_in, (py_data_unpack_fn)unpack_py_samr_LookupRids_args_out, 18, &ndr_table_samr },
	{ "OpenGroup", "S.OpenGroup(domain_handle, access_mask, rid) -> group_handle", (py_dcerpc_call_fn)dcerpc_samr_OpenGroup_r, (py_data_pack_fn)pack_py_samr_OpenGroup_args_in, (py_data_unpack_fn)unpack_py_samr_OpenGroup_args_out, 19, &ndr_table_samr },
	{ "QueryGroupInfo", "S.QueryGroupInfo(group_handle, level) -> info", (py_dcerpc_call_fn)dcerpc_samr_QueryGroupInfo_r, (py_data_pack_fn)pack_py_samr_QueryGroupInfo_args_in, (py_data_unpack_fn)unpack_py_samr_QueryGroupInfo_args_out, 20, &ndr_table_samr },
	{ "SetGroupInfo", "S.SetGroupInfo(group_handle, level, info) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetGroupInfo_r, (py_data_pack_fn)pack_py_samr_SetGroupInfo_args_in, (py_data_unpack_fn)unpack_py_samr_SetGroupInfo_args_out, 21, &ndr_table_samr },
	{ "AddGroupMember", "S.AddGroupMember(group_handle, rid, flags) -> None", (py_dcerpc_call_fn)dcerpc_samr_AddGroupMember_r, (py_data_pack_fn)pack_py_samr_AddGroupMember_args_in, (py_data_unpack_fn)unpack_py_samr_AddGroupMember_args_out, 22, &ndr_table_samr },
	{ "DeleteDomainGroup", "S.DeleteDomainGroup(group_handle) -> group_handle", (py_dcerpc_call_fn)dcerpc_samr_DeleteDomainGroup_r, (py_data_pack_fn)pack_py_samr_DeleteDomainGroup_args_in, (py_data_unpack_fn)unpack_py_samr_DeleteDomainGroup_args_out, 23, &ndr_table_samr },
	{ "DeleteGroupMember", "S.DeleteGroupMember(group_handle, rid) -> None", (py_dcerpc_call_fn)dcerpc_samr_DeleteGroupMember_r, (py_data_pack_fn)pack_py_samr_DeleteGroupMember_args_in, (py_data_unpack_fn)unpack_py_samr_DeleteGroupMember_args_out, 24, &ndr_table_samr },
	{ "QueryGroupMember", "S.QueryGroupMember(group_handle) -> rids", (py_dcerpc_call_fn)dcerpc_samr_QueryGroupMember_r, (py_data_pack_fn)pack_py_samr_QueryGroupMember_args_in, (py_data_unpack_fn)unpack_py_samr_QueryGroupMember_args_out, 25, &ndr_table_samr },
	{ "SetMemberAttributesOfGroup", "S.SetMemberAttributesOfGroup(group_handle, unknown1, unknown2) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetMemberAttributesOfGroup_r, (py_data_pack_fn)pack_py_samr_SetMemberAttributesOfGroup_args_in, (py_data_unpack_fn)unpack_py_samr_SetMemberAttributesOfGroup_args_out, 26, &ndr_table_samr },
	{ "OpenAlias", "S.OpenAlias(domain_handle, access_mask, rid) -> alias_handle", (py_dcerpc_call_fn)dcerpc_samr_OpenAlias_r, (py_data_pack_fn)pack_py_samr_OpenAlias_args_in, (py_data_unpack_fn)unpack_py_samr_OpenAlias_args_out, 27, &ndr_table_samr },
	{ "QueryAliasInfo", "S.QueryAliasInfo(alias_handle, level) -> info", (py_dcerpc_call_fn)dcerpc_samr_QueryAliasInfo_r, (py_data_pack_fn)pack_py_samr_QueryAliasInfo_args_in, (py_data_unpack_fn)unpack_py_samr_QueryAliasInfo_args_out, 28, &ndr_table_samr },
	{ "SetAliasInfo", "S.SetAliasInfo(alias_handle, level, info) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetAliasInfo_r, (py_data_pack_fn)pack_py_samr_SetAliasInfo_args_in, (py_data_unpack_fn)unpack_py_samr_SetAliasInfo_args_out, 29, &ndr_table_samr },
	{ "DeleteDomAlias", "S.DeleteDomAlias(alias_handle) -> alias_handle", (py_dcerpc_call_fn)dcerpc_samr_DeleteDomAlias_r, (py_data_pack_fn)pack_py_samr_DeleteDomAlias_args_in, (py_data_unpack_fn)unpack_py_samr_DeleteDomAlias_args_out, 30, &ndr_table_samr },
	{ "AddAliasMember", "S.AddAliasMember(alias_handle, sid) -> None", (py_dcerpc_call_fn)dcerpc_samr_AddAliasMember_r, (py_data_pack_fn)pack_py_samr_AddAliasMember_args_in, (py_data_unpack_fn)unpack_py_samr_AddAliasMember_args_out, 31, &ndr_table_samr },
	{ "DeleteAliasMember", "S.DeleteAliasMember(alias_handle, sid) -> None", (py_dcerpc_call_fn)dcerpc_samr_DeleteAliasMember_r, (py_data_pack_fn)pack_py_samr_DeleteAliasMember_args_in, (py_data_unpack_fn)unpack_py_samr_DeleteAliasMember_args_out, 32, &ndr_table_samr },
	{ "GetMembersInAlias", "S.GetMembersInAlias(alias_handle) -> sids", (py_dcerpc_call_fn)dcerpc_samr_GetMembersInAlias_r, (py_data_pack_fn)pack_py_samr_GetMembersInAlias_args_in, (py_data_unpack_fn)unpack_py_samr_GetMembersInAlias_args_out, 33, &ndr_table_samr },
	{ "OpenUser", "S.OpenUser(domain_handle, access_mask, rid) -> user_handle", (py_dcerpc_call_fn)dcerpc_samr_OpenUser_r, (py_data_pack_fn)pack_py_samr_OpenUser_args_in, (py_data_unpack_fn)unpack_py_samr_OpenUser_args_out, 34, &ndr_table_samr },
	{ "DeleteUser", "S.DeleteUser(user_handle) -> user_handle", (py_dcerpc_call_fn)dcerpc_samr_DeleteUser_r, (py_data_pack_fn)pack_py_samr_DeleteUser_args_in, (py_data_unpack_fn)unpack_py_samr_DeleteUser_args_out, 35, &ndr_table_samr },
	{ "QueryUserInfo", "S.QueryUserInfo(user_handle, level) -> info", (py_dcerpc_call_fn)dcerpc_samr_QueryUserInfo_r, (py_data_pack_fn)pack_py_samr_QueryUserInfo_args_in, (py_data_unpack_fn)unpack_py_samr_QueryUserInfo_args_out, 36, &ndr_table_samr },
	{ "SetUserInfo", "S.SetUserInfo(user_handle, level, info) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetUserInfo_r, (py_data_pack_fn)pack_py_samr_SetUserInfo_args_in, (py_data_unpack_fn)unpack_py_samr_SetUserInfo_args_out, 37, &ndr_table_samr },
	{ "ChangePasswordUser", "S.ChangePasswordUser(user_handle, lm_present, old_lm_crypted, new_lm_crypted, nt_present, old_nt_crypted, new_nt_crypted, cross1_present, nt_cross, cross2_present, lm_cross) -> None", (py_dcerpc_call_fn)dcerpc_samr_ChangePasswordUser_r, (py_data_pack_fn)pack_py_samr_ChangePasswordUser_args_in, (py_data_unpack_fn)unpack_py_samr_ChangePasswordUser_args_out, 38, &ndr_table_samr },
	{ "GetGroupsForUser", "S.GetGroupsForUser(user_handle) -> rids", (py_dcerpc_call_fn)dcerpc_samr_GetGroupsForUser_r, (py_data_pack_fn)pack_py_samr_GetGroupsForUser_args_in, (py_data_unpack_fn)unpack_py_samr_GetGroupsForUser_args_out, 39, &ndr_table_samr },
	{ "QueryDisplayInfo", "S.QueryDisplayInfo(domain_handle, level, start_idx, max_entries, buf_size) -> (total_size, returned_size, info)", (py_dcerpc_call_fn)dcerpc_samr_QueryDisplayInfo_r, (py_data_pack_fn)pack_py_samr_QueryDisplayInfo_args_in, (py_data_unpack_fn)unpack_py_samr_QueryDisplayInfo_args_out, 40, &ndr_table_samr },
	{ "GetDisplayEnumerationIndex", "S.GetDisplayEnumerationIndex(domain_handle, level, name) -> idx", (py_dcerpc_call_fn)dcerpc_samr_GetDisplayEnumerationIndex_r, (py_data_pack_fn)pack_py_samr_GetDisplayEnumerationIndex_args_in, (py_data_unpack_fn)unpack_py_samr_GetDisplayEnumerationIndex_args_out, 41, &ndr_table_samr },
	{ "TestPrivateFunctionsDomain", "S.TestPrivateFunctionsDomain(domain_handle) -> None", (py_dcerpc_call_fn)dcerpc_samr_TestPrivateFunctionsDomain_r, (py_data_pack_fn)pack_py_samr_TestPrivateFunctionsDomain_args_in, (py_data_unpack_fn)unpack_py_samr_TestPrivateFunctionsDomain_args_out, 42, &ndr_table_samr },
	{ "TestPrivateFunctionsUser", "S.TestPrivateFunctionsUser(user_handle) -> None", (py_dcerpc_call_fn)dcerpc_samr_TestPrivateFunctionsUser_r, (py_data_pack_fn)pack_py_samr_TestPrivateFunctionsUser_args_in, (py_data_unpack_fn)unpack_py_samr_TestPrivateFunctionsUser_args_out, 43, &ndr_table_samr },
	{ "GetUserPwInfo", "S.GetUserPwInfo(user_handle) -> info", (py_dcerpc_call_fn)dcerpc_samr_GetUserPwInfo_r, (py_data_pack_fn)pack_py_samr_GetUserPwInfo_args_in, (py_data_unpack_fn)unpack_py_samr_GetUserPwInfo_args_out, 44, &ndr_table_samr },
	{ "RemoveMemberFromForeignDomain", "S.RemoveMemberFromForeignDomain(domain_handle, sid) -> None", (py_dcerpc_call_fn)dcerpc_samr_RemoveMemberFromForeignDomain_r, (py_data_pack_fn)pack_py_samr_RemoveMemberFromForeignDomain_args_in, (py_data_unpack_fn)unpack_py_samr_RemoveMemberFromForeignDomain_args_out, 45, &ndr_table_samr },
	{ "QueryDomainInfo2", "S.QueryDomainInfo2(domain_handle, level) -> info", (py_dcerpc_call_fn)dcerpc_samr_QueryDomainInfo2_r, (py_data_pack_fn)pack_py_samr_QueryDomainInfo2_args_in, (py_data_unpack_fn)unpack_py_samr_QueryDomainInfo2_args_out, 46, &ndr_table_samr },
	{ "QueryUserInfo2", "S.QueryUserInfo2(user_handle, level) -> info", (py_dcerpc_call_fn)dcerpc_samr_QueryUserInfo2_r, (py_data_pack_fn)pack_py_samr_QueryUserInfo2_args_in, (py_data_unpack_fn)unpack_py_samr_QueryUserInfo2_args_out, 47, &ndr_table_samr },
	{ "QueryDisplayInfo2", "S.QueryDisplayInfo2(domain_handle, level, start_idx, max_entries, buf_size) -> (total_size, returned_size, info)", (py_dcerpc_call_fn)dcerpc_samr_QueryDisplayInfo2_r, (py_data_pack_fn)pack_py_samr_QueryDisplayInfo2_args_in, (py_data_unpack_fn)unpack_py_samr_QueryDisplayInfo2_args_out, 48, &ndr_table_samr },
	{ "GetDisplayEnumerationIndex2", "S.GetDisplayEnumerationIndex2(domain_handle, level, name) -> idx", (py_dcerpc_call_fn)dcerpc_samr_GetDisplayEnumerationIndex2_r, (py_data_pack_fn)pack_py_samr_GetDisplayEnumerationIndex2_args_in, (py_data_unpack_fn)unpack_py_samr_GetDisplayEnumerationIndex2_args_out, 49, &ndr_table_samr },
	{ "CreateUser2", "S.CreateUser2(domain_handle, account_name, acct_flags, access_mask) -> (user_handle, access_granted, rid)", (py_dcerpc_call_fn)dcerpc_samr_CreateUser2_r, (py_data_pack_fn)pack_py_samr_CreateUser2_args_in, (py_data_unpack_fn)unpack_py_samr_CreateUser2_args_out, 50, &ndr_table_samr },
	{ "QueryDisplayInfo3", "S.QueryDisplayInfo3(domain_handle, level, start_idx, max_entries, buf_size) -> (total_size, returned_size, info)", (py_dcerpc_call_fn)dcerpc_samr_QueryDisplayInfo3_r, (py_data_pack_fn)pack_py_samr_QueryDisplayInfo3_args_in, (py_data_unpack_fn)unpack_py_samr_QueryDisplayInfo3_args_out, 51, &ndr_table_samr },
	{ "AddMultipleMembersToAlias", "S.AddMultipleMembersToAlias(alias_handle, sids) -> None", (py_dcerpc_call_fn)dcerpc_samr_AddMultipleMembersToAlias_r, (py_data_pack_fn)pack_py_samr_AddMultipleMembersToAlias_args_in, (py_data_unpack_fn)unpack_py_samr_AddMultipleMembersToAlias_args_out, 52, &ndr_table_samr },
	{ "RemoveMultipleMembersFromAlias", "S.RemoveMultipleMembersFromAlias(alias_handle, sids) -> None", (py_dcerpc_call_fn)dcerpc_samr_RemoveMultipleMembersFromAlias_r, (py_data_pack_fn)pack_py_samr_RemoveMultipleMembersFromAlias_args_in, (py_data_unpack_fn)unpack_py_samr_RemoveMultipleMembersFromAlias_args_out, 53, &ndr_table_samr },
	{ "OemChangePasswordUser2", "S.OemChangePasswordUser2(server, account, password, hash) -> None", (py_dcerpc_call_fn)dcerpc_samr_OemChangePasswordUser2_r, (py_data_pack_fn)pack_py_samr_OemChangePasswordUser2_args_in, (py_data_unpack_fn)unpack_py_samr_OemChangePasswordUser2_args_out, 54, &ndr_table_samr },
	{ "ChangePasswordUser2", "S.ChangePasswordUser2(server, account, nt_password, nt_verifier, lm_change, lm_password, lm_verifier) -> None", (py_dcerpc_call_fn)dcerpc_samr_ChangePasswordUser2_r, (py_data_pack_fn)pack_py_samr_ChangePasswordUser2_args_in, (py_data_unpack_fn)unpack_py_samr_ChangePasswordUser2_args_out, 55, &ndr_table_samr },
	{ "GetDomPwInfo", "S.GetDomPwInfo(domain_name) -> info", (py_dcerpc_call_fn)dcerpc_samr_GetDomPwInfo_r, (py_data_pack_fn)pack_py_samr_GetDomPwInfo_args_in, (py_data_unpack_fn)unpack_py_samr_GetDomPwInfo_args_out, 56, &ndr_table_samr },
	{ "Connect2", "S.Connect2(system_name, access_mask) -> connect_handle", (py_dcerpc_call_fn)dcerpc_samr_Connect2_r, (py_data_pack_fn)pack_py_samr_Connect2_args_in, (py_data_unpack_fn)unpack_py_samr_Connect2_args_out, 57, &ndr_table_samr },
	{ "SetUserInfo2", "S.SetUserInfo2(user_handle, level, info) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetUserInfo2_r, (py_data_pack_fn)pack_py_samr_SetUserInfo2_args_in, (py_data_unpack_fn)unpack_py_samr_SetUserInfo2_args_out, 58, &ndr_table_samr },
	{ "SetBootKeyInformation", "S.SetBootKeyInformation(connect_handle, unknown1, unknown2, unknown3) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetBootKeyInformation_r, (py_data_pack_fn)pack_py_samr_SetBootKeyInformation_args_in, (py_data_unpack_fn)unpack_py_samr_SetBootKeyInformation_args_out, 59, &ndr_table_samr },
	{ "GetBootKeyInformation", "S.GetBootKeyInformation(domain_handle) -> unknown", (py_dcerpc_call_fn)dcerpc_samr_GetBootKeyInformation_r, (py_data_pack_fn)pack_py_samr_GetBootKeyInformation_args_in, (py_data_unpack_fn)unpack_py_samr_GetBootKeyInformation_args_out, 60, &ndr_table_samr },
	{ "Connect3", "S.Connect3(system_name, unknown, access_mask) -> connect_handle", (py_dcerpc_call_fn)dcerpc_samr_Connect3_r, (py_data_pack_fn)pack_py_samr_Connect3_args_in, (py_data_unpack_fn)unpack_py_samr_Connect3_args_out, 61, &ndr_table_samr },
	{ "Connect4", "S.Connect4(system_name, client_version, access_mask) -> connect_handle", (py_dcerpc_call_fn)dcerpc_samr_Connect4_r, (py_data_pack_fn)pack_py_samr_Connect4_args_in, (py_data_unpack_fn)unpack_py_samr_Connect4_args_out, 62, &ndr_table_samr },
	{ "ChangePasswordUser3", "S.ChangePasswordUser3(server, account, nt_password, nt_verifier, lm_change, lm_password, lm_verifier, password3) -> (dominfo, reject)", (py_dcerpc_call_fn)dcerpc_samr_ChangePasswordUser3_r, (py_data_pack_fn)pack_py_samr_ChangePasswordUser3_args_in, (py_data_unpack_fn)unpack_py_samr_ChangePasswordUser3_args_out, 63, &ndr_table_samr },
	{ "Connect5", "S.Connect5(system_name, access_mask, level_in, info_in) -> (level_out, info_out, connect_handle)", (py_dcerpc_call_fn)dcerpc_samr_Connect5_r, (py_data_pack_fn)pack_py_samr_Connect5_args_in, (py_data_unpack_fn)unpack_py_samr_Connect5_args_out, 64, &ndr_table_samr },
	{ "RidToSid", "S.RidToSid(domain_handle, rid) -> sid", (py_dcerpc_call_fn)dcerpc_samr_RidToSid_r, (py_data_pack_fn)pack_py_samr_RidToSid_args_in, (py_data_unpack_fn)unpack_py_samr_RidToSid_args_out, 65, &ndr_table_samr },
	{ "SetDsrmPassword", "S.SetDsrmPassword(name, unknown, hash) -> None", (py_dcerpc_call_fn)dcerpc_samr_SetDsrmPassword_r, (py_data_pack_fn)pack_py_samr_SetDsrmPassword_args_in, (py_data_unpack_fn)unpack_py_samr_SetDsrmPassword_args_out, 66, &ndr_table_samr },
	{ "ValidatePassword", "S.ValidatePassword(level, req) -> rep", (py_dcerpc_call_fn)dcerpc_samr_ValidatePassword_r, (py_data_pack_fn)pack_py_samr_ValidatePassword_args_in, (py_data_unpack_fn)unpack_py_samr_ValidatePassword_args_out, 67, &ndr_table_samr },
	{ NULL }
};

static PyObject *interface_samr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_samr);
}

static PyTypeObject samr_InterfaceType = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "samr.samr",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "samr(binding, lp_ctx=None, credentials=None) -> connection\n"
"\n"
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
"credentials should be a credentials.Credentials object.\n\n",
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_samr_new,
};

static PyMethodDef samr_methods[] = {
	{ NULL, NULL, 0, NULL }
};

void initsamr(void)
{
	PyObject *m;
	PyObject *dep_samba_dcerpc_security;
	PyObject *dep_talloc;
	PyObject *dep_samba_dcerpc_misc;
	PyObject *dep_samba_dcerpc_base;
	PyObject *dep_samba_dcerpc_lsa;

	dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
	if (dep_samba_dcerpc_security == NULL)
		return;

	dep_talloc = PyImport_ImportModule("talloc");
	if (dep_talloc == NULL)
		return;

	dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
	if (dep_samba_dcerpc_misc == NULL)
		return;

	dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
	if (dep_samba_dcerpc_base == NULL)
		return;

	dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
	if (dep_samba_dcerpc_lsa == NULL)
		return;

	dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
	if (dom_sid_Type == NULL)
		return;

	lsa_BinaryString_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "BinaryString");
	if (lsa_BinaryString_Type == NULL)
		return;

	lsa_AsciiString_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "AsciiString");
	if (lsa_AsciiString_Type == NULL)
		return;

	lsa_Strings_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "Strings");
	if (lsa_Strings_Type == NULL)
		return;

	ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
	if (ClientConnection_Type == NULL)
		return;

	lsa_String_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "String");
	if (lsa_String_Type == NULL)
		return;

	lsa_AsciiStringLarge_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "AsciiStringLarge");
	if (lsa_AsciiStringLarge_Type == NULL)
		return;

	lsa_StringLarge_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "StringLarge");
	if (lsa_StringLarge_Type == NULL)
		return;

	sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
	if (sec_desc_buf_Type == NULL)
		return;

	lsa_SidArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "SidArray");
	if (lsa_SidArray_Type == NULL)
		return;

	policy_handle_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "policy_handle");
	if (policy_handle_Type == NULL)
		return;

	Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
	if (Object_Type == NULL)
		return;

	samr_SamEntry_Type.tp_base = Object_Type;

	samr_SamArray_Type.tp_base = Object_Type;

	samr_DomInfo1_Type.tp_base = Object_Type;

	samr_DomGeneralInformation_Type.tp_base = Object_Type;

	samr_DomInfo3_Type.tp_base = Object_Type;

	samr_DomOEMInformation_Type.tp_base = Object_Type;

	samr_DomInfo5_Type.tp_base = Object_Type;

	samr_DomInfo6_Type.tp_base = Object_Type;

	samr_DomInfo7_Type.tp_base = Object_Type;

	samr_DomInfo8_Type.tp_base = Object_Type;

	samr_DomInfo9_Type.tp_base = Object_Type;

	samr_DomGeneralInformation2_Type.tp_base = Object_Type;

	samr_DomInfo12_Type.tp_base = Object_Type;

	samr_DomInfo13_Type.tp_base = Object_Type;

	samr_Ids_Type.tp_base = Object_Type;

	samr_GroupInfoAll_Type.tp_base = Object_Type;

	samr_GroupInfoAttributes_Type.tp_base = Object_Type;

	samr_GroupInfoDescription_Type.tp_base = Object_Type;

	samr_RidAttrArray_Type.tp_base = Object_Type;

	samr_AliasInfoAll_Type.tp_base = Object_Type;

	samr_UserInfo1_Type.tp_base = Object_Type;

	samr_UserInfo2_Type.tp_base = Object_Type;

	samr_LogonHours_Type.tp_base = Object_Type;

	samr_UserInfo3_Type.tp_base = Object_Type;

	samr_UserInfo4_Type.tp_base = Object_Type;

	samr_UserInfo5_Type.tp_base = Object_Type;

	samr_UserInfo6_Type.tp_base = Object_Type;

	samr_UserInfo7_Type.tp_base = Object_Type;

	samr_UserInfo8_Type.tp_base = Object_Type;

	samr_UserInfo9_Type.tp_base = Object_Type;

	samr_UserInfo10_Type.tp_base = Object_Type;

	samr_UserInfo11_Type.tp_base = Object_Type;

	samr_UserInfo12_Type.tp_base = Object_Type;

	samr_UserInfo13_Type.tp_base = Object_Type;

	samr_UserInfo14_Type.tp_base = Object_Type;

	samr_UserInfo16_Type.tp_base = Object_Type;

	samr_UserInfo17_Type.tp_base = Object_Type;

	samr_Password_Type.tp_base = Object_Type;

	samr_UserInfo18_Type.tp_base = Object_Type;

	samr_UserInfo20_Type.tp_base = Object_Type;

	samr_UserInfo21_Type.tp_base = Object_Type;

	samr_CryptPassword_Type.tp_base = Object_Type;

	samr_UserInfo23_Type.tp_base = Object_Type;

	samr_UserInfo24_Type.tp_base = Object_Type;

	samr_CryptPasswordEx_Type.tp_base = Object_Type;

	samr_UserInfo25_Type.tp_base = Object_Type;

	samr_UserInfo26_Type.tp_base = Object_Type;

	samr_RidWithAttribute_Type.tp_base = Object_Type;

	samr_RidWithAttributeArray_Type.tp_base = Object_Type;

	samr_DispEntryGeneral_Type.tp_base = Object_Type;

	samr_DispInfoGeneral_Type.tp_base = Object_Type;

	samr_DispEntryFull_Type.tp_base = Object_Type;

	samr_DispInfoFull_Type.tp_base = Object_Type;

	samr_DispEntryFullGroup_Type.tp_base = Object_Type;

	samr_DispInfoFullGroups_Type.tp_base = Object_Type;

	samr_DispEntryAscii_Type.tp_base = Object_Type;

	samr_DispInfoAscii_Type.tp_base = Object_Type;

	samr_PwInfo_Type.tp_base = Object_Type;

	userPwdChangeFailureInformation_Type.tp_base = Object_Type;

	samr_ConnectInfo1_Type.tp_base = Object_Type;

	samr_ValidationBlob_Type.tp_base = Object_Type;

	samr_ValidatePasswordInfo_Type.tp_base = Object_Type;

	samr_ValidatePasswordRepCtr_Type.tp_base = Object_Type;

	samr_ValidatePasswordReq3_Type.tp_base = Object_Type;

	samr_ValidatePasswordReq2_Type.tp_base = Object_Type;

	samr_ValidatePasswordReq1_Type.tp_base = Object_Type;

	samr_InterfaceType.tp_base = ClientConnection_Type;

	if (PyType_Ready(&samr_SamEntry_Type) < 0)
		return;
	if (PyType_Ready(&samr_SamArray_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo1_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomGeneralInformation_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo3_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomOEMInformation_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo5_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo6_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo7_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo8_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo9_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomGeneralInformation2_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo12_Type) < 0)
		return;
	if (PyType_Ready(&samr_DomInfo13_Type) < 0)
		return;
	if (PyType_Ready(&samr_Ids_Type) < 0)
		return;
	if (PyType_Ready(&samr_GroupInfoAll_Type) < 0)
		return;
	if (PyType_Ready(&samr_GroupInfoAttributes_Type) < 0)
		return;
	if (PyType_Ready(&samr_GroupInfoDescription_Type) < 0)
		return;
	if (PyType_Ready(&samr_RidAttrArray_Type) < 0)
		return;
	if (PyType_Ready(&samr_AliasInfoAll_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo1_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo2_Type) < 0)
		return;
	if (PyType_Ready(&samr_LogonHours_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo3_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo4_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo5_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo6_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo7_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo8_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo9_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo10_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo11_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo12_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo13_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo14_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo16_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo17_Type) < 0)
		return;
	if (PyType_Ready(&samr_Password_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo18_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo20_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo21_Type) < 0)
		return;
	if (PyType_Ready(&samr_CryptPassword_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo23_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo24_Type) < 0)
		return;
	if (PyType_Ready(&samr_CryptPasswordEx_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo25_Type) < 0)
		return;
	if (PyType_Ready(&samr_UserInfo26_Type) < 0)
		return;
	if (PyType_Ready(&samr_RidWithAttribute_Type) < 0)
		return;
	if (PyType_Ready(&samr_RidWithAttributeArray_Type) < 0)
		return;
	if (PyType_Ready(&samr_DispEntryGeneral_Type) < 0)
		return;
	if (PyType_Ready(&samr_DispInfoGeneral_Type) < 0)
		return;
	if (PyType_Ready(&samr_DispEntryFull_Type) < 0)
		return;
	if (PyType_Ready(&samr_DispInfoFull_Type) < 0)
		return;
	if (PyType_Ready(&samr_DispEntryFullGroup_Type) < 0)
		return;
	if (PyType_Ready(&samr_DispInfoFullGroups_Type) < 0)
		return;
	if (PyType_Ready(&samr_DispEntryAscii_Type) < 0)
		return;
	if (PyType_Ready(&samr_DispInfoAscii_Type) < 0)
		return;
	if (PyType_Ready(&samr_PwInfo_Type) < 0)
		return;
	if (PyType_Ready(&userPwdChangeFailureInformation_Type) < 0)
		return;
	if (PyType_Ready(&samr_ConnectInfo1_Type) < 0)
		return;
	if (PyType_Ready(&samr_ValidationBlob_Type) < 0)
		return;
	if (PyType_Ready(&samr_ValidatePasswordInfo_Type) < 0)
		return;
	if (PyType_Ready(&samr_ValidatePasswordRepCtr_Type) < 0)
		return;
	if (PyType_Ready(&samr_ValidatePasswordReq3_Type) < 0)
		return;
	if (PyType_Ready(&samr_ValidatePasswordReq2_Type) < 0)
		return;
	if (PyType_Ready(&samr_ValidatePasswordReq1_Type) < 0)
		return;
	if (PyType_Ready(&samr_InterfaceType) < 0)
		return;
	if (!PyInterface_AddNdrRpcMethods(&samr_InterfaceType, py_ndr_samr_methods))
		return;

#ifdef PY_SAMENTRY_PATCH
	PY_SAMENTRY_PATCH(&samr_SamEntry_Type);
#endif
#ifdef PY_SAMARRAY_PATCH
	PY_SAMARRAY_PATCH(&samr_SamArray_Type);
#endif
#ifdef PY_DOMINFO1_PATCH
	PY_DOMINFO1_PATCH(&samr_DomInfo1_Type);
#endif
#ifdef PY_DOMGENERALINFORMATION_PATCH
	PY_DOMGENERALINFORMATION_PATCH(&samr_DomGeneralInformation_Type);
#endif
#ifdef PY_DOMINFO3_PATCH
	PY_DOMINFO3_PATCH(&samr_DomInfo3_Type);
#endif
#ifdef PY_DOMOEMINFORMATION_PATCH
	PY_DOMOEMINFORMATION_PATCH(&samr_DomOEMInformation_Type);
#endif
#ifdef PY_DOMINFO5_PATCH
	PY_DOMINFO5_PATCH(&samr_DomInfo5_Type);
#endif
#ifdef PY_DOMINFO6_PATCH
	PY_DOMINFO6_PATCH(&samr_DomInfo6_Type);
#endif
#ifdef PY_DOMINFO7_PATCH
	PY_DOMINFO7_PATCH(&samr_DomInfo7_Type);
#endif
#ifdef PY_DOMINFO8_PATCH
	PY_DOMINFO8_PATCH(&samr_DomInfo8_Type);
#endif
#ifdef PY_DOMINFO9_PATCH
	PY_DOMINFO9_PATCH(&samr_DomInfo9_Type);
#endif
#ifdef PY_DOMGENERALINFORMATION2_PATCH
	PY_DOMGENERALINFORMATION2_PATCH(&samr_DomGeneralInformation2_Type);
#endif
#ifdef PY_DOMINFO12_PATCH
	PY_DOMINFO12_PATCH(&samr_DomInfo12_Type);
#endif
#ifdef PY_DOMINFO13_PATCH
	PY_DOMINFO13_PATCH(&samr_DomInfo13_Type);
#endif
#ifdef PY_IDS_PATCH
	PY_IDS_PATCH(&samr_Ids_Type);
#endif
#ifdef PY_GROUPINFOALL_PATCH
	PY_GROUPINFOALL_PATCH(&samr_GroupInfoAll_Type);
#endif
#ifdef PY_GROUPINFOATTRIBUTES_PATCH
	PY_GROUPINFOATTRIBUTES_PATCH(&samr_GroupInfoAttributes_Type);
#endif
#ifdef PY_GROUPINFODESCRIPTION_PATCH
	PY_GROUPINFODESCRIPTION_PATCH(&samr_GroupInfoDescription_Type);
#endif
#ifdef PY_RIDATTRARRAY_PATCH
	PY_RIDATTRARRAY_PATCH(&samr_RidAttrArray_Type);
#endif
#ifdef PY_ALIASINFOALL_PATCH
	PY_ALIASINFOALL_PATCH(&samr_AliasInfoAll_Type);
#endif
#ifdef PY_USERINFO1_PATCH
	PY_USERINFO1_PATCH(&samr_UserInfo1_Type);
#endif
#ifdef PY_USERINFO2_PATCH
	PY_USERINFO2_PATCH(&samr_UserInfo2_Type);
#endif
#ifdef PY_LOGONHOURS_PATCH
	PY_LOGONHOURS_PATCH(&samr_LogonHours_Type);
#endif
#ifdef PY_USERINFO3_PATCH
	PY_USERINFO3_PATCH(&samr_UserInfo3_Type);
#endif
#ifdef PY_USERINFO4_PATCH
	PY_USERINFO4_PATCH(&samr_UserInfo4_Type);
#endif
#ifdef PY_USERINFO5_PATCH
	PY_USERINFO5_PATCH(&samr_UserInfo5_Type);
#endif
#ifdef PY_USERINFO6_PATCH
	PY_USERINFO6_PATCH(&samr_UserInfo6_Type);
#endif
#ifdef PY_USERINFO7_PATCH
	PY_USERINFO7_PATCH(&samr_UserInfo7_Type);
#endif
#ifdef PY_USERINFO8_PATCH
	PY_USERINFO8_PATCH(&samr_UserInfo8_Type);
#endif
#ifdef PY_USERINFO9_PATCH
	PY_USERINFO9_PATCH(&samr_UserInfo9_Type);
#endif
#ifdef PY_USERINFO10_PATCH
	PY_USERINFO10_PATCH(&samr_UserInfo10_Type);
#endif
#ifdef PY_USERINFO11_PATCH
	PY_USERINFO11_PATCH(&samr_UserInfo11_Type);
#endif
#ifdef PY_USERINFO12_PATCH
	PY_USERINFO12_PATCH(&samr_UserInfo12_Type);
#endif
#ifdef PY_USERINFO13_PATCH
	PY_USERINFO13_PATCH(&samr_UserInfo13_Type);
#endif
#ifdef PY_USERINFO14_PATCH
	PY_USERINFO14_PATCH(&samr_UserInfo14_Type);
#endif
#ifdef PY_USERINFO16_PATCH
	PY_USERINFO16_PATCH(&samr_UserInfo16_Type);
#endif
#ifdef PY_USERINFO17_PATCH
	PY_USERINFO17_PATCH(&samr_UserInfo17_Type);
#endif
#ifdef PY_PASSWORD_PATCH
	PY_PASSWORD_PATCH(&samr_Password_Type);
#endif
#ifdef PY_USERINFO18_PATCH
	PY_USERINFO18_PATCH(&samr_UserInfo18_Type);
#endif
#ifdef PY_USERINFO20_PATCH
	PY_USERINFO20_PATCH(&samr_UserInfo20_Type);
#endif
#ifdef PY_USERINFO21_PATCH
	PY_USERINFO21_PATCH(&samr_UserInfo21_Type);
#endif
#ifdef PY_CRYPTPASSWORD_PATCH
	PY_CRYPTPASSWORD_PATCH(&samr_CryptPassword_Type);
#endif
#ifdef PY_USERINFO23_PATCH
	PY_USERINFO23_PATCH(&samr_UserInfo23_Type);
#endif
#ifdef PY_USERINFO24_PATCH
	PY_USERINFO24_PATCH(&samr_UserInfo24_Type);
#endif
#ifdef PY_CRYPTPASSWORDEX_PATCH
	PY_CRYPTPASSWORDEX_PATCH(&samr_CryptPasswordEx_Type);
#endif
#ifdef PY_USERINFO25_PATCH
	PY_USERINFO25_PATCH(&samr_UserInfo25_Type);
#endif
#ifdef PY_USERINFO26_PATCH
	PY_USERINFO26_PATCH(&samr_UserInfo26_Type);
#endif
#ifdef PY_RIDWITHATTRIBUTE_PATCH
	PY_RIDWITHATTRIBUTE_PATCH(&samr_RidWithAttribute_Type);
#endif
#ifdef PY_RIDWITHATTRIBUTEARRAY_PATCH
	PY_RIDWITHATTRIBUTEARRAY_PATCH(&samr_RidWithAttributeArray_Type);
#endif
#ifdef PY_DISPENTRYGENERAL_PATCH
	PY_DISPENTRYGENERAL_PATCH(&samr_DispEntryGeneral_Type);
#endif
#ifdef PY_DISPINFOGENERAL_PATCH
	PY_DISPINFOGENERAL_PATCH(&samr_DispInfoGeneral_Type);
#endif
#ifdef PY_DISPENTRYFULL_PATCH
	PY_DISPENTRYFULL_PATCH(&samr_DispEntryFull_Type);
#endif
#ifdef PY_DISPINFOFULL_PATCH
	PY_DISPINFOFULL_PATCH(&samr_DispInfoFull_Type);
#endif
#ifdef PY_DISPENTRYFULLGROUP_PATCH
	PY_DISPENTRYFULLGROUP_PATCH(&samr_DispEntryFullGroup_Type);
#endif
#ifdef PY_DISPINFOFULLGROUPS_PATCH
	PY_DISPINFOFULLGROUPS_PATCH(&samr_DispInfoFullGroups_Type);
#endif
#ifdef PY_DISPENTRYASCII_PATCH
	PY_DISPENTRYASCII_PATCH(&samr_DispEntryAscii_Type);
#endif
#ifdef PY_DISPINFOASCII_PATCH
	PY_DISPINFOASCII_PATCH(&samr_DispInfoAscii_Type);
#endif
#ifdef PY_PWINFO_PATCH
	PY_PWINFO_PATCH(&samr_PwInfo_Type);
#endif
#ifdef PY_USERPWDCHANGEFAILUREINFORMATION_PATCH
	PY_USERPWDCHANGEFAILUREINFORMATION_PATCH(&userPwdChangeFailureInformation_Type);
#endif
#ifdef PY_CONNECTINFO1_PATCH
	PY_CONNECTINFO1_PATCH(&samr_ConnectInfo1_Type);
#endif
#ifdef PY_VALIDATIONBLOB_PATCH
	PY_VALIDATIONBLOB_PATCH(&samr_ValidationBlob_Type);
#endif
#ifdef PY_VALIDATEPASSWORDINFO_PATCH
	PY_VALIDATEPASSWORDINFO_PATCH(&samr_ValidatePasswordInfo_Type);
#endif
#ifdef PY_VALIDATEPASSWORDREPCTR_PATCH
	PY_VALIDATEPASSWORDREPCTR_PATCH(&samr_ValidatePasswordRepCtr_Type);
#endif
#ifdef PY_VALIDATEPASSWORDREQ3_PATCH
	PY_VALIDATEPASSWORDREQ3_PATCH(&samr_ValidatePasswordReq3_Type);
#endif
#ifdef PY_VALIDATEPASSWORDREQ2_PATCH
	PY_VALIDATEPASSWORDREQ2_PATCH(&samr_ValidatePasswordReq2_Type);
#endif
#ifdef PY_VALIDATEPASSWORDREQ1_PATCH
	PY_VALIDATEPASSWORDREQ1_PATCH(&samr_ValidatePasswordReq1_Type);
#endif
#ifdef PY_SAMR_PATCH
	PY_SAMR_PATCH(&samr_InterfaceType);
#endif

	m = Py_InitModule3("samr", samr_methods, "samr DCE/RPC");
	if (m == NULL)
		return;

	PyModule_AddObject(m, "PASS_DONT_CHANGE_AT_NEXT_LOGON", PyInt_FromLong(0x00));
	PyModule_AddObject(m, "SAMR_FIELD_NT_PASSWORD_PRESENT", PyInt_FromLong(SAMR_FIELD_NT_PASSWORD_PRESENT));
	PyModule_AddObject(m, "DomainModifiedInformation2", PyInt_FromLong(DomainModifiedInformation2));
	PyModule_AddObject(m, "ACB_SMARTCARD_REQUIRED", PyInt_FromLong(ACB_SMARTCARD_REQUIRED));
	PyModule_AddObject(m, "UserLogonHoursInformation", PyInt_FromLong(UserLogonHoursInformation));
	PyModule_AddObject(m, "DomainGeneralInformation", PyInt_FromLong(DomainGeneralInformation));
	PyModule_AddObject(m, "SAMR_ACCESS_CREATE_DOMAIN", PyInt_FromLong(SAMR_ACCESS_CREATE_DOMAIN));
	PyModule_AddObject(m, "SAMR_FIELD_FORCE_PWD_CHANGE", PyInt_FromLong(SAMR_FIELD_FORCE_PWD_CHANGE));
	PyModule_AddObject(m, "DomainLockoutInformation", PyInt_FromLong(DomainLockoutInformation));
	PyModule_AddObject(m, "DOMAIN_PASSWORD_LOCKOUT_ADMINS", PyInt_FromLong(DOMAIN_PASSWORD_LOCKOUT_ADMINS));
	PyModule_AddObject(m, "GENERIC_RIGHTS_SAM_READ", PyInt_FromLong((STANDARD_RIGHTS_READ_ACCESS|SAMR_ACCESS_ENUM_DOMAINS)));
	PyModule_AddObject(m, "SAMR_ACCESS_LOOKUP_DOMAIN", PyInt_FromLong(SAMR_ACCESS_LOOKUP_DOMAIN));
	PyModule_AddObject(m, "SAMR_FIELD_PRIVATE_DATA", PyInt_FromLong(SAMR_FIELD_PRIVATE_DATA));
	PyModule_AddObject(m, "ACB_PARTIAL_SECRETS_ACCOUNT", PyInt_FromLong(ACB_PARTIAL_SECRETS_ACCOUNT));
	PyModule_AddObject(m, "UserControlInformation", PyInt_FromLong(UserControlInformation));
	PyModule_AddObject(m, "DomainLogoffInformation", PyInt_FromLong(DomainLogoffInformation));
	PyModule_AddObject(m, "SAMR_GROUP_ACCESS_GET_MEMBERS", PyInt_FromLong(SAMR_GROUP_ACCESS_GET_MEMBERS));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_SUCCESS", PyInt_FromLong(SAMR_VALIDATION_STATUS_SUCCESS));
	PyModule_AddObject(m, "SAMR_FIELD_CODE_PAGE", PyInt_FromLong(SAMR_FIELD_CODE_PAGE));
	PyModule_AddObject(m, "ACB_HOMDIRREQ", PyInt_FromLong(ACB_HOMDIRREQ));
	PyModule_AddObject(m, "GROUPINFOALL2", PyInt_FromLong(GROUPINFOALL2));
	PyModule_AddObject(m, "UserScriptInformation", PyInt_FromLong(UserScriptInformation));
	PyModule_AddObject(m, "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY", PyInt_FromLong(SAMR_VALIDATE_FIELD_PASSWORD_HISTORY));
	PyModule_AddObject(m, "UserPrimaryGroupInformation", PyInt_FromLong(UserPrimaryGroupInformation));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_GET_NAME_ETC", PyInt_FromLong(SAMR_USER_ACCESS_GET_NAME_ETC));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH", PyInt_FromLong(SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH));
	PyModule_AddObject(m, "UserInternal1Information", PyInt_FromLong(UserInternal1Information));
	PyModule_AddObject(m, "DOMAIN_SERVER_DISABLED", PyInt_FromLong(DOMAIN_SERVER_DISABLED));
	PyModule_AddObject(m, "SE_GROUP_USE_FOR_DENY_ONLY", PyInt_FromLong(SE_GROUP_USE_FOR_DENY_ONLY));
	PyModule_AddObject(m, "UserAccountNameInformation", PyInt_FromLong(UserAccountNameInformation));
	PyModule_AddObject(m, "UserAccountInformation", PyInt_FromLong(UserAccountInformation));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_CREATE_USER", PyInt_FromLong(SAMR_DOMAIN_ACCESS_CREATE_USER));
	PyModule_AddObject(m, "NetValidateAuthentication", PyInt_FromLong(NetValidateAuthentication));
	PyModule_AddObject(m, "SAMR_FIELD_ACCOUNT_NAME", PyInt_FromLong(SAMR_FIELD_ACCOUNT_NAME));
	PyModule_AddObject(m, "DomainPasswordInformation", PyInt_FromLong(DomainPasswordInformation));
	PyModule_AddObject(m, "SAMR_GROUP_ACCESS_ADD_MEMBER", PyInt_FromLong(SAMR_GROUP_ACCESS_ADD_MEMBER));
	PyModule_AddObject(m, "NetValidatePasswordReset", PyInt_FromLong(NetValidatePasswordReset));
	PyModule_AddObject(m, "SAMR_FIELD_LAST_LOGON", PyInt_FromLong(SAMR_FIELD_LAST_LOGON));
	PyModule_AddObject(m, "SE_GROUP_MANDATORY", PyInt_FromLong(SE_GROUP_MANDATORY));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_NOT_COMPLEX", PyInt_FromLong(SAM_PWD_CHANGE_NOT_COMPLEX));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP", PyInt_FromLong(SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP));
	PyModule_AddObject(m, "SAMR_FIELD_EXPIRED_FLAG", PyInt_FromLong(SAMR_FIELD_EXPIRED_FLAG));
	PyModule_AddObject(m, "SAMR_FIELD_LAST_PWD_CHANGE", PyInt_FromLong(SAMR_FIELD_LAST_PWD_CHANGE));
	PyModule_AddObject(m, "GENERIC_RIGHTS_USER_READ", PyInt_FromLong((STANDARD_RIGHTS_READ_ACCESS|SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP|SAMR_USER_ACCESS_GET_GROUPS|SAMR_USER_ACCESS_GET_ATTRIBUTES|SAMR_USER_ACCESS_GET_LOGONINFO|SAMR_USER_ACCESS_GET_LOCALE)));
	PyModule_AddObject(m, "SAMR_FIELD_LM_PASSWORD_PRESENT", PyInt_FromLong(SAMR_FIELD_LM_PASSWORD_PRESENT));
	PyModule_AddObject(m, "SAMR_FIELD_PARAMETERS", PyInt_FromLong(SAMR_FIELD_PARAMETERS));
	PyModule_AddObject(m, "UserPreferencesInformation", PyInt_FromLong(UserPreferencesInformation));
	PyModule_AddObject(m, "SAMR_FIELD_LOGON_SCRIPT", PyInt_FromLong(SAMR_FIELD_LOGON_SCRIPT));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT", PyInt_FromLong(SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_PASSWORD_TOO_LONG", PyInt_FromLong(SAM_PWD_CHANGE_PASSWORD_TOO_LONG));
	PyModule_AddObject(m, "ACB_DONT_REQUIRE_PREAUTH", PyInt_FromLong(ACB_DONT_REQUIRE_PREAUTH));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_PWD_IN_HISTORY", PyInt_FromLong(SAM_PWD_CHANGE_PWD_IN_HISTORY));
	PyModule_AddObject(m, "UserInternal4InformationNew", PyInt_FromLong(UserInternal4InformationNew));
	PyModule_AddObject(m, "UserInternal5Information", PyInt_FromLong(UserInternal5Information));
	PyModule_AddObject(m, "SAMR_VALIDATE_FIELD_LOCKOUT_TIME", PyInt_FromLong(SAMR_VALIDATE_FIELD_LOCKOUT_TIME));
	PyModule_AddObject(m, "SE_GROUP_LOGON_ID", PyInt_FromLong(SE_GROUP_LOGON_ID));
	PyModule_AddObject(m, "UserFullNameInformation", PyInt_FromLong(UserFullNameInformation));
	PyModule_AddObject(m, "DOMAIN_PASSWORD_COMPLEX", PyInt_FromLong(DOMAIN_PASSWORD_COMPLEX));
	PyModule_AddObject(m, "SAMR_ALIAS_ACCESS_GET_MEMBERS", PyInt_FromLong(SAMR_ALIAS_ACCESS_GET_MEMBERS));
	PyModule_AddObject(m, "SE_GROUP_OWNER", PyInt_FromLong(SE_GROUP_OWNER));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_SET_INFO_2", PyInt_FromLong(SAMR_DOMAIN_ACCESS_SET_INFO_2));
	PyModule_AddObject(m, "GENERIC_RIGHTS_GROUP_ALL_ACCESS", PyInt_FromLong((STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_GROUP_ACCESS_ALL_ACCESS)));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_BAD_PASSWORD", PyInt_FromLong(SAMR_VALIDATION_STATUS_BAD_PASSWORD));
	PyModule_AddObject(m, "GROUPINFOATTRIBUTES", PyInt_FromLong(GROUPINFOATTRIBUTES));
	PyModule_AddObject(m, "DomainStateInformation", PyInt_FromLong(DomainStateInformation));
	PyModule_AddObject(m, "ACB_SVRTRUST", PyInt_FromLong(ACB_SVRTRUST));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_NO_ERROR", PyInt_FromLong(SAM_PWD_CHANGE_NO_ERROR));
	PyModule_AddObject(m, "SAMR_ACCESS_INITIALIZE_SERVER", PyInt_FromLong(SAMR_ACCESS_INITIALIZE_SERVER));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR", PyInt_FromLong(SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR));
	PyModule_AddObject(m, "GENERIC_RIGHTS_ALIAS_ALL_ACCESS", PyInt_FromLong((STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_ALIAS_ACCESS_ALL_ACCESS)));
	PyModule_AddObject(m, "DomainReplicationInformation", PyInt_FromLong(DomainReplicationInformation));
	PyModule_AddObject(m, "ACB_USE_AES_KEYS", PyInt_FromLong(ACB_USE_AES_KEYS));
	PyModule_AddObject(m, "DOMAIN_REFUSE_PASSWORD_CHANGE", PyInt_FromLong(DOMAIN_REFUSE_PASSWORD_CHANGE));
	PyModule_AddObject(m, "SAMR_GROUP_ACCESS_REMOVE_MEMBER", PyInt_FromLong(SAMR_GROUP_ACCESS_REMOVE_MEMBER));
	PyModule_AddObject(m, "GROUPINFODESCRIPTION", PyInt_FromLong(GROUPINFODESCRIPTION));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_GET_GROUPS", PyInt_FromLong(SAMR_USER_ACCESS_GET_GROUPS));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS", PyInt_FromLong(SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS));
	PyModule_AddObject(m, "ACB_ENC_TXT_PWD_ALLOWED", PyInt_FromLong(ACB_ENC_TXT_PWD_ALLOWED));
	PyModule_AddObject(m, "SAMR_FIELD_ACCT_FLAGS", PyInt_FromLong(SAMR_FIELD_ACCT_FLAGS));
	PyModule_AddObject(m, "DomainNameInformation", PyInt_FromLong(DomainNameInformation));
	PyModule_AddObject(m, "SAMR_FIELD_SEC_DESC", PyInt_FromLong(SAMR_FIELD_SEC_DESC));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_GET_LOCALE", PyInt_FromLong(SAMR_USER_ACCESS_GET_LOCALE));
	PyModule_AddObject(m, "SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET", PyInt_FromLong(SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET));
	PyModule_AddObject(m, "DomainOemInformation", PyInt_FromLong(DomainOemInformation));
	PyModule_AddObject(m, "DOMAIN_SERVER_ENABLED", PyInt_FromLong(DOMAIN_SERVER_ENABLED));
	PyModule_AddObject(m, "SAMR_FIELD_NUM_LOGONS", PyInt_FromLong(SAMR_FIELD_NUM_LOGONS));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_CREATE_GROUP", PyInt_FromLong(SAMR_DOMAIN_ACCESS_CREATE_GROUP));
	PyModule_AddObject(m, "DOMAIN_PASSWORD_NO_ANON_CHANGE", PyInt_FromLong(DOMAIN_PASSWORD_NO_ANON_CHANGE));
	PyModule_AddObject(m, "SE_GROUP_RESOURCE", PyInt_FromLong(SE_GROUP_RESOURCE));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_GET_LOGONINFO", PyInt_FromLong(SAMR_USER_ACCESS_GET_LOGONINFO));
	PyModule_AddObject(m, "ALIASINFONAME", PyInt_FromLong(ALIASINFONAME));
	PyModule_AddObject(m, "SAMR_ALIAS_ACCESS_ADD_MEMBER", PyInt_FromLong(SAMR_ALIAS_ACCESS_ADD_MEMBER));
	PyModule_AddObject(m, "DOMAIN_PASSWORD_STORE_CLEARTEXT", PyInt_FromLong(DOMAIN_PASSWORD_STORE_CLEARTEXT));
	PyModule_AddObject(m, "DomainModifiedInformation", PyInt_FromLong(DomainModifiedInformation));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1", PyInt_FromLong(SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1));
	PyModule_AddObject(m, "SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT", PyInt_FromLong(SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT));
	PyModule_AddObject(m, "PASS_MUST_CHANGE_AT_NEXT_LOGON", PyInt_FromLong(0x01));
	PyModule_AddObject(m, "ACB_AUTOLOCK", PyInt_FromLong(ACB_AUTOLOCK));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2", PyInt_FromLong(SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2));
	PyModule_AddObject(m, "SAMR_FIELD_ACCT_EXPIRY", PyInt_FromLong(SAMR_FIELD_ACCT_EXPIRY));
	PyModule_AddObject(m, "UserExpiresInformation", PyInt_FromLong(UserExpiresInformation));
	PyModule_AddObject(m, "SAMR_ROLE_DOMAIN_BDC", PyInt_FromLong(SAMR_ROLE_DOMAIN_BDC));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT", PyInt_FromLong(SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT));
	PyModule_AddObject(m, "SAMR_FIELD_HOME_DRIVE", PyInt_FromLong(SAMR_FIELD_HOME_DRIVE));
	PyModule_AddObject(m, "UserAllInformation", PyInt_FromLong(UserAllInformation));
	PyModule_AddObject(m, "UserParametersInformation", PyInt_FromLong(UserParametersInformation));
	PyModule_AddObject(m, "SAMR_ACCESS_CONNECT_TO_SERVER", PyInt_FromLong(SAMR_ACCESS_CONNECT_TO_SERVER));
	PyModule_AddObject(m, "UserNameInformation", PyInt_FromLong(UserNameInformation));
	PyModule_AddObject(m, "ALIASINFODESCRIPTION", PyInt_FromLong(ALIASINFODESCRIPTION));
	PyModule_AddObject(m, "SAMR_ALIAS_ACCESS_LOOKUP_INFO", PyInt_FromLong(SAMR_ALIAS_ACCESS_LOOKUP_INFO));
	PyModule_AddObject(m, "GENERIC_RIGHTS_SAM_WRITE", PyInt_FromLong((STANDARD_RIGHTS_WRITE_ACCESS|SAMR_ACCESS_CREATE_DOMAIN|SAMR_ACCESS_INITIALIZE_SERVER|SAMR_ACCESS_SHUTDOWN_SERVER)));
	PyModule_AddObject(m, "SAM_DATABASE_DOMAIN", PyInt_FromLong(SAM_DATABASE_DOMAIN));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT", PyInt_FromLong(SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT));
	PyModule_AddObject(m, "GROUPINFOALL", PyInt_FromLong(GROUPINFOALL));
	PyModule_AddObject(m, "GENERIC_RIGHTS_USER_EXECUTE", PyInt_FromLong((STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_USER_ACCESS_CHANGE_PASSWORD|SAMR_USER_ACCESS_GET_NAME_ETC)));
	PyModule_AddObject(m, "ACB_NOT_DELEGATED", PyInt_FromLong(ACB_NOT_DELEGATED));
	PyModule_AddObject(m, "GENERIC_RIGHTS_GROUP_READ", PyInt_FromLong((STANDARD_RIGHTS_READ_ACCESS|SAMR_GROUP_ACCESS_GET_MEMBERS)));
	PyModule_AddObject(m, "SAMR_CONNECT_W2K", PyInt_FromLong(SAMR_CONNECT_W2K));
	PyModule_AddObject(m, "SAMR_FIELD_FULL_NAME", PyInt_FromLong(SAMR_FIELD_FULL_NAME));
	PyModule_AddObject(m, "SAMR_ACCESS_ALL_ACCESS", PyInt_FromLong(0x0000003F));
	PyModule_AddObject(m, "SAMR_ROLE_STANDALONE", PyInt_FromLong(SAMR_ROLE_STANDALONE));
	PyModule_AddObject(m, "SAMR_ACCESS_ENUM_DOMAINS", PyInt_FromLong(SAMR_ACCESS_ENUM_DOMAINS));
	PyModule_AddObject(m, "GENERIC_RIGHTS_ALIAS_READ", PyInt_FromLong((STANDARD_RIGHTS_READ_ACCESS|SAMR_ALIAS_ACCESS_GET_MEMBERS)));
	PyModule_AddObject(m, "ACB_TEMPDUP", PyInt_FromLong(ACB_TEMPDUP));
	PyModule_AddObject(m, "UserHomeInformation", PyInt_FromLong(UserHomeInformation));
	PyModule_AddObject(m, "DomainUasInformation", PyInt_FromLong(DomainUasInformation));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_GET_ATTRIBUTES", PyInt_FromLong(SAMR_USER_ACCESS_GET_ATTRIBUTES));
	PyModule_AddObject(m, "DOMAIN_PASSWORD_NO_CLEAR_CHANGE", PyInt_FromLong(DOMAIN_PASSWORD_NO_CLEAR_CHANGE));
	PyModule_AddObject(m, "SAMR_ENUM_USERS_MULTIPLIER", PyInt_FromLong(54));
	PyModule_AddObject(m, "ALIASINFOALL", PyInt_FromLong(ALIASINFOALL));
	PyModule_AddObject(m, "SAM_DATABASE_BUILTIN", PyInt_FromLong(SAM_DATABASE_BUILTIN));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_SET_ATTRIBUTES", PyInt_FromLong(SAMR_USER_ACCESS_SET_ATTRIBUTES));
	PyModule_AddObject(m, "SAMR_CONNECT_PRE_W2K", PyInt_FromLong(SAMR_CONNECT_PRE_W2K));
	PyModule_AddObject(m, "SAMR_FIELD_HOME_DIRECTORY", PyInt_FromLong(SAMR_FIELD_HOME_DIRECTORY));
	PyModule_AddObject(m, "UserGeneralInformation", PyInt_FromLong(UserGeneralInformation));
	PyModule_AddObject(m, "GENERIC_RIGHTS_ALIAS_EXECUTE", PyInt_FromLong((STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_ALIAS_ACCESS_LOOKUP_INFO)));
	PyModule_AddObject(m, "GENERIC_RIGHTS_SAM_EXECUTE", PyInt_FromLong((STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_ACCESS_LOOKUP_DOMAIN|SAMR_ACCESS_CONNECT_TO_SERVER)));
	PyModule_AddObject(m, "DomainServerRoleInformation", PyInt_FromLong(DomainServerRoleInformation));
	PyModule_AddObject(m, "SAMR_ROLE_DOMAIN_PDC", PyInt_FromLong(SAMR_ROLE_DOMAIN_PDC));
	PyModule_AddObject(m, "UserProfileInformation", PyInt_FromLong(UserProfileInformation));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_PWD_TOO_SHORT", PyInt_FromLong(SAMR_VALIDATION_STATUS_PWD_TOO_SHORT));
	PyModule_AddObject(m, "ACB_PWNOTREQ", PyInt_FromLong(ACB_PWNOTREQ));
	PyModule_AddObject(m, "ACB_TRUSTED_FOR_DELEGATION", PyInt_FromLong(ACB_TRUSTED_FOR_DELEGATION));
	PyModule_AddObject(m, "ACB_NO_AUTH_DATA_REQD", PyInt_FromLong(ACB_NO_AUTH_DATA_REQD));
	PyModule_AddObject(m, "ACB_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION", PyInt_FromLong(ACB_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION));
	PyModule_AddObject(m, "GENERIC_RIGHTS_GROUP_EXECUTE", PyInt_FromLong((STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_GROUP_ACCESS_LOOKUP_INFO)));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT", PyInt_FromLong(SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT));
	PyModule_AddObject(m, "ACB_DOMTRUST", PyInt_FromLong(ACB_DOMTRUST));
	PyModule_AddObject(m, "SAMR_ALIAS_ACCESS_REMOVE_MEMBER", PyInt_FromLong(SAMR_ALIAS_ACCESS_REMOVE_MEMBER));
	PyModule_AddObject(m, "SAMR_FIELD_COUNTRY_CODE", PyInt_FromLong(SAMR_FIELD_COUNTRY_CODE));
	PyModule_AddObject(m, "DomainGeneralInformation2", PyInt_FromLong(DomainGeneralInformation2));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS", PyInt_FromLong(SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS));
	PyModule_AddObject(m, "GENERIC_RIGHTS_DOMAIN_WRITE", PyInt_FromLong((STANDARD_RIGHTS_WRITE_ACCESS|SAMR_DOMAIN_ACCESS_SET_INFO_3|SAMR_DOMAIN_ACCESS_CREATE_ALIAS|SAMR_DOMAIN_ACCESS_CREATE_GROUP|SAMR_DOMAIN_ACCESS_CREATE_USER|SAMR_DOMAIN_ACCESS_SET_INFO_2|SAMR_DOMAIN_ACCESS_SET_INFO_1)));
	PyModule_AddObject(m, "SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME", PyInt_FromLong(SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_SET_LOC_COM", PyInt_FromLong(SAMR_USER_ACCESS_SET_LOC_COM));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_PWD_TOO_LONG", PyInt_FromLong(SAMR_VALIDATION_STATUS_PWD_TOO_LONG));
	PyModule_AddObject(m, "ACB_NORMAL", PyInt_FromLong(ACB_NORMAL));
	PyModule_AddObject(m, "SAMR_GROUP_ACCESS_LOOKUP_INFO", PyInt_FromLong(SAMR_GROUP_ACCESS_LOOKUP_INFO));
	PyModule_AddObject(m, "SAMR_ROLE_DOMAIN_MEMBER", PyInt_FromLong(SAMR_ROLE_DOMAIN_MEMBER));
	PyModule_AddObject(m, "SAMR_FIELD_PROFILE_PATH", PyInt_FromLong(SAMR_FIELD_PROFILE_PATH));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD", PyInt_FromLong(SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD));
	PyModule_AddObject(m, "UserInternal4Information", PyInt_FromLong(UserInternal4Information));
	PyModule_AddObject(m, "GROUPINFONAME", PyInt_FromLong(GROUPINFONAME));
	PyModule_AddObject(m, "NetValidatePasswordChange", PyInt_FromLong(NetValidatePasswordChange));
	PyModule_AddObject(m, "ACB_PWNOEXP", PyInt_FromLong(ACB_PWNOEXP));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_CREATE_ALIAS", PyInt_FromLong(SAMR_DOMAIN_ACCESS_CREATE_ALIAS));
	PyModule_AddObject(m, "SAMR_FIELD_PRIMARY_GID", PyInt_FromLong(SAMR_FIELD_PRIMARY_GID));
	PyModule_AddObject(m, "SAMR_ACCESS_SHUTDOWN_SERVER", PyInt_FromLong(SAMR_ACCESS_SHUTDOWN_SERVER));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED", PyInt_FromLong(SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED));
	PyModule_AddObject(m, "ACB_PW_EXPIRED", PyInt_FromLong(ACB_PW_EXPIRED));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_USERNAME_IN_PASSWORD", PyInt_FromLong(SAM_PWD_CHANGE_USERNAME_IN_PASSWORD));
	PyModule_AddObject(m, "GENERIC_RIGHTS_SAM_ALL_ACCESS", PyInt_FromLong((STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_ACCESS_ALL_ACCESS)));
	PyModule_AddObject(m, "ACB_USE_DES_KEY_ONLY", PyInt_FromLong(ACB_USE_DES_KEY_ONLY));
	PyModule_AddObject(m, "GENERIC_RIGHTS_DOMAIN_ALL_ACCESS", PyInt_FromLong((STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_DOMAIN_ACCESS_ALL_ACCESS)));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", PyInt_FromLong(SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP));
	PyModule_AddObject(m, "ACB_MNS", PyInt_FromLong(ACB_MNS));
	PyModule_AddObject(m, "SAMR_FIELD_BAD_PWD_COUNT", PyInt_FromLong(SAMR_FIELD_BAD_PWD_COUNT));
	PyModule_AddObject(m, "ACB_DISABLED", PyInt_FromLong(ACB_DISABLED));
	PyModule_AddObject(m, "SAMR_ALIAS_ACCESS_ALL_ACCESS", PyInt_FromLong(0x0000001F));
	PyModule_AddObject(m, "GENERIC_RIGHTS_ALIAS_WRITE", PyInt_FromLong((STANDARD_RIGHTS_WRITE_ACCESS|SAMR_ALIAS_ACCESS_REMOVE_MEMBER|SAMR_ALIAS_ACCESS_ADD_MEMBER|SAMR_ALIAS_ACCESS_SET_INFO)));
	PyModule_AddObject(m, "UserInternal5InformationNew", PyInt_FromLong(UserInternal5InformationNew));
	PyModule_AddObject(m, "UserAdminCommentInformation", PyInt_FromLong(UserAdminCommentInformation));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_ALL_ACCESS", PyInt_FromLong(0x000007FF));
	PyModule_AddObject(m, "UserLogonInformation", PyInt_FromLong(UserLogonInformation));
	PyModule_AddObject(m, "SAMR_FIELD_OWF_PWD", PyInt_FromLong(SAMR_FIELD_OWF_PWD));
	PyModule_AddObject(m, "SAMR_FIELD_LOGON_HOURS", PyInt_FromLong(SAMR_FIELD_LOGON_HOURS));
	PyModule_AddObject(m, "SAMR_FIELD_ALLOW_PWD_CHANGE", PyInt_FromLong(SAMR_FIELD_ALLOW_PWD_CHANGE));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT", PyInt_FromLong(SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT));
	PyModule_AddObject(m, "GENERIC_RIGHTS_GROUP_WRITE", PyInt_FromLong((STANDARD_RIGHTS_WRITE_ACCESS|SAMR_GROUP_ACCESS_REMOVE_MEMBER|SAMR_GROUP_ACCESS_ADD_MEMBER|SAMR_GROUP_ACCESS_SET_INFO)));
	PyModule_AddObject(m, "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH", PyInt_FromLong(SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_PASSWORD_TOO_SHORT", PyInt_FromLong(SAM_PWD_CHANGE_PASSWORD_TOO_SHORT));
	PyModule_AddObject(m, "SAMR_FIELD_RID", PyInt_FromLong(SAMR_FIELD_RID));
	PyModule_AddObject(m, "SAMR_GROUP_ACCESS_SET_INFO", PyInt_FromLong(SAMR_GROUP_ACCESS_SET_INFO));
	PyModule_AddObject(m, "GENERIC_RIGHTS_DOMAIN_EXECUTE", PyInt_FromLong((STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT|SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS|SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1)));
	PyModule_AddObject(m, "SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE", PyInt_FromLong(SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE));
	PyModule_AddObject(m, "SAM_PWD_CHANGE_FAILED_BY_FILTER", PyInt_FromLong(SAM_PWD_CHANGE_FAILED_BY_FILTER));
	PyModule_AddObject(m, "ACB_WSTRUST", PyInt_FromLong(ACB_WSTRUST));
	PyModule_AddObject(m, "SAMR_CONNECT_AFTER_W2K", PyInt_FromLong(SAMR_CONNECT_AFTER_W2K));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_SET_PASSWORD", PyInt_FromLong(SAMR_USER_ACCESS_SET_PASSWORD));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_CHANGE_PASSWORD", PyInt_FromLong(SAMR_USER_ACCESS_CHANGE_PASSWORD));
	PyModule_AddObject(m, "GENERIC_RIGHTS_DOMAIN_READ", PyInt_FromLong((STANDARD_RIGHTS_READ_ACCESS|SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS|SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2)));
	PyModule_AddObject(m, "SAMR_USER_ACCESS_ALL_ACCESS", PyInt_FromLong(0x000007FF));
	PyModule_AddObject(m, "SAMR_FIELD_LAST_LOGOFF", PyInt_FromLong(SAMR_FIELD_LAST_LOGOFF));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_SET_INFO_1", PyInt_FromLong(SAMR_DOMAIN_ACCESS_SET_INFO_1));
	PyModule_AddObject(m, "UserWorkStationsInformation", PyInt_FromLong(UserWorkStationsInformation));
	PyModule_AddObject(m, "SAMR_ALIAS_ACCESS_SET_INFO", PyInt_FromLong(SAMR_ALIAS_ACCESS_SET_INFO));
	PyModule_AddObject(m, "GENERIC_RIGHTS_USER_ALL_ACCESS", PyInt_FromLong((STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_USER_ACCESS_ALL_ACCESS)));
	PyModule_AddObject(m, "SE_GROUP_ENABLED", PyInt_FromLong(SE_GROUP_ENABLED));
	PyModule_AddObject(m, "SAMR_FIELD_DESCRIPTION", PyInt_FromLong(SAMR_FIELD_DESCRIPTION));
	PyModule_AddObject(m, "GENERIC_RIGHTS_USER_WRITE", PyInt_FromLong((STANDARD_RIGHTS_WRITE_ACCESS|SAMR_USER_ACCESS_CHANGE_PASSWORD|SAMR_USER_ACCESS_SET_LOC_COM|SAMR_USER_ACCESS_SET_ATTRIBUTES|SAMR_USER_ACCESS_SET_PASSWORD|SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP)));
	PyModule_AddObject(m, "SAMR_DOMAIN_ACCESS_SET_INFO_3", PyInt_FromLong(SAMR_DOMAIN_ACCESS_SET_INFO_3));
	PyModule_AddObject(m, "SAM_DATABASE_PRIVS", PyInt_FromLong(SAM_DATABASE_PRIVS));
	PyModule_AddObject(m, "SAMR_FIELD_COMMENT", PyInt_FromLong(SAMR_FIELD_COMMENT));
	PyModule_AddObject(m, "SE_GROUP_ENABLED_BY_DEFAULT", PyInt_FromLong(SE_GROUP_ENABLED_BY_DEFAULT));
	PyModule_AddObject(m, "SAMR_FIELD_WORKSTATIONS", PyInt_FromLong(SAMR_FIELD_WORKSTATIONS));
	PyModule_AddObject(m, "SAMR_GROUP_ACCESS_ALL_ACCESS", PyInt_FromLong(0x0000001F));
	Py_INCREF((PyObject *)(void *)&samr_SamEntry_Type);
	PyModule_AddObject(m, "SamEntry", (PyObject *)(void *)&samr_SamEntry_Type);
	Py_INCREF((PyObject *)(void *)&samr_SamArray_Type);
	PyModule_AddObject(m, "SamArray", (PyObject *)(void *)&samr_SamArray_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo1_Type);
	PyModule_AddObject(m, "DomInfo1", (PyObject *)(void *)&samr_DomInfo1_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomGeneralInformation_Type);
	PyModule_AddObject(m, "DomGeneralInformation", (PyObject *)(void *)&samr_DomGeneralInformation_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo3_Type);
	PyModule_AddObject(m, "DomInfo3", (PyObject *)(void *)&samr_DomInfo3_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomOEMInformation_Type);
	PyModule_AddObject(m, "DomOEMInformation", (PyObject *)(void *)&samr_DomOEMInformation_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo5_Type);
	PyModule_AddObject(m, "DomInfo5", (PyObject *)(void *)&samr_DomInfo5_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo6_Type);
	PyModule_AddObject(m, "DomInfo6", (PyObject *)(void *)&samr_DomInfo6_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo7_Type);
	PyModule_AddObject(m, "DomInfo7", (PyObject *)(void *)&samr_DomInfo7_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo8_Type);
	PyModule_AddObject(m, "DomInfo8", (PyObject *)(void *)&samr_DomInfo8_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo9_Type);
	PyModule_AddObject(m, "DomInfo9", (PyObject *)(void *)&samr_DomInfo9_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomGeneralInformation2_Type);
	PyModule_AddObject(m, "DomGeneralInformation2", (PyObject *)(void *)&samr_DomGeneralInformation2_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo12_Type);
	PyModule_AddObject(m, "DomInfo12", (PyObject *)(void *)&samr_DomInfo12_Type);
	Py_INCREF((PyObject *)(void *)&samr_DomInfo13_Type);
	PyModule_AddObject(m, "DomInfo13", (PyObject *)(void *)&samr_DomInfo13_Type);
	Py_INCREF((PyObject *)(void *)&samr_Ids_Type);
	PyModule_AddObject(m, "Ids", (PyObject *)(void *)&samr_Ids_Type);
	Py_INCREF((PyObject *)(void *)&samr_GroupInfoAll_Type);
	PyModule_AddObject(m, "GroupInfoAll", (PyObject *)(void *)&samr_GroupInfoAll_Type);
	Py_INCREF((PyObject *)(void *)&samr_GroupInfoAttributes_Type);
	PyModule_AddObject(m, "GroupInfoAttributes", (PyObject *)(void *)&samr_GroupInfoAttributes_Type);
	Py_INCREF((PyObject *)(void *)&samr_GroupInfoDescription_Type);
	PyModule_AddObject(m, "GroupInfoDescription", (PyObject *)(void *)&samr_GroupInfoDescription_Type);
	Py_INCREF((PyObject *)(void *)&samr_RidAttrArray_Type);
	PyModule_AddObject(m, "RidAttrArray", (PyObject *)(void *)&samr_RidAttrArray_Type);
	Py_INCREF((PyObject *)(void *)&samr_AliasInfoAll_Type);
	PyModule_AddObject(m, "AliasInfoAll", (PyObject *)(void *)&samr_AliasInfoAll_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo1_Type);
	PyModule_AddObject(m, "UserInfo1", (PyObject *)(void *)&samr_UserInfo1_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo2_Type);
	PyModule_AddObject(m, "UserInfo2", (PyObject *)(void *)&samr_UserInfo2_Type);
	Py_INCREF((PyObject *)(void *)&samr_LogonHours_Type);
	PyModule_AddObject(m, "LogonHours", (PyObject *)(void *)&samr_LogonHours_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo3_Type);
	PyModule_AddObject(m, "UserInfo3", (PyObject *)(void *)&samr_UserInfo3_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo4_Type);
	PyModule_AddObject(m, "UserInfo4", (PyObject *)(void *)&samr_UserInfo4_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo5_Type);
	PyModule_AddObject(m, "UserInfo5", (PyObject *)(void *)&samr_UserInfo5_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo6_Type);
	PyModule_AddObject(m, "UserInfo6", (PyObject *)(void *)&samr_UserInfo6_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo7_Type);
	PyModule_AddObject(m, "UserInfo7", (PyObject *)(void *)&samr_UserInfo7_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo8_Type);
	PyModule_AddObject(m, "UserInfo8", (PyObject *)(void *)&samr_UserInfo8_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo9_Type);
	PyModule_AddObject(m, "UserInfo9", (PyObject *)(void *)&samr_UserInfo9_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo10_Type);
	PyModule_AddObject(m, "UserInfo10", (PyObject *)(void *)&samr_UserInfo10_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo11_Type);
	PyModule_AddObject(m, "UserInfo11", (PyObject *)(void *)&samr_UserInfo11_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo12_Type);
	PyModule_AddObject(m, "UserInfo12", (PyObject *)(void *)&samr_UserInfo12_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo13_Type);
	PyModule_AddObject(m, "UserInfo13", (PyObject *)(void *)&samr_UserInfo13_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo14_Type);
	PyModule_AddObject(m, "UserInfo14", (PyObject *)(void *)&samr_UserInfo14_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo16_Type);
	PyModule_AddObject(m, "UserInfo16", (PyObject *)(void *)&samr_UserInfo16_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo17_Type);
	PyModule_AddObject(m, "UserInfo17", (PyObject *)(void *)&samr_UserInfo17_Type);
	Py_INCREF((PyObject *)(void *)&samr_Password_Type);
	PyModule_AddObject(m, "Password", (PyObject *)(void *)&samr_Password_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo18_Type);
	PyModule_AddObject(m, "UserInfo18", (PyObject *)(void *)&samr_UserInfo18_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo20_Type);
	PyModule_AddObject(m, "UserInfo20", (PyObject *)(void *)&samr_UserInfo20_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo21_Type);
	PyModule_AddObject(m, "UserInfo21", (PyObject *)(void *)&samr_UserInfo21_Type);
	Py_INCREF((PyObject *)(void *)&samr_CryptPassword_Type);
	PyModule_AddObject(m, "CryptPassword", (PyObject *)(void *)&samr_CryptPassword_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo23_Type);
	PyModule_AddObject(m, "UserInfo23", (PyObject *)(void *)&samr_UserInfo23_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo24_Type);
	PyModule_AddObject(m, "UserInfo24", (PyObject *)(void *)&samr_UserInfo24_Type);
	Py_INCREF((PyObject *)(void *)&samr_CryptPasswordEx_Type);
	PyModule_AddObject(m, "CryptPasswordEx", (PyObject *)(void *)&samr_CryptPasswordEx_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo25_Type);
	PyModule_AddObject(m, "UserInfo25", (PyObject *)(void *)&samr_UserInfo25_Type);
	Py_INCREF((PyObject *)(void *)&samr_UserInfo26_Type);
	PyModule_AddObject(m, "UserInfo26", (PyObject *)(void *)&samr_UserInfo26_Type);
	Py_INCREF((PyObject *)(void *)&samr_RidWithAttribute_Type);
	PyModule_AddObject(m, "RidWithAttribute", (PyObject *)(void *)&samr_RidWithAttribute_Type);
	Py_INCREF((PyObject *)(void *)&samr_RidWithAttributeArray_Type);
	PyModule_AddObject(m, "RidWithAttributeArray", (PyObject *)(void *)&samr_RidWithAttributeArray_Type);
	Py_INCREF((PyObject *)(void *)&samr_DispEntryGeneral_Type);
	PyModule_AddObject(m, "DispEntryGeneral", (PyObject *)(void *)&samr_DispEntryGeneral_Type);
	Py_INCREF((PyObject *)(void *)&samr_DispInfoGeneral_Type);
	PyModule_AddObject(m, "DispInfoGeneral", (PyObject *)(void *)&samr_DispInfoGeneral_Type);
	Py_INCREF((PyObject *)(void *)&samr_DispEntryFull_Type);
	PyModule_AddObject(m, "DispEntryFull", (PyObject *)(void *)&samr_DispEntryFull_Type);
	Py_INCREF((PyObject *)(void *)&samr_DispInfoFull_Type);
	PyModule_AddObject(m, "DispInfoFull", (PyObject *)(void *)&samr_DispInfoFull_Type);
	Py_INCREF((PyObject *)(void *)&samr_DispEntryFullGroup_Type);
	PyModule_AddObject(m, "DispEntryFullGroup", (PyObject *)(void *)&samr_DispEntryFullGroup_Type);
	Py_INCREF((PyObject *)(void *)&samr_DispInfoFullGroups_Type);
	PyModule_AddObject(m, "DispInfoFullGroups", (PyObject *)(void *)&samr_DispInfoFullGroups_Type);
	Py_INCREF((PyObject *)(void *)&samr_DispEntryAscii_Type);
	PyModule_AddObject(m, "DispEntryAscii", (PyObject *)(void *)&samr_DispEntryAscii_Type);
	Py_INCREF((PyObject *)(void *)&samr_DispInfoAscii_Type);
	PyModule_AddObject(m, "DispInfoAscii", (PyObject *)(void *)&samr_DispInfoAscii_Type);
	Py_INCREF((PyObject *)(void *)&samr_PwInfo_Type);
	PyModule_AddObject(m, "PwInfo", (PyObject *)(void *)&samr_PwInfo_Type);
	Py_INCREF((PyObject *)(void *)&userPwdChangeFailureInformation_Type);
	PyModule_AddObject(m, "userPwdChangeFailureInformation", (PyObject *)(void *)&userPwdChangeFailureInformation_Type);
	Py_INCREF((PyObject *)(void *)&samr_ConnectInfo1_Type);
	PyModule_AddObject(m, "ConnectInfo1", (PyObject *)(void *)&samr_ConnectInfo1_Type);
	Py_INCREF((PyObject *)(void *)&samr_ValidationBlob_Type);
	PyModule_AddObject(m, "ValidationBlob", (PyObject *)(void *)&samr_ValidationBlob_Type);
	Py_INCREF((PyObject *)(void *)&samr_ValidatePasswordInfo_Type);
	PyModule_AddObject(m, "ValidatePasswordInfo", (PyObject *)(void *)&samr_ValidatePasswordInfo_Type);
	Py_INCREF((PyObject *)(void *)&samr_ValidatePasswordRepCtr_Type);
	PyModule_AddObject(m, "ValidatePasswordRepCtr", (PyObject *)(void *)&samr_ValidatePasswordRepCtr_Type);
	Py_INCREF((PyObject *)(void *)&samr_ValidatePasswordReq3_Type);
	PyModule_AddObject(m, "ValidatePasswordReq3", (PyObject *)(void *)&samr_ValidatePasswordReq3_Type);
	Py_INCREF((PyObject *)(void *)&samr_ValidatePasswordReq2_Type);
	PyModule_AddObject(m, "ValidatePasswordReq2", (PyObject *)(void *)&samr_ValidatePasswordReq2_Type);
	Py_INCREF((PyObject *)(void *)&samr_ValidatePasswordReq1_Type);
	PyModule_AddObject(m, "ValidatePasswordReq1", (PyObject *)(void *)&samr_ValidatePasswordReq1_Type);
	Py_INCREF((PyObject *)(void *)&samr_InterfaceType);
	PyModule_AddObject(m, "samr", (PyObject *)(void *)&samr_InterfaceType);
#ifdef PY_MOD_SAMR_PATCH
	PY_MOD_SAMR_PATCH(m);
#endif

}
