
/* 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 "autoconf/librpc/gen_ndr/ndr_drsuapi.h"
#include "autoconf/librpc/gen_ndr/ndr_drsuapi_c.h"

#include "librpc/gen_ndr/security.h"
#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/lsa.h"
#include "librpc/gen_ndr/samr.h"
staticforward PyTypeObject drsuapi_DsBindInfo24_Type;
staticforward PyTypeObject drsuapi_DsBindInfo28_Type;
staticforward PyTypeObject drsuapi_DsBindInfo48_Type;
staticforward PyTypeObject drsuapi_DsBindInfoFallBack_Type;
staticforward PyTypeObject drsuapi_DsBindInfoCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjectIdentifier_Type;
staticforward PyTypeObject drsuapi_DsReplicaSyncRequest1_Type;
staticforward PyTypeObject drsuapi_DsReplicaHighWaterMark_Type;
staticforward PyTypeObject drsuapi_DsReplicaCursor_Type;
staticforward PyTypeObject drsuapi_DsReplicaCursorCtrEx_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesRequest5_Type;
staticforward PyTypeObject drsuapi_DsReplicaOID_Type;
staticforward PyTypeObject drsuapi_DsReplicaOIDMapping_Type;
staticforward PyTypeObject drsuapi_DsReplicaOIDMapping_Ctr_Type;
staticforward PyTypeObject drsuapi_DsPartialAttributeSet_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesRequest8_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesRequest10_Type;
staticforward PyTypeObject drsuapi_DsReplicaCursor2_Type;
staticforward PyTypeObject drsuapi_DsReplicaCursor2CtrEx_Type;
staticforward PyTypeObject drsuapi_DsAttributeValue_Type;
staticforward PyTypeObject drsuapi_DsAttributeValueCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjectIdentifier3_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjectIdentifier3Binary_Type;
staticforward PyTypeObject drsuapi_DsReplicaAttribute_Type;
staticforward PyTypeObject drsuapi_DsReplicaAttributeCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaObject_Type;
staticforward PyTypeObject drsuapi_DsReplicaMetaData_Type;
staticforward PyTypeObject drsuapi_DsReplicaMetaDataCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjectListItemEx_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesCtr1_Type;
staticforward PyTypeObject drsuapi_DsReplicaLinkedAttribute_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesCtr6_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesCtr1TS_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesCtr6TS_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesMSZIPCtr1_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesMSZIPCtr6_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesXPRESSCtr1_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesXPRESSCtr6_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesCtr2_Type;
staticforward PyTypeObject drsuapi_DsGetNCChangesCtr7_Type;
staticforward PyTypeObject drsuapi_DsReplicaUpdateRefsRequest1_Type;
staticforward PyTypeObject drsuapi_DsReplicaAddRequest1_Type;
staticforward PyTypeObject drsuapi_DsReplicaAddRequest2_Type;
staticforward PyTypeObject drsuapi_DsReplicaDelRequest1_Type;
staticforward PyTypeObject drsuapi_DsReplicaModRequest1_Type;
staticforward PyTypeObject drsuapi_DsGetMembershipsCtr1_Type;
staticforward PyTypeObject drsuapi_DsGetMembershipsRequest1_Type;
staticforward PyTypeObject drsuapi_DsGetNT4ChangeLogRequest1_Type;
staticforward PyTypeObject drsuapi_DsGetNT4ChangeLogInfo1_Type;
staticforward PyTypeObject drsuapi_DsNameString_Type;
staticforward PyTypeObject drsuapi_DsNameRequest1_Type;
staticforward PyTypeObject drsuapi_DsNameInfo1_Type;
staticforward PyTypeObject drsuapi_DsNameCtr1_Type;
staticforward PyTypeObject drsuapi_DsWriteAccountSpnRequest1_Type;
staticforward PyTypeObject drsuapi_DsWriteAccountSpnResult1_Type;
staticforward PyTypeObject drsuapi_DsRemoveDSServerRequest1_Type;
staticforward PyTypeObject drsuapi_DsRemoveDSServerResult1_Type;
staticforward PyTypeObject drsuapi_DsGetDCInfoRequest1_Type;
staticforward PyTypeObject drsuapi_DsGetDCInfo1_Type;
staticforward PyTypeObject drsuapi_DsGetDCInfoCtr1_Type;
staticforward PyTypeObject drsuapi_DsGetDCInfo2_Type;
staticforward PyTypeObject drsuapi_DsGetDCInfoCtr2_Type;
staticforward PyTypeObject drsuapi_DsGetDCInfo3_Type;
staticforward PyTypeObject drsuapi_DsGetDCInfoCtr3_Type;
staticforward PyTypeObject drsuapi_DsGetDCConnection01_Type;
staticforward PyTypeObject drsuapi_DsGetDCConnectionCtr01_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjectListItem_Type;
staticforward PyTypeObject drsuapi_DsAddEntryRequest2_Type;
staticforward PyTypeObject drsuapi_SecBuffer_Type;
staticforward PyTypeObject drsuapi_SecBufferDesc_Type;
staticforward PyTypeObject drsuapi_DsAddEntryRequest3_Type;
staticforward PyTypeObject drsuapi_DsAddEntryErrorInfoX_Type;
staticforward PyTypeObject drsuapi_DsAddEntry_AttrErr_V1_Type;
staticforward PyTypeObject drsuapi_DsAddEntry_AttrErrListItem_V1_Type;
staticforward PyTypeObject drsuapi_DsAddEntryErrorInfo_Attr_V1_Type;
staticforward PyTypeObject drsuapi_DsAddEntryErrorInfo_Name_V1_Type;
staticforward PyTypeObject drsuapi_NameResOp_V1_Type;
staticforward PyTypeObject drsuapi_DsaAddressListItem_V1_Type;
staticforward PyTypeObject drsuapi_DsAddEntry_RefErrListItem_V1_Type;
staticforward PyTypeObject drsuapi_DsAddEntryErrorInfo_Referr_V1_Type;
staticforward PyTypeObject drsuapi_DsAddEntry_ErrData_V1_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjectIdentifier2_Type;
staticforward PyTypeObject drsuapi_DsAddEntryCtr2_Type;
staticforward PyTypeObject drsuapi_DsAddEntryCtr3_Type;
staticforward PyTypeObject drsuapi_DsExecuteKCC1_Type;
staticforward PyTypeObject drsuapi_DsReplicaGetInfoRequest1_Type;
staticforward PyTypeObject drsuapi_DsReplicaGetInfoRequest2_Type;
staticforward PyTypeObject drsuapi_DsReplicaNeighbour_Type;
staticforward PyTypeObject drsuapi_DsReplicaNeighbourCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaCursorCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjMetaData_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjMetaDataCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaKccDsaFailure_Type;
staticforward PyTypeObject drsuapi_DsReplicaKccDsaFailuresCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaOp_Type;
staticforward PyTypeObject drsuapi_DsReplicaOpCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaAttrValMetaData_Type;
staticforward PyTypeObject drsuapi_DsReplicaAttrValMetaDataCtr_Type;
staticforward PyTypeObject drsuapi_DsReplicaCursor2Ctr_Type;
staticforward PyTypeObject drsuapi_DsReplicaCursor3_Type;
staticforward PyTypeObject drsuapi_DsReplicaCursor3Ctr_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjMetaData2_Type;
staticforward PyTypeObject drsuapi_DsReplicaObjMetaData2Ctr_Type;
staticforward PyTypeObject drsuapi_DsReplicaAttrValMetaData2_Type;
staticforward PyTypeObject drsuapi_DsReplicaAttrValMetaData2Ctr_Type;
staticforward PyTypeObject drsuapi_DsReplicaConnection04_Type;
staticforward PyTypeObject drsuapi_DsReplicaConnection04Ctr_Type;
staticforward PyTypeObject drsuapi_DsReplica06_Type;
staticforward PyTypeObject drsuapi_DsReplica06Ctr_Type;
staticforward PyTypeObject drsuapi_DsGetMemberships2Ctr1_Type;
staticforward PyTypeObject drsuapi_DsGetMemberships2Request1_Type;
staticforward PyTypeObject drsuapi_DsSiteCostInfo_Type;
staticforward PyTypeObject drsuapi_QuerySitesByCostCtr1_Type;
staticforward PyTypeObject drsuapi_QuerySitesByCostRequest1_Type;
staticforward PyTypeObject drsuapi_InterfaceType;

void initdrsuapi(void);static PyTypeObject *lsa_String_Type;
static PyTypeObject *dom_sid_Type;
static PyTypeObject *policy_handle_Type;
static PyTypeObject *Object_Type;
static PyTypeObject *GUID_Type;
static PyTypeObject *ClientConnection_Type;

static PyObject *py_drsuapi_DsBindInfo24_get_supported_extensions(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(obj);
	PyObject *py_supported_extensions;
	py_supported_extensions = PyInt_FromLong(object->supported_extensions);
	return py_supported_extensions;
}

static int py_drsuapi_DsBindInfo24_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->supported_extensions = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->supported_extensions = 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_drsuapi_DsBindInfo24_get_site_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(obj);
	PyObject *py_site_guid;
	py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
	return py_site_guid;
}

static int py_drsuapi_DsBindInfo24_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsBindInfo24_get_pid(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(obj);
	PyObject *py_pid;
	py_pid = PyInt_FromLong(object->pid);
	return py_pid;
}

static int py_drsuapi_DsBindInfo24_set_pid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->pid = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsBindInfo24_getsetters[] = {
	{ discard_const_p(char, "supported_extensions"), py_drsuapi_DsBindInfo24_get_supported_extensions, py_drsuapi_DsBindInfo24_set_supported_extensions },
	{ discard_const_p(char, "site_guid"), py_drsuapi_DsBindInfo24_get_site_guid, py_drsuapi_DsBindInfo24_set_site_guid },
	{ discard_const_p(char, "pid"), py_drsuapi_DsBindInfo24_get_pid, py_drsuapi_DsBindInfo24_set_pid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsBindInfo24_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsBindInfo24",
	.tp_getset = py_drsuapi_DsBindInfo24_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsBindInfo24_new,
};


static PyObject *py_drsuapi_DsBindInfo28_get_supported_extensions(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(obj);
	PyObject *py_supported_extensions;
	py_supported_extensions = PyInt_FromLong(object->supported_extensions);
	return py_supported_extensions;
}

static int py_drsuapi_DsBindInfo28_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->supported_extensions = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->supported_extensions = 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_drsuapi_DsBindInfo28_get_site_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(obj);
	PyObject *py_site_guid;
	py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
	return py_site_guid;
}

static int py_drsuapi_DsBindInfo28_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsBindInfo28_get_pid(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(obj);
	PyObject *py_pid;
	py_pid = PyInt_FromLong(object->pid);
	return py_pid;
}

static int py_drsuapi_DsBindInfo28_set_pid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->pid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsBindInfo28_get_repl_epoch(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(obj);
	PyObject *py_repl_epoch;
	py_repl_epoch = PyInt_FromLong(object->repl_epoch);
	return py_repl_epoch;
}

static int py_drsuapi_DsBindInfo28_set_repl_epoch(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->repl_epoch = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsBindInfo28_getsetters[] = {
	{ discard_const_p(char, "supported_extensions"), py_drsuapi_DsBindInfo28_get_supported_extensions, py_drsuapi_DsBindInfo28_set_supported_extensions },
	{ discard_const_p(char, "site_guid"), py_drsuapi_DsBindInfo28_get_site_guid, py_drsuapi_DsBindInfo28_set_site_guid },
	{ discard_const_p(char, "pid"), py_drsuapi_DsBindInfo28_get_pid, py_drsuapi_DsBindInfo28_set_pid },
	{ discard_const_p(char, "repl_epoch"), py_drsuapi_DsBindInfo28_get_repl_epoch, py_drsuapi_DsBindInfo28_set_repl_epoch },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsBindInfo28_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsBindInfo28",
	.tp_getset = py_drsuapi_DsBindInfo28_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsBindInfo28_new,
};


static PyObject *py_drsuapi_DsBindInfo48_get_supported_extensions(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
	PyObject *py_supported_extensions;
	py_supported_extensions = PyInt_FromLong(object->supported_extensions);
	return py_supported_extensions;
}

static int py_drsuapi_DsBindInfo48_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->supported_extensions = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->supported_extensions = 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_drsuapi_DsBindInfo48_get_site_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
	PyObject *py_site_guid;
	py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
	return py_site_guid;
}

static int py_drsuapi_DsBindInfo48_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsBindInfo48_get_pid(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
	PyObject *py_pid;
	py_pid = PyInt_FromLong(object->pid);
	return py_pid;
}

static int py_drsuapi_DsBindInfo48_set_pid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->pid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsBindInfo48_get_repl_epoch(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
	PyObject *py_repl_epoch;
	py_repl_epoch = PyInt_FromLong(object->repl_epoch);
	return py_repl_epoch;
}

static int py_drsuapi_DsBindInfo48_set_repl_epoch(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->repl_epoch = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsBindInfo48_get_supported_extensions_ext(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
	PyObject *py_supported_extensions_ext;
	py_supported_extensions_ext = PyInt_FromLong(object->supported_extensions_ext);
	return py_supported_extensions_ext;
}

static int py_drsuapi_DsBindInfo48_set_supported_extensions_ext(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->supported_extensions_ext = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->supported_extensions_ext = 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_drsuapi_DsBindInfo48_get_config_dn_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
	PyObject *py_config_dn_guid;
	py_config_dn_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->config_dn_guid);
	return py_config_dn_guid;
}

static int py_drsuapi_DsBindInfo48_set_config_dn_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->config_dn_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsBindInfo48_getsetters[] = {
	{ discard_const_p(char, "supported_extensions"), py_drsuapi_DsBindInfo48_get_supported_extensions, py_drsuapi_DsBindInfo48_set_supported_extensions },
	{ discard_const_p(char, "site_guid"), py_drsuapi_DsBindInfo48_get_site_guid, py_drsuapi_DsBindInfo48_set_site_guid },
	{ discard_const_p(char, "pid"), py_drsuapi_DsBindInfo48_get_pid, py_drsuapi_DsBindInfo48_set_pid },
	{ discard_const_p(char, "repl_epoch"), py_drsuapi_DsBindInfo48_get_repl_epoch, py_drsuapi_DsBindInfo48_set_repl_epoch },
	{ discard_const_p(char, "supported_extensions_ext"), py_drsuapi_DsBindInfo48_get_supported_extensions_ext, py_drsuapi_DsBindInfo48_set_supported_extensions_ext },
	{ discard_const_p(char, "config_dn_guid"), py_drsuapi_DsBindInfo48_get_config_dn_guid, py_drsuapi_DsBindInfo48_set_config_dn_guid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsBindInfo48_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsBindInfo48",
	.tp_getset = py_drsuapi_DsBindInfo48_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsBindInfo48_new,
};


static PyObject *py_drsuapi_DsBindInfoFallBack_get_info(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfoFallBack *object = (struct drsuapi_DsBindInfoFallBack *)pytalloc_get_ptr(obj);
	PyObject *py_info;
	py_info = PyString_FromStringAndSize((char *)(object->info).data, (object->info).length);
	return py_info;
}

static int py_drsuapi_DsBindInfoFallBack_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfoFallBack *object = (struct drsuapi_DsBindInfoFallBack *)pytalloc_get_ptr(py_obj);
	object->info = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	return 0;
}

static PyGetSetDef py_drsuapi_DsBindInfoFallBack_getsetters[] = {
	{ discard_const_p(char, "info"), py_drsuapi_DsBindInfoFallBack_get_info, py_drsuapi_DsBindInfoFallBack_set_info },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsBindInfoFallBack_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsBindInfoFallBack",
	.tp_getset = py_drsuapi_DsBindInfoFallBack_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsBindInfoFallBack_new,
};

PyObject *py_import_drsuapi_DsBindInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsBindInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 24:
			ret = pytalloc_reference_ex(&drsuapi_DsBindInfo24_Type, mem_ctx, &in->info24);
			return ret;

		case 28:
			ret = pytalloc_reference_ex(&drsuapi_DsBindInfo28_Type, mem_ctx, &in->info28);
			return ret;

		case 48:
			ret = pytalloc_reference_ex(&drsuapi_DsBindInfo48_Type, mem_ctx, &in->info48);
			return ret;

		default:
			ret = pytalloc_reference_ex(&drsuapi_DsBindInfoFallBack_Type, mem_ctx, &in->FallBack);
			return ret;

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

union drsuapi_DsBindInfo *py_export_drsuapi_DsBindInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsBindInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsBindInfo);
	switch (level) {
		case 24:
			PY_CHECK_TYPE(&drsuapi_DsBindInfo24_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info24 = *(struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(in);
			break;

		case 28:
			PY_CHECK_TYPE(&drsuapi_DsBindInfo28_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info28 = *(struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(in);
			break;

		case 48:
			PY_CHECK_TYPE(&drsuapi_DsBindInfo48_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info48 = *(struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(in);
			break;

		default:
			PY_CHECK_TYPE(&drsuapi_DsBindInfoFallBack_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->FallBack = *(struct drsuapi_DsBindInfoFallBack *)pytalloc_get_ptr(in);
			break;

	}

	return ret;
}


static PyObject *py_drsuapi_DsBindInfoCtr_get_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyInt_FromLong(object->length);
	return py_length;
}

static int py_drsuapi_DsBindInfoCtr_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsBindInfoCtr_get_info(PyObject *obj, void *closure)
{
	struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_import_drsuapi_DsBindInfo(pytalloc_get_mem_ctx(obj), object->length, &object->info);
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_drsuapi_DsBindInfoCtr_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(py_obj);
	{
		union drsuapi_DsBindInfo *info_switch_0;
		info_switch_0 = py_export_drsuapi_DsBindInfo(pytalloc_get_mem_ctx(py_obj), object->length, value);
		if (info_switch_0 == NULL) {
			return -1;
		}
		object->info = *info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsBindInfoCtr_getsetters[] = {
	{ discard_const_p(char, "length"), py_drsuapi_DsBindInfoCtr_get_length, py_drsuapi_DsBindInfoCtr_set_length },
	{ discard_const_p(char, "info"), py_drsuapi_DsBindInfoCtr_get_info, py_drsuapi_DsBindInfoCtr_set_info },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsBindInfoCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsBindInfoCtr",
	.tp_getset = py_drsuapi_DsBindInfoCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsBindInfoCtr_new,
};


static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

static int py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_sid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_sid;
	py___ndr_size_sid = PyInt_FromLong(object->__ndr_size_sid);
	return py___ndr_size_sid;
}

static int py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_sid = PyInt_AsLong(value);
	return 0;
}

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

static int py_drsuapi_DsReplicaObjectIdentifier_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get_sid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
	PyObject *py_sid;
	py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
	return py_sid;
}

static int py_drsuapi_DsReplicaObjectIdentifier_set_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_dn;
	py___ndr_size_dn = PyInt_FromLong(object->__ndr_size_dn);
	return py___ndr_size_dn;
}

static int py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_dn = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
	PyObject *py_dn;
	if (object->dn == NULL) {
		py_dn = Py_None;
		Py_INCREF(py_dn);
	} else {
		py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
	}
	return py_dn;
}

static int py_drsuapi_DsReplicaObjectIdentifier_set_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->dn = 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_drsuapi_DsReplicaObjectIdentifier_getsetters[] = {
	{ discard_const_p(char, "__ndr_size"), py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size, py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size },
	{ discard_const_p(char, "__ndr_size_sid"), py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_sid, py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_sid },
	{ discard_const_p(char, "guid"), py_drsuapi_DsReplicaObjectIdentifier_get_guid, py_drsuapi_DsReplicaObjectIdentifier_set_guid },
	{ discard_const_p(char, "sid"), py_drsuapi_DsReplicaObjectIdentifier_get_sid, py_drsuapi_DsReplicaObjectIdentifier_set_sid },
	{ discard_const_p(char, "__ndr_size_dn"), py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_dn, py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_dn },
	{ discard_const_p(char, "dn"), py_drsuapi_DsReplicaObjectIdentifier_get_dn, py_drsuapi_DsReplicaObjectIdentifier_set_dn },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier, "drsuapi_DsReplicaObjectIdentifier", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaObjectIdentifier_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjectIdentifier",
	.tp_getset = py_drsuapi_DsReplicaObjectIdentifier_getsetters,
	.tp_methods = py_drsuapi_DsReplicaObjectIdentifier_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjectIdentifier_new,
};


static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsReplicaSyncRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_guid;
	py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
	return py_source_dsa_guid;
}

static int py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_dns(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_dns;
	if (object->source_dsa_dns == NULL) {
		py_source_dsa_dns = Py_None;
		Py_INCREF(py_source_dsa_dns);
	} else {
		if (object->source_dsa_dns == NULL) {
			py_source_dsa_dns = Py_None;
			Py_INCREF(py_source_dsa_dns);
		} else {
			py_source_dsa_dns = PyUnicode_Decode(object->source_dsa_dns, strlen(object->source_dsa_dns), "utf-8", "ignore");
		}
	}
	return py_source_dsa_dns;
}

static int py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_dns(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->source_dsa_dns = NULL;
	} else {
		object->source_dsa_dns = NULL;
		if (PyUnicode_Check(value)) {
			object->source_dsa_dns = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->source_dsa_dns = 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 PyObject *py_drsuapi_DsReplicaSyncRequest1_get_options(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_options;
	py_options = PyInt_FromLong(object->options);
	return py_options;
}

static int py_drsuapi_DsReplicaSyncRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->options = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->options = 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_drsuapi_DsReplicaSyncRequest1_getsetters[] = {
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsReplicaSyncRequest1_get_naming_context, py_drsuapi_DsReplicaSyncRequest1_set_naming_context },
	{ discard_const_p(char, "source_dsa_guid"), py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_guid, py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_guid },
	{ discard_const_p(char, "source_dsa_dns"), py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_dns, py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_dns },
	{ discard_const_p(char, "options"), py_drsuapi_DsReplicaSyncRequest1_get_options, py_drsuapi_DsReplicaSyncRequest1_set_options },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaSyncRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaSyncRequest1",
	.tp_getset = py_drsuapi_DsReplicaSyncRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaSyncRequest1_new,
};

PyObject *py_import_drsuapi_DsReplicaSyncRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaSyncRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsReplicaSyncRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsReplicaSyncRequest *py_export_drsuapi_DsReplicaSyncRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsReplicaSyncRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaSyncRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsReplicaSyncRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaHighWaterMark_get_tmp_highest_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(obj);
	PyObject *py_tmp_highest_usn;
	py_tmp_highest_usn = PyLong_FromLongLong(object->tmp_highest_usn);
	return py_tmp_highest_usn;
}

static int py_drsuapi_DsReplicaHighWaterMark_set_tmp_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->tmp_highest_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->tmp_highest_usn = 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_drsuapi_DsReplicaHighWaterMark_get_reserved_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(obj);
	PyObject *py_reserved_usn;
	py_reserved_usn = PyLong_FromLongLong(object->reserved_usn);
	return py_reserved_usn;
}

static int py_drsuapi_DsReplicaHighWaterMark_set_reserved_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->reserved_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->reserved_usn = 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_drsuapi_DsReplicaHighWaterMark_get_highest_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(obj);
	PyObject *py_highest_usn;
	py_highest_usn = PyLong_FromLongLong(object->highest_usn);
	return py_highest_usn;
}

static int py_drsuapi_DsReplicaHighWaterMark_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->highest_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->highest_usn = 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_drsuapi_DsReplicaHighWaterMark_getsetters[] = {
	{ discard_const_p(char, "tmp_highest_usn"), py_drsuapi_DsReplicaHighWaterMark_get_tmp_highest_usn, py_drsuapi_DsReplicaHighWaterMark_set_tmp_highest_usn },
	{ discard_const_p(char, "reserved_usn"), py_drsuapi_DsReplicaHighWaterMark_get_reserved_usn, py_drsuapi_DsReplicaHighWaterMark_set_reserved_usn },
	{ discard_const_p(char, "highest_usn"), py_drsuapi_DsReplicaHighWaterMark_get_highest_usn, py_drsuapi_DsReplicaHighWaterMark_set_highest_usn },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaHighWaterMark);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaHighWaterMark);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaHighWaterMark);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaHighWaterMark, "drsuapi_DsReplicaHighWaterMark", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaHighWaterMark_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaHighWaterMark_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaHighWaterMark_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaHighWaterMark_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaHighWaterMark_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaHighWaterMark",
	.tp_getset = py_drsuapi_DsReplicaHighWaterMark_getsetters,
	.tp_methods = py_drsuapi_DsReplicaHighWaterMark_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaHighWaterMark_new,
};


static PyObject *py_drsuapi_DsReplicaCursor_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsReplicaCursor_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor_get_highest_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(obj);
	PyObject *py_highest_usn;
	py_highest_usn = PyLong_FromLongLong(object->highest_usn);
	return py_highest_usn;
}

static int py_drsuapi_DsReplicaCursor_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->highest_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->highest_usn = 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_drsuapi_DsReplicaCursor_getsetters[] = {
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsReplicaCursor_get_source_dsa_invocation_id, py_drsuapi_DsReplicaCursor_set_source_dsa_invocation_id },
	{ discard_const_p(char, "highest_usn"), py_drsuapi_DsReplicaCursor_get_highest_usn, py_drsuapi_DsReplicaCursor_set_highest_usn },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaCursor_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaCursor);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaCursor_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaCursor_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaCursor, "drsuapi_DsReplicaCursor", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaCursor_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaCursor_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaCursor_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaCursor_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaCursor_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaCursor",
	.tp_getset = py_drsuapi_DsReplicaCursor_getsetters,
	.tp_methods = py_drsuapi_DsReplicaCursor_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaCursor_new,
};


static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_DsReplicaCursorCtrEx_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_reserved1(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_reserved1;
	py_reserved1 = PyInt_FromLong(object->reserved1);
	return py_reserved1;
}

static int py_drsuapi_DsReplicaCursorCtrEx_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaCursorCtrEx_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_reserved2(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_reserved2;
	py_reserved2 = PyInt_FromLong(object->reserved2);
	return py_reserved2;
}

static int py_drsuapi_DsReplicaCursorCtrEx_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_cursors(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_cursors;
	py_cursors = PyList_New(object->count);
	if (py_cursors == NULL) {
		return NULL;
	}
	{
		int cursors_cntr_0;
		for (cursors_cntr_0 = 0; cursors_cntr_0 < object->count; cursors_cntr_0++) {
			PyObject *py_cursors_0;
			py_cursors_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor_Type, object->cursors, &object->cursors[cursors_cntr_0]);
			PyList_SetItem(py_cursors, cursors_cntr_0, py_cursors_0);
		}
	}
	return py_cursors;
}

static int py_drsuapi_DsReplicaCursorCtrEx_set_cursors(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int cursors_cntr_0;
		object->cursors = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cursors, PyList_GET_SIZE(value));
		if (!object->cursors) { return -1;; }
		talloc_set_name_const(object->cursors, "ARRAY: object->cursors");
		for (cursors_cntr_0 = 0; cursors_cntr_0 < PyList_GET_SIZE(value); cursors_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaCursor_Type, PyList_GET_ITEM(value, cursors_cntr_0), return -1;);
			if (talloc_reference(object->cursors, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, cursors_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->cursors[cursors_cntr_0] = *(struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(PyList_GET_ITEM(value, cursors_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaCursorCtrEx_getsetters[] = {
	{ discard_const_p(char, "version"), py_drsuapi_DsReplicaCursorCtrEx_get_version, py_drsuapi_DsReplicaCursorCtrEx_set_version },
	{ discard_const_p(char, "reserved1"), py_drsuapi_DsReplicaCursorCtrEx_get_reserved1, py_drsuapi_DsReplicaCursorCtrEx_set_reserved1 },
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaCursorCtrEx_get_count, py_drsuapi_DsReplicaCursorCtrEx_set_count },
	{ discard_const_p(char, "reserved2"), py_drsuapi_DsReplicaCursorCtrEx_get_reserved2, py_drsuapi_DsReplicaCursorCtrEx_set_reserved2 },
	{ discard_const_p(char, "cursors"), py_drsuapi_DsReplicaCursorCtrEx_get_cursors, py_drsuapi_DsReplicaCursorCtrEx_set_cursors },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaCursorCtrEx_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaCursorCtrEx",
	.tp_getset = py_drsuapi_DsReplicaCursorCtrEx_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaCursorCtrEx_new,
};


static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_destination_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_destination_dsa_guid;
	py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
	return py_destination_dsa_guid;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_highwatermark(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_highwatermark;
	py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
	return py_highwatermark;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_uptodateness_vector(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_uptodateness_vector;
	if (object->uptodateness_vector == NULL) {
		py_uptodateness_vector = Py_None;
		Py_INCREF(py_uptodateness_vector);
	} else {
		py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
	}
	return py_uptodateness_vector;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->uptodateness_vector);
	if (value == Py_None) {
		object->uptodateness_vector = NULL;
	} else {
		object->uptodateness_vector = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_replica_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_replica_flags;
	py_replica_flags = PyInt_FromLong(object->replica_flags);
	return py_replica_flags;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->replica_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->replica_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_drsuapi_DsGetNCChangesRequest5_get_max_object_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_max_object_count;
	py_max_object_count = PyInt_FromLong(object->max_object_count);
	return py_max_object_count;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->max_object_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_max_ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_max_ndr_size;
	py_max_ndr_size = PyInt_FromLong(object->max_ndr_size);
	return py_max_ndr_size;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->max_ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_extended_op(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_op;
	py_extended_op = PyInt_FromLong(object->extended_op);
	return py_extended_op;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->extended_op = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->extended_op = 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_drsuapi_DsGetNCChangesRequest5_get_fsmo_info(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
	PyObject *py_fsmo_info;
	py_fsmo_info = PyLong_FromLongLong(object->fsmo_info);
	return py_fsmo_info;
}

static int py_drsuapi_DsGetNCChangesRequest5_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->fsmo_info = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->fsmo_info = 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_drsuapi_DsGetNCChangesRequest5_getsetters[] = {
	{ discard_const_p(char, "destination_dsa_guid"), py_drsuapi_DsGetNCChangesRequest5_get_destination_dsa_guid, py_drsuapi_DsGetNCChangesRequest5_set_destination_dsa_guid },
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsGetNCChangesRequest5_get_source_dsa_invocation_id, py_drsuapi_DsGetNCChangesRequest5_set_source_dsa_invocation_id },
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsGetNCChangesRequest5_get_naming_context, py_drsuapi_DsGetNCChangesRequest5_set_naming_context },
	{ discard_const_p(char, "highwatermark"), py_drsuapi_DsGetNCChangesRequest5_get_highwatermark, py_drsuapi_DsGetNCChangesRequest5_set_highwatermark },
	{ discard_const_p(char, "uptodateness_vector"), py_drsuapi_DsGetNCChangesRequest5_get_uptodateness_vector, py_drsuapi_DsGetNCChangesRequest5_set_uptodateness_vector },
	{ discard_const_p(char, "replica_flags"), py_drsuapi_DsGetNCChangesRequest5_get_replica_flags, py_drsuapi_DsGetNCChangesRequest5_set_replica_flags },
	{ discard_const_p(char, "max_object_count"), py_drsuapi_DsGetNCChangesRequest5_get_max_object_count, py_drsuapi_DsGetNCChangesRequest5_set_max_object_count },
	{ discard_const_p(char, "max_ndr_size"), py_drsuapi_DsGetNCChangesRequest5_get_max_ndr_size, py_drsuapi_DsGetNCChangesRequest5_set_max_ndr_size },
	{ discard_const_p(char, "extended_op"), py_drsuapi_DsGetNCChangesRequest5_get_extended_op, py_drsuapi_DsGetNCChangesRequest5_set_extended_op },
	{ discard_const_p(char, "fsmo_info"), py_drsuapi_DsGetNCChangesRequest5_get_fsmo_info, py_drsuapi_DsGetNCChangesRequest5_set_fsmo_info },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesRequest5_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesRequest5",
	.tp_getset = py_drsuapi_DsGetNCChangesRequest5_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesRequest5_new,
};


static PyObject *py_drsuapi_DsReplicaOID_get_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOID *object = (struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyInt_FromLong(object->length);
	return py_length;
}

static int py_drsuapi_DsReplicaOID_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOID *object = (struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaOID_get_binary_oid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOID *object = (struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(obj);
	PyObject *py_binary_oid;
	if (object->binary_oid == NULL) {
		py_binary_oid = Py_None;
		Py_INCREF(py_binary_oid);
	} else {
		py_binary_oid = PyList_New(object->length);
		if (py_binary_oid == NULL) {
			return NULL;
		}
		{
			int binary_oid_cntr_1;
			for (binary_oid_cntr_1 = 0; binary_oid_cntr_1 < object->length; binary_oid_cntr_1++) {
				PyObject *py_binary_oid_1;
				py_binary_oid_1 = PyInt_FromLong(object->binary_oid[binary_oid_cntr_1]);
				PyList_SetItem(py_binary_oid, binary_oid_cntr_1, py_binary_oid_1);
			}
		}
	}
	return py_binary_oid;
}

static int py_drsuapi_DsReplicaOID_set_binary_oid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOID *object = (struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->binary_oid);
	if (value == Py_None) {
		object->binary_oid = NULL;
	} else {
		object->binary_oid = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int binary_oid_cntr_1;
			object->binary_oid = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary_oid, PyList_GET_SIZE(value));
			if (!object->binary_oid) { return -1;; }
			talloc_set_name_const(object->binary_oid, "ARRAY: object->binary_oid");
			for (binary_oid_cntr_1 = 0; binary_oid_cntr_1 < PyList_GET_SIZE(value); binary_oid_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, binary_oid_cntr_1), return -1;);
				object->binary_oid[binary_oid_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, binary_oid_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaOID_getsetters[] = {
	{ discard_const_p(char, "length"), py_drsuapi_DsReplicaOID_get_length, py_drsuapi_DsReplicaOID_set_length },
	{ discard_const_p(char, "binary_oid"), py_drsuapi_DsReplicaOID_get_binary_oid, py_drsuapi_DsReplicaOID_set_binary_oid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaOID_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaOID",
	.tp_getset = py_drsuapi_DsReplicaOID_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaOID_new,
};


static PyObject *py_drsuapi_DsReplicaOIDMapping_get_id_prefix(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOIDMapping *object = (struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(obj);
	PyObject *py_id_prefix;
	py_id_prefix = PyInt_FromLong(object->id_prefix);
	return py_id_prefix;
}

static int py_drsuapi_DsReplicaOIDMapping_set_id_prefix(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOIDMapping *object = (struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->id_prefix = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaOIDMapping_get_oid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOIDMapping *object = (struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(obj);
	PyObject *py_oid;
	py_oid = pytalloc_reference_ex(&drsuapi_DsReplicaOID_Type, pytalloc_get_mem_ctx(obj), &object->oid);
	return py_oid;
}

static int py_drsuapi_DsReplicaOIDMapping_set_oid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOIDMapping *object = (struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaOID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->oid = *(struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaOIDMapping_getsetters[] = {
	{ discard_const_p(char, "id_prefix"), py_drsuapi_DsReplicaOIDMapping_get_id_prefix, py_drsuapi_DsReplicaOIDMapping_set_id_prefix },
	{ discard_const_p(char, "oid"), py_drsuapi_DsReplicaOIDMapping_get_oid, py_drsuapi_DsReplicaOIDMapping_set_oid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaOIDMapping_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaOIDMapping",
	.tp_getset = py_drsuapi_DsReplicaOIDMapping_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaOIDMapping_new,
};


static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_get_num_mappings(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_num_mappings;
	py_num_mappings = PyInt_FromLong(object->num_mappings);
	return py_num_mappings;
}

static int py_drsuapi_DsReplicaOIDMapping_Ctr_set_num_mappings(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_mappings = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_get_mappings(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_mappings;
	if (object->mappings == NULL) {
		py_mappings = Py_None;
		Py_INCREF(py_mappings);
	} else {
		py_mappings = PyList_New(object->num_mappings);
		if (py_mappings == NULL) {
			return NULL;
		}
		{
			int mappings_cntr_1;
			for (mappings_cntr_1 = 0; mappings_cntr_1 < object->num_mappings; mappings_cntr_1++) {
				PyObject *py_mappings_1;
				py_mappings_1 = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Type, object->mappings, &object->mappings[mappings_cntr_1]);
				PyList_SetItem(py_mappings, mappings_cntr_1, py_mappings_1);
			}
		}
	}
	return py_mappings;
}

static int py_drsuapi_DsReplicaOIDMapping_Ctr_set_mappings(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->mappings);
	if (value == Py_None) {
		object->mappings = NULL;
	} else {
		object->mappings = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int mappings_cntr_1;
			object->mappings = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->mappings, PyList_GET_SIZE(value));
			if (!object->mappings) { return -1;; }
			talloc_set_name_const(object->mappings, "ARRAY: object->mappings");
			for (mappings_cntr_1 = 0; mappings_cntr_1 < PyList_GET_SIZE(value); mappings_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Type, PyList_GET_ITEM(value, mappings_cntr_1), return -1;);
				if (talloc_reference(object->mappings, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, mappings_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->mappings[mappings_cntr_1] = *(struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(PyList_GET_ITEM(value, mappings_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaOIDMapping_Ctr_getsetters[] = {
	{ discard_const_p(char, "num_mappings"), py_drsuapi_DsReplicaOIDMapping_Ctr_get_num_mappings, py_drsuapi_DsReplicaOIDMapping_Ctr_set_num_mappings },
	{ discard_const_p(char, "mappings"), py_drsuapi_DsReplicaOIDMapping_Ctr_get_mappings, py_drsuapi_DsReplicaOIDMapping_Ctr_set_mappings },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaOIDMapping_Ctr);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaOIDMapping_Ctr, "drsuapi_DsReplicaOIDMapping_Ctr", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaOIDMapping_Ctr_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaOIDMapping_Ctr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaOIDMapping_Ctr",
	.tp_getset = py_drsuapi_DsReplicaOIDMapping_Ctr_getsetters,
	.tp_methods = py_drsuapi_DsReplicaOIDMapping_Ctr_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaOIDMapping_Ctr_new,
};


static PyObject *py_drsuapi_DsPartialAttributeSet_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_DsPartialAttributeSet_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsPartialAttributeSet_get_reserved1(PyObject *obj, void *closure)
{
	struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(obj);
	PyObject *py_reserved1;
	py_reserved1 = PyInt_FromLong(object->reserved1);
	return py_reserved1;
}

static int py_drsuapi_DsPartialAttributeSet_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsPartialAttributeSet_get_num_attids(PyObject *obj, void *closure)
{
	struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(obj);
	PyObject *py_num_attids;
	py_num_attids = PyInt_FromLong(object->num_attids);
	return py_num_attids;
}

static int py_drsuapi_DsPartialAttributeSet_set_num_attids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_attids = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsPartialAttributeSet_get_attids(PyObject *obj, void *closure)
{
	struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(obj);
	PyObject *py_attids;
	py_attids = PyList_New(object->num_attids);
	if (py_attids == NULL) {
		return NULL;
	}
	{
		int attids_cntr_0;
		for (attids_cntr_0 = 0; attids_cntr_0 < object->num_attids; attids_cntr_0++) {
			PyObject *py_attids_0;
			py_attids_0 = PyInt_FromLong(object->attids[attids_cntr_0]);
			PyList_SetItem(py_attids, attids_cntr_0, py_attids_0);
		}
	}
	return py_attids;
}

static int py_drsuapi_DsPartialAttributeSet_set_attids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int attids_cntr_0;
		object->attids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attids, PyList_GET_SIZE(value));
		if (!object->attids) { return -1;; }
		talloc_set_name_const(object->attids, "ARRAY: object->attids");
		for (attids_cntr_0 = 0; attids_cntr_0 < PyList_GET_SIZE(value); attids_cntr_0++) {
			if (PyLong_Check(PyList_GET_ITEM(value, attids_cntr_0))) {
				object->attids[attids_cntr_0] = PyLong_AsLongLong(PyList_GET_ITEM(value, attids_cntr_0));
			} else if (PyInt_Check(PyList_GET_ITEM(value, attids_cntr_0))) {
				object->attids[attids_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, attids_cntr_0));
			} 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_drsuapi_DsPartialAttributeSet_getsetters[] = {
	{ discard_const_p(char, "version"), py_drsuapi_DsPartialAttributeSet_get_version, py_drsuapi_DsPartialAttributeSet_set_version },
	{ discard_const_p(char, "reserved1"), py_drsuapi_DsPartialAttributeSet_get_reserved1, py_drsuapi_DsPartialAttributeSet_set_reserved1 },
	{ discard_const_p(char, "num_attids"), py_drsuapi_DsPartialAttributeSet_get_num_attids, py_drsuapi_DsPartialAttributeSet_set_num_attids },
	{ discard_const_p(char, "attids"), py_drsuapi_DsPartialAttributeSet_get_attids, py_drsuapi_DsPartialAttributeSet_set_attids },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsPartialAttributeSet_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsPartialAttributeSet",
	.tp_getset = py_drsuapi_DsPartialAttributeSet_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsPartialAttributeSet_new,
};


static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_destination_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_destination_dsa_guid;
	py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
	return py_destination_dsa_guid;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_highwatermark(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_highwatermark;
	py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
	return py_highwatermark;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_uptodateness_vector(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_uptodateness_vector;
	if (object->uptodateness_vector == NULL) {
		py_uptodateness_vector = Py_None;
		Py_INCREF(py_uptodateness_vector);
	} else {
		py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
	}
	return py_uptodateness_vector;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->uptodateness_vector);
	if (value == Py_None) {
		object->uptodateness_vector = NULL;
	} else {
		object->uptodateness_vector = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_replica_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_replica_flags;
	py_replica_flags = PyInt_FromLong(object->replica_flags);
	return py_replica_flags;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->replica_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->replica_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_drsuapi_DsGetNCChangesRequest8_get_max_object_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_max_object_count;
	py_max_object_count = PyInt_FromLong(object->max_object_count);
	return py_max_object_count;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->max_object_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_max_ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_max_ndr_size;
	py_max_ndr_size = PyInt_FromLong(object->max_ndr_size);
	return py_max_ndr_size;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->max_ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_extended_op(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_op;
	py_extended_op = PyInt_FromLong(object->extended_op);
	return py_extended_op;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->extended_op = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->extended_op = 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_drsuapi_DsGetNCChangesRequest8_get_fsmo_info(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_fsmo_info;
	py_fsmo_info = PyLong_FromLongLong(object->fsmo_info);
	return py_fsmo_info;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->fsmo_info = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->fsmo_info = 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_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_partial_attribute_set;
	if (object->partial_attribute_set == NULL) {
		py_partial_attribute_set = Py_None;
		Py_INCREF(py_partial_attribute_set);
	} else {
		py_partial_attribute_set = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set, object->partial_attribute_set);
	}
	return py_partial_attribute_set;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->partial_attribute_set);
	if (value == Py_None) {
		object->partial_attribute_set = NULL;
	} else {
		object->partial_attribute_set = NULL;
		PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->partial_attribute_set = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set_ex(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_partial_attribute_set_ex;
	if (object->partial_attribute_set_ex == NULL) {
		py_partial_attribute_set_ex = Py_None;
		Py_INCREF(py_partial_attribute_set_ex);
	} else {
		py_partial_attribute_set_ex = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set_ex, object->partial_attribute_set_ex);
	}
	return py_partial_attribute_set_ex;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set_ex(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->partial_attribute_set_ex);
	if (value == Py_None) {
		object->partial_attribute_set_ex = NULL;
	} else {
		object->partial_attribute_set_ex = NULL;
		PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->partial_attribute_set_ex = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_mapping_ctr(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
	PyObject *py_mapping_ctr;
	py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
	return py_mapping_ctr;
}

static int py_drsuapi_DsGetNCChangesRequest8_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesRequest8_getsetters[] = {
	{ discard_const_p(char, "destination_dsa_guid"), py_drsuapi_DsGetNCChangesRequest8_get_destination_dsa_guid, py_drsuapi_DsGetNCChangesRequest8_set_destination_dsa_guid },
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsGetNCChangesRequest8_get_source_dsa_invocation_id, py_drsuapi_DsGetNCChangesRequest8_set_source_dsa_invocation_id },
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsGetNCChangesRequest8_get_naming_context, py_drsuapi_DsGetNCChangesRequest8_set_naming_context },
	{ discard_const_p(char, "highwatermark"), py_drsuapi_DsGetNCChangesRequest8_get_highwatermark, py_drsuapi_DsGetNCChangesRequest8_set_highwatermark },
	{ discard_const_p(char, "uptodateness_vector"), py_drsuapi_DsGetNCChangesRequest8_get_uptodateness_vector, py_drsuapi_DsGetNCChangesRequest8_set_uptodateness_vector },
	{ discard_const_p(char, "replica_flags"), py_drsuapi_DsGetNCChangesRequest8_get_replica_flags, py_drsuapi_DsGetNCChangesRequest8_set_replica_flags },
	{ discard_const_p(char, "max_object_count"), py_drsuapi_DsGetNCChangesRequest8_get_max_object_count, py_drsuapi_DsGetNCChangesRequest8_set_max_object_count },
	{ discard_const_p(char, "max_ndr_size"), py_drsuapi_DsGetNCChangesRequest8_get_max_ndr_size, py_drsuapi_DsGetNCChangesRequest8_set_max_ndr_size },
	{ discard_const_p(char, "extended_op"), py_drsuapi_DsGetNCChangesRequest8_get_extended_op, py_drsuapi_DsGetNCChangesRequest8_set_extended_op },
	{ discard_const_p(char, "fsmo_info"), py_drsuapi_DsGetNCChangesRequest8_get_fsmo_info, py_drsuapi_DsGetNCChangesRequest8_set_fsmo_info },
	{ discard_const_p(char, "partial_attribute_set"), py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set, py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set },
	{ discard_const_p(char, "partial_attribute_set_ex"), py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set_ex, py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set_ex },
	{ discard_const_p(char, "mapping_ctr"), py_drsuapi_DsGetNCChangesRequest8_get_mapping_ctr, py_drsuapi_DsGetNCChangesRequest8_set_mapping_ctr },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesRequest8_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesRequest8",
	.tp_getset = py_drsuapi_DsGetNCChangesRequest8_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesRequest8_new,
};


static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_destination_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_destination_dsa_guid;
	py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
	return py_destination_dsa_guid;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_highwatermark(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_highwatermark;
	py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
	return py_highwatermark;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_uptodateness_vector(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_uptodateness_vector;
	if (object->uptodateness_vector == NULL) {
		py_uptodateness_vector = Py_None;
		Py_INCREF(py_uptodateness_vector);
	} else {
		py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
	}
	return py_uptodateness_vector;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->uptodateness_vector);
	if (value == Py_None) {
		object->uptodateness_vector = NULL;
	} else {
		object->uptodateness_vector = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_replica_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_replica_flags;
	py_replica_flags = PyInt_FromLong(object->replica_flags);
	return py_replica_flags;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->replica_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->replica_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_drsuapi_DsGetNCChangesRequest10_get_max_object_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_max_object_count;
	py_max_object_count = PyInt_FromLong(object->max_object_count);
	return py_max_object_count;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->max_object_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_max_ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_max_ndr_size;
	py_max_ndr_size = PyInt_FromLong(object->max_ndr_size);
	return py_max_ndr_size;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->max_ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_extended_op(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_op;
	py_extended_op = PyInt_FromLong(object->extended_op);
	return py_extended_op;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->extended_op = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->extended_op = 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_drsuapi_DsGetNCChangesRequest10_get_fsmo_info(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_fsmo_info;
	py_fsmo_info = PyLong_FromLongLong(object->fsmo_info);
	return py_fsmo_info;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->fsmo_info = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->fsmo_info = 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_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_partial_attribute_set;
	if (object->partial_attribute_set == NULL) {
		py_partial_attribute_set = Py_None;
		Py_INCREF(py_partial_attribute_set);
	} else {
		py_partial_attribute_set = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set, object->partial_attribute_set);
	}
	return py_partial_attribute_set;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->partial_attribute_set);
	if (value == Py_None) {
		object->partial_attribute_set = NULL;
	} else {
		object->partial_attribute_set = NULL;
		PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->partial_attribute_set = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set_ex(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_partial_attribute_set_ex;
	if (object->partial_attribute_set_ex == NULL) {
		py_partial_attribute_set_ex = Py_None;
		Py_INCREF(py_partial_attribute_set_ex);
	} else {
		py_partial_attribute_set_ex = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set_ex, object->partial_attribute_set_ex);
	}
	return py_partial_attribute_set_ex;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set_ex(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->partial_attribute_set_ex);
	if (value == Py_None) {
		object->partial_attribute_set_ex = NULL;
	} else {
		object->partial_attribute_set_ex = NULL;
		PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->partial_attribute_set_ex = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_mapping_ctr(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_mapping_ctr;
	py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
	return py_mapping_ctr;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_more_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
	PyObject *py_more_flags;
	py_more_flags = PyInt_FromLong(object->more_flags);
	return py_more_flags;
}

static int py_drsuapi_DsGetNCChangesRequest10_set_more_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->more_flags = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesRequest10_getsetters[] = {
	{ discard_const_p(char, "destination_dsa_guid"), py_drsuapi_DsGetNCChangesRequest10_get_destination_dsa_guid, py_drsuapi_DsGetNCChangesRequest10_set_destination_dsa_guid },
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsGetNCChangesRequest10_get_source_dsa_invocation_id, py_drsuapi_DsGetNCChangesRequest10_set_source_dsa_invocation_id },
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsGetNCChangesRequest10_get_naming_context, py_drsuapi_DsGetNCChangesRequest10_set_naming_context },
	{ discard_const_p(char, "highwatermark"), py_drsuapi_DsGetNCChangesRequest10_get_highwatermark, py_drsuapi_DsGetNCChangesRequest10_set_highwatermark },
	{ discard_const_p(char, "uptodateness_vector"), py_drsuapi_DsGetNCChangesRequest10_get_uptodateness_vector, py_drsuapi_DsGetNCChangesRequest10_set_uptodateness_vector },
	{ discard_const_p(char, "replica_flags"), py_drsuapi_DsGetNCChangesRequest10_get_replica_flags, py_drsuapi_DsGetNCChangesRequest10_set_replica_flags },
	{ discard_const_p(char, "max_object_count"), py_drsuapi_DsGetNCChangesRequest10_get_max_object_count, py_drsuapi_DsGetNCChangesRequest10_set_max_object_count },
	{ discard_const_p(char, "max_ndr_size"), py_drsuapi_DsGetNCChangesRequest10_get_max_ndr_size, py_drsuapi_DsGetNCChangesRequest10_set_max_ndr_size },
	{ discard_const_p(char, "extended_op"), py_drsuapi_DsGetNCChangesRequest10_get_extended_op, py_drsuapi_DsGetNCChangesRequest10_set_extended_op },
	{ discard_const_p(char, "fsmo_info"), py_drsuapi_DsGetNCChangesRequest10_get_fsmo_info, py_drsuapi_DsGetNCChangesRequest10_set_fsmo_info },
	{ discard_const_p(char, "partial_attribute_set"), py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set, py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set },
	{ discard_const_p(char, "partial_attribute_set_ex"), py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set_ex, py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set_ex },
	{ discard_const_p(char, "mapping_ctr"), py_drsuapi_DsGetNCChangesRequest10_get_mapping_ctr, py_drsuapi_DsGetNCChangesRequest10_set_mapping_ctr },
	{ discard_const_p(char, "more_flags"), py_drsuapi_DsGetNCChangesRequest10_get_more_flags, py_drsuapi_DsGetNCChangesRequest10_set_more_flags },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesRequest10_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesRequest10",
	.tp_getset = py_drsuapi_DsGetNCChangesRequest10_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesRequest10_new,
};

PyObject *py_import_drsuapi_DsGetNCChangesRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 5:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest5_Type, mem_ctx, &in->req5);
			return ret;

		case 8:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest8_Type, mem_ctx, &in->req8);
			return ret;

		case 10:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest10_Type, mem_ctx, &in->req10);
			return ret;

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

union drsuapi_DsGetNCChangesRequest *py_export_drsuapi_DsGetNCChangesRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetNCChangesRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesRequest);
	switch (level) {
		case 5:
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest5_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req5 = *(struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(in);
			break;

		case 8:
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest8_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req8 = *(struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(in);
			break;

		case 10:
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest10_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req10 = *(struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaCursor2_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsReplicaCursor2_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor2_get_highest_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(obj);
	PyObject *py_highest_usn;
	py_highest_usn = PyLong_FromLongLong(object->highest_usn);
	return py_highest_usn;
}

static int py_drsuapi_DsReplicaCursor2_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->highest_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->highest_usn = 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_drsuapi_DsReplicaCursor2_get_last_sync_success(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(obj);
	PyObject *py_last_sync_success;
	py_last_sync_success = PyLong_FromLongLong(object->last_sync_success);
	return py_last_sync_success;
}

static int py_drsuapi_DsReplicaCursor2_set_last_sync_success(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_sync_success = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_sync_success = 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_drsuapi_DsReplicaCursor2_getsetters[] = {
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsReplicaCursor2_get_source_dsa_invocation_id, py_drsuapi_DsReplicaCursor2_set_source_dsa_invocation_id },
	{ discard_const_p(char, "highest_usn"), py_drsuapi_DsReplicaCursor2_get_highest_usn, py_drsuapi_DsReplicaCursor2_set_highest_usn },
	{ discard_const_p(char, "last_sync_success"), py_drsuapi_DsReplicaCursor2_get_last_sync_success, py_drsuapi_DsReplicaCursor2_set_last_sync_success },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaCursor2_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaCursor2);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaCursor2_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor2);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor2);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaCursor2_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaCursor2, "drsuapi_DsReplicaCursor2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaCursor2_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaCursor2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaCursor2_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaCursor2_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaCursor2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaCursor2",
	.tp_getset = py_drsuapi_DsReplicaCursor2_getsetters,
	.tp_methods = py_drsuapi_DsReplicaCursor2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaCursor2_new,
};


static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_DsReplicaCursor2CtrEx_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_reserved1(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_reserved1;
	py_reserved1 = PyInt_FromLong(object->reserved1);
	return py_reserved1;
}

static int py_drsuapi_DsReplicaCursor2CtrEx_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaCursor2CtrEx_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_reserved2(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_reserved2;
	py_reserved2 = PyInt_FromLong(object->reserved2);
	return py_reserved2;
}

static int py_drsuapi_DsReplicaCursor2CtrEx_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_cursors(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
	PyObject *py_cursors;
	py_cursors = PyList_New(object->count);
	if (py_cursors == NULL) {
		return NULL;
	}
	{
		int cursors_cntr_0;
		for (cursors_cntr_0 = 0; cursors_cntr_0 < object->count; cursors_cntr_0++) {
			PyObject *py_cursors_0;
			py_cursors_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2_Type, object->cursors, &object->cursors[cursors_cntr_0]);
			PyList_SetItem(py_cursors, cursors_cntr_0, py_cursors_0);
		}
	}
	return py_cursors;
}

static int py_drsuapi_DsReplicaCursor2CtrEx_set_cursors(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int cursors_cntr_0;
		object->cursors = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cursors, PyList_GET_SIZE(value));
		if (!object->cursors) { return -1;; }
		talloc_set_name_const(object->cursors, "ARRAY: object->cursors");
		for (cursors_cntr_0 = 0; cursors_cntr_0 < PyList_GET_SIZE(value); cursors_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2_Type, PyList_GET_ITEM(value, cursors_cntr_0), return -1;);
			if (talloc_reference(object->cursors, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, cursors_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->cursors[cursors_cntr_0] = *(struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, cursors_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaCursor2CtrEx_getsetters[] = {
	{ discard_const_p(char, "version"), py_drsuapi_DsReplicaCursor2CtrEx_get_version, py_drsuapi_DsReplicaCursor2CtrEx_set_version },
	{ discard_const_p(char, "reserved1"), py_drsuapi_DsReplicaCursor2CtrEx_get_reserved1, py_drsuapi_DsReplicaCursor2CtrEx_set_reserved1 },
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaCursor2CtrEx_get_count, py_drsuapi_DsReplicaCursor2CtrEx_set_count },
	{ discard_const_p(char, "reserved2"), py_drsuapi_DsReplicaCursor2CtrEx_get_reserved2, py_drsuapi_DsReplicaCursor2CtrEx_set_reserved2 },
	{ discard_const_p(char, "cursors"), py_drsuapi_DsReplicaCursor2CtrEx_get_cursors, py_drsuapi_DsReplicaCursor2CtrEx_set_cursors },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaCursor2CtrEx_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaCursor2CtrEx",
	.tp_getset = py_drsuapi_DsReplicaCursor2CtrEx_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaCursor2CtrEx_new,
};


static PyObject *py_drsuapi_DsAttributeValue_get___ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsAttributeValue *object = (struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

static int py_drsuapi_DsAttributeValue_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAttributeValue *object = (struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAttributeValue_get_blob(PyObject *obj, void *closure)
{
	struct drsuapi_DsAttributeValue *object = (struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(obj);
	PyObject *py_blob;
	if (object->blob == NULL) {
		py_blob = Py_None;
		Py_INCREF(py_blob);
	} else {
		py_blob = PyString_FromStringAndSize((char *)(*object->blob).data, (*object->blob).length);
	}
	return py_blob;
}

static int py_drsuapi_DsAttributeValue_set_blob(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAttributeValue *object = (struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->blob);
	if (value == Py_None) {
		object->blob = NULL;
	} else {
		object->blob = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->blob);
		*object->blob = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsAttributeValue_getsetters[] = {
	{ discard_const_p(char, "__ndr_size"), py_drsuapi_DsAttributeValue_get___ndr_size, py_drsuapi_DsAttributeValue_set___ndr_size },
	{ discard_const_p(char, "blob"), py_drsuapi_DsAttributeValue_get_blob, py_drsuapi_DsAttributeValue_set_blob },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAttributeValue_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAttributeValue",
	.tp_getset = py_drsuapi_DsAttributeValue_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAttributeValue_new,
};


static PyObject *py_drsuapi_DsAttributeValueCtr_get_num_values(PyObject *obj, void *closure)
{
	struct drsuapi_DsAttributeValueCtr *object = (struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(obj);
	PyObject *py_num_values;
	py_num_values = PyInt_FromLong(object->num_values);
	return py_num_values;
}

static int py_drsuapi_DsAttributeValueCtr_set_num_values(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAttributeValueCtr *object = (struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_values = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAttributeValueCtr_get_values(PyObject *obj, void *closure)
{
	struct drsuapi_DsAttributeValueCtr *object = (struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(obj);
	PyObject *py_values;
	if (object->values == NULL) {
		py_values = Py_None;
		Py_INCREF(py_values);
	} else {
		py_values = PyList_New(object->num_values);
		if (py_values == NULL) {
			return NULL;
		}
		{
			int values_cntr_1;
			for (values_cntr_1 = 0; values_cntr_1 < object->num_values; values_cntr_1++) {
				PyObject *py_values_1;
				py_values_1 = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, object->values, &object->values[values_cntr_1]);
				PyList_SetItem(py_values, values_cntr_1, py_values_1);
			}
		}
	}
	return py_values;
}

static int py_drsuapi_DsAttributeValueCtr_set_values(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAttributeValueCtr *object = (struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->values);
	if (value == Py_None) {
		object->values = NULL;
	} else {
		object->values = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int values_cntr_1;
			object->values = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->values, PyList_GET_SIZE(value));
			if (!object->values) { return -1;; }
			talloc_set_name_const(object->values, "ARRAY: object->values");
			for (values_cntr_1 = 0; values_cntr_1 < PyList_GET_SIZE(value); values_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, PyList_GET_ITEM(value, values_cntr_1), return -1;);
				if (talloc_reference(object->values, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, values_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->values[values_cntr_1] = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(PyList_GET_ITEM(value, values_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsAttributeValueCtr_getsetters[] = {
	{ discard_const_p(char, "num_values"), py_drsuapi_DsAttributeValueCtr_get_num_values, py_drsuapi_DsAttributeValueCtr_set_num_values },
	{ discard_const_p(char, "values"), py_drsuapi_DsAttributeValueCtr_get_values, py_drsuapi_DsAttributeValueCtr_set_values },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAttributeValueCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAttributeValueCtr",
	.tp_getset = py_drsuapi_DsAttributeValueCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAttributeValueCtr_new,
};


static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_sid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_sid;
	py___ndr_size_sid = PyInt_FromLong(object->__ndr_size_sid);
	return py___ndr_size_sid;
}

static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_sid = PyInt_AsLong(value);
	return 0;
}

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

static int py_drsuapi_DsReplicaObjectIdentifier3_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get_sid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
	PyObject *py_sid;
	py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
	return py_sid;
}

static int py_drsuapi_DsReplicaObjectIdentifier3_set_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_dn;
	py___ndr_size_dn = PyInt_FromLong(object->__ndr_size_dn);
	return py___ndr_size_dn;
}

static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_dn = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
	PyObject *py_dn;
	if (object->dn == NULL) {
		py_dn = Py_None;
		Py_INCREF(py_dn);
	} else {
		py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
	}
	return py_dn;
}

static int py_drsuapi_DsReplicaObjectIdentifier3_set_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->dn = 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_drsuapi_DsReplicaObjectIdentifier3_getsetters[] = {
	{ discard_const_p(char, "__ndr_size"), py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size, py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size },
	{ discard_const_p(char, "__ndr_size_sid"), py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_sid, py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_sid },
	{ discard_const_p(char, "guid"), py_drsuapi_DsReplicaObjectIdentifier3_get_guid, py_drsuapi_DsReplicaObjectIdentifier3_set_guid },
	{ discard_const_p(char, "sid"), py_drsuapi_DsReplicaObjectIdentifier3_get_sid, py_drsuapi_DsReplicaObjectIdentifier3_set_sid },
	{ discard_const_p(char, "__ndr_size_dn"), py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_dn, py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_dn },
	{ discard_const_p(char, "dn"), py_drsuapi_DsReplicaObjectIdentifier3_get_dn, py_drsuapi_DsReplicaObjectIdentifier3_set_dn },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier3, "drsuapi_DsReplicaObjectIdentifier3", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier3_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaObjectIdentifier3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjectIdentifier3",
	.tp_getset = py_drsuapi_DsReplicaObjectIdentifier3_getsetters,
	.tp_methods = py_drsuapi_DsReplicaObjectIdentifier3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjectIdentifier3_new,
};


static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_sid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_sid;
	py___ndr_size_sid = PyInt_FromLong(object->__ndr_size_sid);
	return py___ndr_size_sid;
}

static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_sid = PyInt_AsLong(value);
	return 0;
}

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

static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_sid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
	PyObject *py_sid;
	py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
	return py_sid;
}

static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_dn;
	py___ndr_size_dn = PyInt_FromLong(object->__ndr_size_dn);
	return py___ndr_size_dn;
}

static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_dn = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
	PyObject *py_dn;
	if (object->dn == NULL) {
		py_dn = Py_None;
		Py_INCREF(py_dn);
	} else {
		py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
	}
	return py_dn;
}

static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->dn = 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 PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_binary(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_binary;
	py___ndr_size_binary = PyInt_FromLong(object->__ndr_size_binary);
	return py___ndr_size_binary;
}

static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_binary = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_binary(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
	PyObject *py_binary;
	py_binary = PyString_FromStringAndSize((char *)(object->binary).data, (object->binary).length);
	return py_binary;
}

static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_binary(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier3Binary_getsetters[] = {
	{ discard_const_p(char, "__ndr_size"), py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size, py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size },
	{ discard_const_p(char, "__ndr_size_sid"), py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_sid, py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_sid },
	{ discard_const_p(char, "guid"), py_drsuapi_DsReplicaObjectIdentifier3Binary_get_guid, py_drsuapi_DsReplicaObjectIdentifier3Binary_set_guid },
	{ discard_const_p(char, "sid"), py_drsuapi_DsReplicaObjectIdentifier3Binary_get_sid, py_drsuapi_DsReplicaObjectIdentifier3Binary_set_sid },
	{ discard_const_p(char, "__ndr_size_dn"), py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_dn, py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_dn },
	{ discard_const_p(char, "dn"), py_drsuapi_DsReplicaObjectIdentifier3Binary_get_dn, py_drsuapi_DsReplicaObjectIdentifier3Binary_set_dn },
	{ discard_const_p(char, "__ndr_size_binary"), py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_binary, py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_binary },
	{ discard_const_p(char, "binary"), py_drsuapi_DsReplicaObjectIdentifier3Binary_get_binary, py_drsuapi_DsReplicaObjectIdentifier3Binary_set_binary },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary, "drsuapi_DsReplicaObjectIdentifier3Binary", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier3Binary_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaObjectIdentifier3Binary_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjectIdentifier3Binary",
	.tp_getset = py_drsuapi_DsReplicaObjectIdentifier3Binary_getsetters,
	.tp_methods = py_drsuapi_DsReplicaObjectIdentifier3Binary_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjectIdentifier3Binary_new,
};


static PyObject *py_drsuapi_DsReplicaAttribute_get_attid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(obj);
	PyObject *py_attid;
	py_attid = PyInt_FromLong(object->attid);
	return py_attid;
}

static int py_drsuapi_DsReplicaAttribute_set_attid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->attid = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->attid = 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_drsuapi_DsReplicaAttribute_get_value_ctr(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(obj);
	PyObject *py_value_ctr;
	py_value_ctr = pytalloc_reference_ex(&drsuapi_DsAttributeValueCtr_Type, pytalloc_get_mem_ctx(obj), &object->value_ctr);
	return py_value_ctr;
}

static int py_drsuapi_DsReplicaAttribute_set_value_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsAttributeValueCtr_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->value_ctr = *(struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaAttribute_getsetters[] = {
	{ discard_const_p(char, "attid"), py_drsuapi_DsReplicaAttribute_get_attid, py_drsuapi_DsReplicaAttribute_set_attid },
	{ discard_const_p(char, "value_ctr"), py_drsuapi_DsReplicaAttribute_get_value_ctr, py_drsuapi_DsReplicaAttribute_set_value_ctr },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaAttribute_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaAttribute);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaAttribute_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaAttribute);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaAttribute);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaAttribute_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaAttribute, "drsuapi_DsReplicaAttribute", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaAttribute_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaAttribute_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaAttribute_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaAttribute_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaAttribute_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaAttribute",
	.tp_getset = py_drsuapi_DsReplicaAttribute_getsetters,
	.tp_methods = py_drsuapi_DsReplicaAttribute_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaAttribute_new,
};


static PyObject *py_drsuapi_DsReplicaAttributeCtr_get_num_attributes(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttributeCtr *object = (struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(obj);
	PyObject *py_num_attributes;
	py_num_attributes = PyInt_FromLong(object->num_attributes);
	return py_num_attributes;
}

static int py_drsuapi_DsReplicaAttributeCtr_set_num_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttributeCtr *object = (struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_attributes = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttributeCtr_get_attributes(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttributeCtr *object = (struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	if (object->attributes == NULL) {
		py_attributes = Py_None;
		Py_INCREF(py_attributes);
	} else {
		py_attributes = PyList_New(object->num_attributes);
		if (py_attributes == NULL) {
			return NULL;
		}
		{
			int attributes_cntr_1;
			for (attributes_cntr_1 = 0; attributes_cntr_1 < object->num_attributes; attributes_cntr_1++) {
				PyObject *py_attributes_1;
				py_attributes_1 = pytalloc_reference_ex(&drsuapi_DsReplicaAttribute_Type, object->attributes, &object->attributes[attributes_cntr_1]);
				PyList_SetItem(py_attributes, attributes_cntr_1, py_attributes_1);
			}
		}
	}
	return py_attributes;
}

static int py_drsuapi_DsReplicaAttributeCtr_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttributeCtr *object = (struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_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(pytalloc_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++) {
				PY_CHECK_TYPE(&drsuapi_DsReplicaAttribute_Type, PyList_GET_ITEM(value, attributes_cntr_1), return -1;);
				if (talloc_reference(object->attributes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, attributes_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->attributes[attributes_cntr_1] = *(struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(PyList_GET_ITEM(value, attributes_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaAttributeCtr_getsetters[] = {
	{ discard_const_p(char, "num_attributes"), py_drsuapi_DsReplicaAttributeCtr_get_num_attributes, py_drsuapi_DsReplicaAttributeCtr_set_num_attributes },
	{ discard_const_p(char, "attributes"), py_drsuapi_DsReplicaAttributeCtr_get_attributes, py_drsuapi_DsReplicaAttributeCtr_set_attributes },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaAttributeCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaAttributeCtr",
	.tp_getset = py_drsuapi_DsReplicaAttributeCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaAttributeCtr_new,
};


static PyObject *py_drsuapi_DsReplicaObject_get_identifier(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(obj);
	PyObject *py_identifier;
	if (object->identifier == NULL) {
		py_identifier = Py_None;
		Py_INCREF(py_identifier);
	} else {
		py_identifier = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->identifier, object->identifier);
	}
	return py_identifier;
}

static int py_drsuapi_DsReplicaObject_set_identifier(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->identifier);
	if (value == Py_None) {
		object->identifier = NULL;
	} else {
		object->identifier = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->identifier = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObject_get_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_drsuapi_DsReplicaObject_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->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_drsuapi_DsReplicaObject_get_attribute_ctr(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(obj);
	PyObject *py_attribute_ctr;
	py_attribute_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaAttributeCtr_Type, pytalloc_get_mem_ctx(obj), &object->attribute_ctr);
	return py_attribute_ctr;
}

static int py_drsuapi_DsReplicaObject_set_attribute_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaAttributeCtr_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->attribute_ctr = *(struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaObject_getsetters[] = {
	{ discard_const_p(char, "identifier"), py_drsuapi_DsReplicaObject_get_identifier, py_drsuapi_DsReplicaObject_set_identifier },
	{ discard_const_p(char, "flags"), py_drsuapi_DsReplicaObject_get_flags, py_drsuapi_DsReplicaObject_set_flags },
	{ discard_const_p(char, "attribute_ctr"), py_drsuapi_DsReplicaObject_get_attribute_ctr, py_drsuapi_DsReplicaObject_set_attribute_ctr },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaObject_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObject);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaObject_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObject);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObject);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaObject_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObject, "drsuapi_DsReplicaObject", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaObject_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObject_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaObject_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObject_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaObject_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObject",
	.tp_getset = py_drsuapi_DsReplicaObject_getsetters,
	.tp_methods = py_drsuapi_DsReplicaObject_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObject_new,
};


static PyObject *py_drsuapi_DsReplicaMetaData_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_DsReplicaMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaMetaData_get_originating_change_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_change_time;
	py_originating_change_time = PyLong_FromLongLong(object->originating_change_time);
	return py_originating_change_time;
}

static int py_drsuapi_DsReplicaMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_change_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_change_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_drsuapi_DsReplicaMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_invocation_id;
	py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
	return py_originating_invocation_id;
}

static int py_drsuapi_DsReplicaMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaMetaData_get_originating_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_usn;
	py_originating_usn = PyLong_FromLongLong(object->originating_usn);
	return py_originating_usn;
}

static int py_drsuapi_DsReplicaMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_usn = 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_drsuapi_DsReplicaMetaData_getsetters[] = {
	{ discard_const_p(char, "version"), py_drsuapi_DsReplicaMetaData_get_version, py_drsuapi_DsReplicaMetaData_set_version },
	{ discard_const_p(char, "originating_change_time"), py_drsuapi_DsReplicaMetaData_get_originating_change_time, py_drsuapi_DsReplicaMetaData_set_originating_change_time },
	{ discard_const_p(char, "originating_invocation_id"), py_drsuapi_DsReplicaMetaData_get_originating_invocation_id, py_drsuapi_DsReplicaMetaData_set_originating_invocation_id },
	{ discard_const_p(char, "originating_usn"), py_drsuapi_DsReplicaMetaData_get_originating_usn, py_drsuapi_DsReplicaMetaData_set_originating_usn },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaMetaData_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaMetaData",
	.tp_getset = py_drsuapi_DsReplicaMetaData_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaMetaData_new,
};


static PyObject *py_drsuapi_DsReplicaMetaDataCtr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaMetaDataCtr_get_meta_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(obj);
	PyObject *py_meta_data;
	py_meta_data = PyList_New(object->count);
	if (py_meta_data == NULL) {
		return NULL;
	}
	{
		int meta_data_cntr_0;
		for (meta_data_cntr_0 = 0; meta_data_cntr_0 < object->count; meta_data_cntr_0++) {
			PyObject *py_meta_data_0;
			py_meta_data_0 = pytalloc_reference_ex(&drsuapi_DsReplicaMetaData_Type, object->meta_data, &object->meta_data[meta_data_cntr_0]);
			PyList_SetItem(py_meta_data, meta_data_cntr_0, py_meta_data_0);
		}
	}
	return py_meta_data;
}

static int py_drsuapi_DsReplicaMetaDataCtr_set_meta_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int meta_data_cntr_0;
		object->meta_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->meta_data, PyList_GET_SIZE(value));
		if (!object->meta_data) { return -1;; }
		talloc_set_name_const(object->meta_data, "ARRAY: object->meta_data");
		for (meta_data_cntr_0 = 0; meta_data_cntr_0 < PyList_GET_SIZE(value); meta_data_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaMetaData_Type, PyList_GET_ITEM(value, meta_data_cntr_0), return -1;);
			if (talloc_reference(object->meta_data, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, meta_data_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->meta_data[meta_data_cntr_0] = *(struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, meta_data_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaMetaDataCtr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaMetaDataCtr_get_count, py_drsuapi_DsReplicaMetaDataCtr_set_count },
	{ discard_const_p(char, "meta_data"), py_drsuapi_DsReplicaMetaDataCtr_get_meta_data, py_drsuapi_DsReplicaMetaDataCtr_set_meta_data },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaMetaDataCtr);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaMetaDataCtr);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaMetaDataCtr);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaMetaDataCtr, "drsuapi_DsReplicaMetaDataCtr", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaMetaDataCtr_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaMetaDataCtr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaMetaDataCtr_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaMetaDataCtr_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaMetaDataCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaMetaDataCtr",
	.tp_getset = py_drsuapi_DsReplicaMetaDataCtr_getsetters,
	.tp_methods = py_drsuapi_DsReplicaMetaDataCtr_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaMetaDataCtr_new,
};


static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_next_object(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
	PyObject *py_next_object;
	if (object->next_object == NULL) {
		py_next_object = Py_None;
		Py_INCREF(py_next_object);
	} else {
		py_next_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->next_object, object->next_object);
	}
	return py_next_object;
}

static int py_drsuapi_DsReplicaObjectListItemEx_set_next_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->next_object);
	if (value == Py_None) {
		object->next_object = NULL;
	} else {
		object->next_object = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->next_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_object(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
	PyObject *py_object;
	py_object = pytalloc_reference_ex(&drsuapi_DsReplicaObject_Type, pytalloc_get_mem_ctx(obj), &object->object);
	return py_object;
}

static int py_drsuapi_DsReplicaObjectListItemEx_set_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObject_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->object = *(struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_is_nc_prefix(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
	PyObject *py_is_nc_prefix;
	py_is_nc_prefix = PyInt_FromLong(object->is_nc_prefix);
	return py_is_nc_prefix;
}

static int py_drsuapi_DsReplicaObjectListItemEx_set_is_nc_prefix(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_nc_prefix = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_parent_object_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
	PyObject *py_parent_object_guid;
	if (object->parent_object_guid == NULL) {
		py_parent_object_guid = Py_None;
		Py_INCREF(py_parent_object_guid);
	} else {
		py_parent_object_guid = pytalloc_reference_ex(GUID_Type, object->parent_object_guid, object->parent_object_guid);
	}
	return py_parent_object_guid;
}

static int py_drsuapi_DsReplicaObjectListItemEx_set_parent_object_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->parent_object_guid);
	if (value == Py_None) {
		object->parent_object_guid = NULL;
	} else {
		object->parent_object_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->parent_object_guid = (struct GUID *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_meta_data_ctr(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
	PyObject *py_meta_data_ctr;
	if (object->meta_data_ctr == NULL) {
		py_meta_data_ctr = Py_None;
		Py_INCREF(py_meta_data_ctr);
	} else {
		py_meta_data_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaMetaDataCtr_Type, object->meta_data_ctr, object->meta_data_ctr);
	}
	return py_meta_data_ctr;
}

static int py_drsuapi_DsReplicaObjectListItemEx_set_meta_data_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->meta_data_ctr);
	if (value == Py_None) {
		object->meta_data_ctr = NULL;
	} else {
		object->meta_data_ctr = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaMetaDataCtr_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->meta_data_ctr = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaObjectListItemEx_getsetters[] = {
	{ discard_const_p(char, "next_object"), py_drsuapi_DsReplicaObjectListItemEx_get_next_object, py_drsuapi_DsReplicaObjectListItemEx_set_next_object },
	{ discard_const_p(char, "object"), py_drsuapi_DsReplicaObjectListItemEx_get_object, py_drsuapi_DsReplicaObjectListItemEx_set_object },
	{ discard_const_p(char, "is_nc_prefix"), py_drsuapi_DsReplicaObjectListItemEx_get_is_nc_prefix, py_drsuapi_DsReplicaObjectListItemEx_set_is_nc_prefix },
	{ discard_const_p(char, "parent_object_guid"), py_drsuapi_DsReplicaObjectListItemEx_get_parent_object_guid, py_drsuapi_DsReplicaObjectListItemEx_set_parent_object_guid },
	{ discard_const_p(char, "meta_data_ctr"), py_drsuapi_DsReplicaObjectListItemEx_get_meta_data_ctr, py_drsuapi_DsReplicaObjectListItemEx_set_meta_data_ctr },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectListItemEx);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItemEx);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItemEx);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectListItemEx, "drsuapi_DsReplicaObjectListItemEx", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaObjectListItemEx_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectListItemEx_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaObjectListItemEx_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectListItemEx_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaObjectListItemEx_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjectListItemEx",
	.tp_getset = py_drsuapi_DsReplicaObjectListItemEx_getsetters,
	.tp_methods = py_drsuapi_DsReplicaObjectListItemEx_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjectListItemEx_new,
};


static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_guid;
	py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
	return py_source_dsa_guid;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	if (object->naming_context == NULL) {
		py_naming_context = Py_None;
		Py_INCREF(py_naming_context);
	} else {
		py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	}
	return py_naming_context;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	if (value == Py_None) {
		object->naming_context = NULL;
	} else {
		object->naming_context = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_old_highwatermark(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_old_highwatermark;
	py_old_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->old_highwatermark);
	return py_old_highwatermark;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_old_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->old_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_new_highwatermark(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_new_highwatermark;
	py_new_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->new_highwatermark);
	return py_new_highwatermark;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_new_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->new_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_uptodateness_vector(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_uptodateness_vector;
	if (object->uptodateness_vector == NULL) {
		py_uptodateness_vector = Py_None;
		Py_INCREF(py_uptodateness_vector);
	} else {
		py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
	}
	return py_uptodateness_vector;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->uptodateness_vector);
	if (value == Py_None) {
		object->uptodateness_vector = NULL;
	} else {
		object->uptodateness_vector = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_mapping_ctr(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_mapping_ctr;
	py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
	return py_mapping_ctr;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_extended_ret(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_ret;
	py_extended_ret = PyInt_FromLong(object->extended_ret);
	return py_extended_ret;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_extended_ret(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->extended_ret = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->extended_ret = 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_drsuapi_DsGetNCChangesCtr1_get_object_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_object_count;
	py_object_count = PyInt_FromLong(object->object_count);
	return py_object_count;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_object_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->object_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get___ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

static int py_drsuapi_DsGetNCChangesCtr1_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_first_object(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_first_object;
	if (object->first_object == NULL) {
		py_first_object = Py_None;
		Py_INCREF(py_first_object);
	} else {
		py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->first_object, object->first_object);
	}
	return py_first_object;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->first_object);
	if (value == Py_None) {
		object->first_object = NULL;
	} else {
		object->first_object = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->first_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_more_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_more_data;
	py_more_data = PyInt_FromLong(object->more_data);
	return py_more_data;
}

static int py_drsuapi_DsGetNCChangesCtr1_set_more_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->more_data = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesCtr1_getsetters[] = {
	{ discard_const_p(char, "source_dsa_guid"), py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_guid, py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_guid },
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_invocation_id, py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_invocation_id },
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsGetNCChangesCtr1_get_naming_context, py_drsuapi_DsGetNCChangesCtr1_set_naming_context },
	{ discard_const_p(char, "old_highwatermark"), py_drsuapi_DsGetNCChangesCtr1_get_old_highwatermark, py_drsuapi_DsGetNCChangesCtr1_set_old_highwatermark },
	{ discard_const_p(char, "new_highwatermark"), py_drsuapi_DsGetNCChangesCtr1_get_new_highwatermark, py_drsuapi_DsGetNCChangesCtr1_set_new_highwatermark },
	{ discard_const_p(char, "uptodateness_vector"), py_drsuapi_DsGetNCChangesCtr1_get_uptodateness_vector, py_drsuapi_DsGetNCChangesCtr1_set_uptodateness_vector },
	{ discard_const_p(char, "mapping_ctr"), py_drsuapi_DsGetNCChangesCtr1_get_mapping_ctr, py_drsuapi_DsGetNCChangesCtr1_set_mapping_ctr },
	{ discard_const_p(char, "extended_ret"), py_drsuapi_DsGetNCChangesCtr1_get_extended_ret, py_drsuapi_DsGetNCChangesCtr1_set_extended_ret },
	{ discard_const_p(char, "object_count"), py_drsuapi_DsGetNCChangesCtr1_get_object_count, py_drsuapi_DsGetNCChangesCtr1_set_object_count },
	{ discard_const_p(char, "__ndr_size"), py_drsuapi_DsGetNCChangesCtr1_get___ndr_size, py_drsuapi_DsGetNCChangesCtr1_set___ndr_size },
	{ discard_const_p(char, "first_object"), py_drsuapi_DsGetNCChangesCtr1_get_first_object, py_drsuapi_DsGetNCChangesCtr1_set_first_object },
	{ discard_const_p(char, "more_data"), py_drsuapi_DsGetNCChangesCtr1_get_more_data, py_drsuapi_DsGetNCChangesCtr1_set_more_data },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr1, "drsuapi_DsGetNCChangesCtr1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsGetNCChangesCtr1_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsGetNCChangesCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesCtr1",
	.tp_getset = py_drsuapi_DsGetNCChangesCtr1_getsetters,
	.tp_methods = py_drsuapi_DsGetNCChangesCtr1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesCtr1_new,
};


static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_identifier(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
	PyObject *py_identifier;
	if (object->identifier == NULL) {
		py_identifier = Py_None;
		Py_INCREF(py_identifier);
	} else {
		py_identifier = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->identifier, object->identifier);
	}
	return py_identifier;
}

static int py_drsuapi_DsReplicaLinkedAttribute_set_identifier(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->identifier);
	if (value == Py_None) {
		object->identifier = NULL;
	} else {
		object->identifier = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->identifier = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_attid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
	PyObject *py_attid;
	py_attid = PyInt_FromLong(object->attid);
	return py_attid;
}

static int py_drsuapi_DsReplicaLinkedAttribute_set_attid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->attid = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->attid = 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_drsuapi_DsReplicaLinkedAttribute_get_value(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
	PyObject *py_value;
	py_value = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, pytalloc_get_mem_ctx(obj), &object->value);
	return py_value;
}

static int py_drsuapi_DsReplicaLinkedAttribute_set_value(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->value = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_drsuapi_DsReplicaLinkedAttribute_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->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_drsuapi_DsReplicaLinkedAttribute_get_originating_add_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
	PyObject *py_originating_add_time;
	py_originating_add_time = PyLong_FromLongLong(object->originating_add_time);
	return py_originating_add_time;
}

static int py_drsuapi_DsReplicaLinkedAttribute_set_originating_add_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_add_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_add_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_drsuapi_DsReplicaLinkedAttribute_get_meta_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
	PyObject *py_meta_data;
	py_meta_data = pytalloc_reference_ex(&drsuapi_DsReplicaMetaData_Type, pytalloc_get_mem_ctx(obj), &object->meta_data);
	return py_meta_data;
}

static int py_drsuapi_DsReplicaLinkedAttribute_set_meta_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaMetaData_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->meta_data = *(struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaLinkedAttribute_getsetters[] = {
	{ discard_const_p(char, "identifier"), py_drsuapi_DsReplicaLinkedAttribute_get_identifier, py_drsuapi_DsReplicaLinkedAttribute_set_identifier },
	{ discard_const_p(char, "attid"), py_drsuapi_DsReplicaLinkedAttribute_get_attid, py_drsuapi_DsReplicaLinkedAttribute_set_attid },
	{ discard_const_p(char, "value"), py_drsuapi_DsReplicaLinkedAttribute_get_value, py_drsuapi_DsReplicaLinkedAttribute_set_value },
	{ discard_const_p(char, "flags"), py_drsuapi_DsReplicaLinkedAttribute_get_flags, py_drsuapi_DsReplicaLinkedAttribute_set_flags },
	{ discard_const_p(char, "originating_add_time"), py_drsuapi_DsReplicaLinkedAttribute_get_originating_add_time, py_drsuapi_DsReplicaLinkedAttribute_set_originating_add_time },
	{ discard_const_p(char, "meta_data"), py_drsuapi_DsReplicaLinkedAttribute_get_meta_data, py_drsuapi_DsReplicaLinkedAttribute_set_meta_data },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaLinkedAttribute);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaLinkedAttribute);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaLinkedAttribute);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaLinkedAttribute, "drsuapi_DsReplicaLinkedAttribute", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaLinkedAttribute_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaLinkedAttribute_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaLinkedAttribute_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaLinkedAttribute_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaLinkedAttribute_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaLinkedAttribute",
	.tp_getset = py_drsuapi_DsReplicaLinkedAttribute_getsetters,
	.tp_methods = py_drsuapi_DsReplicaLinkedAttribute_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaLinkedAttribute_new,
};


static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_guid;
	py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
	return py_source_dsa_guid;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	if (object->naming_context == NULL) {
		py_naming_context = Py_None;
		Py_INCREF(py_naming_context);
	} else {
		py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	}
	return py_naming_context;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	if (value == Py_None) {
		object->naming_context = NULL;
	} else {
		object->naming_context = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_old_highwatermark(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_old_highwatermark;
	py_old_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->old_highwatermark);
	return py_old_highwatermark;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_old_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->old_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_new_highwatermark(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_new_highwatermark;
	py_new_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->new_highwatermark);
	return py_new_highwatermark;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_new_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->new_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_uptodateness_vector(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_uptodateness_vector;
	if (object->uptodateness_vector == NULL) {
		py_uptodateness_vector = Py_None;
		Py_INCREF(py_uptodateness_vector);
	} else {
		py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2CtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
	}
	return py_uptodateness_vector;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->uptodateness_vector);
	if (value == Py_None) {
		object->uptodateness_vector = NULL;
	} else {
		object->uptodateness_vector = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2CtrEx_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->uptodateness_vector = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_mapping_ctr(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_mapping_ctr;
	py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
	return py_mapping_ctr;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_extended_ret(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_ret;
	py_extended_ret = PyInt_FromLong(object->extended_ret);
	return py_extended_ret;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_extended_ret(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->extended_ret = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->extended_ret = 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_drsuapi_DsGetNCChangesCtr6_get_object_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_object_count;
	py_object_count = PyInt_FromLong(object->object_count);
	return py_object_count;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_object_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->object_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get___ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

static int py_drsuapi_DsGetNCChangesCtr6_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_first_object(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_first_object;
	if (object->first_object == NULL) {
		py_first_object = Py_None;
		Py_INCREF(py_first_object);
	} else {
		py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->first_object, object->first_object);
	}
	return py_first_object;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->first_object);
	if (value == Py_None) {
		object->first_object = NULL;
	} else {
		object->first_object = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->first_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_more_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_more_data;
	py_more_data = PyInt_FromLong(object->more_data);
	return py_more_data;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_more_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->more_data = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_nc_object_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_nc_object_count;
	py_nc_object_count = PyInt_FromLong(object->nc_object_count);
	return py_nc_object_count;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_nc_object_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->nc_object_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_nc_linked_attributes_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_nc_linked_attributes_count;
	py_nc_linked_attributes_count = PyInt_FromLong(object->nc_linked_attributes_count);
	return py_nc_linked_attributes_count;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_nc_linked_attributes_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->nc_linked_attributes_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_linked_attributes_count;
	py_linked_attributes_count = PyInt_FromLong(object->linked_attributes_count);
	return py_linked_attributes_count;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->linked_attributes_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_linked_attributes;
	if (object->linked_attributes == NULL) {
		py_linked_attributes = Py_None;
		Py_INCREF(py_linked_attributes);
	} else {
		py_linked_attributes = PyList_New(object->linked_attributes_count);
		if (py_linked_attributes == NULL) {
			return NULL;
		}
		{
			int linked_attributes_cntr_1;
			for (linked_attributes_cntr_1 = 0; linked_attributes_cntr_1 < object->linked_attributes_count; linked_attributes_cntr_1++) {
				PyObject *py_linked_attributes_1;
				py_linked_attributes_1 = pytalloc_reference_ex(&drsuapi_DsReplicaLinkedAttribute_Type, object->linked_attributes, &object->linked_attributes[linked_attributes_cntr_1]);
				PyList_SetItem(py_linked_attributes, linked_attributes_cntr_1, py_linked_attributes_1);
			}
		}
	}
	return py_linked_attributes;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->linked_attributes);
	if (value == Py_None) {
		object->linked_attributes = NULL;
	} else {
		object->linked_attributes = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int linked_attributes_cntr_1;
			object->linked_attributes = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->linked_attributes, PyList_GET_SIZE(value));
			if (!object->linked_attributes) { return -1;; }
			talloc_set_name_const(object->linked_attributes, "ARRAY: object->linked_attributes");
			for (linked_attributes_cntr_1 = 0; linked_attributes_cntr_1 < PyList_GET_SIZE(value); linked_attributes_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsReplicaLinkedAttribute_Type, PyList_GET_ITEM(value, linked_attributes_cntr_1), return -1;);
				if (talloc_reference(object->linked_attributes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, linked_attributes_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->linked_attributes[linked_attributes_cntr_1] = *(struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(PyList_GET_ITEM(value, linked_attributes_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_drs_error(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_drs_error;
	py_drs_error = PyErr_FromWERROR(object->drs_error);
	return py_drs_error;
}

static int py_drsuapi_DsGetNCChangesCtr6_set_drs_error(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	object->drs_error = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesCtr6_getsetters[] = {
	{ discard_const_p(char, "source_dsa_guid"), py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_guid, py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_guid },
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_invocation_id, py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_invocation_id },
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsGetNCChangesCtr6_get_naming_context, py_drsuapi_DsGetNCChangesCtr6_set_naming_context },
	{ discard_const_p(char, "old_highwatermark"), py_drsuapi_DsGetNCChangesCtr6_get_old_highwatermark, py_drsuapi_DsGetNCChangesCtr6_set_old_highwatermark },
	{ discard_const_p(char, "new_highwatermark"), py_drsuapi_DsGetNCChangesCtr6_get_new_highwatermark, py_drsuapi_DsGetNCChangesCtr6_set_new_highwatermark },
	{ discard_const_p(char, "uptodateness_vector"), py_drsuapi_DsGetNCChangesCtr6_get_uptodateness_vector, py_drsuapi_DsGetNCChangesCtr6_set_uptodateness_vector },
	{ discard_const_p(char, "mapping_ctr"), py_drsuapi_DsGetNCChangesCtr6_get_mapping_ctr, py_drsuapi_DsGetNCChangesCtr6_set_mapping_ctr },
	{ discard_const_p(char, "extended_ret"), py_drsuapi_DsGetNCChangesCtr6_get_extended_ret, py_drsuapi_DsGetNCChangesCtr6_set_extended_ret },
	{ discard_const_p(char, "object_count"), py_drsuapi_DsGetNCChangesCtr6_get_object_count, py_drsuapi_DsGetNCChangesCtr6_set_object_count },
	{ discard_const_p(char, "__ndr_size"), py_drsuapi_DsGetNCChangesCtr6_get___ndr_size, py_drsuapi_DsGetNCChangesCtr6_set___ndr_size },
	{ discard_const_p(char, "first_object"), py_drsuapi_DsGetNCChangesCtr6_get_first_object, py_drsuapi_DsGetNCChangesCtr6_set_first_object },
	{ discard_const_p(char, "more_data"), py_drsuapi_DsGetNCChangesCtr6_get_more_data, py_drsuapi_DsGetNCChangesCtr6_set_more_data },
	{ discard_const_p(char, "nc_object_count"), py_drsuapi_DsGetNCChangesCtr6_get_nc_object_count, py_drsuapi_DsGetNCChangesCtr6_set_nc_object_count },
	{ discard_const_p(char, "nc_linked_attributes_count"), py_drsuapi_DsGetNCChangesCtr6_get_nc_linked_attributes_count, py_drsuapi_DsGetNCChangesCtr6_set_nc_linked_attributes_count },
	{ discard_const_p(char, "linked_attributes_count"), py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes_count, py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes_count },
	{ discard_const_p(char, "linked_attributes"), py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes, py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes },
	{ discard_const_p(char, "drs_error"), py_drsuapi_DsGetNCChangesCtr6_get_drs_error, py_drsuapi_DsGetNCChangesCtr6_set_drs_error },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr6, "drsuapi_DsGetNCChangesCtr6", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsGetNCChangesCtr6_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsGetNCChangesCtr6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesCtr6",
	.tp_getset = py_drsuapi_DsGetNCChangesCtr6_getsetters,
	.tp_methods = py_drsuapi_DsGetNCChangesCtr6_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesCtr6_new,
};


static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_get_ctr1(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(obj);
	PyObject *py_ctr1;
	py_ctr1 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1_Type, pytalloc_get_mem_ctx(obj), &object->ctr1);
	return py_ctr1;
}

static int py_drsuapi_DsGetNCChangesCtr1TS_set_ctr1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->ctr1 = *(struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesCtr1TS_getsetters[] = {
	{ discard_const_p(char, "ctr1"), py_drsuapi_DsGetNCChangesCtr1TS_get_ctr1, py_drsuapi_DsGetNCChangesCtr1TS_set_ctr1 },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1TS);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1TS);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1TS);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr1TS, "drsuapi_DsGetNCChangesCtr1TS", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsGetNCChangesCtr1TS_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1TS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1TS_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1TS_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsGetNCChangesCtr1TS_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesCtr1TS",
	.tp_getset = py_drsuapi_DsGetNCChangesCtr1TS_getsetters,
	.tp_methods = py_drsuapi_DsGetNCChangesCtr1TS_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesCtr1TS_new,
};


static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_get_ctr6(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(obj);
	PyObject *py_ctr6;
	py_ctr6 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6_Type, pytalloc_get_mem_ctx(obj), &object->ctr6);
	return py_ctr6;
}

static int py_drsuapi_DsGetNCChangesCtr6TS_set_ctr6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->ctr6 = *(struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesCtr6TS_getsetters[] = {
	{ discard_const_p(char, "ctr6"), py_drsuapi_DsGetNCChangesCtr6TS_get_ctr6, py_drsuapi_DsGetNCChangesCtr6TS_set_ctr6 },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6TS);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6TS);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6TS);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr6TS, "drsuapi_DsGetNCChangesCtr6TS", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsGetNCChangesCtr6TS_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6TS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6TS_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6TS_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsGetNCChangesCtr6TS_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesCtr6TS",
	.tp_getset = py_drsuapi_DsGetNCChangesCtr6TS_getsetters,
	.tp_methods = py_drsuapi_DsGetNCChangesCtr6TS_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesCtr6TS_new,
};


static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_decompressed_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_decompressed_length;
	py_decompressed_length = PyInt_FromLong(object->decompressed_length);
	return py_decompressed_length;
}

static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->decompressed_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_compressed_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_compressed_length;
	py_compressed_length = PyInt_FromLong(object->compressed_length);
	return py_compressed_length;
}

static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->compressed_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_ts(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_ts;
	if (object->ts == NULL) {
		py_ts = Py_None;
		Py_INCREF(py_ts);
	} else {
		py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1TS_Type, object->ts, object->ts);
	}
	return py_ts;
}

static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_ts(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->ts);
	if (value == Py_None) {
		object->ts = NULL;
	} else {
		object->ts = NULL;
		PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1TS_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->ts = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesMSZIPCtr1_getsetters[] = {
	{ discard_const_p(char, "decompressed_length"), py_drsuapi_DsGetNCChangesMSZIPCtr1_get_decompressed_length, py_drsuapi_DsGetNCChangesMSZIPCtr1_set_decompressed_length },
	{ discard_const_p(char, "compressed_length"), py_drsuapi_DsGetNCChangesMSZIPCtr1_get_compressed_length, py_drsuapi_DsGetNCChangesMSZIPCtr1_set_compressed_length },
	{ discard_const_p(char, "ts"), py_drsuapi_DsGetNCChangesMSZIPCtr1_get_ts, py_drsuapi_DsGetNCChangesMSZIPCtr1_set_ts },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesMSZIPCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesMSZIPCtr1",
	.tp_getset = py_drsuapi_DsGetNCChangesMSZIPCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesMSZIPCtr1_new,
};


static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_decompressed_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_decompressed_length;
	py_decompressed_length = PyInt_FromLong(object->decompressed_length);
	return py_decompressed_length;
}

static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->decompressed_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_compressed_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_compressed_length;
	py_compressed_length = PyInt_FromLong(object->compressed_length);
	return py_compressed_length;
}

static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->compressed_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_ts(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_ts;
	if (object->ts == NULL) {
		py_ts = Py_None;
		Py_INCREF(py_ts);
	} else {
		py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6TS_Type, object->ts, object->ts);
	}
	return py_ts;
}

static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_ts(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->ts);
	if (value == Py_None) {
		object->ts = NULL;
	} else {
		object->ts = NULL;
		PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6TS_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->ts = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesMSZIPCtr6_getsetters[] = {
	{ discard_const_p(char, "decompressed_length"), py_drsuapi_DsGetNCChangesMSZIPCtr6_get_decompressed_length, py_drsuapi_DsGetNCChangesMSZIPCtr6_set_decompressed_length },
	{ discard_const_p(char, "compressed_length"), py_drsuapi_DsGetNCChangesMSZIPCtr6_get_compressed_length, py_drsuapi_DsGetNCChangesMSZIPCtr6_set_compressed_length },
	{ discard_const_p(char, "ts"), py_drsuapi_DsGetNCChangesMSZIPCtr6_get_ts, py_drsuapi_DsGetNCChangesMSZIPCtr6_set_ts },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesMSZIPCtr6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesMSZIPCtr6",
	.tp_getset = py_drsuapi_DsGetNCChangesMSZIPCtr6_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesMSZIPCtr6_new,
};


static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr1_get_decompressed_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_decompressed_length;
	py_decompressed_length = PyInt_FromLong(object->decompressed_length);
	return py_decompressed_length;
}

static int py_drsuapi_DsGetNCChangesXPRESSCtr1_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->decompressed_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr1_get_compressed_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_compressed_length;
	py_compressed_length = PyInt_FromLong(object->compressed_length);
	return py_compressed_length;
}

static int py_drsuapi_DsGetNCChangesXPRESSCtr1_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->compressed_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr1_get_ts(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_ts;
	if (object->ts == NULL) {
		py_ts = Py_None;
		Py_INCREF(py_ts);
	} else {
		py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1TS_Type, object->ts, object->ts);
	}
	return py_ts;
}

static int py_drsuapi_DsGetNCChangesXPRESSCtr1_set_ts(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->ts);
	if (value == Py_None) {
		object->ts = NULL;
	} else {
		object->ts = NULL;
		PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1TS_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->ts = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesXPRESSCtr1_getsetters[] = {
	{ discard_const_p(char, "decompressed_length"), py_drsuapi_DsGetNCChangesXPRESSCtr1_get_decompressed_length, py_drsuapi_DsGetNCChangesXPRESSCtr1_set_decompressed_length },
	{ discard_const_p(char, "compressed_length"), py_drsuapi_DsGetNCChangesXPRESSCtr1_get_compressed_length, py_drsuapi_DsGetNCChangesXPRESSCtr1_set_compressed_length },
	{ discard_const_p(char, "ts"), py_drsuapi_DsGetNCChangesXPRESSCtr1_get_ts, py_drsuapi_DsGetNCChangesXPRESSCtr1_set_ts },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesXPRESSCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesXPRESSCtr1",
	.tp_getset = py_drsuapi_DsGetNCChangesXPRESSCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesXPRESSCtr1_new,
};


static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr6_get_decompressed_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_decompressed_length;
	py_decompressed_length = PyInt_FromLong(object->decompressed_length);
	return py_decompressed_length;
}

static int py_drsuapi_DsGetNCChangesXPRESSCtr6_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->decompressed_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr6_get_compressed_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_compressed_length;
	py_compressed_length = PyInt_FromLong(object->compressed_length);
	return py_compressed_length;
}

static int py_drsuapi_DsGetNCChangesXPRESSCtr6_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->compressed_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr6_get_ts(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(obj);
	PyObject *py_ts;
	if (object->ts == NULL) {
		py_ts = Py_None;
		Py_INCREF(py_ts);
	} else {
		py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6TS_Type, object->ts, object->ts);
	}
	return py_ts;
}

static int py_drsuapi_DsGetNCChangesXPRESSCtr6_set_ts(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->ts);
	if (value == Py_None) {
		object->ts = NULL;
	} else {
		object->ts = NULL;
		PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6TS_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->ts = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesXPRESSCtr6_getsetters[] = {
	{ discard_const_p(char, "decompressed_length"), py_drsuapi_DsGetNCChangesXPRESSCtr6_get_decompressed_length, py_drsuapi_DsGetNCChangesXPRESSCtr6_set_decompressed_length },
	{ discard_const_p(char, "compressed_length"), py_drsuapi_DsGetNCChangesXPRESSCtr6_get_compressed_length, py_drsuapi_DsGetNCChangesXPRESSCtr6_set_compressed_length },
	{ discard_const_p(char, "ts"), py_drsuapi_DsGetNCChangesXPRESSCtr6_get_ts, py_drsuapi_DsGetNCChangesXPRESSCtr6_set_ts },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesXPRESSCtr6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesXPRESSCtr6",
	.tp_getset = py_drsuapi_DsGetNCChangesXPRESSCtr6_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesXPRESSCtr6_new,
};

PyObject *py_import_drsuapi_DsGetNCChangesCompressedCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesCompressedCtr *in)
{
	PyObject *ret;

	switch (level) {
		case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, mem_ctx, &in->mszip1);
			return ret;

		case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr6_Type, mem_ctx, &in->mszip6);
			return ret;

		case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesXPRESSCtr1_Type, mem_ctx, &in->xpress1);
			return ret;

		case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesXPRESSCtr6_Type, mem_ctx, &in->xpress6);
			return ret;

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

union drsuapi_DsGetNCChangesCompressedCtr *py_export_drsuapi_DsGetNCChangesCompressedCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetNCChangesCompressedCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesCompressedCtr);
	switch (level) {
		case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->mszip1 = *(struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(in);
			break;

		case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr6_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->mszip6 = *(struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(in);
			break;

		case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesXPRESSCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->xpress1 = *(struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(in);
			break;

		case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesXPRESSCtr6_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->xpress6 = *(struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetNCChangesCtr2_get_mszip1(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr2 *object = (struct drsuapi_DsGetNCChangesCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_mszip1;
	py_mszip1 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, pytalloc_get_mem_ctx(obj), &object->mszip1);
	return py_mszip1;
}

static int py_drsuapi_DsGetNCChangesCtr2_set_mszip1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr2 *object = (struct drsuapi_DsGetNCChangesCtr2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->mszip1 = *(struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesCtr2_getsetters[] = {
	{ discard_const_p(char, "mszip1"), py_drsuapi_DsGetNCChangesCtr2_get_mszip1, py_drsuapi_DsGetNCChangesCtr2_set_mszip1 },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesCtr2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesCtr2",
	.tp_getset = py_drsuapi_DsGetNCChangesCtr2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesCtr2_new,
};


static PyObject *py_drsuapi_DsGetNCChangesCtr7_get_level(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyInt_FromLong(object->level);
	return py_level;
}

static int py_drsuapi_DsGetNCChangesCtr7_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->level = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNCChangesCtr7_get_type(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(obj);
	PyObject *py_type;
	py_type = PyInt_FromLong(object->type);
	return py_type;
}

static int py_drsuapi_DsGetNCChangesCtr7_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->type = 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_drsuapi_DsGetNCChangesCtr7_get_ctr(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(obj);
	PyObject *py_ctr;
	py_ctr = py_import_drsuapi_DsGetNCChangesCompressedCtr(pytalloc_get_mem_ctx(obj), object->level | (object->type << 16), &object->ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	return py_ctr;
}

static int py_drsuapi_DsGetNCChangesCtr7_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(py_obj);
	{
		union drsuapi_DsGetNCChangesCompressedCtr *ctr_switch_0;
		ctr_switch_0 = py_export_drsuapi_DsGetNCChangesCompressedCtr(pytalloc_get_mem_ctx(py_obj), object->level | (object->type << 16), value);
		if (ctr_switch_0 == NULL) {
			return -1;
		}
		object->ctr = *ctr_switch_0;
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNCChangesCtr7_getsetters[] = {
	{ discard_const_p(char, "level"), py_drsuapi_DsGetNCChangesCtr7_get_level, py_drsuapi_DsGetNCChangesCtr7_set_level },
	{ discard_const_p(char, "type"), py_drsuapi_DsGetNCChangesCtr7_get_type, py_drsuapi_DsGetNCChangesCtr7_set_type },
	{ discard_const_p(char, "ctr"), py_drsuapi_DsGetNCChangesCtr7_get_ctr, py_drsuapi_DsGetNCChangesCtr7_set_ctr },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNCChangesCtr7_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNCChangesCtr7",
	.tp_getset = py_drsuapi_DsGetNCChangesCtr7_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNCChangesCtr7_new,
};

PyObject *py_import_drsuapi_DsGetNCChangesCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesCtr *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1_Type, mem_ctx, &in->ctr1);
			return ret;

		case 2:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr2_Type, mem_ctx, &in->ctr2);
			return ret;

		case 6:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6_Type, mem_ctx, &in->ctr6);
			return ret;

		case 7:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr7_Type, mem_ctx, &in->ctr7);
			return ret;

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

union drsuapi_DsGetNCChangesCtr *py_export_drsuapi_DsGetNCChangesCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetNCChangesCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesCtr);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr2 = *(struct drsuapi_DsGetNCChangesCtr2 *)pytalloc_get_ptr(in);
			break;

		case 6:
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr6 = *(struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(in);
			break;

		case 7:
			PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr7_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr7 = *(struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_dns_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_dest_dsa_dns_name;
	if (object->dest_dsa_dns_name == NULL) {
		py_dest_dsa_dns_name = Py_None;
		Py_INCREF(py_dest_dsa_dns_name);
	} else {
		py_dest_dsa_dns_name = PyUnicode_Decode(object->dest_dsa_dns_name, strlen(object->dest_dsa_dns_name), "utf-8", "ignore");
	}
	return py_dest_dsa_dns_name;
}

static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_dns_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(py_obj);
	object->dest_dsa_dns_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->dest_dsa_dns_name);
	if (PyUnicode_Check(value)) {
		object->dest_dsa_dns_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->dest_dsa_dns_name = 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 PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_dest_dsa_guid;
	py_dest_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->dest_dsa_guid);
	return py_dest_dsa_guid;
}

static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dest_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_options(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_options;
	py_options = PyInt_FromLong(object->options);
	return py_options;
}

static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->options = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->options = 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_drsuapi_DsReplicaUpdateRefsRequest1_getsetters[] = {
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsReplicaUpdateRefsRequest1_get_naming_context, py_drsuapi_DsReplicaUpdateRefsRequest1_set_naming_context },
	{ discard_const_p(char, "dest_dsa_dns_name"), py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_dns_name, py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_dns_name },
	{ discard_const_p(char, "dest_dsa_guid"), py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_guid, py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_guid },
	{ discard_const_p(char, "options"), py_drsuapi_DsReplicaUpdateRefsRequest1_get_options, py_drsuapi_DsReplicaUpdateRefsRequest1_set_options },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaUpdateRefsRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaUpdateRefsRequest1",
	.tp_getset = py_drsuapi_DsReplicaUpdateRefsRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaUpdateRefsRequest1_new,
};

PyObject *py_import_drsuapi_DsReplicaUpdateRefsRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaUpdateRefsRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsReplicaUpdateRefsRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsReplicaUpdateRefsRequest *py_export_drsuapi_DsReplicaUpdateRefsRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsReplicaUpdateRefsRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaUpdateRefsRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsReplicaUpdateRefsRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaAddRequest1_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsReplicaAddRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAddRequest1_get_source_dsa_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_address;
	if (object->source_dsa_address == NULL) {
		py_source_dsa_address = Py_None;
		Py_INCREF(py_source_dsa_address);
	} else {
		if (object->source_dsa_address == NULL) {
			py_source_dsa_address = Py_None;
			Py_INCREF(py_source_dsa_address);
		} else {
			py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
		}
	}
	return py_source_dsa_address;
}

static int py_drsuapi_DsReplicaAddRequest1_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->source_dsa_address = NULL;
	} else {
		object->source_dsa_address = NULL;
		if (PyUnicode_Check(value)) {
			object->source_dsa_address = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->source_dsa_address = 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 PyObject *py_drsuapi_DsReplicaAddRequest1_get_schedule(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_schedule;
	py_schedule = PyList_New(84);
	if (py_schedule == NULL) {
		return NULL;
	}
	{
		int schedule_cntr_0;
		for (schedule_cntr_0 = 0; schedule_cntr_0 < 84; schedule_cntr_0++) {
			PyObject *py_schedule_0;
			py_schedule_0 = PyInt_FromLong(object->schedule[schedule_cntr_0]);
			PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
		}
	}
	return py_schedule;
}

static int py_drsuapi_DsReplicaAddRequest1_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int schedule_cntr_0;
		for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, schedule_cntr_0), return -1;);
			object->schedule[schedule_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, schedule_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAddRequest1_get_options(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_options;
	py_options = PyInt_FromLong(object->options);
	return py_options;
}

static int py_drsuapi_DsReplicaAddRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->options = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->options = 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_drsuapi_DsReplicaAddRequest1_getsetters[] = {
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsReplicaAddRequest1_get_naming_context, py_drsuapi_DsReplicaAddRequest1_set_naming_context },
	{ discard_const_p(char, "source_dsa_address"), py_drsuapi_DsReplicaAddRequest1_get_source_dsa_address, py_drsuapi_DsReplicaAddRequest1_set_source_dsa_address },
	{ discard_const_p(char, "schedule"), py_drsuapi_DsReplicaAddRequest1_get_schedule, py_drsuapi_DsReplicaAddRequest1_set_schedule },
	{ discard_const_p(char, "options"), py_drsuapi_DsReplicaAddRequest1_get_options, py_drsuapi_DsReplicaAddRequest1_set_options },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaAddRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaAddRequest1",
	.tp_getset = py_drsuapi_DsReplicaAddRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaAddRequest1_new,
};


static PyObject *py_drsuapi_DsReplicaAddRequest2_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsReplicaAddRequest2_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAddRequest2_get_source_dsa_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_dn;
	if (object->source_dsa_dn == NULL) {
		py_source_dsa_dn = Py_None;
		Py_INCREF(py_source_dsa_dn);
	} else {
		py_source_dsa_dn = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->source_dsa_dn, object->source_dsa_dn);
	}
	return py_source_dsa_dn;
}

static int py_drsuapi_DsReplicaAddRequest2_set_source_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->source_dsa_dn);
	if (value == Py_None) {
		object->source_dsa_dn = NULL;
	} else {
		object->source_dsa_dn = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->source_dsa_dn = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAddRequest2_get_transport_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_transport_dn;
	if (object->transport_dn == NULL) {
		py_transport_dn = Py_None;
		Py_INCREF(py_transport_dn);
	} else {
		py_transport_dn = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->transport_dn, object->transport_dn);
	}
	return py_transport_dn;
}

static int py_drsuapi_DsReplicaAddRequest2_set_transport_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->transport_dn);
	if (value == Py_None) {
		object->transport_dn = NULL;
	} else {
		object->transport_dn = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->transport_dn = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAddRequest2_get_source_dsa_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_address;
	if (object->source_dsa_address == NULL) {
		py_source_dsa_address = Py_None;
		Py_INCREF(py_source_dsa_address);
	} else {
		if (object->source_dsa_address == NULL) {
			py_source_dsa_address = Py_None;
			Py_INCREF(py_source_dsa_address);
		} else {
			py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
		}
	}
	return py_source_dsa_address;
}

static int py_drsuapi_DsReplicaAddRequest2_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->source_dsa_address = NULL;
	} else {
		object->source_dsa_address = NULL;
		if (PyUnicode_Check(value)) {
			object->source_dsa_address = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->source_dsa_address = 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 PyObject *py_drsuapi_DsReplicaAddRequest2_get_schedule(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_schedule;
	py_schedule = PyList_New(84);
	if (py_schedule == NULL) {
		return NULL;
	}
	{
		int schedule_cntr_0;
		for (schedule_cntr_0 = 0; schedule_cntr_0 < 84; schedule_cntr_0++) {
			PyObject *py_schedule_0;
			py_schedule_0 = PyInt_FromLong(object->schedule[schedule_cntr_0]);
			PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
		}
	}
	return py_schedule;
}

static int py_drsuapi_DsReplicaAddRequest2_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int schedule_cntr_0;
		for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, schedule_cntr_0), return -1;);
			object->schedule[schedule_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, schedule_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAddRequest2_get_options(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_options;
	py_options = PyInt_FromLong(object->options);
	return py_options;
}

static int py_drsuapi_DsReplicaAddRequest2_set_options(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->options = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->options = 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_drsuapi_DsReplicaAddRequest2_getsetters[] = {
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsReplicaAddRequest2_get_naming_context, py_drsuapi_DsReplicaAddRequest2_set_naming_context },
	{ discard_const_p(char, "source_dsa_dn"), py_drsuapi_DsReplicaAddRequest2_get_source_dsa_dn, py_drsuapi_DsReplicaAddRequest2_set_source_dsa_dn },
	{ discard_const_p(char, "transport_dn"), py_drsuapi_DsReplicaAddRequest2_get_transport_dn, py_drsuapi_DsReplicaAddRequest2_set_transport_dn },
	{ discard_const_p(char, "source_dsa_address"), py_drsuapi_DsReplicaAddRequest2_get_source_dsa_address, py_drsuapi_DsReplicaAddRequest2_set_source_dsa_address },
	{ discard_const_p(char, "schedule"), py_drsuapi_DsReplicaAddRequest2_get_schedule, py_drsuapi_DsReplicaAddRequest2_set_schedule },
	{ discard_const_p(char, "options"), py_drsuapi_DsReplicaAddRequest2_get_options, py_drsuapi_DsReplicaAddRequest2_set_options },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaAddRequest2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaAddRequest2",
	.tp_getset = py_drsuapi_DsReplicaAddRequest2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaAddRequest2_new,
};

PyObject *py_import_drsuapi_DsReplicaAddRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaAddRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsReplicaAddRequest1_Type, mem_ctx, &in->req1);
			return ret;

		case 2:
			ret = pytalloc_reference_ex(&drsuapi_DsReplicaAddRequest2_Type, mem_ctx, &in->req2);
			return ret;

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

union drsuapi_DsReplicaAddRequest *py_export_drsuapi_DsReplicaAddRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsReplicaAddRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaAddRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsReplicaAddRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&drsuapi_DsReplicaAddRequest2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req2 = *(struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaDelRequest1_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsReplicaDelRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaDelRequest1_get_source_dsa_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_address;
	if (object->source_dsa_address == NULL) {
		py_source_dsa_address = Py_None;
		Py_INCREF(py_source_dsa_address);
	} else {
		if (object->source_dsa_address == NULL) {
			py_source_dsa_address = Py_None;
			Py_INCREF(py_source_dsa_address);
		} else {
			py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
		}
	}
	return py_source_dsa_address;
}

static int py_drsuapi_DsReplicaDelRequest1_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->source_dsa_address = NULL;
	} else {
		object->source_dsa_address = NULL;
		if (PyUnicode_Check(value)) {
			object->source_dsa_address = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->source_dsa_address = 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 PyObject *py_drsuapi_DsReplicaDelRequest1_get_options(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_options;
	py_options = PyInt_FromLong(object->options);
	return py_options;
}

static int py_drsuapi_DsReplicaDelRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->options = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->options = 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_drsuapi_DsReplicaDelRequest1_getsetters[] = {
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsReplicaDelRequest1_get_naming_context, py_drsuapi_DsReplicaDelRequest1_set_naming_context },
	{ discard_const_p(char, "source_dsa_address"), py_drsuapi_DsReplicaDelRequest1_get_source_dsa_address, py_drsuapi_DsReplicaDelRequest1_set_source_dsa_address },
	{ discard_const_p(char, "options"), py_drsuapi_DsReplicaDelRequest1_get_options, py_drsuapi_DsReplicaDelRequest1_set_options },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaDelRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaDelRequest1",
	.tp_getset = py_drsuapi_DsReplicaDelRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaDelRequest1_new,
};

PyObject *py_import_drsuapi_DsReplicaDelRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaDelRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsReplicaDelRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsReplicaDelRequest *py_export_drsuapi_DsReplicaDelRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsReplicaDelRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaDelRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsReplicaDelRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaModRequest1_get_naming_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context;
	py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
	return py_naming_context;
}

static int py_drsuapi_DsReplicaModRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaModRequest1_get_source_dra(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dra;
	py_source_dra = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dra);
	return py_source_dra;
}

static int py_drsuapi_DsReplicaModRequest1_set_source_dra(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dra = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaModRequest1_get_source_dra_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dra_address;
	if (object->source_dra_address == NULL) {
		py_source_dra_address = Py_None;
		Py_INCREF(py_source_dra_address);
	} else {
		if (object->source_dra_address == NULL) {
			py_source_dra_address = Py_None;
			Py_INCREF(py_source_dra_address);
		} else {
			py_source_dra_address = PyUnicode_Decode(object->source_dra_address, strlen(object->source_dra_address), "utf-8", "ignore");
		}
	}
	return py_source_dra_address;
}

static int py_drsuapi_DsReplicaModRequest1_set_source_dra_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->source_dra_address = NULL;
	} else {
		object->source_dra_address = NULL;
		if (PyUnicode_Check(value)) {
			object->source_dra_address = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->source_dra_address = 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 PyObject *py_drsuapi_DsReplicaModRequest1_get_schedule(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_schedule;
	py_schedule = PyList_New(84);
	if (py_schedule == NULL) {
		return NULL;
	}
	{
		int schedule_cntr_0;
		for (schedule_cntr_0 = 0; schedule_cntr_0 < 84; schedule_cntr_0++) {
			PyObject *py_schedule_0;
			py_schedule_0 = PyInt_FromLong(object->schedule[schedule_cntr_0]);
			PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
		}
	}
	return py_schedule;
}

static int py_drsuapi_DsReplicaModRequest1_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int schedule_cntr_0;
		for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, schedule_cntr_0), return -1;);
			object->schedule[schedule_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, schedule_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaModRequest1_get_replica_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_replica_flags;
	py_replica_flags = PyInt_FromLong(object->replica_flags);
	return py_replica_flags;
}

static int py_drsuapi_DsReplicaModRequest1_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->replica_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->replica_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_drsuapi_DsReplicaModRequest1_get_modify_fields(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_modify_fields;
	py_modify_fields = PyInt_FromLong(object->modify_fields);
	return py_modify_fields;
}

static int py_drsuapi_DsReplicaModRequest1_set_modify_fields(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->modify_fields = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaModRequest1_get_options(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_options;
	py_options = PyInt_FromLong(object->options);
	return py_options;
}

static int py_drsuapi_DsReplicaModRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->options = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->options = 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_drsuapi_DsReplicaModRequest1_getsetters[] = {
	{ discard_const_p(char, "naming_context"), py_drsuapi_DsReplicaModRequest1_get_naming_context, py_drsuapi_DsReplicaModRequest1_set_naming_context },
	{ discard_const_p(char, "source_dra"), py_drsuapi_DsReplicaModRequest1_get_source_dra, py_drsuapi_DsReplicaModRequest1_set_source_dra },
	{ discard_const_p(char, "source_dra_address"), py_drsuapi_DsReplicaModRequest1_get_source_dra_address, py_drsuapi_DsReplicaModRequest1_set_source_dra_address },
	{ discard_const_p(char, "schedule"), py_drsuapi_DsReplicaModRequest1_get_schedule, py_drsuapi_DsReplicaModRequest1_set_schedule },
	{ discard_const_p(char, "replica_flags"), py_drsuapi_DsReplicaModRequest1_get_replica_flags, py_drsuapi_DsReplicaModRequest1_set_replica_flags },
	{ discard_const_p(char, "modify_fields"), py_drsuapi_DsReplicaModRequest1_get_modify_fields, py_drsuapi_DsReplicaModRequest1_set_modify_fields },
	{ discard_const_p(char, "options"), py_drsuapi_DsReplicaModRequest1_get_options, py_drsuapi_DsReplicaModRequest1_set_options },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaModRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaModRequest1",
	.tp_getset = py_drsuapi_DsReplicaModRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaModRequest1_new,
};

PyObject *py_import_drsuapi_DsReplicaModRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaModRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsReplicaModRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsReplicaModRequest *py_export_drsuapi_DsReplicaModRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsReplicaModRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaModRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsReplicaModRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_status(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyErr_FromNTSTATUS(object->status);
	return py_status;
}

static int py_drsuapi_DsGetMembershipsCtr1_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
	object->status = NT_STATUS(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_num_memberships(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_num_memberships;
	py_num_memberships = PyInt_FromLong(object->num_memberships);
	return py_num_memberships;
}

static int py_drsuapi_DsGetMembershipsCtr1_set_num_memberships(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_memberships = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_num_sids(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_num_sids;
	py_num_sids = PyInt_FromLong(object->num_sids);
	return py_num_sids;
}

static int py_drsuapi_DsGetMembershipsCtr1_set_num_sids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_sids = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_info_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_info_array;
	if (object->info_array == NULL) {
		py_info_array = Py_None;
		Py_INCREF(py_info_array);
	} else {
		py_info_array = PyList_New(object->num_memberships);
		if (py_info_array == NULL) {
			return NULL;
		}
		{
			int info_array_cntr_1;
			for (info_array_cntr_1 = 0; info_array_cntr_1 < object->num_memberships; info_array_cntr_1++) {
				PyObject *py_info_array_1;
				if (object->info_array[info_array_cntr_1] == NULL) {
					py_info_array_1 = Py_None;
					Py_INCREF(py_info_array_1);
				} else {
					py_info_array_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->info_array[info_array_cntr_1], object->info_array[info_array_cntr_1]);
				}
				PyList_SetItem(py_info_array, info_array_cntr_1, py_info_array_1);
			}
		}
	}
	return py_info_array;
}

static int py_drsuapi_DsGetMembershipsCtr1_set_info_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->info_array);
	if (value == Py_None) {
		object->info_array = NULL;
	} else {
		object->info_array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int info_array_cntr_1;
			object->info_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info_array, PyList_GET_SIZE(value));
			if (!object->info_array) { return -1;; }
			talloc_set_name_const(object->info_array, "ARRAY: object->info_array");
			for (info_array_cntr_1 = 0; info_array_cntr_1 < PyList_GET_SIZE(value); info_array_cntr_1++) {
				if (PyList_GET_ITEM(value, info_array_cntr_1) == Py_None) {
					object->info_array[info_array_cntr_1] = NULL;
				} else {
					object->info_array[info_array_cntr_1] = NULL;
					PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, PyList_GET_ITEM(value, info_array_cntr_1), return -1;);
					if (talloc_reference(object->info_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_array_cntr_1))) == NULL) {
						PyErr_NoMemory();
						return -1;
					}
					object->info_array[info_array_cntr_1] = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_array_cntr_1));
				}
			}
		}
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_group_attrs(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_group_attrs;
	if (object->group_attrs == NULL) {
		py_group_attrs = Py_None;
		Py_INCREF(py_group_attrs);
	} else {
		py_group_attrs = PyList_New(object->num_memberships);
		if (py_group_attrs == NULL) {
			return NULL;
		}
		{
			int group_attrs_cntr_1;
			for (group_attrs_cntr_1 = 0; group_attrs_cntr_1 < object->num_memberships; group_attrs_cntr_1++) {
				PyObject *py_group_attrs_1;
				py_group_attrs_1 = PyInt_FromLong(object->group_attrs[group_attrs_cntr_1]);
				PyList_SetItem(py_group_attrs, group_attrs_cntr_1, py_group_attrs_1);
			}
		}
	}
	return py_group_attrs;
}

static int py_drsuapi_DsGetMembershipsCtr1_set_group_attrs(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->group_attrs);
	if (value == Py_None) {
		object->group_attrs = NULL;
	} else {
		object->group_attrs = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int group_attrs_cntr_1;
			object->group_attrs = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->group_attrs, PyList_GET_SIZE(value));
			if (!object->group_attrs) { return -1;; }
			talloc_set_name_const(object->group_attrs, "ARRAY: object->group_attrs");
			for (group_attrs_cntr_1 = 0; group_attrs_cntr_1 < PyList_GET_SIZE(value); group_attrs_cntr_1++) {
				if (PyLong_Check(PyList_GET_ITEM(value, group_attrs_cntr_1))) {
					object->group_attrs[group_attrs_cntr_1] = PyLong_AsLongLong(PyList_GET_ITEM(value, group_attrs_cntr_1));
				} else if (PyInt_Check(PyList_GET_ITEM(value, group_attrs_cntr_1))) {
					object->group_attrs[group_attrs_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, group_attrs_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 PyObject *py_drsuapi_DsGetMembershipsCtr1_get_sids(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_sids;
	if (object->sids == NULL) {
		py_sids = Py_None;
		Py_INCREF(py_sids);
	} else {
		py_sids = PyList_New(object->num_sids);
		if (py_sids == NULL) {
			return NULL;
		}
		{
			int sids_cntr_1;
			for (sids_cntr_1 = 0; sids_cntr_1 < object->num_sids; sids_cntr_1++) {
				PyObject *py_sids_1;
				if (object->sids[sids_cntr_1] == NULL) {
					py_sids_1 = Py_None;
					Py_INCREF(py_sids_1);
				} else {
					py_sids_1 = pytalloc_reference_ex(dom_sid_Type, object->sids[sids_cntr_1], object->sids[sids_cntr_1]);
				}
				PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
			}
		}
	}
	return py_sids;
}

static int py_drsuapi_DsGetMembershipsCtr1_set_sids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->sids);
	if (value == Py_None) {
		object->sids = NULL;
	} else {
		object->sids = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int sids_cntr_1;
			object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
			if (!object->sids) { return -1;; }
			talloc_set_name_const(object->sids, "ARRAY: object->sids");
			for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
				if (PyList_GET_ITEM(value, sids_cntr_1) == Py_None) {
					object->sids[sids_cntr_1] = NULL;
				} else {
					object->sids[sids_cntr_1] = NULL;
					PY_CHECK_TYPE(dom_sid_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
					if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
						PyErr_NoMemory();
						return -1;
					}
					object->sids[sids_cntr_1] = (struct dom_sid *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetMembershipsCtr1_getsetters[] = {
	{ discard_const_p(char, "status"), py_drsuapi_DsGetMembershipsCtr1_get_status, py_drsuapi_DsGetMembershipsCtr1_set_status },
	{ discard_const_p(char, "num_memberships"), py_drsuapi_DsGetMembershipsCtr1_get_num_memberships, py_drsuapi_DsGetMembershipsCtr1_set_num_memberships },
	{ discard_const_p(char, "num_sids"), py_drsuapi_DsGetMembershipsCtr1_get_num_sids, py_drsuapi_DsGetMembershipsCtr1_set_num_sids },
	{ discard_const_p(char, "info_array"), py_drsuapi_DsGetMembershipsCtr1_get_info_array, py_drsuapi_DsGetMembershipsCtr1_set_info_array },
	{ discard_const_p(char, "group_attrs"), py_drsuapi_DsGetMembershipsCtr1_get_group_attrs, py_drsuapi_DsGetMembershipsCtr1_set_group_attrs },
	{ discard_const_p(char, "sids"), py_drsuapi_DsGetMembershipsCtr1_get_sids, py_drsuapi_DsGetMembershipsCtr1_set_sids },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetMembershipsCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetMembershipsCtr1",
	.tp_getset = py_drsuapi_DsGetMembershipsCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetMembershipsCtr1_new,
};

PyObject *py_import_drsuapi_DsGetMembershipsCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMembershipsCtr *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsCtr1_Type, mem_ctx, &in->ctr1);
			return ret;

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

union drsuapi_DsGetMembershipsCtr *py_export_drsuapi_DsGetMembershipsCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetMembershipsCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsCtr);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsGetMembershipsRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_info_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_info_array;
	if (object->info_array == NULL) {
		py_info_array = Py_None;
		Py_INCREF(py_info_array);
	} else {
		py_info_array = PyList_New(object->count);
		if (py_info_array == NULL) {
			return NULL;
		}
		{
			int info_array_cntr_1;
			for (info_array_cntr_1 = 0; info_array_cntr_1 < object->count; info_array_cntr_1++) {
				PyObject *py_info_array_1;
				if (object->info_array[info_array_cntr_1] == NULL) {
					py_info_array_1 = Py_None;
					Py_INCREF(py_info_array_1);
				} else {
					py_info_array_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->info_array[info_array_cntr_1], object->info_array[info_array_cntr_1]);
				}
				PyList_SetItem(py_info_array, info_array_cntr_1, py_info_array_1);
			}
		}
	}
	return py_info_array;
}

static int py_drsuapi_DsGetMembershipsRequest1_set_info_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->info_array);
	if (value == Py_None) {
		object->info_array = NULL;
	} else {
		object->info_array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int info_array_cntr_1;
			object->info_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info_array, PyList_GET_SIZE(value));
			if (!object->info_array) { return -1;; }
			talloc_set_name_const(object->info_array, "ARRAY: object->info_array");
			for (info_array_cntr_1 = 0; info_array_cntr_1 < PyList_GET_SIZE(value); info_array_cntr_1++) {
				if (PyList_GET_ITEM(value, info_array_cntr_1) == Py_None) {
					object->info_array[info_array_cntr_1] = NULL;
				} else {
					object->info_array[info_array_cntr_1] = NULL;
					PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, PyList_GET_ITEM(value, info_array_cntr_1), return -1;);
					if (talloc_reference(object->info_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_array_cntr_1))) == NULL) {
						PyErr_NoMemory();
						return -1;
					}
					object->info_array[info_array_cntr_1] = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_array_cntr_1));
				}
			}
		}
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_drsuapi_DsGetMembershipsRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->flags = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_type(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_type;
	py_type = PyInt_FromLong(object->type);
	return py_type;
}

static int py_drsuapi_DsGetMembershipsRequest1_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->type = 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_drsuapi_DsGetMembershipsRequest1_get_domain(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_domain;
	if (object->domain == NULL) {
		py_domain = Py_None;
		Py_INCREF(py_domain);
	} else {
		py_domain = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->domain, object->domain);
	}
	return py_domain;
}

static int py_drsuapi_DsGetMembershipsRequest1_set_domain(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->domain);
	if (value == Py_None) {
		object->domain = NULL;
	} else {
		object->domain = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->domain = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetMembershipsRequest1_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsGetMembershipsRequest1_get_count, py_drsuapi_DsGetMembershipsRequest1_set_count },
	{ discard_const_p(char, "info_array"), py_drsuapi_DsGetMembershipsRequest1_get_info_array, py_drsuapi_DsGetMembershipsRequest1_set_info_array },
	{ discard_const_p(char, "flags"), py_drsuapi_DsGetMembershipsRequest1_get_flags, py_drsuapi_DsGetMembershipsRequest1_set_flags },
	{ discard_const_p(char, "type"), py_drsuapi_DsGetMembershipsRequest1_get_type, py_drsuapi_DsGetMembershipsRequest1_set_type },
	{ discard_const_p(char, "domain"), py_drsuapi_DsGetMembershipsRequest1_get_domain, py_drsuapi_DsGetMembershipsRequest1_set_domain },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetMembershipsRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetMembershipsRequest1",
	.tp_getset = py_drsuapi_DsGetMembershipsRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetMembershipsRequest1_new,
};

PyObject *py_import_drsuapi_DsGetMembershipsRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMembershipsRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsGetMembershipsRequest *py_export_drsuapi_DsGetMembershipsRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetMembershipsRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsGetMembershipsRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->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_drsuapi_DsGetNT4ChangeLogRequest1_get_preferred_maximum_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_preferred_maximum_length;
	py_preferred_maximum_length = PyInt_FromLong(object->preferred_maximum_length);
	return py_preferred_maximum_length;
}

static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_preferred_maximum_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->preferred_maximum_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_restart_length;
	py_restart_length = PyInt_FromLong(object->restart_length);
	return py_restart_length;
}

static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->restart_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_restart_data;
	if (object->restart_data == NULL) {
		py_restart_data = Py_None;
		Py_INCREF(py_restart_data);
	} else {
		py_restart_data = PyList_New(object->restart_length);
		if (py_restart_data == NULL) {
			return NULL;
		}
		{
			int restart_data_cntr_1;
			for (restart_data_cntr_1 = 0; restart_data_cntr_1 < object->restart_length; restart_data_cntr_1++) {
				PyObject *py_restart_data_1;
				py_restart_data_1 = PyInt_FromLong(object->restart_data[restart_data_cntr_1]);
				PyList_SetItem(py_restart_data, restart_data_cntr_1, py_restart_data_1);
			}
		}
	}
	return py_restart_data;
}

static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->restart_data);
	if (value == Py_None) {
		object->restart_data = NULL;
	} else {
		object->restart_data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int restart_data_cntr_1;
			object->restart_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->restart_data, PyList_GET_SIZE(value));
			if (!object->restart_data) { return -1;; }
			talloc_set_name_const(object->restart_data, "ARRAY: object->restart_data");
			for (restart_data_cntr_1 = 0; restart_data_cntr_1 < PyList_GET_SIZE(value); restart_data_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, restart_data_cntr_1), return -1;);
				object->restart_data[restart_data_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, restart_data_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNT4ChangeLogRequest1_getsetters[] = {
	{ discard_const_p(char, "flags"), py_drsuapi_DsGetNT4ChangeLogRequest1_get_flags, py_drsuapi_DsGetNT4ChangeLogRequest1_set_flags },
	{ discard_const_p(char, "preferred_maximum_length"), py_drsuapi_DsGetNT4ChangeLogRequest1_get_preferred_maximum_length, py_drsuapi_DsGetNT4ChangeLogRequest1_set_preferred_maximum_length },
	{ discard_const_p(char, "restart_length"), py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_length, py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_length },
	{ discard_const_p(char, "restart_data"), py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_data, py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_data },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNT4ChangeLogRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNT4ChangeLogRequest1",
	.tp_getset = py_drsuapi_DsGetNT4ChangeLogRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNT4ChangeLogRequest1_new,
};

PyObject *py_import_drsuapi_DsGetNT4ChangeLogRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNT4ChangeLogRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNT4ChangeLogRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsGetNT4ChangeLogRequest *py_export_drsuapi_DsGetNT4ChangeLogRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetNT4ChangeLogRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsGetNT4ChangeLogRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_restart_length;
	py_restart_length = PyInt_FromLong(object->restart_length);
	return py_restart_length;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->restart_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_length(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_log_length;
	py_log_length = PyInt_FromLong(object->log_length);
	return py_log_length;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->log_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_serial_number(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_sam_serial_number;
	py_sam_serial_number = PyLong_FromLongLong(object->sam_serial_number);
	return py_sam_serial_number;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_serial_number(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->sam_serial_number = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->sam_serial_number = 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_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_creation_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_sam_creation_time;
	py_sam_creation_time = PyLong_FromLongLong(object->sam_creation_time);
	return py_sam_creation_time;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_creation_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->sam_creation_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->sam_creation_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_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_serial_number(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_builtin_serial_number;
	py_builtin_serial_number = PyLong_FromLongLong(object->builtin_serial_number);
	return py_builtin_serial_number;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_serial_number(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->builtin_serial_number = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->builtin_serial_number = 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_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_creation_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_builtin_creation_time;
	py_builtin_creation_time = PyLong_FromLongLong(object->builtin_creation_time);
	return py_builtin_creation_time;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_creation_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->builtin_creation_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->builtin_creation_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_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_serial_number(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_lsa_serial_number;
	py_lsa_serial_number = PyLong_FromLongLong(object->lsa_serial_number);
	return py_lsa_serial_number;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_serial_number(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->lsa_serial_number = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->lsa_serial_number = 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_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_creation_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_lsa_creation_time;
	py_lsa_creation_time = PyLong_FromLongLong(object->lsa_creation_time);
	return py_lsa_creation_time;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_creation_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->lsa_creation_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->lsa_creation_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_drsuapi_DsGetNT4ChangeLogInfo1_get_status(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyErr_FromNTSTATUS(object->status);
	return py_status;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	object->status = NT_STATUS(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_restart_data;
	if (object->restart_data == NULL) {
		py_restart_data = Py_None;
		Py_INCREF(py_restart_data);
	} else {
		py_restart_data = PyList_New(object->restart_length);
		if (py_restart_data == NULL) {
			return NULL;
		}
		{
			int restart_data_cntr_1;
			for (restart_data_cntr_1 = 0; restart_data_cntr_1 < object->restart_length; restart_data_cntr_1++) {
				PyObject *py_restart_data_1;
				py_restart_data_1 = PyInt_FromLong(object->restart_data[restart_data_cntr_1]);
				PyList_SetItem(py_restart_data, restart_data_cntr_1, py_restart_data_1);
			}
		}
	}
	return py_restart_data;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->restart_data);
	if (value == Py_None) {
		object->restart_data = NULL;
	} else {
		object->restart_data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int restart_data_cntr_1;
			object->restart_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->restart_data, PyList_GET_SIZE(value));
			if (!object->restart_data) { return -1;; }
			talloc_set_name_const(object->restart_data, "ARRAY: object->restart_data");
			for (restart_data_cntr_1 = 0; restart_data_cntr_1 < PyList_GET_SIZE(value); restart_data_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, restart_data_cntr_1), return -1;);
				object->restart_data[restart_data_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, restart_data_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_log_data;
	if (object->log_data == NULL) {
		py_log_data = Py_None;
		Py_INCREF(py_log_data);
	} else {
		py_log_data = PyList_New(object->log_length);
		if (py_log_data == NULL) {
			return NULL;
		}
		{
			int log_data_cntr_1;
			for (log_data_cntr_1 = 0; log_data_cntr_1 < object->log_length; log_data_cntr_1++) {
				PyObject *py_log_data_1;
				py_log_data_1 = PyInt_FromLong(object->log_data[log_data_cntr_1]);
				PyList_SetItem(py_log_data, log_data_cntr_1, py_log_data_1);
			}
		}
	}
	return py_log_data;
}

static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->log_data);
	if (value == Py_None) {
		object->log_data = NULL;
	} else {
		object->log_data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int log_data_cntr_1;
			object->log_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->log_data, PyList_GET_SIZE(value));
			if (!object->log_data) { return -1;; }
			talloc_set_name_const(object->log_data, "ARRAY: object->log_data");
			for (log_data_cntr_1 = 0; log_data_cntr_1 < PyList_GET_SIZE(value); log_data_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, log_data_cntr_1), return -1;);
				object->log_data[log_data_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, log_data_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetNT4ChangeLogInfo1_getsetters[] = {
	{ discard_const_p(char, "restart_length"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_length, py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_length },
	{ discard_const_p(char, "log_length"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_length, py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_length },
	{ discard_const_p(char, "sam_serial_number"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_serial_number, py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_serial_number },
	{ discard_const_p(char, "sam_creation_time"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_creation_time, py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_creation_time },
	{ discard_const_p(char, "builtin_serial_number"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_serial_number, py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_serial_number },
	{ discard_const_p(char, "builtin_creation_time"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_creation_time, py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_creation_time },
	{ discard_const_p(char, "lsa_serial_number"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_serial_number, py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_serial_number },
	{ discard_const_p(char, "lsa_creation_time"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_creation_time, py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_creation_time },
	{ discard_const_p(char, "status"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_status, py_drsuapi_DsGetNT4ChangeLogInfo1_set_status },
	{ discard_const_p(char, "restart_data"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_data, py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_data },
	{ discard_const_p(char, "log_data"), py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_data, py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_data },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetNT4ChangeLogInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetNT4ChangeLogInfo1",
	.tp_getset = py_drsuapi_DsGetNT4ChangeLogInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetNT4ChangeLogInfo1_new,
};

PyObject *py_import_drsuapi_DsGetNT4ChangeLogInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNT4ChangeLogInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetNT4ChangeLogInfo1_Type, mem_ctx, &in->info1);
			return ret;

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

union drsuapi_DsGetNT4ChangeLogInfo *py_export_drsuapi_DsGetNT4ChangeLogInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetNT4ChangeLogInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogInfo);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsGetNT4ChangeLogInfo1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info1 = *(struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsNameString_get_str(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameString *object = (struct drsuapi_DsNameString *)pytalloc_get_ptr(obj);
	PyObject *py_str;
	if (object->str == NULL) {
		py_str = Py_None;
		Py_INCREF(py_str);
	} else {
		if (object->str == NULL) {
			py_str = Py_None;
			Py_INCREF(py_str);
		} else {
			py_str = PyUnicode_Decode(object->str, strlen(object->str), "utf-8", "ignore");
		}
	}
	return py_str;
}

static int py_drsuapi_DsNameString_set_str(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameString *object = (struct drsuapi_DsNameString *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->str = NULL;
	} else {
		object->str = NULL;
		if (PyUnicode_Check(value)) {
			object->str = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->str = 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_drsuapi_DsNameString_getsetters[] = {
	{ discard_const_p(char, "str"), py_drsuapi_DsNameString_get_str, py_drsuapi_DsNameString_set_str },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsNameString_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsNameString",
	.tp_getset = py_drsuapi_DsNameString_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsNameString_new,
};


static PyObject *py_drsuapi_DsNameRequest1_get_codepage(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_codepage;
	py_codepage = PyInt_FromLong(object->codepage);
	return py_codepage;
}

static int py_drsuapi_DsNameRequest1_set_codepage(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->codepage = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsNameRequest1_get_language(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_language;
	py_language = PyInt_FromLong(object->language);
	return py_language;
}

static int py_drsuapi_DsNameRequest1_set_language(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->language = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsNameRequest1_get_format_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_format_flags;
	py_format_flags = PyInt_FromLong(object->format_flags);
	return py_format_flags;
}

static int py_drsuapi_DsNameRequest1_set_format_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->format_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->format_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_drsuapi_DsNameRequest1_get_format_offered(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_format_offered;
	py_format_offered = PyInt_FromLong(object->format_offered);
	return py_format_offered;
}

static int py_drsuapi_DsNameRequest1_set_format_offered(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->format_offered = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->format_offered = 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_drsuapi_DsNameRequest1_get_format_desired(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_format_desired;
	py_format_desired = PyInt_FromLong(object->format_desired);
	return py_format_desired;
}

static int py_drsuapi_DsNameRequest1_set_format_desired(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->format_desired = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->format_desired = 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_drsuapi_DsNameRequest1_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsNameRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsNameRequest1_get_names(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_names;
	if (object->names == NULL) {
		py_names = Py_None;
		Py_INCREF(py_names);
	} else {
		py_names = PyList_New(object->count);
		if (py_names == NULL) {
			return NULL;
		}
		{
			int names_cntr_1;
			for (names_cntr_1 = 0; names_cntr_1 < object->count; names_cntr_1++) {
				PyObject *py_names_1;
				py_names_1 = pytalloc_reference_ex(&drsuapi_DsNameString_Type, object->names, &object->names[names_cntr_1]);
				PyList_SetItem(py_names, names_cntr_1, py_names_1);
			}
		}
	}
	return py_names;
}

static int py_drsuapi_DsNameRequest1_set_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->names);
	if (value == Py_None) {
		object->names = NULL;
	} else {
		object->names = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int names_cntr_1;
			object->names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->names, PyList_GET_SIZE(value));
			if (!object->names) { return -1;; }
			talloc_set_name_const(object->names, "ARRAY: object->names");
			for (names_cntr_1 = 0; names_cntr_1 < PyList_GET_SIZE(value); names_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsNameString_Type, PyList_GET_ITEM(value, names_cntr_1), return -1;);
				if (talloc_reference(object->names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, names_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->names[names_cntr_1] = *(struct drsuapi_DsNameString *)pytalloc_get_ptr(PyList_GET_ITEM(value, names_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsNameRequest1_getsetters[] = {
	{ discard_const_p(char, "codepage"), py_drsuapi_DsNameRequest1_get_codepage, py_drsuapi_DsNameRequest1_set_codepage },
	{ discard_const_p(char, "language"), py_drsuapi_DsNameRequest1_get_language, py_drsuapi_DsNameRequest1_set_language },
	{ discard_const_p(char, "format_flags"), py_drsuapi_DsNameRequest1_get_format_flags, py_drsuapi_DsNameRequest1_set_format_flags },
	{ discard_const_p(char, "format_offered"), py_drsuapi_DsNameRequest1_get_format_offered, py_drsuapi_DsNameRequest1_set_format_offered },
	{ discard_const_p(char, "format_desired"), py_drsuapi_DsNameRequest1_get_format_desired, py_drsuapi_DsNameRequest1_set_format_desired },
	{ discard_const_p(char, "count"), py_drsuapi_DsNameRequest1_get_count, py_drsuapi_DsNameRequest1_set_count },
	{ discard_const_p(char, "names"), py_drsuapi_DsNameRequest1_get_names, py_drsuapi_DsNameRequest1_set_names },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsNameRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsNameRequest1",
	.tp_getset = py_drsuapi_DsNameRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsNameRequest1_new,
};

PyObject *py_import_drsuapi_DsNameRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsNameRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsNameRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsNameRequest *py_export_drsuapi_DsNameRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsNameRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsNameRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsNameRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsNameInfo1_get_status(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

static int py_drsuapi_DsNameInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_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 PyObject *py_drsuapi_DsNameInfo1_get_dns_domain_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_dns_domain_name;
	if (object->dns_domain_name == NULL) {
		py_dns_domain_name = Py_None;
		Py_INCREF(py_dns_domain_name);
	} else {
		if (object->dns_domain_name == NULL) {
			py_dns_domain_name = Py_None;
			Py_INCREF(py_dns_domain_name);
		} else {
			py_dns_domain_name = PyUnicode_Decode(object->dns_domain_name, strlen(object->dns_domain_name), "utf-8", "ignore");
		}
	}
	return py_dns_domain_name;
}

static int py_drsuapi_DsNameInfo1_set_dns_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dns_domain_name = NULL;
	} else {
		object->dns_domain_name = NULL;
		if (PyUnicode_Check(value)) {
			object->dns_domain_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->dns_domain_name = 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 PyObject *py_drsuapi_DsNameInfo1_get_result_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_result_name;
	if (object->result_name == NULL) {
		py_result_name = Py_None;
		Py_INCREF(py_result_name);
	} else {
		if (object->result_name == NULL) {
			py_result_name = Py_None;
			Py_INCREF(py_result_name);
		} else {
			py_result_name = PyUnicode_Decode(object->result_name, strlen(object->result_name), "utf-8", "ignore");
		}
	}
	return py_result_name;
}

static int py_drsuapi_DsNameInfo1_set_result_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->result_name = NULL;
	} else {
		object->result_name = NULL;
		if (PyUnicode_Check(value)) {
			object->result_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->result_name = 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_drsuapi_DsNameInfo1_getsetters[] = {
	{ discard_const_p(char, "status"), py_drsuapi_DsNameInfo1_get_status, py_drsuapi_DsNameInfo1_set_status },
	{ discard_const_p(char, "dns_domain_name"), py_drsuapi_DsNameInfo1_get_dns_domain_name, py_drsuapi_DsNameInfo1_set_dns_domain_name },
	{ discard_const_p(char, "result_name"), py_drsuapi_DsNameInfo1_get_result_name, py_drsuapi_DsNameInfo1_set_result_name },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsNameInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsNameInfo1",
	.tp_getset = py_drsuapi_DsNameInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsNameInfo1_new,
};


static PyObject *py_drsuapi_DsNameCtr1_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameCtr1 *object = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsNameCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameCtr1 *object = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsNameCtr1_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsNameCtr1 *object = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	if (object->array == NULL) {
		py_array = Py_None;
		Py_INCREF(py_array);
	} else {
		py_array = PyList_New(object->count);
		if (py_array == NULL) {
			return NULL;
		}
		{
			int array_cntr_1;
			for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
				PyObject *py_array_1;
				py_array_1 = pytalloc_reference_ex(&drsuapi_DsNameInfo1_Type, object->array, &object->array[array_cntr_1]);
				PyList_SetItem(py_array, array_cntr_1, py_array_1);
			}
		}
	}
	return py_array;
}

static int py_drsuapi_DsNameCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsNameCtr1 *object = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
	if (value == Py_None) {
		object->array = NULL;
	} else {
		object->array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int array_cntr_1;
			object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
			if (!object->array) { return -1;; }
			talloc_set_name_const(object->array, "ARRAY: object->array");
			for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsNameInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
				if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->array[array_cntr_1] = *(struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsNameCtr1_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsNameCtr1_get_count, py_drsuapi_DsNameCtr1_set_count },
	{ discard_const_p(char, "array"), py_drsuapi_DsNameCtr1_get_array, py_drsuapi_DsNameCtr1_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsNameCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsNameCtr1",
	.tp_getset = py_drsuapi_DsNameCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsNameCtr1_new,
};

PyObject *py_import_drsuapi_DsNameCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsNameCtr *in)
{
	PyObject *ret;

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

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

union drsuapi_DsNameCtr *py_export_drsuapi_DsNameCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsNameCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsNameCtr);
	switch (level) {
		case 1:
			if (in == Py_None) {
				ret->ctr1 = NULL;
			} else {
				ret->ctr1 = NULL;
				PY_CHECK_TYPE(&drsuapi_DsNameCtr1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->ctr1 = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(in);
			}
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_operation(PyObject *obj, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_operation;
	py_operation = PyInt_FromLong(object->operation);
	return py_operation;
}

static int py_drsuapi_DsWriteAccountSpnRequest1_set_operation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->operation = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->operation = 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_drsuapi_DsWriteAccountSpnRequest1_get_unknown1(PyObject *obj, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyInt_FromLong(object->unknown1);
	return py_unknown1;
}

static int py_drsuapi_DsWriteAccountSpnRequest1_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_object_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_object_dn;
	if (object->object_dn == NULL) {
		py_object_dn = Py_None;
		Py_INCREF(py_object_dn);
	} else {
		if (object->object_dn == NULL) {
			py_object_dn = Py_None;
			Py_INCREF(py_object_dn);
		} else {
			py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
		}
	}
	return py_object_dn;
}

static int py_drsuapi_DsWriteAccountSpnRequest1_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->object_dn = NULL;
	} else {
		object->object_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->object_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->object_dn = 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 PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsWriteAccountSpnRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_spn_names(PyObject *obj, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_spn_names;
	if (object->spn_names == NULL) {
		py_spn_names = Py_None;
		Py_INCREF(py_spn_names);
	} else {
		py_spn_names = PyList_New(object->count);
		if (py_spn_names == NULL) {
			return NULL;
		}
		{
			int spn_names_cntr_1;
			for (spn_names_cntr_1 = 0; spn_names_cntr_1 < object->count; spn_names_cntr_1++) {
				PyObject *py_spn_names_1;
				py_spn_names_1 = pytalloc_reference_ex(&drsuapi_DsNameString_Type, object->spn_names, &object->spn_names[spn_names_cntr_1]);
				PyList_SetItem(py_spn_names, spn_names_cntr_1, py_spn_names_1);
			}
		}
	}
	return py_spn_names;
}

static int py_drsuapi_DsWriteAccountSpnRequest1_set_spn_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->spn_names);
	if (value == Py_None) {
		object->spn_names = NULL;
	} else {
		object->spn_names = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int spn_names_cntr_1;
			object->spn_names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->spn_names, PyList_GET_SIZE(value));
			if (!object->spn_names) { return -1;; }
			talloc_set_name_const(object->spn_names, "ARRAY: object->spn_names");
			for (spn_names_cntr_1 = 0; spn_names_cntr_1 < PyList_GET_SIZE(value); spn_names_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsNameString_Type, PyList_GET_ITEM(value, spn_names_cntr_1), return -1;);
				if (talloc_reference(object->spn_names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, spn_names_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->spn_names[spn_names_cntr_1] = *(struct drsuapi_DsNameString *)pytalloc_get_ptr(PyList_GET_ITEM(value, spn_names_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsWriteAccountSpnRequest1_getsetters[] = {
	{ discard_const_p(char, "operation"), py_drsuapi_DsWriteAccountSpnRequest1_get_operation, py_drsuapi_DsWriteAccountSpnRequest1_set_operation },
	{ discard_const_p(char, "unknown1"), py_drsuapi_DsWriteAccountSpnRequest1_get_unknown1, py_drsuapi_DsWriteAccountSpnRequest1_set_unknown1 },
	{ discard_const_p(char, "object_dn"), py_drsuapi_DsWriteAccountSpnRequest1_get_object_dn, py_drsuapi_DsWriteAccountSpnRequest1_set_object_dn },
	{ discard_const_p(char, "count"), py_drsuapi_DsWriteAccountSpnRequest1_get_count, py_drsuapi_DsWriteAccountSpnRequest1_set_count },
	{ discard_const_p(char, "spn_names"), py_drsuapi_DsWriteAccountSpnRequest1_get_spn_names, py_drsuapi_DsWriteAccountSpnRequest1_set_spn_names },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsWriteAccountSpnRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsWriteAccountSpnRequest1",
	.tp_getset = py_drsuapi_DsWriteAccountSpnRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsWriteAccountSpnRequest1_new,
};

PyObject *py_import_drsuapi_DsWriteAccountSpnRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsWriteAccountSpnRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsWriteAccountSpnRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsWriteAccountSpnRequest *py_export_drsuapi_DsWriteAccountSpnRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsWriteAccountSpnRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsWriteAccountSpnRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsWriteAccountSpnResult1_get_status(PyObject *obj, void *closure)
{
	struct drsuapi_DsWriteAccountSpnResult1 *object = (struct drsuapi_DsWriteAccountSpnResult1 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyErr_FromWERROR(object->status);
	return py_status;
}

static int py_drsuapi_DsWriteAccountSpnResult1_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsWriteAccountSpnResult1 *object = (struct drsuapi_DsWriteAccountSpnResult1 *)pytalloc_get_ptr(py_obj);
	object->status = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyGetSetDef py_drsuapi_DsWriteAccountSpnResult1_getsetters[] = {
	{ discard_const_p(char, "status"), py_drsuapi_DsWriteAccountSpnResult1_get_status, py_drsuapi_DsWriteAccountSpnResult1_set_status },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsWriteAccountSpnResult1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsWriteAccountSpnResult1",
	.tp_getset = py_drsuapi_DsWriteAccountSpnResult1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsWriteAccountSpnResult1_new,
};

PyObject *py_import_drsuapi_DsWriteAccountSpnResult(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsWriteAccountSpnResult *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsWriteAccountSpnResult1_Type, mem_ctx, &in->res1);
			return ret;

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

union drsuapi_DsWriteAccountSpnResult *py_export_drsuapi_DsWriteAccountSpnResult(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsWriteAccountSpnResult *ret = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnResult);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsWriteAccountSpnResult1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->res1 = *(struct drsuapi_DsWriteAccountSpnResult1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_server_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_server_dn;
	if (object->server_dn == NULL) {
		py_server_dn = Py_None;
		Py_INCREF(py_server_dn);
	} else {
		if (object->server_dn == NULL) {
			py_server_dn = Py_None;
			Py_INCREF(py_server_dn);
		} else {
			py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
		}
	}
	return py_server_dn;
}

static int py_drsuapi_DsRemoveDSServerRequest1_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_dn = NULL;
	} else {
		object->server_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->server_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->server_dn = 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 PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_domain_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_domain_dn;
	if (object->domain_dn == NULL) {
		py_domain_dn = Py_None;
		Py_INCREF(py_domain_dn);
	} else {
		if (object->domain_dn == NULL) {
			py_domain_dn = Py_None;
			Py_INCREF(py_domain_dn);
		} else {
			py_domain_dn = PyUnicode_Decode(object->domain_dn, strlen(object->domain_dn), "utf-8", "ignore");
		}
	}
	return py_domain_dn;
}

static int py_drsuapi_DsRemoveDSServerRequest1_set_domain_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->domain_dn = NULL;
	} else {
		object->domain_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->domain_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->domain_dn = 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 PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_commit(PyObject *obj, void *closure)
{
	struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_commit;
	py_commit = PyInt_FromLong(object->commit);
	return py_commit;
}

static int py_drsuapi_DsRemoveDSServerRequest1_set_commit(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->commit = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsRemoveDSServerRequest1_getsetters[] = {
	{ discard_const_p(char, "server_dn"), py_drsuapi_DsRemoveDSServerRequest1_get_server_dn, py_drsuapi_DsRemoveDSServerRequest1_set_server_dn },
	{ discard_const_p(char, "domain_dn"), py_drsuapi_DsRemoveDSServerRequest1_get_domain_dn, py_drsuapi_DsRemoveDSServerRequest1_set_domain_dn },
	{ discard_const_p(char, "commit"), py_drsuapi_DsRemoveDSServerRequest1_get_commit, py_drsuapi_DsRemoveDSServerRequest1_set_commit },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsRemoveDSServerRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsRemoveDSServerRequest1",
	.tp_getset = py_drsuapi_DsRemoveDSServerRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsRemoveDSServerRequest1_new,
};

PyObject *py_import_drsuapi_DsRemoveDSServerRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsRemoveDSServerRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsRemoveDSServerRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsRemoveDSServerRequest *py_export_drsuapi_DsRemoveDSServerRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsRemoveDSServerRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsRemoveDSServerRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsRemoveDSServerResult1_get_last_dc_in_domain(PyObject *obj, void *closure)
{
	struct drsuapi_DsRemoveDSServerResult1 *object = (struct drsuapi_DsRemoveDSServerResult1 *)pytalloc_get_ptr(obj);
	PyObject *py_last_dc_in_domain;
	py_last_dc_in_domain = PyInt_FromLong(object->last_dc_in_domain);
	return py_last_dc_in_domain;
}

static int py_drsuapi_DsRemoveDSServerResult1_set_last_dc_in_domain(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsRemoveDSServerResult1 *object = (struct drsuapi_DsRemoveDSServerResult1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->last_dc_in_domain = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsRemoveDSServerResult1_getsetters[] = {
	{ discard_const_p(char, "last_dc_in_domain"), py_drsuapi_DsRemoveDSServerResult1_get_last_dc_in_domain, py_drsuapi_DsRemoveDSServerResult1_set_last_dc_in_domain },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsRemoveDSServerResult1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsRemoveDSServerResult1",
	.tp_getset = py_drsuapi_DsRemoveDSServerResult1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsRemoveDSServerResult1_new,
};

PyObject *py_import_drsuapi_DsRemoveDSServerResult(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsRemoveDSServerResult *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsRemoveDSServerResult1_Type, mem_ctx, &in->res1);
			return ret;

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

union drsuapi_DsRemoveDSServerResult *py_export_drsuapi_DsRemoveDSServerResult(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsRemoveDSServerResult *ret = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerResult);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsRemoveDSServerResult1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->res1 = *(struct drsuapi_DsRemoveDSServerResult1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetDCInfoRequest1_get_domain_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfoRequest1 *object = (struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	if (object->domain_name == NULL) {
		py_domain_name = Py_None;
		Py_INCREF(py_domain_name);
	} else {
		if (object->domain_name == NULL) {
			py_domain_name = Py_None;
			Py_INCREF(py_domain_name);
		} else {
			py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
		}
	}
	return py_domain_name;
}

static int py_drsuapi_DsGetDCInfoRequest1_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfoRequest1 *object = (struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->domain_name = NULL;
	} else {
		object->domain_name = NULL;
		if (PyUnicode_Check(value)) {
			object->domain_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->domain_name = 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 PyObject *py_drsuapi_DsGetDCInfoRequest1_get_level(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfoRequest1 *object = (struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyInt_FromLong(object->level);
	return py_level;
}

static int py_drsuapi_DsGetDCInfoRequest1_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfoRequest1 *object = (struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->level = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetDCInfoRequest1_getsetters[] = {
	{ discard_const_p(char, "domain_name"), py_drsuapi_DsGetDCInfoRequest1_get_domain_name, py_drsuapi_DsGetDCInfoRequest1_set_domain_name },
	{ discard_const_p(char, "level"), py_drsuapi_DsGetDCInfoRequest1_get_level, py_drsuapi_DsGetDCInfoRequest1_set_level },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCInfoRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCInfoRequest1",
	.tp_getset = py_drsuapi_DsGetDCInfoRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCInfoRequest1_new,
};

PyObject *py_import_drsuapi_DsGetDCInfoRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetDCInfoRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsGetDCInfoRequest *py_export_drsuapi_DsGetDCInfoRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetDCInfoRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsGetDCInfoRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetDCInfo1_get_netbios_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_netbios_name;
	if (object->netbios_name == NULL) {
		py_netbios_name = Py_None;
		Py_INCREF(py_netbios_name);
	} else {
		if (object->netbios_name == NULL) {
			py_netbios_name = Py_None;
			Py_INCREF(py_netbios_name);
		} else {
			py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
		}
	}
	return py_netbios_name;
}

static int py_drsuapi_DsGetDCInfo1_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->netbios_name = NULL;
	} else {
		object->netbios_name = NULL;
		if (PyUnicode_Check(value)) {
			object->netbios_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->netbios_name = 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 PyObject *py_drsuapi_DsGetDCInfo1_get_dns_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_dns_name;
	if (object->dns_name == NULL) {
		py_dns_name = Py_None;
		Py_INCREF(py_dns_name);
	} else {
		if (object->dns_name == NULL) {
			py_dns_name = Py_None;
			Py_INCREF(py_dns_name);
		} else {
			py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
		}
	}
	return py_dns_name;
}

static int py_drsuapi_DsGetDCInfo1_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dns_name = NULL;
	} else {
		object->dns_name = NULL;
		if (PyUnicode_Check(value)) {
			object->dns_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->dns_name = 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 PyObject *py_drsuapi_DsGetDCInfo1_get_site_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_site_name;
	if (object->site_name == NULL) {
		py_site_name = Py_None;
		Py_INCREF(py_site_name);
	} else {
		if (object->site_name == NULL) {
			py_site_name = Py_None;
			Py_INCREF(py_site_name);
		} else {
			py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
		}
	}
	return py_site_name;
}

static int py_drsuapi_DsGetDCInfo1_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->site_name = NULL;
	} else {
		object->site_name = NULL;
		if (PyUnicode_Check(value)) {
			object->site_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->site_name = 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 PyObject *py_drsuapi_DsGetDCInfo1_get_computer_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_computer_dn;
	if (object->computer_dn == NULL) {
		py_computer_dn = Py_None;
		Py_INCREF(py_computer_dn);
	} else {
		if (object->computer_dn == NULL) {
			py_computer_dn = Py_None;
			Py_INCREF(py_computer_dn);
		} else {
			py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
		}
	}
	return py_computer_dn;
}

static int py_drsuapi_DsGetDCInfo1_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->computer_dn = NULL;
	} else {
		object->computer_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->computer_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->computer_dn = 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 PyObject *py_drsuapi_DsGetDCInfo1_get_server_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_server_dn;
	if (object->server_dn == NULL) {
		py_server_dn = Py_None;
		Py_INCREF(py_server_dn);
	} else {
		if (object->server_dn == NULL) {
			py_server_dn = Py_None;
			Py_INCREF(py_server_dn);
		} else {
			py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
		}
	}
	return py_server_dn;
}

static int py_drsuapi_DsGetDCInfo1_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_dn = NULL;
	} else {
		object->server_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->server_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->server_dn = 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 PyObject *py_drsuapi_DsGetDCInfo1_get_is_pdc(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_is_pdc;
	py_is_pdc = PyInt_FromLong(object->is_pdc);
	return py_is_pdc;
}

static int py_drsuapi_DsGetDCInfo1_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_pdc = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo1_get_is_enabled(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_is_enabled;
	py_is_enabled = PyInt_FromLong(object->is_enabled);
	return py_is_enabled;
}

static int py_drsuapi_DsGetDCInfo1_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_enabled = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetDCInfo1_getsetters[] = {
	{ discard_const_p(char, "netbios_name"), py_drsuapi_DsGetDCInfo1_get_netbios_name, py_drsuapi_DsGetDCInfo1_set_netbios_name },
	{ discard_const_p(char, "dns_name"), py_drsuapi_DsGetDCInfo1_get_dns_name, py_drsuapi_DsGetDCInfo1_set_dns_name },
	{ discard_const_p(char, "site_name"), py_drsuapi_DsGetDCInfo1_get_site_name, py_drsuapi_DsGetDCInfo1_set_site_name },
	{ discard_const_p(char, "computer_dn"), py_drsuapi_DsGetDCInfo1_get_computer_dn, py_drsuapi_DsGetDCInfo1_set_computer_dn },
	{ discard_const_p(char, "server_dn"), py_drsuapi_DsGetDCInfo1_get_server_dn, py_drsuapi_DsGetDCInfo1_set_server_dn },
	{ discard_const_p(char, "is_pdc"), py_drsuapi_DsGetDCInfo1_get_is_pdc, py_drsuapi_DsGetDCInfo1_set_is_pdc },
	{ discard_const_p(char, "is_enabled"), py_drsuapi_DsGetDCInfo1_get_is_enabled, py_drsuapi_DsGetDCInfo1_set_is_enabled },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCInfo1",
	.tp_getset = py_drsuapi_DsGetDCInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCInfo1_new,
};


static PyObject *py_drsuapi_DsGetDCInfoCtr1_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr1 *object = (struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsGetDCInfoCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr1 *object = (struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfoCtr1_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr1 *object = (struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	if (object->array == NULL) {
		py_array = Py_None;
		Py_INCREF(py_array);
	} else {
		py_array = PyList_New(object->count);
		if (py_array == NULL) {
			return NULL;
		}
		{
			int array_cntr_1;
			for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
				PyObject *py_array_1;
				py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo1_Type, object->array, &object->array[array_cntr_1]);
				PyList_SetItem(py_array, array_cntr_1, py_array_1);
			}
		}
	}
	return py_array;
}

static int py_drsuapi_DsGetDCInfoCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr1 *object = (struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
	if (value == Py_None) {
		object->array = NULL;
	} else {
		object->array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int array_cntr_1;
			object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
			if (!object->array) { return -1;; }
			talloc_set_name_const(object->array, "ARRAY: object->array");
			for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsGetDCInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
				if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->array[array_cntr_1] = *(struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetDCInfoCtr1_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsGetDCInfoCtr1_get_count, py_drsuapi_DsGetDCInfoCtr1_set_count },
	{ discard_const_p(char, "array"), py_drsuapi_DsGetDCInfoCtr1_get_array, py_drsuapi_DsGetDCInfoCtr1_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCInfoCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCInfoCtr1",
	.tp_getset = py_drsuapi_DsGetDCInfoCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCInfoCtr1_new,
};


static PyObject *py_drsuapi_DsGetDCInfo2_get_netbios_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_netbios_name;
	if (object->netbios_name == NULL) {
		py_netbios_name = Py_None;
		Py_INCREF(py_netbios_name);
	} else {
		if (object->netbios_name == NULL) {
			py_netbios_name = Py_None;
			Py_INCREF(py_netbios_name);
		} else {
			py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
		}
	}
	return py_netbios_name;
}

static int py_drsuapi_DsGetDCInfo2_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->netbios_name = NULL;
	} else {
		object->netbios_name = NULL;
		if (PyUnicode_Check(value)) {
			object->netbios_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->netbios_name = 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 PyObject *py_drsuapi_DsGetDCInfo2_get_dns_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_dns_name;
	if (object->dns_name == NULL) {
		py_dns_name = Py_None;
		Py_INCREF(py_dns_name);
	} else {
		if (object->dns_name == NULL) {
			py_dns_name = Py_None;
			Py_INCREF(py_dns_name);
		} else {
			py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
		}
	}
	return py_dns_name;
}

static int py_drsuapi_DsGetDCInfo2_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dns_name = NULL;
	} else {
		object->dns_name = NULL;
		if (PyUnicode_Check(value)) {
			object->dns_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->dns_name = 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 PyObject *py_drsuapi_DsGetDCInfo2_get_site_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_site_name;
	if (object->site_name == NULL) {
		py_site_name = Py_None;
		Py_INCREF(py_site_name);
	} else {
		if (object->site_name == NULL) {
			py_site_name = Py_None;
			Py_INCREF(py_site_name);
		} else {
			py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
		}
	}
	return py_site_name;
}

static int py_drsuapi_DsGetDCInfo2_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->site_name = NULL;
	} else {
		object->site_name = NULL;
		if (PyUnicode_Check(value)) {
			object->site_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->site_name = 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 PyObject *py_drsuapi_DsGetDCInfo2_get_site_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_site_dn;
	if (object->site_dn == NULL) {
		py_site_dn = Py_None;
		Py_INCREF(py_site_dn);
	} else {
		if (object->site_dn == NULL) {
			py_site_dn = Py_None;
			Py_INCREF(py_site_dn);
		} else {
			py_site_dn = PyUnicode_Decode(object->site_dn, strlen(object->site_dn), "utf-8", "ignore");
		}
	}
	return py_site_dn;
}

static int py_drsuapi_DsGetDCInfo2_set_site_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->site_dn = NULL;
	} else {
		object->site_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->site_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->site_dn = 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 PyObject *py_drsuapi_DsGetDCInfo2_get_computer_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_computer_dn;
	if (object->computer_dn == NULL) {
		py_computer_dn = Py_None;
		Py_INCREF(py_computer_dn);
	} else {
		if (object->computer_dn == NULL) {
			py_computer_dn = Py_None;
			Py_INCREF(py_computer_dn);
		} else {
			py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
		}
	}
	return py_computer_dn;
}

static int py_drsuapi_DsGetDCInfo2_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->computer_dn = NULL;
	} else {
		object->computer_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->computer_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->computer_dn = 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 PyObject *py_drsuapi_DsGetDCInfo2_get_server_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_server_dn;
	if (object->server_dn == NULL) {
		py_server_dn = Py_None;
		Py_INCREF(py_server_dn);
	} else {
		if (object->server_dn == NULL) {
			py_server_dn = Py_None;
			Py_INCREF(py_server_dn);
		} else {
			py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
		}
	}
	return py_server_dn;
}

static int py_drsuapi_DsGetDCInfo2_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_dn = NULL;
	} else {
		object->server_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->server_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->server_dn = 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 PyObject *py_drsuapi_DsGetDCInfo2_get_ntds_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_ntds_dn;
	if (object->ntds_dn == NULL) {
		py_ntds_dn = Py_None;
		Py_INCREF(py_ntds_dn);
	} else {
		if (object->ntds_dn == NULL) {
			py_ntds_dn = Py_None;
			Py_INCREF(py_ntds_dn);
		} else {
			py_ntds_dn = PyUnicode_Decode(object->ntds_dn, strlen(object->ntds_dn), "utf-8", "ignore");
		}
	}
	return py_ntds_dn;
}

static int py_drsuapi_DsGetDCInfo2_set_ntds_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->ntds_dn = NULL;
	} else {
		object->ntds_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->ntds_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->ntds_dn = 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 PyObject *py_drsuapi_DsGetDCInfo2_get_is_pdc(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_is_pdc;
	py_is_pdc = PyInt_FromLong(object->is_pdc);
	return py_is_pdc;
}

static int py_drsuapi_DsGetDCInfo2_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_pdc = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo2_get_is_enabled(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_is_enabled;
	py_is_enabled = PyInt_FromLong(object->is_enabled);
	return py_is_enabled;
}

static int py_drsuapi_DsGetDCInfo2_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_enabled = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo2_get_is_gc(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_is_gc;
	py_is_gc = PyInt_FromLong(object->is_gc);
	return py_is_gc;
}

static int py_drsuapi_DsGetDCInfo2_set_is_gc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_gc = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo2_get_site_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_site_guid;
	py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
	return py_site_guid;
}

static int py_drsuapi_DsGetDCInfo2_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo2_get_computer_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_computer_guid;
	py_computer_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->computer_guid);
	return py_computer_guid;
}

static int py_drsuapi_DsGetDCInfo2_set_computer_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->computer_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo2_get_server_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_server_guid;
	py_server_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->server_guid);
	return py_server_guid;
}

static int py_drsuapi_DsGetDCInfo2_set_server_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->server_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo2_get_ntds_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_ntds_guid;
	py_ntds_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->ntds_guid);
	return py_ntds_guid;
}

static int py_drsuapi_DsGetDCInfo2_set_ntds_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->ntds_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetDCInfo2_getsetters[] = {
	{ discard_const_p(char, "netbios_name"), py_drsuapi_DsGetDCInfo2_get_netbios_name, py_drsuapi_DsGetDCInfo2_set_netbios_name },
	{ discard_const_p(char, "dns_name"), py_drsuapi_DsGetDCInfo2_get_dns_name, py_drsuapi_DsGetDCInfo2_set_dns_name },
	{ discard_const_p(char, "site_name"), py_drsuapi_DsGetDCInfo2_get_site_name, py_drsuapi_DsGetDCInfo2_set_site_name },
	{ discard_const_p(char, "site_dn"), py_drsuapi_DsGetDCInfo2_get_site_dn, py_drsuapi_DsGetDCInfo2_set_site_dn },
	{ discard_const_p(char, "computer_dn"), py_drsuapi_DsGetDCInfo2_get_computer_dn, py_drsuapi_DsGetDCInfo2_set_computer_dn },
	{ discard_const_p(char, "server_dn"), py_drsuapi_DsGetDCInfo2_get_server_dn, py_drsuapi_DsGetDCInfo2_set_server_dn },
	{ discard_const_p(char, "ntds_dn"), py_drsuapi_DsGetDCInfo2_get_ntds_dn, py_drsuapi_DsGetDCInfo2_set_ntds_dn },
	{ discard_const_p(char, "is_pdc"), py_drsuapi_DsGetDCInfo2_get_is_pdc, py_drsuapi_DsGetDCInfo2_set_is_pdc },
	{ discard_const_p(char, "is_enabled"), py_drsuapi_DsGetDCInfo2_get_is_enabled, py_drsuapi_DsGetDCInfo2_set_is_enabled },
	{ discard_const_p(char, "is_gc"), py_drsuapi_DsGetDCInfo2_get_is_gc, py_drsuapi_DsGetDCInfo2_set_is_gc },
	{ discard_const_p(char, "site_guid"), py_drsuapi_DsGetDCInfo2_get_site_guid, py_drsuapi_DsGetDCInfo2_set_site_guid },
	{ discard_const_p(char, "computer_guid"), py_drsuapi_DsGetDCInfo2_get_computer_guid, py_drsuapi_DsGetDCInfo2_set_computer_guid },
	{ discard_const_p(char, "server_guid"), py_drsuapi_DsGetDCInfo2_get_server_guid, py_drsuapi_DsGetDCInfo2_set_server_guid },
	{ discard_const_p(char, "ntds_guid"), py_drsuapi_DsGetDCInfo2_get_ntds_guid, py_drsuapi_DsGetDCInfo2_set_ntds_guid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCInfo2",
	.tp_getset = py_drsuapi_DsGetDCInfo2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCInfo2_new,
};


static PyObject *py_drsuapi_DsGetDCInfoCtr2_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr2 *object = (struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsGetDCInfoCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr2 *object = (struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfoCtr2_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr2 *object = (struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	if (object->array == NULL) {
		py_array = Py_None;
		Py_INCREF(py_array);
	} else {
		py_array = PyList_New(object->count);
		if (py_array == NULL) {
			return NULL;
		}
		{
			int array_cntr_1;
			for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
				PyObject *py_array_1;
				py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo2_Type, object->array, &object->array[array_cntr_1]);
				PyList_SetItem(py_array, array_cntr_1, py_array_1);
			}
		}
	}
	return py_array;
}

static int py_drsuapi_DsGetDCInfoCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr2 *object = (struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
	if (value == Py_None) {
		object->array = NULL;
	} else {
		object->array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int array_cntr_1;
			object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
			if (!object->array) { return -1;; }
			talloc_set_name_const(object->array, "ARRAY: object->array");
			for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsGetDCInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
				if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->array[array_cntr_1] = *(struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetDCInfoCtr2_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsGetDCInfoCtr2_get_count, py_drsuapi_DsGetDCInfoCtr2_set_count },
	{ discard_const_p(char, "array"), py_drsuapi_DsGetDCInfoCtr2_get_array, py_drsuapi_DsGetDCInfoCtr2_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCInfoCtr2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCInfoCtr2",
	.tp_getset = py_drsuapi_DsGetDCInfoCtr2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCInfoCtr2_new,
};


static PyObject *py_drsuapi_DsGetDCInfo3_get_netbios_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_netbios_name;
	if (object->netbios_name == NULL) {
		py_netbios_name = Py_None;
		Py_INCREF(py_netbios_name);
	} else {
		if (object->netbios_name == NULL) {
			py_netbios_name = Py_None;
			Py_INCREF(py_netbios_name);
		} else {
			py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
		}
	}
	return py_netbios_name;
}

static int py_drsuapi_DsGetDCInfo3_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->netbios_name = NULL;
	} else {
		object->netbios_name = NULL;
		if (PyUnicode_Check(value)) {
			object->netbios_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->netbios_name = 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 PyObject *py_drsuapi_DsGetDCInfo3_get_dns_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_dns_name;
	if (object->dns_name == NULL) {
		py_dns_name = Py_None;
		Py_INCREF(py_dns_name);
	} else {
		if (object->dns_name == NULL) {
			py_dns_name = Py_None;
			Py_INCREF(py_dns_name);
		} else {
			py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
		}
	}
	return py_dns_name;
}

static int py_drsuapi_DsGetDCInfo3_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dns_name = NULL;
	} else {
		object->dns_name = NULL;
		if (PyUnicode_Check(value)) {
			object->dns_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->dns_name = 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 PyObject *py_drsuapi_DsGetDCInfo3_get_site_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_site_name;
	if (object->site_name == NULL) {
		py_site_name = Py_None;
		Py_INCREF(py_site_name);
	} else {
		if (object->site_name == NULL) {
			py_site_name = Py_None;
			Py_INCREF(py_site_name);
		} else {
			py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
		}
	}
	return py_site_name;
}

static int py_drsuapi_DsGetDCInfo3_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->site_name = NULL;
	} else {
		object->site_name = NULL;
		if (PyUnicode_Check(value)) {
			object->site_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->site_name = 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 PyObject *py_drsuapi_DsGetDCInfo3_get_site_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_site_dn;
	if (object->site_dn == NULL) {
		py_site_dn = Py_None;
		Py_INCREF(py_site_dn);
	} else {
		if (object->site_dn == NULL) {
			py_site_dn = Py_None;
			Py_INCREF(py_site_dn);
		} else {
			py_site_dn = PyUnicode_Decode(object->site_dn, strlen(object->site_dn), "utf-8", "ignore");
		}
	}
	return py_site_dn;
}

static int py_drsuapi_DsGetDCInfo3_set_site_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->site_dn = NULL;
	} else {
		object->site_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->site_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->site_dn = 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 PyObject *py_drsuapi_DsGetDCInfo3_get_computer_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_computer_dn;
	if (object->computer_dn == NULL) {
		py_computer_dn = Py_None;
		Py_INCREF(py_computer_dn);
	} else {
		if (object->computer_dn == NULL) {
			py_computer_dn = Py_None;
			Py_INCREF(py_computer_dn);
		} else {
			py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
		}
	}
	return py_computer_dn;
}

static int py_drsuapi_DsGetDCInfo3_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->computer_dn = NULL;
	} else {
		object->computer_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->computer_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->computer_dn = 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 PyObject *py_drsuapi_DsGetDCInfo3_get_server_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_server_dn;
	if (object->server_dn == NULL) {
		py_server_dn = Py_None;
		Py_INCREF(py_server_dn);
	} else {
		if (object->server_dn == NULL) {
			py_server_dn = Py_None;
			Py_INCREF(py_server_dn);
		} else {
			py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
		}
	}
	return py_server_dn;
}

static int py_drsuapi_DsGetDCInfo3_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_dn = NULL;
	} else {
		object->server_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->server_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->server_dn = 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 PyObject *py_drsuapi_DsGetDCInfo3_get_ntds_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_ntds_dn;
	if (object->ntds_dn == NULL) {
		py_ntds_dn = Py_None;
		Py_INCREF(py_ntds_dn);
	} else {
		if (object->ntds_dn == NULL) {
			py_ntds_dn = Py_None;
			Py_INCREF(py_ntds_dn);
		} else {
			py_ntds_dn = PyUnicode_Decode(object->ntds_dn, strlen(object->ntds_dn), "utf-8", "ignore");
		}
	}
	return py_ntds_dn;
}

static int py_drsuapi_DsGetDCInfo3_set_ntds_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->ntds_dn = NULL;
	} else {
		object->ntds_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->ntds_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->ntds_dn = 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 PyObject *py_drsuapi_DsGetDCInfo3_get_is_pdc(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_is_pdc;
	py_is_pdc = PyInt_FromLong(object->is_pdc);
	return py_is_pdc;
}

static int py_drsuapi_DsGetDCInfo3_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_pdc = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo3_get_is_enabled(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_is_enabled;
	py_is_enabled = PyInt_FromLong(object->is_enabled);
	return py_is_enabled;
}

static int py_drsuapi_DsGetDCInfo3_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_enabled = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo3_get_is_gc(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_is_gc;
	py_is_gc = PyInt_FromLong(object->is_gc);
	return py_is_gc;
}

static int py_drsuapi_DsGetDCInfo3_set_is_gc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_gc = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo3_get_is_rodc(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_is_rodc;
	py_is_rodc = PyInt_FromLong(object->is_rodc);
	return py_is_rodc;
}

static int py_drsuapi_DsGetDCInfo3_set_is_rodc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_rodc = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo3_get_site_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_site_guid;
	py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
	return py_site_guid;
}

static int py_drsuapi_DsGetDCInfo3_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo3_get_computer_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_computer_guid;
	py_computer_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->computer_guid);
	return py_computer_guid;
}

static int py_drsuapi_DsGetDCInfo3_set_computer_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->computer_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo3_get_server_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_server_guid;
	py_server_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->server_guid);
	return py_server_guid;
}

static int py_drsuapi_DsGetDCInfo3_set_server_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->server_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfo3_get_ntds_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_ntds_guid;
	py_ntds_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->ntds_guid);
	return py_ntds_guid;
}

static int py_drsuapi_DsGetDCInfo3_set_ntds_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->ntds_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetDCInfo3_getsetters[] = {
	{ discard_const_p(char, "netbios_name"), py_drsuapi_DsGetDCInfo3_get_netbios_name, py_drsuapi_DsGetDCInfo3_set_netbios_name },
	{ discard_const_p(char, "dns_name"), py_drsuapi_DsGetDCInfo3_get_dns_name, py_drsuapi_DsGetDCInfo3_set_dns_name },
	{ discard_const_p(char, "site_name"), py_drsuapi_DsGetDCInfo3_get_site_name, py_drsuapi_DsGetDCInfo3_set_site_name },
	{ discard_const_p(char, "site_dn"), py_drsuapi_DsGetDCInfo3_get_site_dn, py_drsuapi_DsGetDCInfo3_set_site_dn },
	{ discard_const_p(char, "computer_dn"), py_drsuapi_DsGetDCInfo3_get_computer_dn, py_drsuapi_DsGetDCInfo3_set_computer_dn },
	{ discard_const_p(char, "server_dn"), py_drsuapi_DsGetDCInfo3_get_server_dn, py_drsuapi_DsGetDCInfo3_set_server_dn },
	{ discard_const_p(char, "ntds_dn"), py_drsuapi_DsGetDCInfo3_get_ntds_dn, py_drsuapi_DsGetDCInfo3_set_ntds_dn },
	{ discard_const_p(char, "is_pdc"), py_drsuapi_DsGetDCInfo3_get_is_pdc, py_drsuapi_DsGetDCInfo3_set_is_pdc },
	{ discard_const_p(char, "is_enabled"), py_drsuapi_DsGetDCInfo3_get_is_enabled, py_drsuapi_DsGetDCInfo3_set_is_enabled },
	{ discard_const_p(char, "is_gc"), py_drsuapi_DsGetDCInfo3_get_is_gc, py_drsuapi_DsGetDCInfo3_set_is_gc },
	{ discard_const_p(char, "is_rodc"), py_drsuapi_DsGetDCInfo3_get_is_rodc, py_drsuapi_DsGetDCInfo3_set_is_rodc },
	{ discard_const_p(char, "site_guid"), py_drsuapi_DsGetDCInfo3_get_site_guid, py_drsuapi_DsGetDCInfo3_set_site_guid },
	{ discard_const_p(char, "computer_guid"), py_drsuapi_DsGetDCInfo3_get_computer_guid, py_drsuapi_DsGetDCInfo3_set_computer_guid },
	{ discard_const_p(char, "server_guid"), py_drsuapi_DsGetDCInfo3_get_server_guid, py_drsuapi_DsGetDCInfo3_set_server_guid },
	{ discard_const_p(char, "ntds_guid"), py_drsuapi_DsGetDCInfo3_get_ntds_guid, py_drsuapi_DsGetDCInfo3_set_ntds_guid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCInfo3",
	.tp_getset = py_drsuapi_DsGetDCInfo3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCInfo3_new,
};


static PyObject *py_drsuapi_DsGetDCInfoCtr3_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr3 *object = (struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsGetDCInfoCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr3 *object = (struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCInfoCtr3_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr3 *object = (struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	if (object->array == NULL) {
		py_array = Py_None;
		Py_INCREF(py_array);
	} else {
		py_array = PyList_New(object->count);
		if (py_array == NULL) {
			return NULL;
		}
		{
			int array_cntr_1;
			for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
				PyObject *py_array_1;
				py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo3_Type, object->array, &object->array[array_cntr_1]);
				PyList_SetItem(py_array, array_cntr_1, py_array_1);
			}
		}
	}
	return py_array;
}

static int py_drsuapi_DsGetDCInfoCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCInfoCtr3 *object = (struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
	if (value == Py_None) {
		object->array = NULL;
	} else {
		object->array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int array_cntr_1;
			object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
			if (!object->array) { return -1;; }
			talloc_set_name_const(object->array, "ARRAY: object->array");
			for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsGetDCInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
				if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->array[array_cntr_1] = *(struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetDCInfoCtr3_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsGetDCInfoCtr3_get_count, py_drsuapi_DsGetDCInfoCtr3_set_count },
	{ discard_const_p(char, "array"), py_drsuapi_DsGetDCInfoCtr3_get_array, py_drsuapi_DsGetDCInfoCtr3_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCInfoCtr3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCInfoCtr3",
	.tp_getset = py_drsuapi_DsGetDCInfoCtr3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCInfoCtr3_new,
};


static PyObject *py_drsuapi_DsGetDCConnection01_get_client_ip_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
	PyObject *py_client_ip_address;
	py_client_ip_address = PyString_FromStringOrNULL(object->client_ip_address);
	return py_client_ip_address;
}

static int py_drsuapi_DsGetDCConnection01_set_client_ip_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
	object->client_ip_address = PyString_AS_STRING(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown2(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = PyInt_FromLong(object->unknown2);
	return py_unknown2;
}

static int py_drsuapi_DsGetDCConnection01_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCConnection01_get_connection_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
	PyObject *py_connection_time;
	py_connection_time = PyInt_FromLong(object->connection_time);
	return py_connection_time;
}

static int py_drsuapi_DsGetDCConnection01_set_connection_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->connection_time = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown4(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = PyInt_FromLong(object->unknown4);
	return py_unknown4;
}

static int py_drsuapi_DsGetDCConnection01_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown4 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown5(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyInt_FromLong(object->unknown5);
	return py_unknown5;
}

static int py_drsuapi_DsGetDCConnection01_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown5 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown6(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyInt_FromLong(object->unknown6);
	return py_unknown6;
}

static int py_drsuapi_DsGetDCConnection01_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown6 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCConnection01_get_client_account(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
	PyObject *py_client_account;
	if (object->client_account == NULL) {
		py_client_account = Py_None;
		Py_INCREF(py_client_account);
	} else {
		if (object->client_account == NULL) {
			py_client_account = Py_None;
			Py_INCREF(py_client_account);
		} else {
			py_client_account = PyUnicode_Decode(object->client_account, strlen(object->client_account), "utf-8", "ignore");
		}
	}
	return py_client_account;
}

static int py_drsuapi_DsGetDCConnection01_set_client_account(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->client_account = NULL;
	} else {
		object->client_account = NULL;
		if (PyUnicode_Check(value)) {
			object->client_account = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->client_account = 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_drsuapi_DsGetDCConnection01_getsetters[] = {
	{ discard_const_p(char, "client_ip_address"), py_drsuapi_DsGetDCConnection01_get_client_ip_address, py_drsuapi_DsGetDCConnection01_set_client_ip_address },
	{ discard_const_p(char, "unknown2"), py_drsuapi_DsGetDCConnection01_get_unknown2, py_drsuapi_DsGetDCConnection01_set_unknown2 },
	{ discard_const_p(char, "connection_time"), py_drsuapi_DsGetDCConnection01_get_connection_time, py_drsuapi_DsGetDCConnection01_set_connection_time },
	{ discard_const_p(char, "unknown4"), py_drsuapi_DsGetDCConnection01_get_unknown4, py_drsuapi_DsGetDCConnection01_set_unknown4 },
	{ discard_const_p(char, "unknown5"), py_drsuapi_DsGetDCConnection01_get_unknown5, py_drsuapi_DsGetDCConnection01_set_unknown5 },
	{ discard_const_p(char, "unknown6"), py_drsuapi_DsGetDCConnection01_get_unknown6, py_drsuapi_DsGetDCConnection01_set_unknown6 },
	{ discard_const_p(char, "client_account"), py_drsuapi_DsGetDCConnection01_get_client_account, py_drsuapi_DsGetDCConnection01_set_client_account },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCConnection01_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCConnection01",
	.tp_getset = py_drsuapi_DsGetDCConnection01_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCConnection01_new,
};


static PyObject *py_drsuapi_DsGetDCConnectionCtr01_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnectionCtr01 *object = (struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsGetDCConnectionCtr01_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnectionCtr01 *object = (struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetDCConnectionCtr01_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetDCConnectionCtr01 *object = (struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	if (object->array == NULL) {
		py_array = Py_None;
		Py_INCREF(py_array);
	} else {
		py_array = PyList_New(object->count);
		if (py_array == NULL) {
			return NULL;
		}
		{
			int array_cntr_1;
			for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
				PyObject *py_array_1;
				py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCConnection01_Type, object->array, &object->array[array_cntr_1]);
				PyList_SetItem(py_array, array_cntr_1, py_array_1);
			}
		}
	}
	return py_array;
}

static int py_drsuapi_DsGetDCConnectionCtr01_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetDCConnectionCtr01 *object = (struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
	if (value == Py_None) {
		object->array = NULL;
	} else {
		object->array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int array_cntr_1;
			object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
			if (!object->array) { return -1;; }
			talloc_set_name_const(object->array, "ARRAY: object->array");
			for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsGetDCConnection01_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
				if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->array[array_cntr_1] = *(struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetDCConnectionCtr01_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsGetDCConnectionCtr01_get_count, py_drsuapi_DsGetDCConnectionCtr01_set_count },
	{ discard_const_p(char, "array"), py_drsuapi_DsGetDCConnectionCtr01_get_array, py_drsuapi_DsGetDCConnectionCtr01_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetDCConnectionCtr01_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetDCConnectionCtr01",
	.tp_getset = py_drsuapi_DsGetDCConnectionCtr01_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetDCConnectionCtr01_new,
};

PyObject *py_import_drsuapi_DsGetDCInfoCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetDCInfoCtr *in)
{
	PyObject *ret;

	switch (level) {
		case DRSUAPI_DC_INFO_CTR_1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr1_Type, mem_ctx, &in->ctr1);
			return ret;

		case DRSUAPI_DC_INFO_CTR_2:
			ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr2_Type, mem_ctx, &in->ctr2);
			return ret;

		case DRSUAPI_DC_INFO_CTR_3:
			ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr3_Type, mem_ctx, &in->ctr3);
			return ret;

		case DRSUAPI_DC_CONNECTION_CTR_01:
			ret = pytalloc_reference_ex(&drsuapi_DsGetDCConnectionCtr01_Type, mem_ctx, &in->ctr01);
			return ret;

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

union drsuapi_DsGetDCInfoCtr *py_export_drsuapi_DsGetDCInfoCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetDCInfoCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoCtr);
	switch (level) {
		case DRSUAPI_DC_INFO_CTR_1:
			PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(in);
			break;

		case DRSUAPI_DC_INFO_CTR_2:
			PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr2 = *(struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(in);
			break;

		case DRSUAPI_DC_INFO_CTR_3:
			PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr3 = *(struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(in);
			break;

		case DRSUAPI_DC_CONNECTION_CTR_01:
			PY_CHECK_TYPE(&drsuapi_DsGetDCConnectionCtr01_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr01 = *(struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaObjectListItem_get_next_object(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(obj);
	PyObject *py_next_object;
	if (object->next_object == NULL) {
		py_next_object = Py_None;
		Py_INCREF(py_next_object);
	} else {
		py_next_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, object->next_object, object->next_object);
	}
	return py_next_object;
}

static int py_drsuapi_DsReplicaObjectListItem_set_next_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->next_object);
	if (value == Py_None) {
		object->next_object = NULL;
	} else {
		object->next_object = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->next_object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectListItem_get_object(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(obj);
	PyObject *py_object;
	py_object = pytalloc_reference_ex(&drsuapi_DsReplicaObject_Type, pytalloc_get_mem_ctx(obj), &object->object);
	return py_object;
}

static int py_drsuapi_DsReplicaObjectListItem_set_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObject_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->object = *(struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaObjectListItem_getsetters[] = {
	{ discard_const_p(char, "next_object"), py_drsuapi_DsReplicaObjectListItem_get_next_object, py_drsuapi_DsReplicaObjectListItem_set_next_object },
	{ discard_const_p(char, "object"), py_drsuapi_DsReplicaObjectListItem_get_object, py_drsuapi_DsReplicaObjectListItem_set_object },
	{ NULL }
};

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

static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectListItem);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

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

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItem);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItem);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_print(PyObject *py_obj)
{
	struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectListItem, "drsuapi_DsReplicaObjectListItem", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_DsReplicaObjectListItem_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectListItem_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_DsReplicaObjectListItem_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectListItem_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_DsReplicaObjectListItem_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjectListItem",
	.tp_getset = py_drsuapi_DsReplicaObjectListItem_getsetters,
	.tp_methods = py_drsuapi_DsReplicaObjectListItem_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjectListItem_new,
};


static PyObject *py_drsuapi_DsAddEntryRequest2_get_first_object(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryRequest2 *object = (struct drsuapi_DsAddEntryRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_first_object;
	py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, pytalloc_get_mem_ctx(obj), &object->first_object);
	return py_first_object;
}

static int py_drsuapi_DsAddEntryRequest2_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryRequest2 *object = (struct drsuapi_DsAddEntryRequest2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->first_object = *(struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntryRequest2_getsetters[] = {
	{ discard_const_p(char, "first_object"), py_drsuapi_DsAddEntryRequest2_get_first_object, py_drsuapi_DsAddEntryRequest2_set_first_object },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntryRequest2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntryRequest2",
	.tp_getset = py_drsuapi_DsAddEntryRequest2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntryRequest2_new,
};


static PyObject *py_drsuapi_SecBuffer_get_buf_size(PyObject *obj, void *closure)
{
	struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(obj);
	PyObject *py_buf_size;
	py_buf_size = PyInt_FromLong(object->buf_size);
	return py_buf_size;
}

static int py_drsuapi_SecBuffer_set_buf_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->buf_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_SecBuffer_get_buf_type(PyObject *obj, void *closure)
{
	struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(obj);
	PyObject *py_buf_type;
	py_buf_type = PyInt_FromLong(object->buf_type);
	return py_buf_type;
}

static int py_drsuapi_SecBuffer_set_buf_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->buf_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->buf_type = 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_drsuapi_SecBuffer_get_buffer(PyObject *obj, void *closure)
{
	struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_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_size);
		if (py_buffer == NULL) {
			return NULL;
		}
		{
			int buffer_cntr_1;
			for (buffer_cntr_1 = 0; buffer_cntr_1 < object->buf_size; 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_drsuapi_SecBuffer_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_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(pytalloc_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 PyGetSetDef py_drsuapi_SecBuffer_getsetters[] = {
	{ discard_const_p(char, "buf_size"), py_drsuapi_SecBuffer_get_buf_size, py_drsuapi_SecBuffer_set_buf_size },
	{ discard_const_p(char, "buf_type"), py_drsuapi_SecBuffer_get_buf_type, py_drsuapi_SecBuffer_set_buf_type },
	{ discard_const_p(char, "buffer"), py_drsuapi_SecBuffer_get_buffer, py_drsuapi_SecBuffer_set_buffer },
	{ NULL }
};

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


static PyTypeObject drsuapi_SecBuffer_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.SecBuffer",
	.tp_getset = py_drsuapi_SecBuffer_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_SecBuffer_new,
};


static PyObject *py_drsuapi_SecBufferDesc_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_SecBufferDesc_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_SecBufferDesc_get_buff_count(PyObject *obj, void *closure)
{
	struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(obj);
	PyObject *py_buff_count;
	py_buff_count = PyInt_FromLong(object->buff_count);
	return py_buff_count;
}

static int py_drsuapi_SecBufferDesc_set_buff_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->buff_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_SecBufferDesc_get_buffers(PyObject *obj, void *closure)
{
	struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(obj);
	PyObject *py_buffers;
	if (object->buffers == NULL) {
		py_buffers = Py_None;
		Py_INCREF(py_buffers);
	} else {
		py_buffers = PyList_New(object->buff_count);
		if (py_buffers == NULL) {
			return NULL;
		}
		{
			int buffers_cntr_1;
			for (buffers_cntr_1 = 0; buffers_cntr_1 < object->buff_count; buffers_cntr_1++) {
				PyObject *py_buffers_1;
				py_buffers_1 = pytalloc_reference_ex(&drsuapi_SecBuffer_Type, object->buffers, &object->buffers[buffers_cntr_1]);
				PyList_SetItem(py_buffers, buffers_cntr_1, py_buffers_1);
			}
		}
	}
	return py_buffers;
}

static int py_drsuapi_SecBufferDesc_set_buffers(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->buffers);
	if (value == Py_None) {
		object->buffers = NULL;
	} else {
		object->buffers = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int buffers_cntr_1;
			object->buffers = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffers, PyList_GET_SIZE(value));
			if (!object->buffers) { return -1;; }
			talloc_set_name_const(object->buffers, "ARRAY: object->buffers");
			for (buffers_cntr_1 = 0; buffers_cntr_1 < PyList_GET_SIZE(value); buffers_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_SecBuffer_Type, PyList_GET_ITEM(value, buffers_cntr_1), return -1;);
				if (talloc_reference(object->buffers, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, buffers_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->buffers[buffers_cntr_1] = *(struct drsuapi_SecBuffer *)pytalloc_get_ptr(PyList_GET_ITEM(value, buffers_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_SecBufferDesc_getsetters[] = {
	{ discard_const_p(char, "version"), py_drsuapi_SecBufferDesc_get_version, py_drsuapi_SecBufferDesc_set_version },
	{ discard_const_p(char, "buff_count"), py_drsuapi_SecBufferDesc_get_buff_count, py_drsuapi_SecBufferDesc_set_buff_count },
	{ discard_const_p(char, "buffers"), py_drsuapi_SecBufferDesc_get_buffers, py_drsuapi_SecBufferDesc_set_buffers },
	{ NULL }
};

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


static PyTypeObject drsuapi_SecBufferDesc_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.SecBufferDesc",
	.tp_getset = py_drsuapi_SecBufferDesc_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_SecBufferDesc_new,
};


static PyObject *py_drsuapi_DsAddEntryRequest3_get_first_object(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryRequest3 *object = (struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(obj);
	PyObject *py_first_object;
	py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, pytalloc_get_mem_ctx(obj), &object->first_object);
	return py_first_object;
}

static int py_drsuapi_DsAddEntryRequest3_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryRequest3 *object = (struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->first_object = *(struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryRequest3_get_client_creds(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryRequest3 *object = (struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(obj);
	PyObject *py_client_creds;
	if (object->client_creds == NULL) {
		py_client_creds = Py_None;
		Py_INCREF(py_client_creds);
	} else {
		py_client_creds = pytalloc_reference_ex(&drsuapi_SecBufferDesc_Type, object->client_creds, object->client_creds);
	}
	return py_client_creds;
}

static int py_drsuapi_DsAddEntryRequest3_set_client_creds(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryRequest3 *object = (struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->client_creds);
	if (value == Py_None) {
		object->client_creds = NULL;
	} else {
		object->client_creds = NULL;
		PY_CHECK_TYPE(&drsuapi_SecBufferDesc_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->client_creds = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntryRequest3_getsetters[] = {
	{ discard_const_p(char, "first_object"), py_drsuapi_DsAddEntryRequest3_get_first_object, py_drsuapi_DsAddEntryRequest3_set_first_object },
	{ discard_const_p(char, "client_creds"), py_drsuapi_DsAddEntryRequest3_get_client_creds, py_drsuapi_DsAddEntryRequest3_set_client_creds },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntryRequest3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntryRequest3",
	.tp_getset = py_drsuapi_DsAddEntryRequest3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntryRequest3_new,
};

PyObject *py_import_drsuapi_DsAddEntryRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 2:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryRequest2_Type, mem_ctx, &in->req2);
			return ret;

		case 3:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryRequest3_Type, mem_ctx, &in->req3);
			return ret;

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

union drsuapi_DsAddEntryRequest *py_export_drsuapi_DsAddEntryRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsAddEntryRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryRequest);
	switch (level) {
		case 2:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryRequest2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req2 = *(struct drsuapi_DsAddEntryRequest2 *)pytalloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryRequest3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req3 = *(struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_dsid(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(obj);
	PyObject *py_dsid;
	py_dsid = PyInt_FromLong(object->dsid);
	return py_dsid;
}

static int py_drsuapi_DsAddEntryErrorInfoX_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->dsid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_extended_err(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(obj);
	PyObject *py_extended_err;
	py_extended_err = PyErr_FromWERROR(object->extended_err);
	return py_extended_err;
}

static int py_drsuapi_DsAddEntryErrorInfoX_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(py_obj);
	object->extended_err = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_extended_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(obj);
	PyObject *py_extended_data;
	py_extended_data = PyInt_FromLong(object->extended_data);
	return py_extended_data;
}

static int py_drsuapi_DsAddEntryErrorInfoX_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->extended_data = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_problem(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(obj);
	PyObject *py_problem;
	py_problem = PyInt_FromLong(object->problem);
	return py_problem;
}

static int py_drsuapi_DsAddEntryErrorInfoX_set_problem(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->problem = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntryErrorInfoX_getsetters[] = {
	{ discard_const_p(char, "dsid"), py_drsuapi_DsAddEntryErrorInfoX_get_dsid, py_drsuapi_DsAddEntryErrorInfoX_set_dsid },
	{ discard_const_p(char, "extended_err"), py_drsuapi_DsAddEntryErrorInfoX_get_extended_err, py_drsuapi_DsAddEntryErrorInfoX_set_extended_err },
	{ discard_const_p(char, "extended_data"), py_drsuapi_DsAddEntryErrorInfoX_get_extended_data, py_drsuapi_DsAddEntryErrorInfoX_set_extended_data },
	{ discard_const_p(char, "problem"), py_drsuapi_DsAddEntryErrorInfoX_get_problem, py_drsuapi_DsAddEntryErrorInfoX_set_problem },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntryErrorInfoX_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntryErrorInfoX",
	.tp_getset = py_drsuapi_DsAddEntryErrorInfoX_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntryErrorInfoX_new,
};


static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_dsid(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_dsid;
	py_dsid = PyInt_FromLong(object->dsid);
	return py_dsid;
}

static int py_drsuapi_DsAddEntry_AttrErr_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->dsid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_err(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_err;
	py_extended_err = PyErr_FromWERROR(object->extended_err);
	return py_extended_err;
}

static int py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
	object->extended_err = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_data;
	py_extended_data = PyInt_FromLong(object->extended_data);
	return py_extended_data;
}

static int py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->extended_data = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_problem(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_problem;
	py_problem = PyInt_FromLong(object->problem);
	return py_problem;
}

static int py_drsuapi_DsAddEntry_AttrErr_V1_set_problem(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->problem = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_attid(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_attid;
	py_attid = PyInt_FromLong(object->attid);
	return py_attid;
}

static int py_drsuapi_DsAddEntry_AttrErr_V1_set_attid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->attid = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->attid = 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_drsuapi_DsAddEntry_AttrErr_V1_get_is_val_returned(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_is_val_returned;
	py_is_val_returned = PyInt_FromLong(object->is_val_returned);
	return py_is_val_returned;
}

static int py_drsuapi_DsAddEntry_AttrErr_V1_set_is_val_returned(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_val_returned = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_attr_val(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_attr_val;
	py_attr_val = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, pytalloc_get_mem_ctx(obj), &object->attr_val);
	return py_attr_val;
}

static int py_drsuapi_DsAddEntry_AttrErr_V1_set_attr_val(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->attr_val = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntry_AttrErr_V1_getsetters[] = {
	{ discard_const_p(char, "dsid"), py_drsuapi_DsAddEntry_AttrErr_V1_get_dsid, py_drsuapi_DsAddEntry_AttrErr_V1_set_dsid },
	{ discard_const_p(char, "extended_err"), py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_err, py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_err },
	{ discard_const_p(char, "extended_data"), py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_data, py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_data },
	{ discard_const_p(char, "problem"), py_drsuapi_DsAddEntry_AttrErr_V1_get_problem, py_drsuapi_DsAddEntry_AttrErr_V1_set_problem },
	{ discard_const_p(char, "attid"), py_drsuapi_DsAddEntry_AttrErr_V1_get_attid, py_drsuapi_DsAddEntry_AttrErr_V1_set_attid },
	{ discard_const_p(char, "is_val_returned"), py_drsuapi_DsAddEntry_AttrErr_V1_get_is_val_returned, py_drsuapi_DsAddEntry_AttrErr_V1_set_is_val_returned },
	{ discard_const_p(char, "attr_val"), py_drsuapi_DsAddEntry_AttrErr_V1_get_attr_val, py_drsuapi_DsAddEntry_AttrErr_V1_set_attr_val },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntry_AttrErr_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntry_AttrErr_V1",
	.tp_getset = py_drsuapi_DsAddEntry_AttrErr_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntry_AttrErr_V1_new,
};


static PyObject *py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_next(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_next;
	if (object->next == NULL) {
		py_next = Py_None;
		Py_INCREF(py_next);
	} else {
		py_next = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, object->next, object->next);
	}
	return py_next;
}

static int py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->next);
	if (value == Py_None) {
		object->next = NULL;
	} else {
		object->next = NULL;
		PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->next = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_err_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_err_data;
	py_err_data = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErr_V1_Type, pytalloc_get_mem_ctx(obj), &object->err_data);
	return py_err_data;
}

static int py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_err_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErr_V1_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->err_data = *(struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntry_AttrErrListItem_V1_getsetters[] = {
	{ discard_const_p(char, "next"), py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_next, py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_next },
	{ discard_const_p(char, "err_data"), py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_err_data, py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_err_data },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntry_AttrErrListItem_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntry_AttrErrListItem_V1",
	.tp_getset = py_drsuapi_DsAddEntry_AttrErrListItem_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntry_AttrErrListItem_V1_new,
};


static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_id;
	if (object->id == NULL) {
		py_id = Py_None;
		Py_INCREF(py_id);
	} else {
		py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
	}
	return py_id;
}

static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->id);
	if (value == Py_None) {
		object->id = NULL;
	} else {
		object->id = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_first(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_first;
	py_first = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, pytalloc_get_mem_ctx(obj), &object->first);
	return py_first;
}

static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_first(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->first = *(struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Attr_V1_getsetters[] = {
	{ discard_const_p(char, "id"), py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_id, py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_id },
	{ discard_const_p(char, "count"), py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_count, py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_count },
	{ discard_const_p(char, "first"), py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_first, py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_first },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntryErrorInfo_Attr_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntryErrorInfo_Attr_V1",
	.tp_getset = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_new,
};


static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_dsid(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_dsid;
	py_dsid = PyInt_FromLong(object->dsid);
	return py_dsid;
}

static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->dsid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_err(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_err;
	py_extended_err = PyErr_FromWERROR(object->extended_err);
	return py_extended_err;
}

static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
	object->extended_err = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_data;
	py_extended_data = PyInt_FromLong(object->extended_data);
	return py_extended_data;
}

static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->extended_data = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_problem(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_problem;
	py_problem = PyInt_FromLong(object->problem);
	return py_problem;
}

static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_problem(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->problem = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_id_matched(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_id_matched;
	if (object->id_matched == NULL) {
		py_id_matched = Py_None;
		Py_INCREF(py_id_matched);
	} else {
		py_id_matched = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id_matched, object->id_matched);
	}
	return py_id_matched;
}

static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_id_matched(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->id_matched);
	if (value == Py_None) {
		object->id_matched = NULL;
	} else {
		object->id_matched = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->id_matched = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Name_V1_getsetters[] = {
	{ discard_const_p(char, "dsid"), py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_dsid, py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_dsid },
	{ discard_const_p(char, "extended_err"), py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_err, py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_err },
	{ discard_const_p(char, "extended_data"), py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_data, py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_data },
	{ discard_const_p(char, "problem"), py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_problem, py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_problem },
	{ discard_const_p(char, "id_matched"), py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_id_matched, py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_id_matched },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntryErrorInfo_Name_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntryErrorInfo_Name_V1",
	.tp_getset = py_drsuapi_DsAddEntryErrorInfo_Name_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntryErrorInfo_Name_V1_new,
};


static PyObject *py_drsuapi_NameResOp_V1_get_name_res(PyObject *obj, void *closure)
{
	struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_name_res;
	py_name_res = PyInt_FromLong(object->name_res);
	return py_name_res;
}

static int py_drsuapi_NameResOp_V1_set_name_res(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->name_res = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_NameResOp_V1_get_unused_pad(PyObject *obj, void *closure)
{
	struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_unused_pad;
	py_unused_pad = PyInt_FromLong(object->unused_pad);
	return py_unused_pad;
}

static int py_drsuapi_NameResOp_V1_set_unused_pad(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unused_pad = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_NameResOp_V1_get_next_rdn(PyObject *obj, void *closure)
{
	struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_next_rdn;
	py_next_rdn = PyInt_FromLong(object->next_rdn);
	return py_next_rdn;
}

static int py_drsuapi_NameResOp_V1_set_next_rdn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->next_rdn = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_NameResOp_V1_getsetters[] = {
	{ discard_const_p(char, "name_res"), py_drsuapi_NameResOp_V1_get_name_res, py_drsuapi_NameResOp_V1_set_name_res },
	{ discard_const_p(char, "unused_pad"), py_drsuapi_NameResOp_V1_get_unused_pad, py_drsuapi_NameResOp_V1_set_unused_pad },
	{ discard_const_p(char, "next_rdn"), py_drsuapi_NameResOp_V1_get_next_rdn, py_drsuapi_NameResOp_V1_set_next_rdn },
	{ NULL }
};

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


static PyTypeObject drsuapi_NameResOp_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.NameResOp_V1",
	.tp_getset = py_drsuapi_NameResOp_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_NameResOp_V1_new,
};


static PyObject *py_drsuapi_DsaAddressListItem_V1_get_next(PyObject *obj, void *closure)
{
	struct drsuapi_DsaAddressListItem_V1 *object = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_next;
	if (object->next == NULL) {
		py_next = Py_None;
		Py_INCREF(py_next);
	} else {
		py_next = pytalloc_reference_ex(&drsuapi_DsaAddressListItem_V1_Type, object->next, object->next);
	}
	return py_next;
}

static int py_drsuapi_DsaAddressListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsaAddressListItem_V1 *object = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->next);
	if (value == Py_None) {
		object->next = NULL;
	} else {
		object->next = NULL;
		PY_CHECK_TYPE(&drsuapi_DsaAddressListItem_V1_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->next = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsaAddressListItem_V1_get_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsaAddressListItem_V1 *object = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_address;
	if (object->address == NULL) {
		py_address = Py_None;
		Py_INCREF(py_address);
	} else {
		py_address = pytalloc_reference_ex(lsa_String_Type, object->address, object->address);
	}
	return py_address;
}

static int py_drsuapi_DsaAddressListItem_V1_set_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsaAddressListItem_V1 *object = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->address);
	if (value == Py_None) {
		object->address = NULL;
	} else {
		object->address = NULL;
		PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->address = (struct lsa_String *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsaAddressListItem_V1_getsetters[] = {
	{ discard_const_p(char, "next"), py_drsuapi_DsaAddressListItem_V1_get_next, py_drsuapi_DsaAddressListItem_V1_set_next },
	{ discard_const_p(char, "address"), py_drsuapi_DsaAddressListItem_V1_get_address, py_drsuapi_DsaAddressListItem_V1_set_address },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsaAddressListItem_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsaAddressListItem_V1",
	.tp_getset = py_drsuapi_DsaAddressListItem_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsaAddressListItem_V1_new,
};


static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_id_target(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_id_target;
	if (object->id_target == NULL) {
		py_id_target = Py_None;
		Py_INCREF(py_id_target);
	} else {
		py_id_target = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id_target, object->id_target);
	}
	return py_id_target;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_id_target(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->id_target);
	if (value == Py_None) {
		object->id_target = NULL;
	} else {
		object->id_target = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->id_target = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_op_state(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_op_state;
	py_op_state = pytalloc_reference_ex(&drsuapi_NameResOp_V1_Type, pytalloc_get_mem_ctx(obj), &object->op_state);
	return py_op_state;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_op_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_NameResOp_V1_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->op_state = *(struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_alias(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_rdn_alias;
	py_rdn_alias = PyInt_FromLong(object->rdn_alias);
	return py_rdn_alias;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_alias(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rdn_alias = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_internal(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_rdn_internal;
	py_rdn_internal = PyInt_FromLong(object->rdn_internal);
	return py_rdn_internal;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_internal(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->rdn_internal = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_ref_type(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_ref_type;
	py_ref_type = PyInt_FromLong(object->ref_type);
	return py_ref_type;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_ref_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->ref_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->ref_type = 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_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_addr_list_count;
	py_addr_list_count = PyInt_FromLong(object->addr_list_count);
	return py_addr_list_count;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->addr_list_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_addr_list;
	if (object->addr_list == NULL) {
		py_addr_list = Py_None;
		Py_INCREF(py_addr_list);
	} else {
		py_addr_list = pytalloc_reference_ex(&drsuapi_DsaAddressListItem_V1_Type, object->addr_list, object->addr_list);
	}
	return py_addr_list;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->addr_list);
	if (value == Py_None) {
		object->addr_list = NULL;
	} else {
		object->addr_list = NULL;
		PY_CHECK_TYPE(&drsuapi_DsaAddressListItem_V1_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->addr_list = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_next(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_next;
	if (object->next == NULL) {
		py_next = Py_None;
		Py_INCREF(py_next);
	} else {
		py_next = pytalloc_reference_ex(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, object->next, object->next);
	}
	return py_next;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->next);
	if (value == Py_None) {
		object->next = NULL;
	} else {
		object->next = NULL;
		PY_CHECK_TYPE(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->next = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_is_choice_set(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_is_choice_set;
	py_is_choice_set = PyInt_FromLong(object->is_choice_set);
	return py_is_choice_set;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_is_choice_set(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->is_choice_set = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_choice(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_choice;
	py_choice = PyInt_FromLong(object->choice);
	return py_choice;
}

static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_choice(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->choice = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->choice = 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_drsuapi_DsAddEntry_RefErrListItem_V1_getsetters[] = {
	{ discard_const_p(char, "id_target"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_id_target, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_id_target },
	{ discard_const_p(char, "op_state"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_op_state, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_op_state },
	{ discard_const_p(char, "rdn_alias"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_alias, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_alias },
	{ discard_const_p(char, "rdn_internal"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_internal, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_internal },
	{ discard_const_p(char, "ref_type"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_ref_type, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_ref_type },
	{ discard_const_p(char, "addr_list_count"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list_count, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list_count },
	{ discard_const_p(char, "addr_list"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list },
	{ discard_const_p(char, "next"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_next, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_next },
	{ discard_const_p(char, "is_choice_set"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_is_choice_set, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_is_choice_set },
	{ discard_const_p(char, "choice"), py_drsuapi_DsAddEntry_RefErrListItem_V1_get_choice, py_drsuapi_DsAddEntry_RefErrListItem_V1_set_choice },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntry_RefErrListItem_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntry_RefErrListItem_V1",
	.tp_getset = py_drsuapi_DsAddEntry_RefErrListItem_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntry_RefErrListItem_V1_new,
};


static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_dsid(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_dsid;
	py_dsid = PyInt_FromLong(object->dsid);
	return py_dsid;
}

static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->dsid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_err(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_err;
	py_extended_err = PyErr_FromWERROR(object->extended_err);
	return py_extended_err;
}

static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(py_obj);
	object->extended_err = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_data;
	py_extended_data = PyInt_FromLong(object->extended_data);
	return py_extended_data;
}

static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->extended_data = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_refer(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_refer;
	py_refer = pytalloc_reference_ex(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, pytalloc_get_mem_ctx(obj), &object->refer);
	return py_refer;
}

static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_refer(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->refer = *(struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Referr_V1_getsetters[] = {
	{ discard_const_p(char, "dsid"), py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_dsid, py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_dsid },
	{ discard_const_p(char, "extended_err"), py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_err, py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_err },
	{ discard_const_p(char, "extended_data"), py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_data, py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_data },
	{ discard_const_p(char, "refer"), py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_refer, py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_refer },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntryErrorInfo_Referr_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntryErrorInfo_Referr_V1",
	.tp_getset = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_new,
};

PyObject *py_import_drsuapi_DsAddEntryErrorInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryErrorInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type, mem_ctx, &in->attr_err);
			return ret;

		case 2:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type, mem_ctx, &in->name_err);
			return ret;

		case 3:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type, mem_ctx, &in->referral_err);
			return ret;

		case 4:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->security_err);
			return ret;

		case 5:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->service_err);
			return ret;

		case 6:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->update_err);
			return ret;

		case 7:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->system_err);
			return ret;

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

union drsuapi_DsAddEntryErrorInfo *py_export_drsuapi_DsAddEntryErrorInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsAddEntryErrorInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryErrorInfo);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->attr_err = *(struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->name_err = *(struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->referral_err = *(struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->security_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
			break;

		case 5:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->service_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
			break;

		case 6:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->update_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
			break;

		case 7:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->system_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_get_status(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyErr_FromWERROR(object->status);
	return py_status;
}

static int py_drsuapi_DsAddEntry_ErrData_V1_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(py_obj);
	object->status = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_get_dir_err(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_dir_err;
	py_dir_err = PyInt_FromLong(object->dir_err);
	return py_dir_err;
}

static int py_drsuapi_DsAddEntry_ErrData_V1_set_dir_err(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dir_err = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dir_err = 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_drsuapi_DsAddEntry_ErrData_V1_get_info(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_drsuapi_DsAddEntryErrorInfo(object->info, object->dir_err, object->info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	return py_info;
}

static int py_drsuapi_DsAddEntry_ErrData_V1_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->info);
	if (value == Py_None) {
		object->info = NULL;
	} else {
		object->info = NULL;
		{
			union drsuapi_DsAddEntryErrorInfo *info_switch_1;
			info_switch_1 = py_export_drsuapi_DsAddEntryErrorInfo(pytalloc_get_mem_ctx(py_obj), object->dir_err, value);
			if (info_switch_1 == NULL) {
				return -1;
			}
			object->info = info_switch_1;
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntry_ErrData_V1_getsetters[] = {
	{ discard_const_p(char, "status"), py_drsuapi_DsAddEntry_ErrData_V1_get_status, py_drsuapi_DsAddEntry_ErrData_V1_set_status },
	{ discard_const_p(char, "dir_err"), py_drsuapi_DsAddEntry_ErrData_V1_get_dir_err, py_drsuapi_DsAddEntry_ErrData_V1_set_dir_err },
	{ discard_const_p(char, "info"), py_drsuapi_DsAddEntry_ErrData_V1_get_info, py_drsuapi_DsAddEntry_ErrData_V1_set_info },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntry_ErrData_V1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntry_ErrData_V1",
	.tp_getset = py_drsuapi_DsAddEntry_ErrData_V1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntry_ErrData_V1_new,
};

PyObject *py_import_drsuapi_DsAddEntry_ErrData(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntry_ErrData *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntry_ErrData_V1_Type, mem_ctx, &in->v1);
			return ret;

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

union drsuapi_DsAddEntry_ErrData *py_export_drsuapi_DsAddEntry_ErrData(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsAddEntry_ErrData *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntry_ErrData);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsAddEntry_ErrData_V1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->v1 = *(struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


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

static int py_drsuapi_DsReplicaObjectIdentifier2_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier2 *object = (struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjectIdentifier2_get_sid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier2 *object = (struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(obj);
	PyObject *py_sid;
	py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
	return py_sid;
}

static int py_drsuapi_DsReplicaObjectIdentifier2_set_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjectIdentifier2 *object = (struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier2_getsetters[] = {
	{ discard_const_p(char, "guid"), py_drsuapi_DsReplicaObjectIdentifier2_get_guid, py_drsuapi_DsReplicaObjectIdentifier2_set_guid },
	{ discard_const_p(char, "sid"), py_drsuapi_DsReplicaObjectIdentifier2_get_sid, py_drsuapi_DsReplicaObjectIdentifier2_set_sid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaObjectIdentifier2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjectIdentifier2",
	.tp_getset = py_drsuapi_DsReplicaObjectIdentifier2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjectIdentifier2_new,
};


static PyObject *py_drsuapi_DsAddEntryCtr2_get_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_id;
	if (object->id == NULL) {
		py_id = Py_None;
		Py_INCREF(py_id);
	} else {
		py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
	}
	return py_id;
}

static int py_drsuapi_DsAddEntryCtr2_set_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->id);
	if (value == Py_None) {
		object->id = NULL;
	} else {
		object->id = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr2_get_dir_err(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_dir_err;
	py_dir_err = PyInt_FromLong(object->dir_err);
	return py_dir_err;
}

static int py_drsuapi_DsAddEntryCtr2_set_dir_err(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dir_err = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dir_err = 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_drsuapi_DsAddEntryCtr2_get_dsid(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_dsid;
	py_dsid = PyInt_FromLong(object->dsid);
	return py_dsid;
}

static int py_drsuapi_DsAddEntryCtr2_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->dsid = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr2_get_extended_err(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_err;
	py_extended_err = PyErr_FromWERROR(object->extended_err);
	return py_extended_err;
}

static int py_drsuapi_DsAddEntryCtr2_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
	object->extended_err = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr2_get_extended_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_extended_data;
	py_extended_data = PyInt_FromLong(object->extended_data);
	return py_extended_data;
}

static int py_drsuapi_DsAddEntryCtr2_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->extended_data = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr2_get_problem(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_problem;
	py_problem = PyInt_FromLong(object->problem);
	return py_problem;
}

static int py_drsuapi_DsAddEntryCtr2_set_problem(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->problem = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr2_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsAddEntryCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr2_get_objects(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
	PyObject *py_objects;
	if (object->objects == NULL) {
		py_objects = Py_None;
		Py_INCREF(py_objects);
	} else {
		py_objects = PyList_New(object->count);
		if (py_objects == NULL) {
			return NULL;
		}
		{
			int objects_cntr_1;
			for (objects_cntr_1 = 0; objects_cntr_1 < object->count; objects_cntr_1++) {
				PyObject *py_objects_1;
				py_objects_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier2_Type, object->objects, &object->objects[objects_cntr_1]);
				PyList_SetItem(py_objects, objects_cntr_1, py_objects_1);
			}
		}
	}
	return py_objects;
}

static int py_drsuapi_DsAddEntryCtr2_set_objects(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->objects);
	if (value == Py_None) {
		object->objects = NULL;
	} else {
		object->objects = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int objects_cntr_1;
			object->objects = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->objects, PyList_GET_SIZE(value));
			if (!object->objects) { return -1;; }
			talloc_set_name_const(object->objects, "ARRAY: object->objects");
			for (objects_cntr_1 = 0; objects_cntr_1 < PyList_GET_SIZE(value); objects_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier2_Type, PyList_GET_ITEM(value, objects_cntr_1), return -1;);
				if (talloc_reference(object->objects, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, objects_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->objects[objects_cntr_1] = *(struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, objects_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntryCtr2_getsetters[] = {
	{ discard_const_p(char, "id"), py_drsuapi_DsAddEntryCtr2_get_id, py_drsuapi_DsAddEntryCtr2_set_id },
	{ discard_const_p(char, "dir_err"), py_drsuapi_DsAddEntryCtr2_get_dir_err, py_drsuapi_DsAddEntryCtr2_set_dir_err },
	{ discard_const_p(char, "dsid"), py_drsuapi_DsAddEntryCtr2_get_dsid, py_drsuapi_DsAddEntryCtr2_set_dsid },
	{ discard_const_p(char, "extended_err"), py_drsuapi_DsAddEntryCtr2_get_extended_err, py_drsuapi_DsAddEntryCtr2_set_extended_err },
	{ discard_const_p(char, "extended_data"), py_drsuapi_DsAddEntryCtr2_get_extended_data, py_drsuapi_DsAddEntryCtr2_set_extended_data },
	{ discard_const_p(char, "problem"), py_drsuapi_DsAddEntryCtr2_get_problem, py_drsuapi_DsAddEntryCtr2_set_problem },
	{ discard_const_p(char, "count"), py_drsuapi_DsAddEntryCtr2_get_count, py_drsuapi_DsAddEntryCtr2_set_count },
	{ discard_const_p(char, "objects"), py_drsuapi_DsAddEntryCtr2_get_objects, py_drsuapi_DsAddEntryCtr2_set_objects },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntryCtr2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntryCtr2",
	.tp_getset = py_drsuapi_DsAddEntryCtr2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntryCtr2_new,
};


static PyObject *py_drsuapi_DsAddEntryCtr3_get_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
	PyObject *py_id;
	if (object->id == NULL) {
		py_id = Py_None;
		Py_INCREF(py_id);
	} else {
		py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
	}
	return py_id;
}

static int py_drsuapi_DsAddEntryCtr3_set_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->id);
	if (value == Py_None) {
		object->id = NULL;
	} else {
		object->id = NULL;
		PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr3_get_err_ver(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
	PyObject *py_err_ver;
	py_err_ver = PyInt_FromLong(object->err_ver);
	return py_err_ver;
}

static int py_drsuapi_DsAddEntryCtr3_set_err_ver(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->err_ver = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr3_get_err_data(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
	PyObject *py_err_data;
	if (object->err_data == NULL) {
		py_err_data = Py_None;
		Py_INCREF(py_err_data);
	} else {
		py_err_data = py_import_drsuapi_DsAddEntry_ErrData(object->err_data, object->err_ver, object->err_data);
		if (py_err_data == NULL) {
			return NULL;
		}
	}
	return py_err_data;
}

static int py_drsuapi_DsAddEntryCtr3_set_err_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->err_data);
	if (value == Py_None) {
		object->err_data = NULL;
	} else {
		object->err_data = NULL;
		{
			union drsuapi_DsAddEntry_ErrData *err_data_switch_1;
			err_data_switch_1 = py_export_drsuapi_DsAddEntry_ErrData(pytalloc_get_mem_ctx(py_obj), object->err_ver, value);
			if (err_data_switch_1 == NULL) {
				return -1;
			}
			object->err_data = err_data_switch_1;
		}
	}
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr3_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsAddEntryCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsAddEntryCtr3_get_objects(PyObject *obj, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
	PyObject *py_objects;
	if (object->objects == NULL) {
		py_objects = Py_None;
		Py_INCREF(py_objects);
	} else {
		py_objects = PyList_New(object->count);
		if (py_objects == NULL) {
			return NULL;
		}
		{
			int objects_cntr_1;
			for (objects_cntr_1 = 0; objects_cntr_1 < object->count; objects_cntr_1++) {
				PyObject *py_objects_1;
				py_objects_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier2_Type, object->objects, &object->objects[objects_cntr_1]);
				PyList_SetItem(py_objects, objects_cntr_1, py_objects_1);
			}
		}
	}
	return py_objects;
}

static int py_drsuapi_DsAddEntryCtr3_set_objects(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->objects);
	if (value == Py_None) {
		object->objects = NULL;
	} else {
		object->objects = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int objects_cntr_1;
			object->objects = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->objects, PyList_GET_SIZE(value));
			if (!object->objects) { return -1;; }
			talloc_set_name_const(object->objects, "ARRAY: object->objects");
			for (objects_cntr_1 = 0; objects_cntr_1 < PyList_GET_SIZE(value); objects_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier2_Type, PyList_GET_ITEM(value, objects_cntr_1), return -1;);
				if (talloc_reference(object->objects, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, objects_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->objects[objects_cntr_1] = *(struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, objects_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsAddEntryCtr3_getsetters[] = {
	{ discard_const_p(char, "id"), py_drsuapi_DsAddEntryCtr3_get_id, py_drsuapi_DsAddEntryCtr3_set_id },
	{ discard_const_p(char, "err_ver"), py_drsuapi_DsAddEntryCtr3_get_err_ver, py_drsuapi_DsAddEntryCtr3_set_err_ver },
	{ discard_const_p(char, "err_data"), py_drsuapi_DsAddEntryCtr3_get_err_data, py_drsuapi_DsAddEntryCtr3_set_err_data },
	{ discard_const_p(char, "count"), py_drsuapi_DsAddEntryCtr3_get_count, py_drsuapi_DsAddEntryCtr3_set_count },
	{ discard_const_p(char, "objects"), py_drsuapi_DsAddEntryCtr3_get_objects, py_drsuapi_DsAddEntryCtr3_set_objects },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsAddEntryCtr3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsAddEntryCtr3",
	.tp_getset = py_drsuapi_DsAddEntryCtr3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsAddEntryCtr3_new,
};

PyObject *py_import_drsuapi_DsAddEntryCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryCtr *in)
{
	PyObject *ret;

	switch (level) {
		case 2:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryCtr2_Type, mem_ctx, &in->ctr2);
			return ret;

		case 3:
			ret = pytalloc_reference_ex(&drsuapi_DsAddEntryCtr3_Type, mem_ctx, &in->ctr3);
			return ret;

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

union drsuapi_DsAddEntryCtr *py_export_drsuapi_DsAddEntryCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsAddEntryCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryCtr);
	switch (level) {
		case 2:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryCtr2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr2 = *(struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&drsuapi_DsAddEntryCtr3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr3 = *(struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsExecuteKCC1_get_taskID(PyObject *obj, void *closure)
{
	struct drsuapi_DsExecuteKCC1 *object = (struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(obj);
	PyObject *py_taskID;
	py_taskID = PyInt_FromLong(object->taskID);
	return py_taskID;
}

static int py_drsuapi_DsExecuteKCC1_set_taskID(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsExecuteKCC1 *object = (struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->taskID = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsExecuteKCC1_get_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsExecuteKCC1 *object = (struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_drsuapi_DsExecuteKCC1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsExecuteKCC1 *object = (struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->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_drsuapi_DsExecuteKCC1_getsetters[] = {
	{ discard_const_p(char, "taskID"), py_drsuapi_DsExecuteKCC1_get_taskID, py_drsuapi_DsExecuteKCC1_set_taskID },
	{ discard_const_p(char, "flags"), py_drsuapi_DsExecuteKCC1_get_flags, py_drsuapi_DsExecuteKCC1_set_flags },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsExecuteKCC1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsExecuteKCC1",
	.tp_getset = py_drsuapi_DsExecuteKCC1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsExecuteKCC1_new,
};

PyObject *py_import_drsuapi_DsExecuteKCCRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsExecuteKCCRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsExecuteKCC1_Type, mem_ctx, &in->ctr1);
			return ret;

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

union drsuapi_DsExecuteKCCRequest *py_export_drsuapi_DsExecuteKCCRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsExecuteKCCRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsExecuteKCCRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsExecuteKCC1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_get_info_type(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_info_type;
	py_info_type = PyInt_FromLong(object->info_type);
	return py_info_type;
}

static int py_drsuapi_DsReplicaGetInfoRequest1_set_info_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->info_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->info_type = 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_drsuapi_DsReplicaGetInfoRequest1_get_object_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_object_dn;
	if (object->object_dn == NULL) {
		py_object_dn = Py_None;
		Py_INCREF(py_object_dn);
	} else {
		if (object->object_dn == NULL) {
			py_object_dn = Py_None;
			Py_INCREF(py_object_dn);
		} else {
			py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
		}
	}
	return py_object_dn;
}

static int py_drsuapi_DsReplicaGetInfoRequest1_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->object_dn = NULL;
	} else {
		object->object_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->object_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->object_dn = 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 PyObject *py_drsuapi_DsReplicaGetInfoRequest1_get_source_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_guid;
	py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
	return py_source_dsa_guid;
}

static int py_drsuapi_DsReplicaGetInfoRequest1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaGetInfoRequest1_getsetters[] = {
	{ discard_const_p(char, "info_type"), py_drsuapi_DsReplicaGetInfoRequest1_get_info_type, py_drsuapi_DsReplicaGetInfoRequest1_set_info_type },
	{ discard_const_p(char, "object_dn"), py_drsuapi_DsReplicaGetInfoRequest1_get_object_dn, py_drsuapi_DsReplicaGetInfoRequest1_set_object_dn },
	{ discard_const_p(char, "source_dsa_guid"), py_drsuapi_DsReplicaGetInfoRequest1_get_source_dsa_guid, py_drsuapi_DsReplicaGetInfoRequest1_set_source_dsa_guid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaGetInfoRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaGetInfoRequest1",
	.tp_getset = py_drsuapi_DsReplicaGetInfoRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaGetInfoRequest1_new,
};


static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_info_type(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_info_type;
	py_info_type = PyInt_FromLong(object->info_type);
	return py_info_type;
}

static int py_drsuapi_DsReplicaGetInfoRequest2_set_info_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->info_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->info_type = 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_drsuapi_DsReplicaGetInfoRequest2_get_object_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_object_dn;
	if (object->object_dn == NULL) {
		py_object_dn = Py_None;
		Py_INCREF(py_object_dn);
	} else {
		if (object->object_dn == NULL) {
			py_object_dn = Py_None;
			Py_INCREF(py_object_dn);
		} else {
			py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
		}
	}
	return py_object_dn;
}

static int py_drsuapi_DsReplicaGetInfoRequest2_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->object_dn = NULL;
	} else {
		object->object_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->object_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->object_dn = 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 PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_source_dsa_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_guid;
	py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
	return py_source_dsa_guid;
}

static int py_drsuapi_DsReplicaGetInfoRequest2_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_drsuapi_DsReplicaGetInfoRequest2_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->flags = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_attribute_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_attribute_name;
	if (object->attribute_name == NULL) {
		py_attribute_name = Py_None;
		Py_INCREF(py_attribute_name);
	} else {
		if (object->attribute_name == NULL) {
			py_attribute_name = Py_None;
			Py_INCREF(py_attribute_name);
		} else {
			py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
		}
	}
	return py_attribute_name;
}

static int py_drsuapi_DsReplicaGetInfoRequest2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->attribute_name = NULL;
	} else {
		object->attribute_name = NULL;
		if (PyUnicode_Check(value)) {
			object->attribute_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->attribute_name = 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 PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_value_dn_str(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_value_dn_str;
	if (object->value_dn_str == NULL) {
		py_value_dn_str = Py_None;
		Py_INCREF(py_value_dn_str);
	} else {
		if (object->value_dn_str == NULL) {
			py_value_dn_str = Py_None;
			Py_INCREF(py_value_dn_str);
		} else {
			py_value_dn_str = PyUnicode_Decode(object->value_dn_str, strlen(object->value_dn_str), "utf-8", "ignore");
		}
	}
	return py_value_dn_str;
}

static int py_drsuapi_DsReplicaGetInfoRequest2_set_value_dn_str(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->value_dn_str = NULL;
	} else {
		object->value_dn_str = NULL;
		if (PyUnicode_Check(value)) {
			object->value_dn_str = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->value_dn_str = 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 PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_enumeration_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
	PyObject *py_enumeration_context;
	py_enumeration_context = PyInt_FromLong(object->enumeration_context);
	return py_enumeration_context;
}

static int py_drsuapi_DsReplicaGetInfoRequest2_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->enumeration_context = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaGetInfoRequest2_getsetters[] = {
	{ discard_const_p(char, "info_type"), py_drsuapi_DsReplicaGetInfoRequest2_get_info_type, py_drsuapi_DsReplicaGetInfoRequest2_set_info_type },
	{ discard_const_p(char, "object_dn"), py_drsuapi_DsReplicaGetInfoRequest2_get_object_dn, py_drsuapi_DsReplicaGetInfoRequest2_set_object_dn },
	{ discard_const_p(char, "source_dsa_guid"), py_drsuapi_DsReplicaGetInfoRequest2_get_source_dsa_guid, py_drsuapi_DsReplicaGetInfoRequest2_set_source_dsa_guid },
	{ discard_const_p(char, "flags"), py_drsuapi_DsReplicaGetInfoRequest2_get_flags, py_drsuapi_DsReplicaGetInfoRequest2_set_flags },
	{ discard_const_p(char, "attribute_name"), py_drsuapi_DsReplicaGetInfoRequest2_get_attribute_name, py_drsuapi_DsReplicaGetInfoRequest2_set_attribute_name },
	{ discard_const_p(char, "value_dn_str"), py_drsuapi_DsReplicaGetInfoRequest2_get_value_dn_str, py_drsuapi_DsReplicaGetInfoRequest2_set_value_dn_str },
	{ discard_const_p(char, "enumeration_context"), py_drsuapi_DsReplicaGetInfoRequest2_get_enumeration_context, py_drsuapi_DsReplicaGetInfoRequest2_set_enumeration_context },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaGetInfoRequest2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaGetInfoRequest2",
	.tp_getset = py_drsuapi_DsReplicaGetInfoRequest2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaGetInfoRequest2_new,
};

PyObject *py_import_drsuapi_DsReplicaGetInfoRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaGetInfoRequest *in)
{
	PyObject *ret;

	switch (level) {
		case DRSUAPI_DS_REPLICA_GET_INFO:
			ret = pytalloc_reference_ex(&drsuapi_DsReplicaGetInfoRequest1_Type, mem_ctx, &in->req1);
			return ret;

		case DRSUAPI_DS_REPLICA_GET_INFO2:
			ret = pytalloc_reference_ex(&drsuapi_DsReplicaGetInfoRequest2_Type, mem_ctx, &in->req2);
			return ret;

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

union drsuapi_DsReplicaGetInfoRequest *py_export_drsuapi_DsReplicaGetInfoRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsReplicaGetInfoRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaGetInfoRequest);
	switch (level) {
		case DRSUAPI_DS_REPLICA_GET_INFO:
			PY_CHECK_TYPE(&drsuapi_DsReplicaGetInfoRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(in);
			break;

		case DRSUAPI_DS_REPLICA_GET_INFO2:
			PY_CHECK_TYPE(&drsuapi_DsReplicaGetInfoRequest2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req2 = *(struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsReplicaNeighbour_get_naming_context_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context_dn;
	if (object->naming_context_dn == NULL) {
		py_naming_context_dn = Py_None;
		Py_INCREF(py_naming_context_dn);
	} else {
		if (object->naming_context_dn == NULL) {
			py_naming_context_dn = Py_None;
			Py_INCREF(py_naming_context_dn);
		} else {
			py_naming_context_dn = PyUnicode_Decode(object->naming_context_dn, strlen(object->naming_context_dn), "utf-8", "ignore");
		}
	}
	return py_naming_context_dn;
}

static int py_drsuapi_DsReplicaNeighbour_set_naming_context_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->naming_context_dn = NULL;
	} else {
		object->naming_context_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->naming_context_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->naming_context_dn = 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 PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_obj_dn;
	if (object->source_dsa_obj_dn == NULL) {
		py_source_dsa_obj_dn = Py_None;
		Py_INCREF(py_source_dsa_obj_dn);
	} else {
		if (object->source_dsa_obj_dn == NULL) {
			py_source_dsa_obj_dn = Py_None;
			Py_INCREF(py_source_dsa_obj_dn);
		} else {
			py_source_dsa_obj_dn = PyUnicode_Decode(object->source_dsa_obj_dn, strlen(object->source_dsa_obj_dn), "utf-8", "ignore");
		}
	}
	return py_source_dsa_obj_dn;
}

static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->source_dsa_obj_dn = NULL;
	} else {
		object->source_dsa_obj_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->source_dsa_obj_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->source_dsa_obj_dn = 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 PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_address;
	if (object->source_dsa_address == NULL) {
		py_source_dsa_address = Py_None;
		Py_INCREF(py_source_dsa_address);
	} else {
		if (object->source_dsa_address == NULL) {
			py_source_dsa_address = Py_None;
			Py_INCREF(py_source_dsa_address);
		} else {
			py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
		}
	}
	return py_source_dsa_address;
}

static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->source_dsa_address = NULL;
	} else {
		object->source_dsa_address = NULL;
		if (PyUnicode_Check(value)) {
			object->source_dsa_address = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->source_dsa_address = 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 PyObject *py_drsuapi_DsReplicaNeighbour_get_transport_obj_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_transport_obj_dn;
	if (object->transport_obj_dn == NULL) {
		py_transport_obj_dn = Py_None;
		Py_INCREF(py_transport_obj_dn);
	} else {
		if (object->transport_obj_dn == NULL) {
			py_transport_obj_dn = Py_None;
			Py_INCREF(py_transport_obj_dn);
		} else {
			py_transport_obj_dn = PyUnicode_Decode(object->transport_obj_dn, strlen(object->transport_obj_dn), "utf-8", "ignore");
		}
	}
	return py_transport_obj_dn;
}

static int py_drsuapi_DsReplicaNeighbour_set_transport_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->transport_obj_dn = NULL;
	} else {
		object->transport_obj_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->transport_obj_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->transport_obj_dn = 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 PyObject *py_drsuapi_DsReplicaNeighbour_get_replica_flags(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_replica_flags;
	py_replica_flags = PyInt_FromLong(object->replica_flags);
	return py_replica_flags;
}

static int py_drsuapi_DsReplicaNeighbour_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->replica_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->replica_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_drsuapi_DsReplicaNeighbour_get_reserved(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_drsuapi_DsReplicaNeighbour_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaNeighbour_get_naming_context_obj_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_naming_context_obj_guid;
	py_naming_context_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->naming_context_obj_guid);
	return py_naming_context_obj_guid;
}

static int py_drsuapi_DsReplicaNeighbour_set_naming_context_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->naming_context_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_obj_guid;
	py_source_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_obj_guid);
	return py_source_dsa_obj_guid;
}

static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaNeighbour_get_transport_obj_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_transport_obj_guid;
	py_transport_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->transport_obj_guid);
	return py_transport_obj_guid;
}

static int py_drsuapi_DsReplicaNeighbour_set_transport_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->transport_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaNeighbour_get_tmp_highest_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_tmp_highest_usn;
	py_tmp_highest_usn = PyLong_FromLongLong(object->tmp_highest_usn);
	return py_tmp_highest_usn;
}

static int py_drsuapi_DsReplicaNeighbour_set_tmp_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->tmp_highest_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->tmp_highest_usn = 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_drsuapi_DsReplicaNeighbour_get_highest_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_highest_usn;
	py_highest_usn = PyLong_FromLongLong(object->highest_usn);
	return py_highest_usn;
}

static int py_drsuapi_DsReplicaNeighbour_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->highest_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->highest_usn = 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_drsuapi_DsReplicaNeighbour_get_last_success(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_last_success;
	py_last_success = PyLong_FromLongLong(object->last_success);
	return py_last_success;
}

static int py_drsuapi_DsReplicaNeighbour_set_last_success(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_success = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_success = 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_drsuapi_DsReplicaNeighbour_get_last_attempt(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_last_attempt;
	py_last_attempt = PyLong_FromLongLong(object->last_attempt);
	return py_last_attempt;
}

static int py_drsuapi_DsReplicaNeighbour_set_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_attempt = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_attempt = 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_drsuapi_DsReplicaNeighbour_get_result_last_attempt(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_result_last_attempt;
	py_result_last_attempt = PyErr_FromWERROR(object->result_last_attempt);
	return py_result_last_attempt;
}

static int py_drsuapi_DsReplicaNeighbour_set_result_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	object->result_last_attempt = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsReplicaNeighbour_get_consecutive_sync_failures(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
	PyObject *py_consecutive_sync_failures;
	py_consecutive_sync_failures = PyInt_FromLong(object->consecutive_sync_failures);
	return py_consecutive_sync_failures;
}

static int py_drsuapi_DsReplicaNeighbour_set_consecutive_sync_failures(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->consecutive_sync_failures = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaNeighbour_getsetters[] = {
	{ discard_const_p(char, "naming_context_dn"), py_drsuapi_DsReplicaNeighbour_get_naming_context_dn, py_drsuapi_DsReplicaNeighbour_set_naming_context_dn },
	{ discard_const_p(char, "source_dsa_obj_dn"), py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_dn, py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_dn },
	{ discard_const_p(char, "source_dsa_address"), py_drsuapi_DsReplicaNeighbour_get_source_dsa_address, py_drsuapi_DsReplicaNeighbour_set_source_dsa_address },
	{ discard_const_p(char, "transport_obj_dn"), py_drsuapi_DsReplicaNeighbour_get_transport_obj_dn, py_drsuapi_DsReplicaNeighbour_set_transport_obj_dn },
	{ discard_const_p(char, "replica_flags"), py_drsuapi_DsReplicaNeighbour_get_replica_flags, py_drsuapi_DsReplicaNeighbour_set_replica_flags },
	{ discard_const_p(char, "reserved"), py_drsuapi_DsReplicaNeighbour_get_reserved, py_drsuapi_DsReplicaNeighbour_set_reserved },
	{ discard_const_p(char, "naming_context_obj_guid"), py_drsuapi_DsReplicaNeighbour_get_naming_context_obj_guid, py_drsuapi_DsReplicaNeighbour_set_naming_context_obj_guid },
	{ discard_const_p(char, "source_dsa_obj_guid"), py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_guid, py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_guid },
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsReplicaNeighbour_get_source_dsa_invocation_id, py_drsuapi_DsReplicaNeighbour_set_source_dsa_invocation_id },
	{ discard_const_p(char, "transport_obj_guid"), py_drsuapi_DsReplicaNeighbour_get_transport_obj_guid, py_drsuapi_DsReplicaNeighbour_set_transport_obj_guid },
	{ discard_const_p(char, "tmp_highest_usn"), py_drsuapi_DsReplicaNeighbour_get_tmp_highest_usn, py_drsuapi_DsReplicaNeighbour_set_tmp_highest_usn },
	{ discard_const_p(char, "highest_usn"), py_drsuapi_DsReplicaNeighbour_get_highest_usn, py_drsuapi_DsReplicaNeighbour_set_highest_usn },
	{ discard_const_p(char, "last_success"), py_drsuapi_DsReplicaNeighbour_get_last_success, py_drsuapi_DsReplicaNeighbour_set_last_success },
	{ discard_const_p(char, "last_attempt"), py_drsuapi_DsReplicaNeighbour_get_last_attempt, py_drsuapi_DsReplicaNeighbour_set_last_attempt },
	{ discard_const_p(char, "result_last_attempt"), py_drsuapi_DsReplicaNeighbour_get_result_last_attempt, py_drsuapi_DsReplicaNeighbour_set_result_last_attempt },
	{ discard_const_p(char, "consecutive_sync_failures"), py_drsuapi_DsReplicaNeighbour_get_consecutive_sync_failures, py_drsuapi_DsReplicaNeighbour_set_consecutive_sync_failures },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaNeighbour_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaNeighbour",
	.tp_getset = py_drsuapi_DsReplicaNeighbour_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaNeighbour_new,
};


static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaNeighbourCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_reserved(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_drsuapi_DsReplicaNeighbourCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbour_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaNeighbourCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbour_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaNeighbourCtr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaNeighbourCtr_get_count, py_drsuapi_DsReplicaNeighbourCtr_set_count },
	{ discard_const_p(char, "reserved"), py_drsuapi_DsReplicaNeighbourCtr_get_reserved, py_drsuapi_DsReplicaNeighbourCtr_set_reserved },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaNeighbourCtr_get_array, py_drsuapi_DsReplicaNeighbourCtr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaNeighbourCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaNeighbourCtr",
	.tp_getset = py_drsuapi_DsReplicaNeighbourCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaNeighbourCtr_new,
};


static PyObject *py_drsuapi_DsReplicaCursorCtr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaCursorCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursorCtr_get_reserved(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_drsuapi_DsReplicaCursorCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursorCtr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaCursorCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaCursor_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaCursorCtr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaCursorCtr_get_count, py_drsuapi_DsReplicaCursorCtr_set_count },
	{ discard_const_p(char, "reserved"), py_drsuapi_DsReplicaCursorCtr_get_reserved, py_drsuapi_DsReplicaCursorCtr_set_reserved },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaCursorCtr_get_array, py_drsuapi_DsReplicaCursorCtr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaCursorCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaCursorCtr",
	.tp_getset = py_drsuapi_DsReplicaCursorCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaCursorCtr_new,
};


static PyObject *py_drsuapi_DsReplicaObjMetaData_get_attribute_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_attribute_name;
	if (object->attribute_name == NULL) {
		py_attribute_name = Py_None;
		Py_INCREF(py_attribute_name);
	} else {
		if (object->attribute_name == NULL) {
			py_attribute_name = Py_None;
			Py_INCREF(py_attribute_name);
		} else {
			py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
		}
	}
	return py_attribute_name;
}

static int py_drsuapi_DsReplicaObjMetaData_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->attribute_name = NULL;
	} else {
		object->attribute_name = NULL;
		if (PyUnicode_Check(value)) {
			object->attribute_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->attribute_name = 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 PyObject *py_drsuapi_DsReplicaObjMetaData_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_DsReplicaObjMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjMetaData_get_originating_change_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_change_time;
	py_originating_change_time = PyLong_FromLongLong(object->originating_change_time);
	return py_originating_change_time;
}

static int py_drsuapi_DsReplicaObjMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_change_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_change_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_drsuapi_DsReplicaObjMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_invocation_id;
	py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
	return py_originating_invocation_id;
}

static int py_drsuapi_DsReplicaObjMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjMetaData_get_originating_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_usn;
	py_originating_usn = PyLong_FromLongLong(object->originating_usn);
	return py_originating_usn;
}

static int py_drsuapi_DsReplicaObjMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_usn = 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_drsuapi_DsReplicaObjMetaData_get_local_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_local_usn;
	py_local_usn = PyLong_FromLongLong(object->local_usn);
	return py_local_usn;
}

static int py_drsuapi_DsReplicaObjMetaData_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->local_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->local_usn = 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_drsuapi_DsReplicaObjMetaData_getsetters[] = {
	{ discard_const_p(char, "attribute_name"), py_drsuapi_DsReplicaObjMetaData_get_attribute_name, py_drsuapi_DsReplicaObjMetaData_set_attribute_name },
	{ discard_const_p(char, "version"), py_drsuapi_DsReplicaObjMetaData_get_version, py_drsuapi_DsReplicaObjMetaData_set_version },
	{ discard_const_p(char, "originating_change_time"), py_drsuapi_DsReplicaObjMetaData_get_originating_change_time, py_drsuapi_DsReplicaObjMetaData_set_originating_change_time },
	{ discard_const_p(char, "originating_invocation_id"), py_drsuapi_DsReplicaObjMetaData_get_originating_invocation_id, py_drsuapi_DsReplicaObjMetaData_set_originating_invocation_id },
	{ discard_const_p(char, "originating_usn"), py_drsuapi_DsReplicaObjMetaData_get_originating_usn, py_drsuapi_DsReplicaObjMetaData_set_originating_usn },
	{ discard_const_p(char, "local_usn"), py_drsuapi_DsReplicaObjMetaData_get_local_usn, py_drsuapi_DsReplicaObjMetaData_set_local_usn },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaObjMetaData_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjMetaData",
	.tp_getset = py_drsuapi_DsReplicaObjMetaData_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjMetaData_new,
};


static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaObjMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_reserved(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_drsuapi_DsReplicaObjMetaDataCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaObjMetaDataCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaObjMetaDataCtr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaObjMetaDataCtr_get_count, py_drsuapi_DsReplicaObjMetaDataCtr_set_count },
	{ discard_const_p(char, "reserved"), py_drsuapi_DsReplicaObjMetaDataCtr_get_reserved, py_drsuapi_DsReplicaObjMetaDataCtr_set_reserved },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaObjMetaDataCtr_get_array, py_drsuapi_DsReplicaObjMetaDataCtr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaObjMetaDataCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjMetaDataCtr",
	.tp_getset = py_drsuapi_DsReplicaObjMetaDataCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjMetaDataCtr_new,
};


static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
	PyObject *py_dsa_obj_dn;
	if (object->dsa_obj_dn == NULL) {
		py_dsa_obj_dn = Py_None;
		Py_INCREF(py_dsa_obj_dn);
	} else {
		if (object->dsa_obj_dn == NULL) {
			py_dsa_obj_dn = Py_None;
			Py_INCREF(py_dsa_obj_dn);
		} else {
			py_dsa_obj_dn = PyUnicode_Decode(object->dsa_obj_dn, strlen(object->dsa_obj_dn), "utf-8", "ignore");
		}
	}
	return py_dsa_obj_dn;
}

static int py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dsa_obj_dn = NULL;
	} else {
		object->dsa_obj_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->dsa_obj_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->dsa_obj_dn = 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 PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
	PyObject *py_dsa_obj_guid;
	py_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->dsa_obj_guid);
	return py_dsa_obj_guid;
}

static int py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_first_failure(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
	PyObject *py_first_failure;
	py_first_failure = PyLong_FromLongLong(object->first_failure);
	return py_first_failure;
}

static int py_drsuapi_DsReplicaKccDsaFailure_set_first_failure(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->first_failure = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->first_failure = 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_drsuapi_DsReplicaKccDsaFailure_get_num_failures(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
	PyObject *py_num_failures;
	py_num_failures = PyInt_FromLong(object->num_failures);
	return py_num_failures;
}

static int py_drsuapi_DsReplicaKccDsaFailure_set_num_failures(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_failures = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_last_result(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
	PyObject *py_last_result;
	py_last_result = PyErr_FromWERROR(object->last_result);
	return py_last_result;
}

static int py_drsuapi_DsReplicaKccDsaFailure_set_last_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
	object->last_result = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaKccDsaFailure_getsetters[] = {
	{ discard_const_p(char, "dsa_obj_dn"), py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_dn, py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_dn },
	{ discard_const_p(char, "dsa_obj_guid"), py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_guid, py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_guid },
	{ discard_const_p(char, "first_failure"), py_drsuapi_DsReplicaKccDsaFailure_get_first_failure, py_drsuapi_DsReplicaKccDsaFailure_set_first_failure },
	{ discard_const_p(char, "num_failures"), py_drsuapi_DsReplicaKccDsaFailure_get_num_failures, py_drsuapi_DsReplicaKccDsaFailure_set_num_failures },
	{ discard_const_p(char, "last_result"), py_drsuapi_DsReplicaKccDsaFailure_get_last_result, py_drsuapi_DsReplicaKccDsaFailure_set_last_result },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaKccDsaFailure_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaKccDsaFailure",
	.tp_getset = py_drsuapi_DsReplicaKccDsaFailure_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaKccDsaFailure_new,
};


static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_reserved(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailure_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailure_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaKccDsaFailuresCtr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaKccDsaFailuresCtr_get_count, py_drsuapi_DsReplicaKccDsaFailuresCtr_set_count },
	{ discard_const_p(char, "reserved"), py_drsuapi_DsReplicaKccDsaFailuresCtr_get_reserved, py_drsuapi_DsReplicaKccDsaFailuresCtr_set_reserved },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaKccDsaFailuresCtr_get_array, py_drsuapi_DsReplicaKccDsaFailuresCtr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaKccDsaFailuresCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaKccDsaFailuresCtr",
	.tp_getset = py_drsuapi_DsReplicaKccDsaFailuresCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaKccDsaFailuresCtr_new,
};


static PyObject *py_drsuapi_DsReplicaOp_get_operation_start(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_operation_start;
	py_operation_start = PyLong_FromLongLong(object->operation_start);
	return py_operation_start;
}

static int py_drsuapi_DsReplicaOp_set_operation_start(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->operation_start = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->operation_start = 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_drsuapi_DsReplicaOp_get_serial_num(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_serial_num;
	py_serial_num = PyInt_FromLong(object->serial_num);
	return py_serial_num;
}

static int py_drsuapi_DsReplicaOp_set_serial_num(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->serial_num = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaOp_get_priority(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

static int py_drsuapi_DsReplicaOp_set_priority(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->priority = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaOp_get_operation_type(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_operation_type;
	py_operation_type = PyInt_FromLong(object->operation_type);
	return py_operation_type;
}

static int py_drsuapi_DsReplicaOp_set_operation_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->operation_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->operation_type = 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_drsuapi_DsReplicaOp_get_options(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_options;
	py_options = PyInt_FromLong(object->options);
	return py_options;
}

static int py_drsuapi_DsReplicaOp_set_options(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->options = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->options = 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_drsuapi_DsReplicaOp_get_nc_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_nc_dn;
	if (object->nc_dn == NULL) {
		py_nc_dn = Py_None;
		Py_INCREF(py_nc_dn);
	} else {
		if (object->nc_dn == NULL) {
			py_nc_dn = Py_None;
			Py_INCREF(py_nc_dn);
		} else {
			py_nc_dn = PyUnicode_Decode(object->nc_dn, strlen(object->nc_dn), "utf-8", "ignore");
		}
	}
	return py_nc_dn;
}

static int py_drsuapi_DsReplicaOp_set_nc_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->nc_dn = NULL;
	} else {
		object->nc_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->nc_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->nc_dn = 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 PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_obj_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_remote_dsa_obj_dn;
	if (object->remote_dsa_obj_dn == NULL) {
		py_remote_dsa_obj_dn = Py_None;
		Py_INCREF(py_remote_dsa_obj_dn);
	} else {
		if (object->remote_dsa_obj_dn == NULL) {
			py_remote_dsa_obj_dn = Py_None;
			Py_INCREF(py_remote_dsa_obj_dn);
		} else {
			py_remote_dsa_obj_dn = PyUnicode_Decode(object->remote_dsa_obj_dn, strlen(object->remote_dsa_obj_dn), "utf-8", "ignore");
		}
	}
	return py_remote_dsa_obj_dn;
}

static int py_drsuapi_DsReplicaOp_set_remote_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->remote_dsa_obj_dn = NULL;
	} else {
		object->remote_dsa_obj_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->remote_dsa_obj_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->remote_dsa_obj_dn = 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 PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_remote_dsa_address;
	if (object->remote_dsa_address == NULL) {
		py_remote_dsa_address = Py_None;
		Py_INCREF(py_remote_dsa_address);
	} else {
		if (object->remote_dsa_address == NULL) {
			py_remote_dsa_address = Py_None;
			Py_INCREF(py_remote_dsa_address);
		} else {
			py_remote_dsa_address = PyUnicode_Decode(object->remote_dsa_address, strlen(object->remote_dsa_address), "utf-8", "ignore");
		}
	}
	return py_remote_dsa_address;
}

static int py_drsuapi_DsReplicaOp_set_remote_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->remote_dsa_address = NULL;
	} else {
		object->remote_dsa_address = NULL;
		if (PyUnicode_Check(value)) {
			object->remote_dsa_address = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->remote_dsa_address = 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 PyObject *py_drsuapi_DsReplicaOp_get_nc_obj_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_nc_obj_guid;
	py_nc_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->nc_obj_guid);
	return py_nc_obj_guid;
}

static int py_drsuapi_DsReplicaOp_set_nc_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->nc_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_obj_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
	PyObject *py_remote_dsa_obj_guid;
	py_remote_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->remote_dsa_obj_guid);
	return py_remote_dsa_obj_guid;
}

static int py_drsuapi_DsReplicaOp_set_remote_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->remote_dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaOp_getsetters[] = {
	{ discard_const_p(char, "operation_start"), py_drsuapi_DsReplicaOp_get_operation_start, py_drsuapi_DsReplicaOp_set_operation_start },
	{ discard_const_p(char, "serial_num"), py_drsuapi_DsReplicaOp_get_serial_num, py_drsuapi_DsReplicaOp_set_serial_num },
	{ discard_const_p(char, "priority"), py_drsuapi_DsReplicaOp_get_priority, py_drsuapi_DsReplicaOp_set_priority },
	{ discard_const_p(char, "operation_type"), py_drsuapi_DsReplicaOp_get_operation_type, py_drsuapi_DsReplicaOp_set_operation_type },
	{ discard_const_p(char, "options"), py_drsuapi_DsReplicaOp_get_options, py_drsuapi_DsReplicaOp_set_options },
	{ discard_const_p(char, "nc_dn"), py_drsuapi_DsReplicaOp_get_nc_dn, py_drsuapi_DsReplicaOp_set_nc_dn },
	{ discard_const_p(char, "remote_dsa_obj_dn"), py_drsuapi_DsReplicaOp_get_remote_dsa_obj_dn, py_drsuapi_DsReplicaOp_set_remote_dsa_obj_dn },
	{ discard_const_p(char, "remote_dsa_address"), py_drsuapi_DsReplicaOp_get_remote_dsa_address, py_drsuapi_DsReplicaOp_set_remote_dsa_address },
	{ discard_const_p(char, "nc_obj_guid"), py_drsuapi_DsReplicaOp_get_nc_obj_guid, py_drsuapi_DsReplicaOp_set_nc_obj_guid },
	{ discard_const_p(char, "remote_dsa_obj_guid"), py_drsuapi_DsReplicaOp_get_remote_dsa_obj_guid, py_drsuapi_DsReplicaOp_set_remote_dsa_obj_guid },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaOp_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaOp",
	.tp_getset = py_drsuapi_DsReplicaOp_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaOp_new,
};


static PyObject *py_drsuapi_DsReplicaOpCtr_get_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(obj);
	PyObject *py_time;
	py_time = PyLong_FromLongLong(object->time);
	return py_time;
}

static int py_drsuapi_DsReplicaOpCtr_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->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_drsuapi_DsReplicaOpCtr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaOpCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaOpCtr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaOp_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaOpCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaOp_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaOpCtr_getsetters[] = {
	{ discard_const_p(char, "time"), py_drsuapi_DsReplicaOpCtr_get_time, py_drsuapi_DsReplicaOpCtr_set_time },
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaOpCtr_get_count, py_drsuapi_DsReplicaOpCtr_set_count },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaOpCtr_get_array, py_drsuapi_DsReplicaOpCtr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaOpCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaOpCtr",
	.tp_getset = py_drsuapi_DsReplicaOpCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaOpCtr_new,
};


static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_attribute_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_attribute_name;
	if (object->attribute_name == NULL) {
		py_attribute_name = Py_None;
		Py_INCREF(py_attribute_name);
	} else {
		if (object->attribute_name == NULL) {
			py_attribute_name = Py_None;
			Py_INCREF(py_attribute_name);
		} else {
			py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
		}
	}
	return py_attribute_name;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->attribute_name = NULL;
	} else {
		object->attribute_name = NULL;
		if (PyUnicode_Check(value)) {
			object->attribute_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->attribute_name = 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 PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_object_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_object_dn;
	if (object->object_dn == NULL) {
		py_object_dn = Py_None;
		Py_INCREF(py_object_dn);
	} else {
		if (object->object_dn == NULL) {
			py_object_dn = Py_None;
			Py_INCREF(py_object_dn);
		} else {
			py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
		}
	}
	return py_object_dn;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->object_dn = NULL;
	} else {
		object->object_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->object_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->object_dn = 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 PyObject *py_drsuapi_DsReplicaAttrValMetaData_get___ndr_size_binary(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_binary;
	py___ndr_size_binary = PyInt_FromLong(object->__ndr_size_binary);
	return py___ndr_size_binary;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_binary = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_binary(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_binary;
	if (object->binary == NULL) {
		py_binary = Py_None;
		Py_INCREF(py_binary);
	} else {
		py_binary = PyString_FromStringAndSize((char *)(*object->binary).data, (*object->binary).length);
	}
	return py_binary;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_binary(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->binary);
	if (value == Py_None) {
		object->binary = NULL;
	} else {
		object->binary = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary);
		*object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_deleted(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_deleted;
	py_deleted = PyLong_FromLongLong(object->deleted);
	return py_deleted;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_deleted(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->deleted = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->deleted = 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_drsuapi_DsReplicaAttrValMetaData_get_created(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_created;
	py_created = PyLong_FromLongLong(object->created);
	return py_created;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_created(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->created = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->created = 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_drsuapi_DsReplicaAttrValMetaData_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_originating_change_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_change_time;
	py_originating_change_time = PyLong_FromLongLong(object->originating_change_time);
	return py_originating_change_time;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_change_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_change_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_drsuapi_DsReplicaAttrValMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_invocation_id;
	py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
	return py_originating_invocation_id;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_originating_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_originating_usn;
	py_originating_usn = PyLong_FromLongLong(object->originating_usn);
	return py_originating_usn;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_usn = 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_drsuapi_DsReplicaAttrValMetaData_get_local_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
	PyObject *py_local_usn;
	py_local_usn = PyLong_FromLongLong(object->local_usn);
	return py_local_usn;
}

static int py_drsuapi_DsReplicaAttrValMetaData_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->local_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->local_usn = 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_drsuapi_DsReplicaAttrValMetaData_getsetters[] = {
	{ discard_const_p(char, "attribute_name"), py_drsuapi_DsReplicaAttrValMetaData_get_attribute_name, py_drsuapi_DsReplicaAttrValMetaData_set_attribute_name },
	{ discard_const_p(char, "object_dn"), py_drsuapi_DsReplicaAttrValMetaData_get_object_dn, py_drsuapi_DsReplicaAttrValMetaData_set_object_dn },
	{ discard_const_p(char, "__ndr_size_binary"), py_drsuapi_DsReplicaAttrValMetaData_get___ndr_size_binary, py_drsuapi_DsReplicaAttrValMetaData_set___ndr_size_binary },
	{ discard_const_p(char, "binary"), py_drsuapi_DsReplicaAttrValMetaData_get_binary, py_drsuapi_DsReplicaAttrValMetaData_set_binary },
	{ discard_const_p(char, "deleted"), py_drsuapi_DsReplicaAttrValMetaData_get_deleted, py_drsuapi_DsReplicaAttrValMetaData_set_deleted },
	{ discard_const_p(char, "created"), py_drsuapi_DsReplicaAttrValMetaData_get_created, py_drsuapi_DsReplicaAttrValMetaData_set_created },
	{ discard_const_p(char, "version"), py_drsuapi_DsReplicaAttrValMetaData_get_version, py_drsuapi_DsReplicaAttrValMetaData_set_version },
	{ discard_const_p(char, "originating_change_time"), py_drsuapi_DsReplicaAttrValMetaData_get_originating_change_time, py_drsuapi_DsReplicaAttrValMetaData_set_originating_change_time },
	{ discard_const_p(char, "originating_invocation_id"), py_drsuapi_DsReplicaAttrValMetaData_get_originating_invocation_id, py_drsuapi_DsReplicaAttrValMetaData_set_originating_invocation_id },
	{ discard_const_p(char, "originating_usn"), py_drsuapi_DsReplicaAttrValMetaData_get_originating_usn, py_drsuapi_DsReplicaAttrValMetaData_set_originating_usn },
	{ discard_const_p(char, "local_usn"), py_drsuapi_DsReplicaAttrValMetaData_get_local_usn, py_drsuapi_DsReplicaAttrValMetaData_set_local_usn },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaAttrValMetaData_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaAttrValMetaData",
	.tp_getset = py_drsuapi_DsReplicaAttrValMetaData_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaAttrValMetaData_new,
};


static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_enumeration_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(obj);
	PyObject *py_enumeration_context;
	py_enumeration_context = PyInt_FromLong(object->enumeration_context);
	return py_enumeration_context;
}

static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->enumeration_context = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaDataCtr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaAttrValMetaDataCtr_get_count, py_drsuapi_DsReplicaAttrValMetaDataCtr_set_count },
	{ discard_const_p(char, "enumeration_context"), py_drsuapi_DsReplicaAttrValMetaDataCtr_get_enumeration_context, py_drsuapi_DsReplicaAttrValMetaDataCtr_set_enumeration_context },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaAttrValMetaDataCtr_get_array, py_drsuapi_DsReplicaAttrValMetaDataCtr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaAttrValMetaDataCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaAttrValMetaDataCtr",
	.tp_getset = py_drsuapi_DsReplicaAttrValMetaDataCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaAttrValMetaDataCtr_new,
};


static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaCursor2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_enumeration_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_enumeration_context;
	py_enumeration_context = PyInt_FromLong(object->enumeration_context);
	return py_enumeration_context;
}

static int py_drsuapi_DsReplicaCursor2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->enumeration_context = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaCursor2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaCursor2Ctr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaCursor2Ctr_get_count, py_drsuapi_DsReplicaCursor2Ctr_set_count },
	{ discard_const_p(char, "enumeration_context"), py_drsuapi_DsReplicaCursor2Ctr_get_enumeration_context, py_drsuapi_DsReplicaCursor2Ctr_set_enumeration_context },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaCursor2Ctr_get_array, py_drsuapi_DsReplicaCursor2Ctr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaCursor2Ctr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaCursor2Ctr",
	.tp_getset = py_drsuapi_DsReplicaCursor2Ctr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaCursor2Ctr_new,
};


static PyObject *py_drsuapi_DsReplicaCursor3_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_drsuapi_DsReplicaCursor3_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor3_get_highest_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(obj);
	PyObject *py_highest_usn;
	py_highest_usn = PyLong_FromLongLong(object->highest_usn);
	return py_highest_usn;
}

static int py_drsuapi_DsReplicaCursor3_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->highest_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->highest_usn = 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_drsuapi_DsReplicaCursor3_get_last_sync_success(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(obj);
	PyObject *py_last_sync_success;
	py_last_sync_success = PyLong_FromLongLong(object->last_sync_success);
	return py_last_sync_success;
}

static int py_drsuapi_DsReplicaCursor3_set_last_sync_success(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->last_sync_success = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->last_sync_success = 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_drsuapi_DsReplicaCursor3_get_source_dsa_obj_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(obj);
	PyObject *py_source_dsa_obj_dn;
	if (object->source_dsa_obj_dn == NULL) {
		py_source_dsa_obj_dn = Py_None;
		Py_INCREF(py_source_dsa_obj_dn);
	} else {
		if (object->source_dsa_obj_dn == NULL) {
			py_source_dsa_obj_dn = Py_None;
			Py_INCREF(py_source_dsa_obj_dn);
		} else {
			py_source_dsa_obj_dn = PyUnicode_Decode(object->source_dsa_obj_dn, strlen(object->source_dsa_obj_dn), "utf-8", "ignore");
		}
	}
	return py_source_dsa_obj_dn;
}

static int py_drsuapi_DsReplicaCursor3_set_source_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->source_dsa_obj_dn = NULL;
	} else {
		object->source_dsa_obj_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->source_dsa_obj_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->source_dsa_obj_dn = 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_drsuapi_DsReplicaCursor3_getsetters[] = {
	{ discard_const_p(char, "source_dsa_invocation_id"), py_drsuapi_DsReplicaCursor3_get_source_dsa_invocation_id, py_drsuapi_DsReplicaCursor3_set_source_dsa_invocation_id },
	{ discard_const_p(char, "highest_usn"), py_drsuapi_DsReplicaCursor3_get_highest_usn, py_drsuapi_DsReplicaCursor3_set_highest_usn },
	{ discard_const_p(char, "last_sync_success"), py_drsuapi_DsReplicaCursor3_get_last_sync_success, py_drsuapi_DsReplicaCursor3_set_last_sync_success },
	{ discard_const_p(char, "source_dsa_obj_dn"), py_drsuapi_DsReplicaCursor3_get_source_dsa_obj_dn, py_drsuapi_DsReplicaCursor3_set_source_dsa_obj_dn },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaCursor3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaCursor3",
	.tp_getset = py_drsuapi_DsReplicaCursor3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaCursor3_new,
};


static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaCursor3Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_enumeration_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_enumeration_context;
	py_enumeration_context = PyInt_FromLong(object->enumeration_context);
	return py_enumeration_context;
}

static int py_drsuapi_DsReplicaCursor3Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->enumeration_context = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor3_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaCursor3Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaCursor3_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaCursor3Ctr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaCursor3Ctr_get_count, py_drsuapi_DsReplicaCursor3Ctr_set_count },
	{ discard_const_p(char, "enumeration_context"), py_drsuapi_DsReplicaCursor3Ctr_get_enumeration_context, py_drsuapi_DsReplicaCursor3Ctr_set_enumeration_context },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaCursor3Ctr_get_array, py_drsuapi_DsReplicaCursor3Ctr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaCursor3Ctr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaCursor3Ctr",
	.tp_getset = py_drsuapi_DsReplicaCursor3Ctr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaCursor3Ctr_new,
};


static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_attribute_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_attribute_name;
	if (object->attribute_name == NULL) {
		py_attribute_name = Py_None;
		Py_INCREF(py_attribute_name);
	} else {
		if (object->attribute_name == NULL) {
			py_attribute_name = Py_None;
			Py_INCREF(py_attribute_name);
		} else {
			py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
		}
	}
	return py_attribute_name;
}

static int py_drsuapi_DsReplicaObjMetaData2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->attribute_name = NULL;
	} else {
		object->attribute_name = NULL;
		if (PyUnicode_Check(value)) {
			object->attribute_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->attribute_name = 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 PyObject *py_drsuapi_DsReplicaObjMetaData2_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_DsReplicaObjMetaData2_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_change_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_originating_change_time;
	py_originating_change_time = PyLong_FromLongLong(object->originating_change_time);
	return py_originating_change_time;
}

static int py_drsuapi_DsReplicaObjMetaData2_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_change_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_change_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_drsuapi_DsReplicaObjMetaData2_get_originating_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_originating_invocation_id;
	py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
	return py_originating_invocation_id;
}

static int py_drsuapi_DsReplicaObjMetaData2_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_originating_usn;
	py_originating_usn = PyLong_FromLongLong(object->originating_usn);
	return py_originating_usn;
}

static int py_drsuapi_DsReplicaObjMetaData2_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_usn = 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_drsuapi_DsReplicaObjMetaData2_get_local_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_local_usn;
	py_local_usn = PyLong_FromLongLong(object->local_usn);
	return py_local_usn;
}

static int py_drsuapi_DsReplicaObjMetaData2_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->local_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->local_usn = 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_drsuapi_DsReplicaObjMetaData2_get_originating_dsa_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_originating_dsa_dn;
	if (object->originating_dsa_dn == NULL) {
		py_originating_dsa_dn = Py_None;
		Py_INCREF(py_originating_dsa_dn);
	} else {
		if (object->originating_dsa_dn == NULL) {
			py_originating_dsa_dn = Py_None;
			Py_INCREF(py_originating_dsa_dn);
		} else {
			py_originating_dsa_dn = PyUnicode_Decode(object->originating_dsa_dn, strlen(object->originating_dsa_dn), "utf-8", "ignore");
		}
	}
	return py_originating_dsa_dn;
}

static int py_drsuapi_DsReplicaObjMetaData2_set_originating_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->originating_dsa_dn = NULL;
	} else {
		object->originating_dsa_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->originating_dsa_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->originating_dsa_dn = 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_drsuapi_DsReplicaObjMetaData2_getsetters[] = {
	{ discard_const_p(char, "attribute_name"), py_drsuapi_DsReplicaObjMetaData2_get_attribute_name, py_drsuapi_DsReplicaObjMetaData2_set_attribute_name },
	{ discard_const_p(char, "version"), py_drsuapi_DsReplicaObjMetaData2_get_version, py_drsuapi_DsReplicaObjMetaData2_set_version },
	{ discard_const_p(char, "originating_change_time"), py_drsuapi_DsReplicaObjMetaData2_get_originating_change_time, py_drsuapi_DsReplicaObjMetaData2_set_originating_change_time },
	{ discard_const_p(char, "originating_invocation_id"), py_drsuapi_DsReplicaObjMetaData2_get_originating_invocation_id, py_drsuapi_DsReplicaObjMetaData2_set_originating_invocation_id },
	{ discard_const_p(char, "originating_usn"), py_drsuapi_DsReplicaObjMetaData2_get_originating_usn, py_drsuapi_DsReplicaObjMetaData2_set_originating_usn },
	{ discard_const_p(char, "local_usn"), py_drsuapi_DsReplicaObjMetaData2_get_local_usn, py_drsuapi_DsReplicaObjMetaData2_set_local_usn },
	{ discard_const_p(char, "originating_dsa_dn"), py_drsuapi_DsReplicaObjMetaData2_get_originating_dsa_dn, py_drsuapi_DsReplicaObjMetaData2_set_originating_dsa_dn },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaObjMetaData2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjMetaData2",
	.tp_getset = py_drsuapi_DsReplicaObjMetaData2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjMetaData2_new,
};


static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_enumeration_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_enumeration_context;
	py_enumeration_context = PyInt_FromLong(object->enumeration_context);
	return py_enumeration_context;
}

static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->enumeration_context = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData2_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaObjMetaData2Ctr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaObjMetaData2Ctr_get_count, py_drsuapi_DsReplicaObjMetaData2Ctr_set_count },
	{ discard_const_p(char, "enumeration_context"), py_drsuapi_DsReplicaObjMetaData2Ctr_get_enumeration_context, py_drsuapi_DsReplicaObjMetaData2Ctr_set_enumeration_context },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaObjMetaData2Ctr_get_array, py_drsuapi_DsReplicaObjMetaData2Ctr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaObjMetaData2Ctr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaObjMetaData2Ctr",
	.tp_getset = py_drsuapi_DsReplicaObjMetaData2Ctr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaObjMetaData2Ctr_new,
};


static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_attribute_name(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_attribute_name;
	if (object->attribute_name == NULL) {
		py_attribute_name = Py_None;
		Py_INCREF(py_attribute_name);
	} else {
		if (object->attribute_name == NULL) {
			py_attribute_name = Py_None;
			Py_INCREF(py_attribute_name);
		} else {
			py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
		}
	}
	return py_attribute_name;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->attribute_name = NULL;
	} else {
		object->attribute_name = NULL;
		if (PyUnicode_Check(value)) {
			object->attribute_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->attribute_name = 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 PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_object_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_object_dn;
	if (object->object_dn == NULL) {
		py_object_dn = Py_None;
		Py_INCREF(py_object_dn);
	} else {
		if (object->object_dn == NULL) {
			py_object_dn = Py_None;
			Py_INCREF(py_object_dn);
		} else {
			py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
		}
	}
	return py_object_dn;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->object_dn = NULL;
	} else {
		object->object_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->object_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->object_dn = 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 PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get___ndr_size_binary(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py___ndr_size_binary;
	py___ndr_size_binary = PyInt_FromLong(object->__ndr_size_binary);
	return py___ndr_size_binary;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__ndr_size_binary = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_binary(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_binary;
	if (object->binary == NULL) {
		py_binary = Py_None;
		Py_INCREF(py_binary);
	} else {
		py_binary = PyString_FromStringAndSize((char *)(*object->binary).data, (*object->binary).length);
	}
	return py_binary;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_binary(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->binary);
	if (value == Py_None) {
		object->binary = NULL;
	} else {
		object->binary = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary);
		*object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	}
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_deleted(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_deleted;
	py_deleted = PyLong_FromLongLong(object->deleted);
	return py_deleted;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_deleted(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->deleted = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->deleted = 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_drsuapi_DsReplicaAttrValMetaData2_get_created(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_created;
	py_created = PyLong_FromLongLong(object->created);
	return py_created;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_created(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->created = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->created = 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_drsuapi_DsReplicaAttrValMetaData2_get_version(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_change_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_originating_change_time;
	py_originating_change_time = PyLong_FromLongLong(object->originating_change_time);
	return py_originating_change_time;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_change_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_change_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_drsuapi_DsReplicaAttrValMetaData2_get_originating_invocation_id(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_originating_invocation_id;
	py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
	return py_originating_invocation_id;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_originating_usn;
	py_originating_usn = PyLong_FromLongLong(object->originating_usn);
	return py_originating_usn;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->originating_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->originating_usn = 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_drsuapi_DsReplicaAttrValMetaData2_get_local_usn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_local_usn;
	py_local_usn = PyLong_FromLongLong(object->local_usn);
	return py_local_usn;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->local_usn = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->local_usn = 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_drsuapi_DsReplicaAttrValMetaData2_get_originating_dsa_dn(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
	PyObject *py_originating_dsa_dn;
	if (object->originating_dsa_dn == NULL) {
		py_originating_dsa_dn = Py_None;
		Py_INCREF(py_originating_dsa_dn);
	} else {
		if (object->originating_dsa_dn == NULL) {
			py_originating_dsa_dn = Py_None;
			Py_INCREF(py_originating_dsa_dn);
		} else {
			py_originating_dsa_dn = PyUnicode_Decode(object->originating_dsa_dn, strlen(object->originating_dsa_dn), "utf-8", "ignore");
		}
	}
	return py_originating_dsa_dn;
}

static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->originating_dsa_dn = NULL;
	} else {
		object->originating_dsa_dn = NULL;
		if (PyUnicode_Check(value)) {
			object->originating_dsa_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->originating_dsa_dn = 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_drsuapi_DsReplicaAttrValMetaData2_getsetters[] = {
	{ discard_const_p(char, "attribute_name"), py_drsuapi_DsReplicaAttrValMetaData2_get_attribute_name, py_drsuapi_DsReplicaAttrValMetaData2_set_attribute_name },
	{ discard_const_p(char, "object_dn"), py_drsuapi_DsReplicaAttrValMetaData2_get_object_dn, py_drsuapi_DsReplicaAttrValMetaData2_set_object_dn },
	{ discard_const_p(char, "__ndr_size_binary"), py_drsuapi_DsReplicaAttrValMetaData2_get___ndr_size_binary, py_drsuapi_DsReplicaAttrValMetaData2_set___ndr_size_binary },
	{ discard_const_p(char, "binary"), py_drsuapi_DsReplicaAttrValMetaData2_get_binary, py_drsuapi_DsReplicaAttrValMetaData2_set_binary },
	{ discard_const_p(char, "deleted"), py_drsuapi_DsReplicaAttrValMetaData2_get_deleted, py_drsuapi_DsReplicaAttrValMetaData2_set_deleted },
	{ discard_const_p(char, "created"), py_drsuapi_DsReplicaAttrValMetaData2_get_created, py_drsuapi_DsReplicaAttrValMetaData2_set_created },
	{ discard_const_p(char, "version"), py_drsuapi_DsReplicaAttrValMetaData2_get_version, py_drsuapi_DsReplicaAttrValMetaData2_set_version },
	{ discard_const_p(char, "originating_change_time"), py_drsuapi_DsReplicaAttrValMetaData2_get_originating_change_time, py_drsuapi_DsReplicaAttrValMetaData2_set_originating_change_time },
	{ discard_const_p(char, "originating_invocation_id"), py_drsuapi_DsReplicaAttrValMetaData2_get_originating_invocation_id, py_drsuapi_DsReplicaAttrValMetaData2_set_originating_invocation_id },
	{ discard_const_p(char, "originating_usn"), py_drsuapi_DsReplicaAttrValMetaData2_get_originating_usn, py_drsuapi_DsReplicaAttrValMetaData2_set_originating_usn },
	{ discard_const_p(char, "local_usn"), py_drsuapi_DsReplicaAttrValMetaData2_get_local_usn, py_drsuapi_DsReplicaAttrValMetaData2_set_local_usn },
	{ discard_const_p(char, "originating_dsa_dn"), py_drsuapi_DsReplicaAttrValMetaData2_get_originating_dsa_dn, py_drsuapi_DsReplicaAttrValMetaData2_set_originating_dsa_dn },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaAttrValMetaData2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaAttrValMetaData2",
	.tp_getset = py_drsuapi_DsReplicaAttrValMetaData2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaAttrValMetaData2_new,
};


static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_enumeration_context(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_enumeration_context;
	py_enumeration_context = PyInt_FromLong(object->enumeration_context);
	return py_enumeration_context;
}

static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->enumeration_context = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData2_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaData2Ctr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_count, py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_count },
	{ discard_const_p(char, "enumeration_context"), py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_enumeration_context, py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_enumeration_context },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_array, py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaAttrValMetaData2Ctr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaAttrValMetaData2Ctr",
	.tp_getset = py_drsuapi_DsReplicaAttrValMetaData2Ctr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaAttrValMetaData2Ctr_new,
};


static PyObject *py_drsuapi_DsReplicaConnection04_get_u1(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
	PyObject *py_u1;
	py_u1 = PyLong_FromLongLong(object->u1);
	return py_u1;
}

static int py_drsuapi_DsReplicaConnection04_set_u1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->u1 = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->u1 = 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_drsuapi_DsReplicaConnection04_get_u2(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
	PyObject *py_u2;
	py_u2 = PyInt_FromLong(object->u2);
	return py_u2;
}

static int py_drsuapi_DsReplicaConnection04_set_u2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaConnection04_get_u3(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
	PyObject *py_u3;
	py_u3 = PyInt_FromLong(object->u3);
	return py_u3;
}

static int py_drsuapi_DsReplicaConnection04_set_u3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaConnection04_get_bind_guid(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
	PyObject *py_bind_guid;
	py_bind_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->bind_guid);
	return py_bind_guid;
}

static int py_drsuapi_DsReplicaConnection04_set_bind_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->bind_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaConnection04_get_bind_time(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
	PyObject *py_bind_time;
	py_bind_time = PyLong_FromLongLong(object->bind_time);
	return py_bind_time;
}

static int py_drsuapi_DsReplicaConnection04_set_bind_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->bind_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->bind_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_drsuapi_DsReplicaConnection04_get_client_ip_address(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
	PyObject *py_client_ip_address;
	py_client_ip_address = PyString_FromStringOrNULL(object->client_ip_address);
	return py_client_ip_address;
}

static int py_drsuapi_DsReplicaConnection04_set_client_ip_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
	object->client_ip_address = PyString_AS_STRING(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaConnection04_get_u5(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
	PyObject *py_u5;
	py_u5 = PyInt_FromLong(object->u5);
	return py_u5;
}

static int py_drsuapi_DsReplicaConnection04_set_u5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u5 = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaConnection04_getsetters[] = {
	{ discard_const_p(char, "u1"), py_drsuapi_DsReplicaConnection04_get_u1, py_drsuapi_DsReplicaConnection04_set_u1 },
	{ discard_const_p(char, "u2"), py_drsuapi_DsReplicaConnection04_get_u2, py_drsuapi_DsReplicaConnection04_set_u2 },
	{ discard_const_p(char, "u3"), py_drsuapi_DsReplicaConnection04_get_u3, py_drsuapi_DsReplicaConnection04_set_u3 },
	{ discard_const_p(char, "bind_guid"), py_drsuapi_DsReplicaConnection04_get_bind_guid, py_drsuapi_DsReplicaConnection04_set_bind_guid },
	{ discard_const_p(char, "bind_time"), py_drsuapi_DsReplicaConnection04_get_bind_time, py_drsuapi_DsReplicaConnection04_set_bind_time },
	{ discard_const_p(char, "client_ip_address"), py_drsuapi_DsReplicaConnection04_get_client_ip_address, py_drsuapi_DsReplicaConnection04_set_client_ip_address },
	{ discard_const_p(char, "u5"), py_drsuapi_DsReplicaConnection04_get_u5, py_drsuapi_DsReplicaConnection04_set_u5 },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaConnection04_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaConnection04",
	.tp_getset = py_drsuapi_DsReplicaConnection04_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaConnection04_new,
};


static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplicaConnection04Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_reserved(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_drsuapi_DsReplicaConnection04Ctr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaConnection04_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplicaConnection04Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplicaConnection04_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplicaConnection04Ctr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplicaConnection04Ctr_get_count, py_drsuapi_DsReplicaConnection04Ctr_set_count },
	{ discard_const_p(char, "reserved"), py_drsuapi_DsReplicaConnection04Ctr_get_reserved, py_drsuapi_DsReplicaConnection04Ctr_set_reserved },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplicaConnection04Ctr_get_array, py_drsuapi_DsReplicaConnection04Ctr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplicaConnection04Ctr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplicaConnection04Ctr",
	.tp_getset = py_drsuapi_DsReplicaConnection04Ctr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplicaConnection04Ctr_new,
};


static PyObject *py_drsuapi_DsReplica06_get_str1(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
	PyObject *py_str1;
	if (object->str1 == NULL) {
		py_str1 = Py_None;
		Py_INCREF(py_str1);
	} else {
		if (object->str1 == NULL) {
			py_str1 = Py_None;
			Py_INCREF(py_str1);
		} else {
			py_str1 = PyUnicode_Decode(object->str1, strlen(object->str1), "utf-8", "ignore");
		}
	}
	return py_str1;
}

static int py_drsuapi_DsReplica06_set_str1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->str1 = NULL;
	} else {
		object->str1 = NULL;
		if (PyUnicode_Check(value)) {
			object->str1 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->str1 = 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 PyObject *py_drsuapi_DsReplica06_get_u1(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
	PyObject *py_u1;
	py_u1 = PyInt_FromLong(object->u1);
	return py_u1;
}

static int py_drsuapi_DsReplica06_set_u1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplica06_get_u2(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
	PyObject *py_u2;
	py_u2 = PyInt_FromLong(object->u2);
	return py_u2;
}

static int py_drsuapi_DsReplica06_set_u2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplica06_get_u3(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
	PyObject *py_u3;
	py_u3 = PyInt_FromLong(object->u3);
	return py_u3;
}

static int py_drsuapi_DsReplica06_set_u3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplica06_get_u4(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
	PyObject *py_u4;
	py_u4 = PyInt_FromLong(object->u4);
	return py_u4;
}

static int py_drsuapi_DsReplica06_set_u4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u4 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplica06_get_u5(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
	PyObject *py_u5;
	py_u5 = PyInt_FromLong(object->u5);
	return py_u5;
}

static int py_drsuapi_DsReplica06_set_u5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u5 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplica06_get_u6(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
	PyObject *py_u6;
	py_u6 = PyLong_FromLongLong(object->u6);
	return py_u6;
}

static int py_drsuapi_DsReplica06_set_u6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->u6 = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->u6 = 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_drsuapi_DsReplica06_get_u7(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
	PyObject *py_u7;
	py_u7 = PyInt_FromLong(object->u7);
	return py_u7;
}

static int py_drsuapi_DsReplica06_set_u7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u7 = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplica06_getsetters[] = {
	{ discard_const_p(char, "str1"), py_drsuapi_DsReplica06_get_str1, py_drsuapi_DsReplica06_set_str1 },
	{ discard_const_p(char, "u1"), py_drsuapi_DsReplica06_get_u1, py_drsuapi_DsReplica06_set_u1 },
	{ discard_const_p(char, "u2"), py_drsuapi_DsReplica06_get_u2, py_drsuapi_DsReplica06_set_u2 },
	{ discard_const_p(char, "u3"), py_drsuapi_DsReplica06_get_u3, py_drsuapi_DsReplica06_set_u3 },
	{ discard_const_p(char, "u4"), py_drsuapi_DsReplica06_get_u4, py_drsuapi_DsReplica06_set_u4 },
	{ discard_const_p(char, "u5"), py_drsuapi_DsReplica06_get_u5, py_drsuapi_DsReplica06_set_u5 },
	{ discard_const_p(char, "u6"), py_drsuapi_DsReplica06_get_u6, py_drsuapi_DsReplica06_set_u6 },
	{ discard_const_p(char, "u7"), py_drsuapi_DsReplica06_get_u7, py_drsuapi_DsReplica06_set_u7 },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplica06_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplica06",
	.tp_getset = py_drsuapi_DsReplica06_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplica06_new,
};


static PyObject *py_drsuapi_DsReplica06Ctr_get_count(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_drsuapi_DsReplica06Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplica06Ctr_get_reserved(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_drsuapi_DsReplica06Ctr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsReplica06Ctr_get_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(obj);
	PyObject *py_array;
	py_array = PyList_New(object->count);
	if (py_array == NULL) {
		return NULL;
	}
	{
		int array_cntr_0;
		for (array_cntr_0 = 0; array_cntr_0 < object->count; array_cntr_0++) {
			PyObject *py_array_0;
			py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplica06_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_drsuapi_DsReplica06Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
		if (!object->array) { return -1;; }
		talloc_set_name_const(object->array, "ARRAY: object->array");
		for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_DsReplica06_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct drsuapi_DsReplica06 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsReplica06Ctr_getsetters[] = {
	{ discard_const_p(char, "count"), py_drsuapi_DsReplica06Ctr_get_count, py_drsuapi_DsReplica06Ctr_set_count },
	{ discard_const_p(char, "reserved"), py_drsuapi_DsReplica06Ctr_get_reserved, py_drsuapi_DsReplica06Ctr_set_reserved },
	{ discard_const_p(char, "array"), py_drsuapi_DsReplica06Ctr_get_array, py_drsuapi_DsReplica06Ctr_set_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsReplica06Ctr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsReplica06Ctr",
	.tp_getset = py_drsuapi_DsReplica06Ctr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsReplica06Ctr_new,
};

PyObject *py_import_drsuapi_DsReplicaInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaInfo *in)
{
	PyObject *ret;

	switch (level) {
		case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
			if (in->neighbours == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbourCtr_Type, in->neighbours, in->neighbours);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_CURSORS:
			if (in->cursors == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtr_Type, in->cursors, in->cursors);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
			if (in->objmetadata == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaDataCtr_Type, in->objmetadata, in->objmetadata);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
			if (in->connectfailures == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in->connectfailures, in->connectfailures);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
			if (in->linkfailures == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in->linkfailures, in->linkfailures);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
			if (in->pendingops == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaOpCtr_Type, in->pendingops, in->pendingops);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
			if (in->attrvalmetadata == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaDataCtr_Type, in->attrvalmetadata, in->attrvalmetadata);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
			if (in->cursors2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2Ctr_Type, in->cursors2, in->cursors2);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
			if (in->cursors3 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursor3Ctr_Type, in->cursors3, in->cursors3);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
			if (in->objmetadata2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData2Ctr_Type, in->objmetadata2, in->objmetadata2);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
			if (in->attrvalmetadata2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type, in->attrvalmetadata2, in->attrvalmetadata2);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_REPSTO:
			if (in->repsto == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbourCtr_Type, in->repsto, in->repsto);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
			if (in->clientctx == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaConnection04Ctr_Type, in->clientctx, in->clientctx);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
			if (in->udv1 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, in->udv1, in->udv1);
			}
			return ret;

		case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
			if (in->srvoutgoingcalls == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&drsuapi_DsReplica06Ctr_Type, in->srvoutgoingcalls, in->srvoutgoingcalls);
			}
			return ret;

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

union drsuapi_DsReplicaInfo *py_export_drsuapi_DsReplicaInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsReplicaInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaInfo);
	switch (level) {
		case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
			if (in == Py_None) {
				ret->neighbours = NULL;
			} else {
				ret->neighbours = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbourCtr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->neighbours = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_CURSORS:
			if (in == Py_None) {
				ret->cursors = NULL;
			} else {
				ret->cursors = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->cursors = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
			if (in == Py_None) {
				ret->objmetadata = NULL;
			} else {
				ret->objmetadata = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaDataCtr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->objmetadata = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
			if (in == Py_None) {
				ret->connectfailures = NULL;
			} else {
				ret->connectfailures = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->connectfailures = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
			if (in == Py_None) {
				ret->linkfailures = NULL;
			} else {
				ret->linkfailures = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->linkfailures = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
			if (in == Py_None) {
				ret->pendingops = NULL;
			} else {
				ret->pendingops = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaOpCtr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->pendingops = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
			if (in == Py_None) {
				ret->attrvalmetadata = NULL;
			} else {
				ret->attrvalmetadata = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaDataCtr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->attrvalmetadata = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
			if (in == Py_None) {
				ret->cursors2 = NULL;
			} else {
				ret->cursors2 = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2Ctr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->cursors2 = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
			if (in == Py_None) {
				ret->cursors3 = NULL;
			} else {
				ret->cursors3 = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaCursor3Ctr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->cursors3 = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
			if (in == Py_None) {
				ret->objmetadata2 = NULL;
			} else {
				ret->objmetadata2 = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData2Ctr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->objmetadata2 = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
			if (in == Py_None) {
				ret->attrvalmetadata2 = NULL;
			} else {
				ret->attrvalmetadata2 = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->attrvalmetadata2 = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_REPSTO:
			if (in == Py_None) {
				ret->repsto = NULL;
			} else {
				ret->repsto = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbourCtr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->repsto = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
			if (in == Py_None) {
				ret->clientctx = NULL;
			} else {
				ret->clientctx = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaConnection04Ctr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->clientctx = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
			if (in == Py_None) {
				ret->udv1 = NULL;
			} else {
				ret->udv1 = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->udv1 = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(in);
			}
			break;

		case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
			if (in == Py_None) {
				ret->srvoutgoingcalls = NULL;
			} else {
				ret->srvoutgoingcalls = NULL;
				PY_CHECK_TYPE(&drsuapi_DsReplica06Ctr_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->srvoutgoingcalls = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(in);
			}
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetMemberships2Ctr1_get_num_entries(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMemberships2Ctr1 *object = (struct drsuapi_DsGetMemberships2Ctr1 *)pytalloc_get_ptr(obj);
	PyObject *py_num_entries;
	py_num_entries = PyInt_FromLong(object->num_entries);
	return py_num_entries;
}

static int py_drsuapi_DsGetMemberships2Ctr1_set_num_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMemberships2Ctr1 *object = (struct drsuapi_DsGetMemberships2Ctr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_entries = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetMemberships2Ctr1_get_ctrl_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMemberships2Ctr1 *object = (struct drsuapi_DsGetMemberships2Ctr1 *)pytalloc_get_ptr(obj);
	PyObject *py_ctrl_array;
	if (object->ctrl_array == NULL) {
		py_ctrl_array = Py_None;
		Py_INCREF(py_ctrl_array);
	} else {
		py_ctrl_array = PyList_New(object->num_entries);
		if (py_ctrl_array == NULL) {
			return NULL;
		}
		{
			int ctrl_array_cntr_1;
			for (ctrl_array_cntr_1 = 0; ctrl_array_cntr_1 < object->num_entries; ctrl_array_cntr_1++) {
				PyObject *py_ctrl_array_1;
				if (object->ctrl_array[ctrl_array_cntr_1] == NULL) {
					py_ctrl_array_1 = Py_None;
					Py_INCREF(py_ctrl_array_1);
				} else {
					py_ctrl_array_1 = pytalloc_reference_ex(&drsuapi_DsGetMembershipsCtr1_Type, object->ctrl_array[ctrl_array_cntr_1], object->ctrl_array[ctrl_array_cntr_1]);
				}
				PyList_SetItem(py_ctrl_array, ctrl_array_cntr_1, py_ctrl_array_1);
			}
		}
	}
	return py_ctrl_array;
}

static int py_drsuapi_DsGetMemberships2Ctr1_set_ctrl_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMemberships2Ctr1 *object = (struct drsuapi_DsGetMemberships2Ctr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->ctrl_array);
	if (value == Py_None) {
		object->ctrl_array = NULL;
	} else {
		object->ctrl_array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int ctrl_array_cntr_1;
			object->ctrl_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ctrl_array, PyList_GET_SIZE(value));
			if (!object->ctrl_array) { return -1;; }
			talloc_set_name_const(object->ctrl_array, "ARRAY: object->ctrl_array");
			for (ctrl_array_cntr_1 = 0; ctrl_array_cntr_1 < PyList_GET_SIZE(value); ctrl_array_cntr_1++) {
				if (PyList_GET_ITEM(value, ctrl_array_cntr_1) == Py_None) {
					object->ctrl_array[ctrl_array_cntr_1] = NULL;
				} else {
					object->ctrl_array[ctrl_array_cntr_1] = NULL;
					PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, PyList_GET_ITEM(value, ctrl_array_cntr_1), return -1;);
					if (talloc_reference(object->ctrl_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ctrl_array_cntr_1))) == NULL) {
						PyErr_NoMemory();
						return -1;
					}
					object->ctrl_array[ctrl_array_cntr_1] = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, ctrl_array_cntr_1));
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetMemberships2Ctr1_getsetters[] = {
	{ discard_const_p(char, "num_entries"), py_drsuapi_DsGetMemberships2Ctr1_get_num_entries, py_drsuapi_DsGetMemberships2Ctr1_set_num_entries },
	{ discard_const_p(char, "ctrl_array"), py_drsuapi_DsGetMemberships2Ctr1_get_ctrl_array, py_drsuapi_DsGetMemberships2Ctr1_set_ctrl_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetMemberships2Ctr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetMemberships2Ctr1",
	.tp_getset = py_drsuapi_DsGetMemberships2Ctr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetMemberships2Ctr1_new,
};

PyObject *py_import_drsuapi_DsGetMemberships2Ctr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMemberships2Ctr *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsCtr1_Type, mem_ctx, &in->ctr1);
			return ret;

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

union drsuapi_DsGetMemberships2Ctr *py_export_drsuapi_DsGetMemberships2Ctr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetMemberships2Ctr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Ctr);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsGetMemberships2Request1_get_num_req(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMemberships2Request1 *object = (struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(obj);
	PyObject *py_num_req;
	py_num_req = PyInt_FromLong(object->num_req);
	return py_num_req;
}

static int py_drsuapi_DsGetMemberships2Request1_set_num_req(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMemberships2Request1 *object = (struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_req = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_DsGetMemberships2Request1_get_req_array(PyObject *obj, void *closure)
{
	struct drsuapi_DsGetMemberships2Request1 *object = (struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(obj);
	PyObject *py_req_array;
	if (object->req_array == NULL) {
		py_req_array = Py_None;
		Py_INCREF(py_req_array);
	} else {
		py_req_array = PyList_New(object->num_req);
		if (py_req_array == NULL) {
			return NULL;
		}
		{
			int req_array_cntr_1;
			for (req_array_cntr_1 = 0; req_array_cntr_1 < object->num_req; req_array_cntr_1++) {
				PyObject *py_req_array_1;
				if (object->req_array[req_array_cntr_1] == NULL) {
					py_req_array_1 = Py_None;
					Py_INCREF(py_req_array_1);
				} else {
					py_req_array_1 = pytalloc_reference_ex(&drsuapi_DsGetMembershipsRequest1_Type, object->req_array[req_array_cntr_1], object->req_array[req_array_cntr_1]);
				}
				PyList_SetItem(py_req_array, req_array_cntr_1, py_req_array_1);
			}
		}
	}
	return py_req_array;
}

static int py_drsuapi_DsGetMemberships2Request1_set_req_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsGetMemberships2Request1 *object = (struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->req_array);
	if (value == Py_None) {
		object->req_array = NULL;
	} else {
		object->req_array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int req_array_cntr_1;
			object->req_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->req_array, PyList_GET_SIZE(value));
			if (!object->req_array) { return -1;; }
			talloc_set_name_const(object->req_array, "ARRAY: object->req_array");
			for (req_array_cntr_1 = 0; req_array_cntr_1 < PyList_GET_SIZE(value); req_array_cntr_1++) {
				if (PyList_GET_ITEM(value, req_array_cntr_1) == Py_None) {
					object->req_array[req_array_cntr_1] = NULL;
				} else {
					object->req_array[req_array_cntr_1] = NULL;
					PY_CHECK_TYPE(&drsuapi_DsGetMembershipsRequest1_Type, PyList_GET_ITEM(value, req_array_cntr_1), return -1;);
					if (talloc_reference(object->req_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, req_array_cntr_1))) == NULL) {
						PyErr_NoMemory();
						return -1;
					}
					object->req_array[req_array_cntr_1] = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, req_array_cntr_1));
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_DsGetMemberships2Request1_getsetters[] = {
	{ discard_const_p(char, "num_req"), py_drsuapi_DsGetMemberships2Request1_get_num_req, py_drsuapi_DsGetMemberships2Request1_set_num_req },
	{ discard_const_p(char, "req_array"), py_drsuapi_DsGetMemberships2Request1_get_req_array, py_drsuapi_DsGetMemberships2Request1_set_req_array },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsGetMemberships2Request1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsGetMemberships2Request1",
	.tp_getset = py_drsuapi_DsGetMemberships2Request1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsGetMemberships2Request1_new,
};

PyObject *py_import_drsuapi_DsGetMemberships2Request(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMemberships2Request *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_DsGetMemberships2Request1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_DsGetMemberships2Request *py_export_drsuapi_DsGetMemberships2Request(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_DsGetMemberships2Request *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Request);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_DsGetMemberships2Request1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_DsSiteCostInfo_get_error_code(PyObject *obj, void *closure)
{
	struct drsuapi_DsSiteCostInfo *object = (struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(obj);
	PyObject *py_error_code;
	py_error_code = PyErr_FromWERROR(object->error_code);
	return py_error_code;
}

static int py_drsuapi_DsSiteCostInfo_set_error_code(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsSiteCostInfo *object = (struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(py_obj);
	object->error_code = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_drsuapi_DsSiteCostInfo_get_site_cost(PyObject *obj, void *closure)
{
	struct drsuapi_DsSiteCostInfo *object = (struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(obj);
	PyObject *py_site_cost;
	py_site_cost = PyInt_FromLong(object->site_cost);
	return py_site_cost;
}

static int py_drsuapi_DsSiteCostInfo_set_site_cost(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_DsSiteCostInfo *object = (struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->site_cost = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_DsSiteCostInfo_getsetters[] = {
	{ discard_const_p(char, "error_code"), py_drsuapi_DsSiteCostInfo_get_error_code, py_drsuapi_DsSiteCostInfo_set_error_code },
	{ discard_const_p(char, "site_cost"), py_drsuapi_DsSiteCostInfo_get_site_cost, py_drsuapi_DsSiteCostInfo_set_site_cost },
	{ NULL }
};

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


static PyTypeObject drsuapi_DsSiteCostInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.DsSiteCostInfo",
	.tp_getset = py_drsuapi_DsSiteCostInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_DsSiteCostInfo_new,
};


static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_num_info(PyObject *obj, void *closure)
{
	struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_num_info;
	py_num_info = PyInt_FromLong(object->num_info);
	return py_num_info;
}

static int py_drsuapi_QuerySitesByCostCtr1_set_num_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_info = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_info(PyObject *obj, void *closure)
{
	struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(object->num_info);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_1;
			for (info_cntr_1 = 0; info_cntr_1 < object->num_info; info_cntr_1++) {
				PyObject *py_info_1;
				py_info_1 = pytalloc_reference_ex(&drsuapi_DsSiteCostInfo_Type, object->info, &object->info[info_cntr_1]);
				PyList_SetItem(py_info, info_cntr_1, py_info_1);
			}
		}
	}
	return py_info;
}

static int py_drsuapi_QuerySitesByCostCtr1_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->info);
	if (value == Py_None) {
		object->info = NULL;
	} else {
		object->info = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int info_cntr_1;
			object->info = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info, PyList_GET_SIZE(value));
			if (!object->info) { return -1;; }
			talloc_set_name_const(object->info, "ARRAY: object->info");
			for (info_cntr_1 = 0; info_cntr_1 < PyList_GET_SIZE(value); info_cntr_1++) {
				PY_CHECK_TYPE(&drsuapi_DsSiteCostInfo_Type, PyList_GET_ITEM(value, info_cntr_1), return -1;);
				if (talloc_reference(object->info, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->info[info_cntr_1] = *(struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_flags_reserved(PyObject *obj, void *closure)
{
	struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(obj);
	PyObject *py_flags_reserved;
	py_flags_reserved = PyInt_FromLong(object->flags_reserved);
	return py_flags_reserved;
}

static int py_drsuapi_QuerySitesByCostCtr1_set_flags_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->flags_reserved = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_QuerySitesByCostCtr1_getsetters[] = {
	{ discard_const_p(char, "num_info"), py_drsuapi_QuerySitesByCostCtr1_get_num_info, py_drsuapi_QuerySitesByCostCtr1_set_num_info },
	{ discard_const_p(char, "info"), py_drsuapi_QuerySitesByCostCtr1_get_info, py_drsuapi_QuerySitesByCostCtr1_set_info },
	{ discard_const_p(char, "flags_reserved"), py_drsuapi_QuerySitesByCostCtr1_get_flags_reserved, py_drsuapi_QuerySitesByCostCtr1_set_flags_reserved },
	{ NULL }
};

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


static PyTypeObject drsuapi_QuerySitesByCostCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.QuerySitesByCostCtr1",
	.tp_getset = py_drsuapi_QuerySitesByCostCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_QuerySitesByCostCtr1_new,
};

PyObject *py_import_drsuapi_QuerySitesByCostCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_QuerySitesByCostCtr *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_QuerySitesByCostCtr1_Type, mem_ctx, &in->ctr1);
			return ret;

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

union drsuapi_QuerySitesByCostCtr *py_export_drsuapi_QuerySitesByCostCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_QuerySitesByCostCtr *ret = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostCtr);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_QuerySitesByCostCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_site_from(PyObject *obj, void *closure)
{
	struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_site_from;
	if (object->site_from == NULL) {
		py_site_from = Py_None;
		Py_INCREF(py_site_from);
	} else {
		if (object->site_from == NULL) {
			py_site_from = Py_None;
			Py_INCREF(py_site_from);
		} else {
			py_site_from = PyUnicode_Decode(object->site_from, strlen(object->site_from), "utf-8", "ignore");
		}
	}
	return py_site_from;
}

static int py_drsuapi_QuerySitesByCostRequest1_set_site_from(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->site_from = NULL;
	} else {
		object->site_from = NULL;
		if (PyUnicode_Check(value)) {
			object->site_from = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->site_from = 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 PyObject *py_drsuapi_QuerySitesByCostRequest1_get_num_req(PyObject *obj, void *closure)
{
	struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_num_req;
	py_num_req = PyInt_FromLong(object->num_req);
	return py_num_req;
}

static int py_drsuapi_QuerySitesByCostRequest1_set_num_req(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_req = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_site_to(PyObject *obj, void *closure)
{
	struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_site_to;
	if (object->site_to == NULL) {
		py_site_to = Py_None;
		Py_INCREF(py_site_to);
	} else {
		py_site_to = PyList_New(object->num_req);
		if (py_site_to == NULL) {
			return NULL;
		}
		{
			int site_to_cntr_1;
			for (site_to_cntr_1 = 0; site_to_cntr_1 < object->num_req; site_to_cntr_1++) {
				PyObject *py_site_to_1;
				if (object->site_to[site_to_cntr_1] == NULL) {
					py_site_to_1 = Py_None;
					Py_INCREF(py_site_to_1);
				} else {
					if (object->site_to[site_to_cntr_1] == NULL) {
						py_site_to_1 = Py_None;
						Py_INCREF(py_site_to_1);
					} else {
						py_site_to_1 = PyUnicode_Decode(object->site_to[site_to_cntr_1], strlen(object->site_to[site_to_cntr_1]), "utf-8", "ignore");
					}
				}
				PyList_SetItem(py_site_to, site_to_cntr_1, py_site_to_1);
			}
		}
	}
	return py_site_to;
}

static int py_drsuapi_QuerySitesByCostRequest1_set_site_to(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->site_to);
	if (value == Py_None) {
		object->site_to = NULL;
	} else {
		object->site_to = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int site_to_cntr_1;
			object->site_to = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->site_to, PyList_GET_SIZE(value));
			if (!object->site_to) { return -1;; }
			talloc_set_name_const(object->site_to, "ARRAY: object->site_to");
			for (site_to_cntr_1 = 0; site_to_cntr_1 < PyList_GET_SIZE(value); site_to_cntr_1++) {
				if (PyList_GET_ITEM(value, site_to_cntr_1) == Py_None) {
					object->site_to[site_to_cntr_1] = NULL;
				} else {
					object->site_to[site_to_cntr_1] = NULL;
					if (PyUnicode_Check(PyList_GET_ITEM(value, site_to_cntr_1))) {
						object->site_to[site_to_cntr_1] = PyString_AS_STRING(PyUnicode_AsEncodedString(PyList_GET_ITEM(value, site_to_cntr_1), "utf-8", "ignore"));
					} else if (PyString_Check(PyList_GET_ITEM(value, site_to_cntr_1))) {
						object->site_to[site_to_cntr_1] = PyString_AS_STRING(PyList_GET_ITEM(value, site_to_cntr_1));
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(PyList_GET_ITEM(value, site_to_cntr_1))->tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_flags(PyObject *obj, void *closure)
{
	struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_drsuapi_QuerySitesByCostRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->flags = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_drsuapi_QuerySitesByCostRequest1_getsetters[] = {
	{ discard_const_p(char, "site_from"), py_drsuapi_QuerySitesByCostRequest1_get_site_from, py_drsuapi_QuerySitesByCostRequest1_set_site_from },
	{ discard_const_p(char, "num_req"), py_drsuapi_QuerySitesByCostRequest1_get_num_req, py_drsuapi_QuerySitesByCostRequest1_set_num_req },
	{ discard_const_p(char, "site_to"), py_drsuapi_QuerySitesByCostRequest1_get_site_to, py_drsuapi_QuerySitesByCostRequest1_set_site_to },
	{ discard_const_p(char, "flags"), py_drsuapi_QuerySitesByCostRequest1_get_flags, py_drsuapi_QuerySitesByCostRequest1_set_flags },
	{ NULL }
};

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


static PyTypeObject drsuapi_QuerySitesByCostRequest1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.QuerySitesByCostRequest1",
	.tp_getset = py_drsuapi_QuerySitesByCostRequest1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_drsuapi_QuerySitesByCostRequest1_new,
};

PyObject *py_import_drsuapi_QuerySitesByCostRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_QuerySitesByCostRequest *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&drsuapi_QuerySitesByCostRequest1_Type, mem_ctx, &in->req1);
			return ret;

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

union drsuapi_QuerySitesByCostRequest *py_export_drsuapi_QuerySitesByCostRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union drsuapi_QuerySitesByCostRequest *ret = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostRequest);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&drsuapi_QuerySitesByCostRequest1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->req1 = *(struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static bool pack_py_drsuapi_DsBind_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsBind *r)
{
	PyObject *py_bind_guid;
	PyObject *py_bind_info;
	const char *kwnames[] = {
		"bind_guid", "bind_info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:drsuapi_DsBind", discard_const_p(char *, kwnames), &py_bind_guid, &py_bind_info)) {
		return false;
	}

	if (py_bind_guid == Py_None) {
		r->in.bind_guid = NULL;
	} else {
		r->in.bind_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, py_bind_guid, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_guid)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.bind_guid = (struct GUID *)pytalloc_get_ptr(py_bind_guid);
	}
	if (py_bind_info == Py_None) {
		r->in.bind_info = NULL;
	} else {
		r->in.bind_info = NULL;
		PY_CHECK_TYPE(&drsuapi_DsBindInfoCtr_Type, py_bind_info, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_info)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.bind_info = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(py_bind_info);
	}
	return true;
}

static PyObject *unpack_py_drsuapi_DsBind_args_out(struct drsuapi_DsBind *r)
{
	PyObject *result;
	PyObject *py_bind_info;
	PyObject *py_bind_handle;
	result = PyTuple_New(2);
	if (r->out.bind_info == NULL) {
		py_bind_info = Py_None;
		Py_INCREF(py_bind_info);
	} else {
		py_bind_info = pytalloc_reference_ex(&drsuapi_DsBindInfoCtr_Type, r->out.bind_info, r->out.bind_info);
	}
	PyTuple_SetItem(result, 0, py_bind_info);
	py_bind_handle = pytalloc_reference_ex(policy_handle_Type, r->out.bind_handle, r->out.bind_handle);
	PyTuple_SetItem(result, 1, py_bind_handle);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsUnbind_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsUnbind *r)
{
	PyObject *py_bind_handle;
	const char *kwnames[] = {
		"bind_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:drsuapi_DsUnbind", discard_const_p(char *, kwnames), &py_bind_handle)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	return true;
}

static PyObject *unpack_py_drsuapi_DsUnbind_args_out(struct drsuapi_DsUnbind *r)
{
	PyObject *result;
	PyObject *py_bind_handle;
	py_bind_handle = pytalloc_reference_ex(policy_handle_Type, r->out.bind_handle, r->out.bind_handle);
	result = py_bind_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsReplicaSync_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaSync *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaSync", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsReplicaSyncRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsReplicaSyncRequest(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_drsuapi_DsReplicaSync_args_out(struct drsuapi_DsReplicaSync *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsGetNCChanges_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetNCChanges *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetNCChanges", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsGetNCChangesRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsGetNCChangesRequest(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_drsuapi_DsGetNCChanges_args_out(struct drsuapi_DsGetNCChanges *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_ctr;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_ctr = py_import_drsuapi_DsGetNCChangesCtr(r->out.ctr, *r->out.level_out, r->out.ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_ctr);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsReplicaUpdateRefs_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaUpdateRefs *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaUpdateRefs", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	{
		union drsuapi_DsReplicaUpdateRefsRequest *req_switch_0;
		req_switch_0 = py_export_drsuapi_DsReplicaUpdateRefsRequest(r, r->in.level, py_req);
		if (req_switch_0 == NULL) {
			return false;
		}
		r->in.req = *req_switch_0;
	}
	return true;
}

static PyObject *unpack_py_drsuapi_DsReplicaUpdateRefs_args_out(struct drsuapi_DsReplicaUpdateRefs *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsReplicaAdd_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaAdd *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaAdd", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	{
		union drsuapi_DsReplicaAddRequest *req_switch_0;
		req_switch_0 = py_export_drsuapi_DsReplicaAddRequest(r, r->in.level, py_req);
		if (req_switch_0 == NULL) {
			return false;
		}
		r->in.req = *req_switch_0;
	}
	return true;
}

static PyObject *unpack_py_drsuapi_DsReplicaAdd_args_out(struct drsuapi_DsReplicaAdd *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsReplicaDel_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaDel *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaDel", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	{
		union drsuapi_DsReplicaDelRequest *req_switch_0;
		req_switch_0 = py_export_drsuapi_DsReplicaDelRequest(r, r->in.level, py_req);
		if (req_switch_0 == NULL) {
			return false;
		}
		r->in.req = *req_switch_0;
	}
	return true;
}

static PyObject *unpack_py_drsuapi_DsReplicaDel_args_out(struct drsuapi_DsReplicaDel *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsReplicaMod_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaMod *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaMod", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	{
		union drsuapi_DsReplicaModRequest *req_switch_0;
		req_switch_0 = py_export_drsuapi_DsReplicaModRequest(r, r->in.level, py_req);
		if (req_switch_0 == NULL) {
			return false;
		}
		r->in.req = *req_switch_0;
	}
	return true;
}

static PyObject *unpack_py_drsuapi_DsReplicaMod_args_out(struct drsuapi_DsReplicaMod *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsGetMemberships_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetMemberships *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetMemberships", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsGetMembershipsRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsGetMembershipsRequest(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_drsuapi_DsGetMemberships_args_out(struct drsuapi_DsGetMemberships *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_ctr;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_ctr = py_import_drsuapi_DsGetMembershipsCtr(r->out.ctr, *r->out.level_out, r->out.ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_ctr);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsGetNT4ChangeLog_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetNT4ChangeLog *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetNT4ChangeLog", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsGetNT4ChangeLogRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsGetNT4ChangeLogRequest(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_drsuapi_DsGetNT4ChangeLog_args_out(struct drsuapi_DsGetNT4ChangeLog *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_info;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_info = py_import_drsuapi_DsGetNT4ChangeLogInfo(r->out.info, *r->out.level_out, r->out.info);
	if (py_info == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_info);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsCrackNames_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsCrackNames *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsCrackNames", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsNameRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsNameRequest(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_drsuapi_DsCrackNames_args_out(struct drsuapi_DsCrackNames *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_ctr;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_ctr = py_import_drsuapi_DsNameCtr(r->out.ctr, *r->out.level_out, r->out.ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_ctr);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsWriteAccountSpn_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsWriteAccountSpn *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsWriteAccountSpn", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsWriteAccountSpnRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsWriteAccountSpnRequest(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_drsuapi_DsWriteAccountSpn_args_out(struct drsuapi_DsWriteAccountSpn *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_res;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_res = py_import_drsuapi_DsWriteAccountSpnResult(r->out.res, *r->out.level_out, r->out.res);
	if (py_res == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_res);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsRemoveDSServer_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsRemoveDSServer *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsRemoveDSServer", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsRemoveDSServerRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsRemoveDSServerRequest(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_drsuapi_DsRemoveDSServer_args_out(struct drsuapi_DsRemoveDSServer *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_res;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_res = py_import_drsuapi_DsRemoveDSServerResult(r->out.res, *r->out.level_out, r->out.res);
	if (py_res == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_res);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsGetDomainControllerInfo_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetDomainControllerInfo *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetDomainControllerInfo", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsGetDCInfoRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsGetDCInfoRequest(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_drsuapi_DsGetDomainControllerInfo_args_out(struct drsuapi_DsGetDomainControllerInfo *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_ctr;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_ctr = py_import_drsuapi_DsGetDCInfoCtr(r->out.ctr, *r->out.level_out, r->out.ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_ctr);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsAddEntry_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsAddEntry *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsAddEntry", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsAddEntryRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsAddEntryRequest(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_drsuapi_DsAddEntry_args_out(struct drsuapi_DsAddEntry *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_ctr;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_ctr = py_import_drsuapi_DsAddEntryCtr(r->out.ctr, *r->out.level_out, r->out.ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_ctr);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsExecuteKCC_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsExecuteKCC *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsExecuteKCC", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsExecuteKCCRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsExecuteKCCRequest(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_drsuapi_DsExecuteKCC_args_out(struct drsuapi_DsExecuteKCC *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsReplicaGetInfo_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaGetInfo *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaGetInfo", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_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.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsReplicaGetInfoRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsReplicaGetInfoRequest(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_drsuapi_DsReplicaGetInfo_args_out(struct drsuapi_DsReplicaGetInfo *r)
{
	PyObject *result;
	PyObject *py_info_type;
	PyObject *py_info;
	result = PyTuple_New(2);
	py_info_type = PyInt_FromLong(*r->out.info_type);
	PyTuple_SetItem(result, 0, py_info_type);
	py_info = py_import_drsuapi_DsReplicaInfo(r->out.info, *r->out.info_type, r->out.info);
	if (py_info == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_info);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_DsGetMemberships2_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetMemberships2 *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetMemberships2", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_DsGetMemberships2Request *req_switch_1;
		req_switch_1 = py_export_drsuapi_DsGetMemberships2Request(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_drsuapi_DsGetMemberships2_args_out(struct drsuapi_DsGetMemberships2 *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_ctr;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_ctr = py_import_drsuapi_DsGetMemberships2Ctr(r->out.ctr, *r->out.level_out, r->out.ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_ctr);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_drsuapi_QuerySitesByCost_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_QuerySitesByCost *r)
{
	PyObject *py_bind_handle;
	PyObject *py_level;
	PyObject *py_req;
	const char *kwnames[] = {
		"bind_handle", "level", "req", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_QuerySitesByCost", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
		return false;
	}

	r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	r->in.req = talloc_ptrtype(r, r->in.req);
	{
		union drsuapi_QuerySitesByCostRequest *req_switch_1;
		req_switch_1 = py_export_drsuapi_QuerySitesByCostRequest(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_drsuapi_QuerySitesByCost_args_out(struct drsuapi_QuerySitesByCost *r)
{
	PyObject *result;
	PyObject *py_level_out;
	PyObject *py_ctr;
	result = PyTuple_New(2);
	py_level_out = PyInt_FromLong(*r->out.level_out);
	PyTuple_SetItem(result, 0, py_level_out);
	py_ctr = py_import_drsuapi_QuerySitesByCostCtr(r->out.ctr, *r->out.level_out, r->out.ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_ctr);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

const struct PyNdrRpcMethodDef py_ndr_drsuapi_methods[] = {
	{ "DsBind", "S.DsBind(bind_guid, bind_info) -> (bind_info, bind_handle)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsBind_r, (py_data_pack_fn)pack_py_drsuapi_DsBind_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsBind_args_out, 0, &ndr_table_drsuapi },
	{ "DsUnbind", "S.DsUnbind(bind_handle) -> bind_handle", (py_dcerpc_call_fn)dcerpc_drsuapi_DsUnbind_r, (py_data_pack_fn)pack_py_drsuapi_DsUnbind_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsUnbind_args_out, 1, &ndr_table_drsuapi },
	{ "DsReplicaSync", "S.DsReplicaSync(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaSync_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaSync_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaSync_args_out, 2, &ndr_table_drsuapi },
	{ "DsGetNCChanges", "S.DsGetNCChanges(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetNCChanges_r, (py_data_pack_fn)pack_py_drsuapi_DsGetNCChanges_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetNCChanges_args_out, 3, &ndr_table_drsuapi },
	{ "DsReplicaUpdateRefs", "S.DsReplicaUpdateRefs(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaUpdateRefs_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaUpdateRefs_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaUpdateRefs_args_out, 4, &ndr_table_drsuapi },
	{ "DsReplicaAdd", "S.DsReplicaAdd(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaAdd_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaAdd_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaAdd_args_out, 5, &ndr_table_drsuapi },
	{ "DsReplicaDel", "S.DsReplicaDel(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaDel_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaDel_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaDel_args_out, 6, &ndr_table_drsuapi },
	{ "DsReplicaMod", "S.DsReplicaMod(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaMod_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaMod_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaMod_args_out, 7, &ndr_table_drsuapi },
	{ "DsGetMemberships", "S.DsGetMemberships(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetMemberships_r, (py_data_pack_fn)pack_py_drsuapi_DsGetMemberships_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetMemberships_args_out, 9, &ndr_table_drsuapi },
	{ "DsGetNT4ChangeLog", "S.DsGetNT4ChangeLog(bind_handle, level, req) -> (level_out, info)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetNT4ChangeLog_r, (py_data_pack_fn)pack_py_drsuapi_DsGetNT4ChangeLog_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetNT4ChangeLog_args_out, 11, &ndr_table_drsuapi },
	{ "DsCrackNames", "S.DsCrackNames(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsCrackNames_r, (py_data_pack_fn)pack_py_drsuapi_DsCrackNames_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsCrackNames_args_out, 12, &ndr_table_drsuapi },
	{ "DsWriteAccountSpn", "S.DsWriteAccountSpn(bind_handle, level, req) -> (level_out, res)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsWriteAccountSpn_r, (py_data_pack_fn)pack_py_drsuapi_DsWriteAccountSpn_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsWriteAccountSpn_args_out, 13, &ndr_table_drsuapi },
	{ "DsRemoveDSServer", "S.DsRemoveDSServer(bind_handle, level, req) -> (level_out, res)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsRemoveDSServer_r, (py_data_pack_fn)pack_py_drsuapi_DsRemoveDSServer_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsRemoveDSServer_args_out, 14, &ndr_table_drsuapi },
	{ "DsGetDomainControllerInfo", "S.DsGetDomainControllerInfo(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetDomainControllerInfo_r, (py_data_pack_fn)pack_py_drsuapi_DsGetDomainControllerInfo_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetDomainControllerInfo_args_out, 16, &ndr_table_drsuapi },
	{ "DsAddEntry", "S.DsAddEntry(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsAddEntry_r, (py_data_pack_fn)pack_py_drsuapi_DsAddEntry_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsAddEntry_args_out, 17, &ndr_table_drsuapi },
	{ "DsExecuteKCC", "S.DsExecuteKCC(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsExecuteKCC_r, (py_data_pack_fn)pack_py_drsuapi_DsExecuteKCC_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsExecuteKCC_args_out, 18, &ndr_table_drsuapi },
	{ "DsReplicaGetInfo", "S.DsReplicaGetInfo(bind_handle, level, req) -> (info_type, info)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaGetInfo_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaGetInfo_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaGetInfo_args_out, 19, &ndr_table_drsuapi },
	{ "DsGetMemberships2", "S.DsGetMemberships2(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetMemberships2_r, (py_data_pack_fn)pack_py_drsuapi_DsGetMemberships2_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetMemberships2_args_out, 21, &ndr_table_drsuapi },
	{ "QuerySitesByCost", "S.QuerySitesByCost(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_QuerySitesByCost_r, (py_data_pack_fn)pack_py_drsuapi_QuerySitesByCost_args_in, (py_data_unpack_fn)unpack_py_drsuapi_QuerySitesByCost_args_out, 24, &ndr_table_drsuapi },
	{ NULL }
};

static PyObject *interface_drsuapi_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_drsuapi);
}

#define PY_DOC_DRSUAPI "Active Directory Replication"
static PyTypeObject drsuapi_InterfaceType = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsuapi.drsuapi",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "drsuapi(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"PY_DOC_DRSUAPI,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_drsuapi_new,
};

static PyMethodDef drsuapi_methods[] = {
	{ NULL, NULL, 0, NULL }
};

void initdrsuapi(void)
{
	PyObject *m;
	PyObject *dep_samba_dcerpc_samr;
	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_samr = PyImport_ImportModule("samba.dcerpc.samr");
	if (dep_samba_dcerpc_samr == NULL)
		return;

	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;

	lsa_String_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "String");
	if (lsa_String_Type == NULL)
		return;

	dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
	if (dom_sid_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;

	GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
	if (GUID_Type == NULL)
		return;

	ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
	if (ClientConnection_Type == NULL)
		return;

	drsuapi_DsBindInfo24_Type.tp_base = Object_Type;

	drsuapi_DsBindInfo28_Type.tp_base = Object_Type;

	drsuapi_DsBindInfo48_Type.tp_base = Object_Type;

	drsuapi_DsBindInfoFallBack_Type.tp_base = Object_Type;

	drsuapi_DsBindInfoCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjectIdentifier_Type.tp_base = Object_Type;

	drsuapi_DsReplicaSyncRequest1_Type.tp_base = Object_Type;

	drsuapi_DsReplicaHighWaterMark_Type.tp_base = Object_Type;

	drsuapi_DsReplicaCursor_Type.tp_base = Object_Type;

	drsuapi_DsReplicaCursorCtrEx_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesRequest5_Type.tp_base = Object_Type;

	drsuapi_DsReplicaOID_Type.tp_base = Object_Type;

	drsuapi_DsReplicaOIDMapping_Type.tp_base = Object_Type;

	drsuapi_DsReplicaOIDMapping_Ctr_Type.tp_base = Object_Type;

	drsuapi_DsPartialAttributeSet_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesRequest8_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesRequest10_Type.tp_base = Object_Type;

	drsuapi_DsReplicaCursor2_Type.tp_base = Object_Type;

	drsuapi_DsReplicaCursor2CtrEx_Type.tp_base = Object_Type;

	drsuapi_DsAttributeValue_Type.tp_base = Object_Type;

	drsuapi_DsAttributeValueCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjectIdentifier3_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjectIdentifier3Binary_Type.tp_base = Object_Type;

	drsuapi_DsReplicaAttribute_Type.tp_base = Object_Type;

	drsuapi_DsReplicaAttributeCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObject_Type.tp_base = Object_Type;

	drsuapi_DsReplicaMetaData_Type.tp_base = Object_Type;

	drsuapi_DsReplicaMetaDataCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjectListItemEx_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesCtr1_Type.tp_base = Object_Type;

	drsuapi_DsReplicaLinkedAttribute_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesCtr6_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesCtr1TS_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesCtr6TS_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesMSZIPCtr1_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesMSZIPCtr6_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesXPRESSCtr1_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesXPRESSCtr6_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesCtr2_Type.tp_base = Object_Type;

	drsuapi_DsGetNCChangesCtr7_Type.tp_base = Object_Type;

	drsuapi_DsReplicaUpdateRefsRequest1_Type.tp_base = Object_Type;

	drsuapi_DsReplicaAddRequest1_Type.tp_base = Object_Type;

	drsuapi_DsReplicaAddRequest2_Type.tp_base = Object_Type;

	drsuapi_DsReplicaDelRequest1_Type.tp_base = Object_Type;

	drsuapi_DsReplicaModRequest1_Type.tp_base = Object_Type;

	drsuapi_DsGetMembershipsCtr1_Type.tp_base = Object_Type;

	drsuapi_DsGetMembershipsRequest1_Type.tp_base = Object_Type;

	drsuapi_DsGetNT4ChangeLogRequest1_Type.tp_base = Object_Type;

	drsuapi_DsGetNT4ChangeLogInfo1_Type.tp_base = Object_Type;

	drsuapi_DsNameString_Type.tp_base = Object_Type;

	drsuapi_DsNameRequest1_Type.tp_base = Object_Type;

	drsuapi_DsNameInfo1_Type.tp_base = Object_Type;

	drsuapi_DsNameCtr1_Type.tp_base = Object_Type;

	drsuapi_DsWriteAccountSpnRequest1_Type.tp_base = Object_Type;

	drsuapi_DsWriteAccountSpnResult1_Type.tp_base = Object_Type;

	drsuapi_DsRemoveDSServerRequest1_Type.tp_base = Object_Type;

	drsuapi_DsRemoveDSServerResult1_Type.tp_base = Object_Type;

	drsuapi_DsGetDCInfoRequest1_Type.tp_base = Object_Type;

	drsuapi_DsGetDCInfo1_Type.tp_base = Object_Type;

	drsuapi_DsGetDCInfoCtr1_Type.tp_base = Object_Type;

	drsuapi_DsGetDCInfo2_Type.tp_base = Object_Type;

	drsuapi_DsGetDCInfoCtr2_Type.tp_base = Object_Type;

	drsuapi_DsGetDCInfo3_Type.tp_base = Object_Type;

	drsuapi_DsGetDCInfoCtr3_Type.tp_base = Object_Type;

	drsuapi_DsGetDCConnection01_Type.tp_base = Object_Type;

	drsuapi_DsGetDCConnectionCtr01_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjectListItem_Type.tp_base = Object_Type;

	drsuapi_DsAddEntryRequest2_Type.tp_base = Object_Type;

	drsuapi_SecBuffer_Type.tp_base = Object_Type;

	drsuapi_SecBufferDesc_Type.tp_base = Object_Type;

	drsuapi_DsAddEntryRequest3_Type.tp_base = Object_Type;

	drsuapi_DsAddEntryErrorInfoX_Type.tp_base = Object_Type;

	drsuapi_DsAddEntry_AttrErr_V1_Type.tp_base = Object_Type;

	drsuapi_DsAddEntry_AttrErrListItem_V1_Type.tp_base = Object_Type;

	drsuapi_DsAddEntryErrorInfo_Attr_V1_Type.tp_base = Object_Type;

	drsuapi_DsAddEntryErrorInfo_Name_V1_Type.tp_base = Object_Type;

	drsuapi_NameResOp_V1_Type.tp_base = Object_Type;

	drsuapi_DsaAddressListItem_V1_Type.tp_base = Object_Type;

	drsuapi_DsAddEntry_RefErrListItem_V1_Type.tp_base = Object_Type;

	drsuapi_DsAddEntryErrorInfo_Referr_V1_Type.tp_base = Object_Type;

	drsuapi_DsAddEntry_ErrData_V1_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjectIdentifier2_Type.tp_base = Object_Type;

	drsuapi_DsAddEntryCtr2_Type.tp_base = Object_Type;

	drsuapi_DsAddEntryCtr3_Type.tp_base = Object_Type;

	drsuapi_DsExecuteKCC1_Type.tp_base = Object_Type;

	drsuapi_DsReplicaGetInfoRequest1_Type.tp_base = Object_Type;

	drsuapi_DsReplicaGetInfoRequest2_Type.tp_base = Object_Type;

	drsuapi_DsReplicaNeighbour_Type.tp_base = Object_Type;

	drsuapi_DsReplicaNeighbourCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaCursorCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjMetaData_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjMetaDataCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaKccDsaFailure_Type.tp_base = Object_Type;

	drsuapi_DsReplicaKccDsaFailuresCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaOp_Type.tp_base = Object_Type;

	drsuapi_DsReplicaOpCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaAttrValMetaData_Type.tp_base = Object_Type;

	drsuapi_DsReplicaAttrValMetaDataCtr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaCursor2Ctr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaCursor3_Type.tp_base = Object_Type;

	drsuapi_DsReplicaCursor3Ctr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjMetaData2_Type.tp_base = Object_Type;

	drsuapi_DsReplicaObjMetaData2Ctr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaAttrValMetaData2_Type.tp_base = Object_Type;

	drsuapi_DsReplicaAttrValMetaData2Ctr_Type.tp_base = Object_Type;

	drsuapi_DsReplicaConnection04_Type.tp_base = Object_Type;

	drsuapi_DsReplicaConnection04Ctr_Type.tp_base = Object_Type;

	drsuapi_DsReplica06_Type.tp_base = Object_Type;

	drsuapi_DsReplica06Ctr_Type.tp_base = Object_Type;

	drsuapi_DsGetMemberships2Ctr1_Type.tp_base = Object_Type;

	drsuapi_DsGetMemberships2Request1_Type.tp_base = Object_Type;

	drsuapi_DsSiteCostInfo_Type.tp_base = Object_Type;

	drsuapi_QuerySitesByCostCtr1_Type.tp_base = Object_Type;

	drsuapi_QuerySitesByCostRequest1_Type.tp_base = Object_Type;

	drsuapi_InterfaceType.tp_base = ClientConnection_Type;

	if (PyType_Ready(&drsuapi_DsBindInfo24_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsBindInfo28_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsBindInfo48_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsBindInfoFallBack_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsBindInfoCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaSyncRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaHighWaterMark_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaCursor_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaCursorCtrEx_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesRequest5_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaOID_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaOIDMapping_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaOIDMapping_Ctr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsPartialAttributeSet_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesRequest8_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesRequest10_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaCursor2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaCursor2CtrEx_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAttributeValue_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAttributeValueCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier3_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier3Binary_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaAttribute_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaAttributeCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObject_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaMetaData_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaMetaDataCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjectListItemEx_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesCtr1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaLinkedAttribute_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesCtr6_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesCtr1TS_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesCtr6TS_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesMSZIPCtr1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesMSZIPCtr6_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesXPRESSCtr1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesXPRESSCtr6_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesCtr2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNCChangesCtr7_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaUpdateRefsRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaAddRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaAddRequest2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaDelRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaModRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetMembershipsCtr1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetMembershipsRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogInfo1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsNameString_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsNameRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsNameInfo1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsNameCtr1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsWriteAccountSpnRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsWriteAccountSpnResult1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsRemoveDSServerRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsRemoveDSServerResult1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCInfoRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCInfo1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCInfoCtr1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCInfo2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCInfoCtr2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCInfo3_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCInfoCtr3_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCConnection01_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetDCConnectionCtr01_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjectListItem_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntryRequest2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_SecBuffer_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_SecBufferDesc_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntryRequest3_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntryErrorInfoX_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntry_AttrErr_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_NameResOp_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsaAddressListItem_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntry_RefErrListItem_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntry_ErrData_V1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntryCtr2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsAddEntryCtr3_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsExecuteKCC1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaGetInfoRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaGetInfoRequest2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaNeighbour_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaNeighbourCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaCursorCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjMetaData_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjMetaDataCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaKccDsaFailure_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaKccDsaFailuresCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaOp_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaOpCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaDataCtr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaCursor2Ctr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaCursor3_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaCursor3Ctr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjMetaData2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaObjMetaData2Ctr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData2_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaConnection04_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplicaConnection04Ctr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplica06_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsReplica06Ctr_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetMemberships2Ctr1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsGetMemberships2Request1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_DsSiteCostInfo_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_QuerySitesByCostCtr1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_QuerySitesByCostRequest1_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_InterfaceType) < 0)
		return;
	if (!PyInterface_AddNdrRpcMethods(&drsuapi_InterfaceType, py_ndr_drsuapi_methods))
		return;

#ifdef PY_DSBINDINFO24_PATCH
	PY_DSBINDINFO24_PATCH(&drsuapi_DsBindInfo24_Type);
#endif
#ifdef PY_DSBINDINFO28_PATCH
	PY_DSBINDINFO28_PATCH(&drsuapi_DsBindInfo28_Type);
#endif
#ifdef PY_DSBINDINFO48_PATCH
	PY_DSBINDINFO48_PATCH(&drsuapi_DsBindInfo48_Type);
#endif
#ifdef PY_DSBINDINFOFALLBACK_PATCH
	PY_DSBINDINFOFALLBACK_PATCH(&drsuapi_DsBindInfoFallBack_Type);
#endif
#ifdef PY_DSBINDINFOCTR_PATCH
	PY_DSBINDINFOCTR_PATCH(&drsuapi_DsBindInfoCtr_Type);
#endif
#ifdef PY_DSREPLICAOBJECTIDENTIFIER_PATCH
	PY_DSREPLICAOBJECTIDENTIFIER_PATCH(&drsuapi_DsReplicaObjectIdentifier_Type);
#endif
#ifdef PY_DSREPLICASYNCREQUEST1_PATCH
	PY_DSREPLICASYNCREQUEST1_PATCH(&drsuapi_DsReplicaSyncRequest1_Type);
#endif
#ifdef PY_DSREPLICAHIGHWATERMARK_PATCH
	PY_DSREPLICAHIGHWATERMARK_PATCH(&drsuapi_DsReplicaHighWaterMark_Type);
#endif
#ifdef PY_DSREPLICACURSOR_PATCH
	PY_DSREPLICACURSOR_PATCH(&drsuapi_DsReplicaCursor_Type);
#endif
#ifdef PY_DSREPLICACURSORCTREX_PATCH
	PY_DSREPLICACURSORCTREX_PATCH(&drsuapi_DsReplicaCursorCtrEx_Type);
#endif
#ifdef PY_DSGETNCCHANGESREQUEST5_PATCH
	PY_DSGETNCCHANGESREQUEST5_PATCH(&drsuapi_DsGetNCChangesRequest5_Type);
#endif
#ifdef PY_DSREPLICAOID_PATCH
	PY_DSREPLICAOID_PATCH(&drsuapi_DsReplicaOID_Type);
#endif
#ifdef PY_DSREPLICAOIDMAPPING_PATCH
	PY_DSREPLICAOIDMAPPING_PATCH(&drsuapi_DsReplicaOIDMapping_Type);
#endif
#ifdef PY_DSREPLICAOIDMAPPING_CTR_PATCH
	PY_DSREPLICAOIDMAPPING_CTR_PATCH(&drsuapi_DsReplicaOIDMapping_Ctr_Type);
#endif
#ifdef PY_DSPARTIALATTRIBUTESET_PATCH
	PY_DSPARTIALATTRIBUTESET_PATCH(&drsuapi_DsPartialAttributeSet_Type);
#endif
#ifdef PY_DSGETNCCHANGESREQUEST8_PATCH
	PY_DSGETNCCHANGESREQUEST8_PATCH(&drsuapi_DsGetNCChangesRequest8_Type);
#endif
#ifdef PY_DSGETNCCHANGESREQUEST10_PATCH
	PY_DSGETNCCHANGESREQUEST10_PATCH(&drsuapi_DsGetNCChangesRequest10_Type);
#endif
#ifdef PY_DSREPLICACURSOR2_PATCH
	PY_DSREPLICACURSOR2_PATCH(&drsuapi_DsReplicaCursor2_Type);
#endif
#ifdef PY_DSREPLICACURSOR2CTREX_PATCH
	PY_DSREPLICACURSOR2CTREX_PATCH(&drsuapi_DsReplicaCursor2CtrEx_Type);
#endif
#ifdef PY_DSATTRIBUTEVALUE_PATCH
	PY_DSATTRIBUTEVALUE_PATCH(&drsuapi_DsAttributeValue_Type);
#endif
#ifdef PY_DSATTRIBUTEVALUECTR_PATCH
	PY_DSATTRIBUTEVALUECTR_PATCH(&drsuapi_DsAttributeValueCtr_Type);
#endif
#ifdef PY_DSREPLICAOBJECTIDENTIFIER3_PATCH
	PY_DSREPLICAOBJECTIDENTIFIER3_PATCH(&drsuapi_DsReplicaObjectIdentifier3_Type);
#endif
#ifdef PY_DSREPLICAOBJECTIDENTIFIER3BINARY_PATCH
	PY_DSREPLICAOBJECTIDENTIFIER3BINARY_PATCH(&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
#endif
#ifdef PY_DSREPLICAATTRIBUTE_PATCH
	PY_DSREPLICAATTRIBUTE_PATCH(&drsuapi_DsReplicaAttribute_Type);
#endif
#ifdef PY_DSREPLICAATTRIBUTECTR_PATCH
	PY_DSREPLICAATTRIBUTECTR_PATCH(&drsuapi_DsReplicaAttributeCtr_Type);
#endif
#ifdef PY_DSREPLICAOBJECT_PATCH
	PY_DSREPLICAOBJECT_PATCH(&drsuapi_DsReplicaObject_Type);
#endif
#ifdef PY_DSREPLICAMETADATA_PATCH
	PY_DSREPLICAMETADATA_PATCH(&drsuapi_DsReplicaMetaData_Type);
#endif
#ifdef PY_DSREPLICAMETADATACTR_PATCH
	PY_DSREPLICAMETADATACTR_PATCH(&drsuapi_DsReplicaMetaDataCtr_Type);
#endif
#ifdef PY_DSREPLICAOBJECTLISTITEMEX_PATCH
	PY_DSREPLICAOBJECTLISTITEMEX_PATCH(&drsuapi_DsReplicaObjectListItemEx_Type);
#endif
#ifdef PY_DSGETNCCHANGESCTR1_PATCH
	PY_DSGETNCCHANGESCTR1_PATCH(&drsuapi_DsGetNCChangesCtr1_Type);
#endif
#ifdef PY_DSREPLICALINKEDATTRIBUTE_PATCH
	PY_DSREPLICALINKEDATTRIBUTE_PATCH(&drsuapi_DsReplicaLinkedAttribute_Type);
#endif
#ifdef PY_DSGETNCCHANGESCTR6_PATCH
	PY_DSGETNCCHANGESCTR6_PATCH(&drsuapi_DsGetNCChangesCtr6_Type);
#endif
#ifdef PY_DSGETNCCHANGESCTR1TS_PATCH
	PY_DSGETNCCHANGESCTR1TS_PATCH(&drsuapi_DsGetNCChangesCtr1TS_Type);
#endif
#ifdef PY_DSGETNCCHANGESCTR6TS_PATCH
	PY_DSGETNCCHANGESCTR6TS_PATCH(&drsuapi_DsGetNCChangesCtr6TS_Type);
#endif
#ifdef PY_DSGETNCCHANGESMSZIPCTR1_PATCH
	PY_DSGETNCCHANGESMSZIPCTR1_PATCH(&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
#endif
#ifdef PY_DSGETNCCHANGESMSZIPCTR6_PATCH
	PY_DSGETNCCHANGESMSZIPCTR6_PATCH(&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
#endif
#ifdef PY_DSGETNCCHANGESXPRESSCTR1_PATCH
	PY_DSGETNCCHANGESXPRESSCTR1_PATCH(&drsuapi_DsGetNCChangesXPRESSCtr1_Type);
#endif
#ifdef PY_DSGETNCCHANGESXPRESSCTR6_PATCH
	PY_DSGETNCCHANGESXPRESSCTR6_PATCH(&drsuapi_DsGetNCChangesXPRESSCtr6_Type);
#endif
#ifdef PY_DSGETNCCHANGESCTR2_PATCH
	PY_DSGETNCCHANGESCTR2_PATCH(&drsuapi_DsGetNCChangesCtr2_Type);
#endif
#ifdef PY_DSGETNCCHANGESCTR7_PATCH
	PY_DSGETNCCHANGESCTR7_PATCH(&drsuapi_DsGetNCChangesCtr7_Type);
#endif
#ifdef PY_DSREPLICAUPDATEREFSREQUEST1_PATCH
	PY_DSREPLICAUPDATEREFSREQUEST1_PATCH(&drsuapi_DsReplicaUpdateRefsRequest1_Type);
#endif
#ifdef PY_DSREPLICAADDREQUEST1_PATCH
	PY_DSREPLICAADDREQUEST1_PATCH(&drsuapi_DsReplicaAddRequest1_Type);
#endif
#ifdef PY_DSREPLICAADDREQUEST2_PATCH
	PY_DSREPLICAADDREQUEST2_PATCH(&drsuapi_DsReplicaAddRequest2_Type);
#endif
#ifdef PY_DSREPLICADELREQUEST1_PATCH
	PY_DSREPLICADELREQUEST1_PATCH(&drsuapi_DsReplicaDelRequest1_Type);
#endif
#ifdef PY_DSREPLICAMODREQUEST1_PATCH
	PY_DSREPLICAMODREQUEST1_PATCH(&drsuapi_DsReplicaModRequest1_Type);
#endif
#ifdef PY_DSGETMEMBERSHIPSCTR1_PATCH
	PY_DSGETMEMBERSHIPSCTR1_PATCH(&drsuapi_DsGetMembershipsCtr1_Type);
#endif
#ifdef PY_DSGETMEMBERSHIPSREQUEST1_PATCH
	PY_DSGETMEMBERSHIPSREQUEST1_PATCH(&drsuapi_DsGetMembershipsRequest1_Type);
#endif
#ifdef PY_DSGETNT4CHANGELOGREQUEST1_PATCH
	PY_DSGETNT4CHANGELOGREQUEST1_PATCH(&drsuapi_DsGetNT4ChangeLogRequest1_Type);
#endif
#ifdef PY_DSGETNT4CHANGELOGINFO1_PATCH
	PY_DSGETNT4CHANGELOGINFO1_PATCH(&drsuapi_DsGetNT4ChangeLogInfo1_Type);
#endif
#ifdef PY_DSNAMESTRING_PATCH
	PY_DSNAMESTRING_PATCH(&drsuapi_DsNameString_Type);
#endif
#ifdef PY_DSNAMEREQUEST1_PATCH
	PY_DSNAMEREQUEST1_PATCH(&drsuapi_DsNameRequest1_Type);
#endif
#ifdef PY_DSNAMEINFO1_PATCH
	PY_DSNAMEINFO1_PATCH(&drsuapi_DsNameInfo1_Type);
#endif
#ifdef PY_DSNAMECTR1_PATCH
	PY_DSNAMECTR1_PATCH(&drsuapi_DsNameCtr1_Type);
#endif
#ifdef PY_DSWRITEACCOUNTSPNREQUEST1_PATCH
	PY_DSWRITEACCOUNTSPNREQUEST1_PATCH(&drsuapi_DsWriteAccountSpnRequest1_Type);
#endif
#ifdef PY_DSWRITEACCOUNTSPNRESULT1_PATCH
	PY_DSWRITEACCOUNTSPNRESULT1_PATCH(&drsuapi_DsWriteAccountSpnResult1_Type);
#endif
#ifdef PY_DSREMOVEDSSERVERREQUEST1_PATCH
	PY_DSREMOVEDSSERVERREQUEST1_PATCH(&drsuapi_DsRemoveDSServerRequest1_Type);
#endif
#ifdef PY_DSREMOVEDSSERVERRESULT1_PATCH
	PY_DSREMOVEDSSERVERRESULT1_PATCH(&drsuapi_DsRemoveDSServerResult1_Type);
#endif
#ifdef PY_DSGETDCINFOREQUEST1_PATCH
	PY_DSGETDCINFOREQUEST1_PATCH(&drsuapi_DsGetDCInfoRequest1_Type);
#endif
#ifdef PY_DSGETDCINFO1_PATCH
	PY_DSGETDCINFO1_PATCH(&drsuapi_DsGetDCInfo1_Type);
#endif
#ifdef PY_DSGETDCINFOCTR1_PATCH
	PY_DSGETDCINFOCTR1_PATCH(&drsuapi_DsGetDCInfoCtr1_Type);
#endif
#ifdef PY_DSGETDCINFO2_PATCH
	PY_DSGETDCINFO2_PATCH(&drsuapi_DsGetDCInfo2_Type);
#endif
#ifdef PY_DSGETDCINFOCTR2_PATCH
	PY_DSGETDCINFOCTR2_PATCH(&drsuapi_DsGetDCInfoCtr2_Type);
#endif
#ifdef PY_DSGETDCINFO3_PATCH
	PY_DSGETDCINFO3_PATCH(&drsuapi_DsGetDCInfo3_Type);
#endif
#ifdef PY_DSGETDCINFOCTR3_PATCH
	PY_DSGETDCINFOCTR3_PATCH(&drsuapi_DsGetDCInfoCtr3_Type);
#endif
#ifdef PY_DSGETDCCONNECTION01_PATCH
	PY_DSGETDCCONNECTION01_PATCH(&drsuapi_DsGetDCConnection01_Type);
#endif
#ifdef PY_DSGETDCCONNECTIONCTR01_PATCH
	PY_DSGETDCCONNECTIONCTR01_PATCH(&drsuapi_DsGetDCConnectionCtr01_Type);
#endif
#ifdef PY_DSREPLICAOBJECTLISTITEM_PATCH
	PY_DSREPLICAOBJECTLISTITEM_PATCH(&drsuapi_DsReplicaObjectListItem_Type);
#endif
#ifdef PY_DSADDENTRYREQUEST2_PATCH
	PY_DSADDENTRYREQUEST2_PATCH(&drsuapi_DsAddEntryRequest2_Type);
#endif
#ifdef PY_SECBUFFER_PATCH
	PY_SECBUFFER_PATCH(&drsuapi_SecBuffer_Type);
#endif
#ifdef PY_SECBUFFERDESC_PATCH
	PY_SECBUFFERDESC_PATCH(&drsuapi_SecBufferDesc_Type);
#endif
#ifdef PY_DSADDENTRYREQUEST3_PATCH
	PY_DSADDENTRYREQUEST3_PATCH(&drsuapi_DsAddEntryRequest3_Type);
#endif
#ifdef PY_DSADDENTRYERRORINFOX_PATCH
	PY_DSADDENTRYERRORINFOX_PATCH(&drsuapi_DsAddEntryErrorInfoX_Type);
#endif
#ifdef PY_DSADDENTRY_ATTRERR_V1_PATCH
	PY_DSADDENTRY_ATTRERR_V1_PATCH(&drsuapi_DsAddEntry_AttrErr_V1_Type);
#endif
#ifdef PY_DSADDENTRY_ATTRERRLISTITEM_V1_PATCH
	PY_DSADDENTRY_ATTRERRLISTITEM_V1_PATCH(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
#endif
#ifdef PY_DSADDENTRYERRORINFO_ATTR_V1_PATCH
	PY_DSADDENTRYERRORINFO_ATTR_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
#endif
#ifdef PY_DSADDENTRYERRORINFO_NAME_V1_PATCH
	PY_DSADDENTRYERRORINFO_NAME_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
#endif
#ifdef PY_NAMERESOP_V1_PATCH
	PY_NAMERESOP_V1_PATCH(&drsuapi_NameResOp_V1_Type);
#endif
#ifdef PY_DSAADDRESSLISTITEM_V1_PATCH
	PY_DSAADDRESSLISTITEM_V1_PATCH(&drsuapi_DsaAddressListItem_V1_Type);
#endif
#ifdef PY_DSADDENTRY_REFERRLISTITEM_V1_PATCH
	PY_DSADDENTRY_REFERRLISTITEM_V1_PATCH(&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
#endif
#ifdef PY_DSADDENTRYERRORINFO_REFERR_V1_PATCH
	PY_DSADDENTRYERRORINFO_REFERR_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
#endif
#ifdef PY_DSADDENTRY_ERRDATA_V1_PATCH
	PY_DSADDENTRY_ERRDATA_V1_PATCH(&drsuapi_DsAddEntry_ErrData_V1_Type);
#endif
#ifdef PY_DSREPLICAOBJECTIDENTIFIER2_PATCH
	PY_DSREPLICAOBJECTIDENTIFIER2_PATCH(&drsuapi_DsReplicaObjectIdentifier2_Type);
#endif
#ifdef PY_DSADDENTRYCTR2_PATCH
	PY_DSADDENTRYCTR2_PATCH(&drsuapi_DsAddEntryCtr2_Type);
#endif
#ifdef PY_DSADDENTRYCTR3_PATCH
	PY_DSADDENTRYCTR3_PATCH(&drsuapi_DsAddEntryCtr3_Type);
#endif
#ifdef PY_DSEXECUTEKCC1_PATCH
	PY_DSEXECUTEKCC1_PATCH(&drsuapi_DsExecuteKCC1_Type);
#endif
#ifdef PY_DSREPLICAGETINFOREQUEST1_PATCH
	PY_DSREPLICAGETINFOREQUEST1_PATCH(&drsuapi_DsReplicaGetInfoRequest1_Type);
#endif
#ifdef PY_DSREPLICAGETINFOREQUEST2_PATCH
	PY_DSREPLICAGETINFOREQUEST2_PATCH(&drsuapi_DsReplicaGetInfoRequest2_Type);
#endif
#ifdef PY_DSREPLICANEIGHBOUR_PATCH
	PY_DSREPLICANEIGHBOUR_PATCH(&drsuapi_DsReplicaNeighbour_Type);
#endif
#ifdef PY_DSREPLICANEIGHBOURCTR_PATCH
	PY_DSREPLICANEIGHBOURCTR_PATCH(&drsuapi_DsReplicaNeighbourCtr_Type);
#endif
#ifdef PY_DSREPLICACURSORCTR_PATCH
	PY_DSREPLICACURSORCTR_PATCH(&drsuapi_DsReplicaCursorCtr_Type);
#endif
#ifdef PY_DSREPLICAOBJMETADATA_PATCH
	PY_DSREPLICAOBJMETADATA_PATCH(&drsuapi_DsReplicaObjMetaData_Type);
#endif
#ifdef PY_DSREPLICAOBJMETADATACTR_PATCH
	PY_DSREPLICAOBJMETADATACTR_PATCH(&drsuapi_DsReplicaObjMetaDataCtr_Type);
#endif
#ifdef PY_DSREPLICAKCCDSAFAILURE_PATCH
	PY_DSREPLICAKCCDSAFAILURE_PATCH(&drsuapi_DsReplicaKccDsaFailure_Type);
#endif
#ifdef PY_DSREPLICAKCCDSAFAILURESCTR_PATCH
	PY_DSREPLICAKCCDSAFAILURESCTR_PATCH(&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
#endif
#ifdef PY_DSREPLICAOP_PATCH
	PY_DSREPLICAOP_PATCH(&drsuapi_DsReplicaOp_Type);
#endif
#ifdef PY_DSREPLICAOPCTR_PATCH
	PY_DSREPLICAOPCTR_PATCH(&drsuapi_DsReplicaOpCtr_Type);
#endif
#ifdef PY_DSREPLICAATTRVALMETADATA_PATCH
	PY_DSREPLICAATTRVALMETADATA_PATCH(&drsuapi_DsReplicaAttrValMetaData_Type);
#endif
#ifdef PY_DSREPLICAATTRVALMETADATACTR_PATCH
	PY_DSREPLICAATTRVALMETADATACTR_PATCH(&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
#endif
#ifdef PY_DSREPLICACURSOR2CTR_PATCH
	PY_DSREPLICACURSOR2CTR_PATCH(&drsuapi_DsReplicaCursor2Ctr_Type);
#endif
#ifdef PY_DSREPLICACURSOR3_PATCH
	PY_DSREPLICACURSOR3_PATCH(&drsuapi_DsReplicaCursor3_Type);
#endif
#ifdef PY_DSREPLICACURSOR3CTR_PATCH
	PY_DSREPLICACURSOR3CTR_PATCH(&drsuapi_DsReplicaCursor3Ctr_Type);
#endif
#ifdef PY_DSREPLICAOBJMETADATA2_PATCH
	PY_DSREPLICAOBJMETADATA2_PATCH(&drsuapi_DsReplicaObjMetaData2_Type);
#endif
#ifdef PY_DSREPLICAOBJMETADATA2CTR_PATCH
	PY_DSREPLICAOBJMETADATA2CTR_PATCH(&drsuapi_DsReplicaObjMetaData2Ctr_Type);
#endif
#ifdef PY_DSREPLICAATTRVALMETADATA2_PATCH
	PY_DSREPLICAATTRVALMETADATA2_PATCH(&drsuapi_DsReplicaAttrValMetaData2_Type);
#endif
#ifdef PY_DSREPLICAATTRVALMETADATA2CTR_PATCH
	PY_DSREPLICAATTRVALMETADATA2CTR_PATCH(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
#endif
#ifdef PY_DSREPLICACONNECTION04_PATCH
	PY_DSREPLICACONNECTION04_PATCH(&drsuapi_DsReplicaConnection04_Type);
#endif
#ifdef PY_DSREPLICACONNECTION04CTR_PATCH
	PY_DSREPLICACONNECTION04CTR_PATCH(&drsuapi_DsReplicaConnection04Ctr_Type);
#endif
#ifdef PY_DSREPLICA06_PATCH
	PY_DSREPLICA06_PATCH(&drsuapi_DsReplica06_Type);
#endif
#ifdef PY_DSREPLICA06CTR_PATCH
	PY_DSREPLICA06CTR_PATCH(&drsuapi_DsReplica06Ctr_Type);
#endif
#ifdef PY_DSGETMEMBERSHIPS2CTR1_PATCH
	PY_DSGETMEMBERSHIPS2CTR1_PATCH(&drsuapi_DsGetMemberships2Ctr1_Type);
#endif
#ifdef PY_DSGETMEMBERSHIPS2REQUEST1_PATCH
	PY_DSGETMEMBERSHIPS2REQUEST1_PATCH(&drsuapi_DsGetMemberships2Request1_Type);
#endif
#ifdef PY_DSSITECOSTINFO_PATCH
	PY_DSSITECOSTINFO_PATCH(&drsuapi_DsSiteCostInfo_Type);
#endif
#ifdef PY_QUERYSITESBYCOSTCTR1_PATCH
	PY_QUERYSITESBYCOSTCTR1_PATCH(&drsuapi_QuerySitesByCostCtr1_Type);
#endif
#ifdef PY_QUERYSITESBYCOSTREQUEST1_PATCH
	PY_QUERYSITESBYCOSTREQUEST1_PATCH(&drsuapi_QuerySitesByCostRequest1_Type);
#endif
#ifdef PY_DRSUAPI_PATCH
	PY_DRSUAPI_PATCH(&drsuapi_InterfaceType);
#endif

	m = Py_InitModule3("drsuapi", drsuapi_methods, "drsuapi DCE/RPC");
	if (m == NULL)
		return;

	PyModule_AddObject(m, "DRSUAPI_DIRERR_REFERRAL", PyInt_FromLong(DRSUAPI_DIRERR_REFERRAL));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", PyInt_FromLong(DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY));
	PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_NOW", PyInt_FromLong(DRSUAPI_DRS_FULL_SYNC_NOW));
	PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_PAS", PyInt_FromLong(DRSUAPI_DRS_SYNC_PAS));
	PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_REQ_ROLE", PyInt_FromLong(DRSUAPI_EXOP_FSMO_REQ_ROLE));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS));
	PyModule_AddObject(m, "DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS", PyInt_FromLong(DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS));
	PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_FLAGS", PyInt_FromLong(DRSUAPI_DRS_UPDATE_FLAGS));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_ROLES", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_ROLES));
	PyModule_AddObject(m, "DRSUAPI_ATTID_objectClass", PyInt_FromLong(DRSUAPI_ATTID_objectClass));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_CANONICAL", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_CANONICAL));
	PyModule_AddObject(m, "DRSUAPI_ATTID_systemMayContain", PyInt_FromLong(DRSUAPI_ATTID_systemMayContain));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION));
	PyModule_AddObject(m, "DRSUAPI_DIRERR_OK", PyInt_FromLong(DRSUAPI_DIRERR_OK));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_NCS", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_NCS));
	PyModule_AddObject(m, "DRSUAPI_ATTID_lmPwdHistory", PyInt_FromLong(DRSUAPI_ATTID_lmPwdHistory));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_GET_INFO2", PyInt_FromLong(DRSUAPI_DS_REPLICA_GET_INFO2));
	PyModule_AddObject(m, "DRSUAPI_ATTID_systemAuxiliaryClass", PyInt_FromLong(DRSUAPI_ATTID_systemAuxiliaryClass));
	PyModule_AddObject(m, "DRSUAPI_ATTID_serverReferenceBL", PyInt_FromLong(DRSUAPI_ATTID_serverReferenceBL));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_BASE", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_BASE));
	PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_RID_ALLOC", PyInt_FromLong(DRSUAPI_EXOP_FSMO_RID_ALLOC));
	PyModule_AddObject(m, "DRSUAPI_DRS_DEL_REF", PyInt_FromLong(DRSUAPI_DRS_DEL_REF));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_DELETE", PyInt_FromLong(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED", PyInt_FromLong(DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED));
	PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_1", PyInt_FromLong(DRSUAPI_DC_INFO_CTR_1));
	PyModule_AddObject(m, "DRSUAPI_ATTID_governsID", PyInt_FromLong(DRSUAPI_ATTID_governsID));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL", PyInt_FromLong(DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL));
	PyModule_AddObject(m, "DRSUAPI_ATTID_initialAuthOutgoing", PyInt_FromLong(DRSUAPI_ATTID_initialAuthOutgoing));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_TOKEN", PyInt_FromLong(DRSUAPI_SECBUFFER_TOKEN));
	PyModule_AddObject(m, "DRSUAPI_ATTID_attributeID", PyInt_FromLong(DRSUAPI_ATTID_attributeID));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_PARAM_ERROR", PyInt_FromLong(DRSUAPI_EXOP_ERR_PARAM_ERROR));
	PyModule_AddObject(m, "DRSUAPI_DRS_ASYNC_REP", PyInt_FromLong(DRSUAPI_DRS_ASYNC_REP));
	PyModule_AddObject(m, "DRSUAPI_ATTID_dMDLocation", PyInt_FromLong(DRSUAPI_ATTID_dMDLocation));
	PyModule_AddObject(m, "DRSUAPI_DRS_PREEMPTED", PyInt_FromLong(DRSUAPI_DRS_PREEMPTED));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_GET_INFO", PyInt_FromLong(DRSUAPI_DS_REPLICA_GET_INFO));
	PyModule_AddObject(m, "DRSUAPI_DRS_NEVER_SYNCED", PyInt_FromLong(DRSUAPI_DRS_NEVER_SYNCED));
	PyModule_AddObject(m, "DRSUAPI_ATTID_countryCode", PyInt_FromLong(DRSUAPI_ATTID_countryCode));
	PyModule_AddObject(m, "DRSUAPI_ATTID_wellKnownObjects", PyInt_FromLong(DRSUAPI_ATTID_wellKnownObjects));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2));
	PyModule_AddObject(m, "DRSUAPI_ATTID_lastKnownParent", PyInt_FromLong(DRSUAPI_ATTID_lastKnownParent));
	PyModule_AddObject(m, "DRSUAPI_ATTID_objectVersion", PyInt_FromLong(DRSUAPI_ATTID_objectVersion));
	PyModule_AddObject(m, "DRSUAPI_ATTID_possSuperiors", PyInt_FromLong(DRSUAPI_ATTID_possSuperiors));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SITES", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_SITES));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_ADD", PyInt_FromLong(DRSUAPI_DS_REPLICA_OP_TYPE_ADD));
	PyModule_AddObject(m, "DRSUAPI_ATTID_comment", PyInt_FromLong(DRSUAPI_ATTID_comment));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_PENDING_OPS", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS));
	PyModule_AddObject(m, "DRSUAPI_DIRERR_NAME", PyInt_FromLong(DRSUAPI_DIRERR_NAME));
	PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID_W2K", PyString_FromString("6abec3d1-3054-41c8-a362-5a0c5b7d5d71"));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN));
	PyModule_AddObject(m, "DRSUAPI_ATTID_servicePrincipalName", PyInt_FromLong(DRSUAPI_ATTID_servicePrincipalName));
	PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_ADDRESS", PyInt_FromLong(DRSUAPI_DRS_UPDATE_ADDRESS));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION));
	PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_SUPERIOR", PyInt_FromLong(DRSUAPI_CH_REFTYPE_SUPERIOR));
	PyModule_AddObject(m, "DRSUAPI_DRS_NONGC_RO_REP", PyInt_FromLong(DRSUAPI_DRS_NONGC_RO_REP));
	PyModule_AddObject(m, "DRSUAPI_ATTID_fSMORoleOwner", PyInt_FromLong(DRSUAPI_ATTID_fSMORoleOwner));
	PyModule_AddObject(m, "DRSUAPI_DRS_USE_COMPRESSION", PyInt_FromLong(DRSUAPI_DRS_USE_COMPRESSION));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR", PyInt_FromLong(DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR));
	PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_NSSR", PyInt_FromLong(DRSUAPI_CH_REFTYPE_NSSR));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_GUID", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_GUID));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_STREAM_TRAILER", PyInt_FromLong(DRSUAPI_SECBUFFER_STREAM_TRAILER));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FMSO_PENDING_OP", PyInt_FromLong(DRSUAPI_EXOP_ERR_FMSO_PENDING_OP));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UNKNOWN_OP", PyInt_FromLong(DRSUAPI_EXOP_ERR_UNKNOWN_OP));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3));
	PyModule_AddObject(m, "DRSUAPI_ATTID_systemPossSuperiors", PyInt_FromLong(DRSUAPI_ATTID_systemPossSuperiors));
	PyModule_AddObject(m, "DRSUAPI_ATTID_sAMAccountType", PyInt_FromLong(DRSUAPI_ATTID_sAMAccountType));
	PyModule_AddObject(m, "DRSUAPI_ATTID_instanceType", PyInt_FromLong(DRSUAPI_ATTID_instanceType));
	PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_HasDomainNCs", PyInt_FromLong(DRSUAPI_ATTID_msDS_HasDomainNCs));
	PyModule_AddObject(m, "DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING", PyInt_FromLong(DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING));
	PyModule_AddObject(m, "DRSUAPI_DRS_GET_ANC", PyInt_FromLong(DRSUAPI_DRS_GET_ANC));
	PyModule_AddObject(m, "DRSUAPI_DRS_TWOWAY_SYNC", PyInt_FromLong(DRSUAPI_DRS_TWOWAY_SYNC));
	PyModule_AddObject(m, "DRSUAPI_ATTID_sAMAccountName", PyInt_FromLong(DRSUAPI_ATTID_sAMAccountName));
	PyModule_AddObject(m, "DRSUAPI_DRS_INIT_SYNC_NOW", PyInt_FromLong(DRSUAPI_DRS_INIT_SYNC_NOW));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5));
	PyModule_AddObject(m, "DRSUAPI_DRS_IGNORE_ERROR", PyInt_FromLong(DRSUAPI_DRS_IGNORE_ERROR));
	PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_Behavior_Version", PyInt_FromLong(DRSUAPI_ATTID_msDS_Behavior_Version));
	PyModule_AddObject(m, "DRSUAPI_ATTID_showInAdvancedViewOnly", PyInt_FromLong(DRSUAPI_ATTID_showInAdvancedViewOnly));
	PyModule_AddObject(m, "DRSUAPI_DRS_PER_SYNC", PyInt_FromLong(DRSUAPI_DRS_PER_SYNC));
	PyModule_AddObject(m, "DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION", PyInt_FromLong(DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION));
	PyModule_AddObject(m, "DRSUAPI_ATTID_unicodePwd", PyInt_FromLong(DRSUAPI_ATTID_unicodePwd));
	PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS", PyInt_FromLong(DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_EMPTY", PyInt_FromLong(DRSUAPI_SECBUFFER_EMPTY));
	PyModule_AddObject(m, "DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID", PyString_FromString("E3514235-4B06-11D1-AB04-00C04FC2DCD2"));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_STREAM_HEADER", PyInt_FromLong(DRSUAPI_SECBUFFER_STREAM_HEADER));
	PyModule_AddObject(m, "DRSUAPI_ATTID_userAccountControl", PyInt_FromLong(DRSUAPI_ATTID_userAccountControl));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN));
	PyModule_AddObject(m, "DRSUAPI_DRS_ASYNC_OP", PyInt_FromLong(DRSUAPI_DRS_ASYNC_OP));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL));
	PyModule_AddObject(m, "DRSUAPI_ATTID_trustAuthOutgoing", PyInt_FromLong(DRSUAPI_ATTID_trustAuthOutgoing));
	PyModule_AddObject(m, "DRSUAPI_ATTID_invocationId", PyInt_FromLong(DRSUAPI_ATTID_invocationId));
	PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR", PyInt_FromLong(0x1));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_DATA", PyInt_FromLong(DRSUAPI_SECBUFFER_DATA));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_GCVERIFY", PyInt_FromLong(DRSUAPI_DS_NAME_FLAG_GCVERIFY));
	PyModule_AddObject(m, "DRSUAPI_ATTID_homeDirectory", PyInt_FromLong(DRSUAPI_ATTID_homeDirectory));
	PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_WHOLE_SUBTREE", PyInt_FromLong(DRSUAPI_SE_CHOICE_WHOLE_SUBTREE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_logonHours", PyInt_FromLong(DRSUAPI_ATTID_logonHours));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_NO_FLAGS", PyInt_FromLong(DRSUAPI_DS_NAME_FLAG_NO_FLAGS));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3));
	PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_IMMED_CHLDRN", PyInt_FromLong(DRSUAPI_SE_CHOICE_IMMED_CHLDRN));
	PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_URGENT", PyInt_FromLong(DRSUAPI_DRS_SYNC_URGENT));
	PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS", PyInt_FromLong(DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS));
	PyModule_AddObject(m, "DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG", PyInt_FromLong(DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG));
	PyModule_AddObject(m, "DRSUAPI_ATTID_subClassOf", PyInt_FromLong(DRSUAPI_ATTID_subClassOf));
	PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID", PyString_FromString("e24d201a-4fd6-11d1-a3da-0000f875ae0d"));
	PyModule_AddObject(m, "DRSUAPI_DRS_ADD_REF", PyInt_FromLong(DRSUAPI_DRS_ADD_REF));
	PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_hasMasterNCs", PyInt_FromLong(DRSUAPI_ATTID_msDS_hasMasterNCs));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_SUCCESS", PyInt_FromLong(DRSUAPI_EXOP_ERR_SUCCESS));
	PyModule_AddObject(m, "DRSUAPI_ATTID_pwdLastSet", PyInt_FromLong(DRSUAPI_ATTID_pwdLastSet));
	PyModule_AddObject(m, "DRSUAPI_ATTID_groupType", PyInt_FromLong(DRSUAPI_ATTID_groupType));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_DIR_ERROR", PyInt_FromLong(DRSUAPI_EXOP_ERR_DIR_ERROR));
	PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2", PyInt_FromLong(DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2));
	PyModule_AddObject(m, "DRSUAPI_COMPRESSION_TYPE_XPRESS", PyInt_FromLong(DRSUAPI_COMPRESSION_TYPE_XPRESS));
	PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_KeyVersionNumber", PyInt_FromLong(DRSUAPI_ATTID_msDS_KeyVersionNumber));
	PyModule_AddObject(m, "DRSUAPI_ATTID_systemMustContain", PyInt_FromLong(DRSUAPI_ATTID_systemMustContain));
	PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_3", PyInt_FromLong(DRSUAPI_DC_INFO_CTR_3));
	PyModule_AddObject(m, "DRSUAPI_ATTID_ntPwdHistory", PyInt_FromLong(DRSUAPI_ATTID_ntPwdHistory));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY));
	PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS", PyInt_FromLong(DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL", PyInt_FromLong(DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL));
	PyModule_AddObject(m, "DRSUAPI_DIRERR_ATTRIBUTE", PyInt_FromLong(DRSUAPI_DIRERR_ATTRIBUTE));
	PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_NOTIFICATION", PyInt_FromLong(DRSUAPI_DRS_UPDATE_NOTIFICATION));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS3", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_CURSORS3));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_OK", PyInt_FromLong(DRSUAPI_DS_NAME_STATUS_OK));
	PyModule_AddObject(m, "DRSUAPI_ATTID_serverReference", PyInt_FromLong(DRSUAPI_ATTID_serverReference));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING", PyInt_FromLong(DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING));
	PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_REQ_PDC", PyInt_FromLong(DRSUAPI_EXOP_FSMO_REQ_PDC));
	PyModule_AddObject(m, "DRSUAPI_ATTID_adminDisplayName", PyInt_FromLong(DRSUAPI_ATTID_adminDisplayName));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_CURSORS));
	PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_SCHEDULE", PyInt_FromLong(DRSUAPI_DRS_UPDATE_SCHEDULE));
	PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID_W2K3", PyString_FromString("6afab99c-6e26-464a-975f-f58f105218bc"));
	PyModule_AddObject(m, "DRSUAPI_ATTID_attributeSyntax", PyInt_FromLong(DRSUAPI_ATTID_attributeSyntax));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2));
	PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2", PyInt_FromLong(DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2));
	PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_REPLACE", PyInt_FromLong(DRSUAPI_DS_SPN_OPERATION_REPLACE));
	PyModule_AddObject(m, "DRSUAPI_DRS_REF_OK", PyInt_FromLong(DRSUAPI_DRS_REF_OK));
	PyModule_AddObject(m, "DRSUAPI_ATTID_isSingleValued", PyInt_FromLong(DRSUAPI_ATTID_isSingleValued));
	PyModule_AddObject(m, "DRSUAPI_ATTID_currentValue", PyInt_FromLong(DRSUAPI_ATTID_currentValue));
	PyModule_AddObject(m, "DRSUAPI_DRS_LOCAL_ONLY", PyInt_FromLong(DRSUAPI_DRS_LOCAL_ONLY));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADAM", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_ADAM));
	PyModule_AddObject(m, "DRSUAPI_DRS_CRITICAL_ONLY", PyInt_FromLong(DRSUAPI_DRS_CRITICAL_ONLY));
	PyModule_AddObject(m, "DRSUAPI_ATTID_description", PyInt_FromLong(DRSUAPI_ATTID_description));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_ACCESS_DENIED", PyInt_FromLong(DRSUAPI_EXOP_ERR_ACCESS_DENIED));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10));
	PyModule_AddObject(m, "DRSUAPI_DRS_NEVER_NOTIFY", PyInt_FromLong(DRSUAPI_DRS_NEVER_NOTIFY));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3));
	PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_REQUEUE", PyInt_FromLong(DRSUAPI_DRS_SYNC_REQUEUE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_displayName", PyInt_FromLong(DRSUAPI_ATTID_displayName));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS));
	PyModule_AddObject(m, "DRSUAPI_DRS_INIT_SYNC", PyInt_FromLong(DRSUAPI_DRS_INIT_SYNC));
	PyModule_AddObject(m, "DRSUAPI_ATTID_isDeleted", PyInt_FromLong(DRSUAPI_ATTID_isDeleted));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA));
	PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_DELETE", PyInt_FromLong(DRSUAPI_DS_SPN_OPERATION_DELETE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_lDAPDisplayName", PyInt_FromLong(DRSUAPI_ATTID_lDAPDisplayName));
	PyModule_AddObject(m, "DRSUAPI_ATTID_primaryGroupID", PyInt_FromLong(DRSUAPI_ATTID_primaryGroupID));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UNKNOWN", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_UNKNOWN));
	PyModule_AddObject(m, "DRSUAPI_DIRERR_SYSTEM", PyInt_FromLong(DRSUAPI_DIRERR_SYSTEM));
	PyModule_AddObject(m, "DRSUAPI_ATTID_homeDrive", PyInt_FromLong(DRSUAPI_ATTID_homeDrive));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE", PyInt_FromLong(DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE));
	PyModule_AddObject(m, "DRSUAPI_DRS_DISABLE_AUTO_SYNC", PyInt_FromLong(DRSUAPI_DRS_DISABLE_AUTO_SYNC));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_MISMATCH", PyInt_FromLong(DRSUAPI_EXOP_ERR_MISMATCH));
	PyModule_AddObject(m, "DRSUAPI_DRS_NO_SOURCE", PyInt_FromLong(DRSUAPI_DRS_NO_SOURCE));
	PyModule_AddObject(m, "DRSUAPI_DRS_REF_GCSPN", PyInt_FromLong(DRSUAPI_DRS_REF_GCSPN));
	PyModule_AddObject(m, "DRSUAPI_ATTID_member", PyInt_FromLong(DRSUAPI_ATTID_member));
	PyModule_AddObject(m, "DRSUAPI_DRS_WRIT_REP", PyInt_FromLong(DRSUAPI_DRS_WRIT_REP));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UNKNOWN_CALLER", PyInt_FromLong(DRSUAPI_EXOP_ERR_UNKNOWN_CALLER));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", PyInt_FromLong(DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_FQDN_1779", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_FQDN_1779));
	PyModule_AddObject(m, "DRSUAPI_ATTID_auxiliaryClass", PyInt_FromLong(DRSUAPI_ATTID_auxiliaryClass));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_COULDNT_CONTACT", PyInt_FromLong(DRSUAPI_EXOP_ERR_COULDNT_CONTACT));
	PyModule_AddObject(m, "DRSUAPI_DIRERR_SECURITY", PyInt_FromLong(DRSUAPI_DIRERR_SECURITY));
	PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_BYNAME", PyInt_FromLong(DRSUAPI_DRS_SYNC_BYNAME));
	PyModule_AddObject(m, "DRSUAPI_EXOP_REPL_OBJ", PyInt_FromLong(DRSUAPI_EXOP_REPL_OBJ));
	PyModule_AddObject(m, "DRSUAPI_ATTID_badPwdCount", PyInt_FromLong(DRSUAPI_ATTID_badPwdCount));
	PyModule_AddObject(m, "DRSUAPI_ATTID_isRecycled", PyInt_FromLong(DRSUAPI_ATTID_isRecycled));
	PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS", PyInt_FromLong(DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS));
	PyModule_AddObject(m, "DRSUAPI_ATTID_userPrincipalName", PyInt_FromLong(DRSUAPI_ATTID_userPrincipalName));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", PyInt_FromLong(DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER));
	PyModule_AddObject(m, "DRSUAPI_ATTID_rangeUpper", PyInt_FromLong(DRSUAPI_ATTID_rangeUpper));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE));
	PyModule_AddObject(m, "DRSUAPI_DRS_NO_DISCARD", PyInt_FromLong(DRSUAPI_DRS_NO_DISCARD));
	PyModule_AddObject(m, "DRSUAPI_ATTID_priorValue", PyInt_FromLong(DRSUAPI_ATTID_priorValue));
	PyModule_AddObject(m, "DRSUAPI_ATTID_codePage", PyInt_FromLong(DRSUAPI_ATTID_codePage));
	PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_BASE_ONLY", PyInt_FromLong(DRSUAPI_SE_CHOICE_BASE_ONLY));
	PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS", PyInt_FromLong(DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS));
	PyModule_AddObject(m, "DRSUAPI_DIRERR_SERVICE", PyInt_FromLong(DRSUAPI_DIRERR_SERVICE));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN));
	PyModule_AddObject(m, "DRSUAPI_ATTID_scriptPath", PyInt_FromLong(DRSUAPI_ATTID_scriptPath));
	PyModule_AddObject(m, "DRSUAPI_ATTID_oMSyntax", PyInt_FromLong(DRSUAPI_ATTID_oMSyntax));
	PyModule_AddObject(m, "DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE", PyInt_FromLong(DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_nCName", PyInt_FromLong(DRSUAPI_ATTID_nCName));
	PyModule_AddObject(m, "DRSUAPI_ATTID_rangeLower", PyInt_FromLong(DRSUAPI_ATTID_rangeLower));
	PyModule_AddObject(m, "DRSUAPI_EXOP_NONE", PyInt_FromLong(DRSUAPI_EXOP_NONE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_objectSid", PyInt_FromLong(DRSUAPI_ATTID_objectSid));
	PyModule_AddObject(m, "DRSUAPI_DS_EXECUTE_KCC_DAMPED", PyInt_FromLong(DRSUAPI_DS_EXECUTE_KCC_DAMPED));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_PKG_PARAMS", PyInt_FromLong(DRSUAPI_SECBUFFER_PKG_PARAMS));
	PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_RID_REQ_ROLE", PyInt_FromLong(DRSUAPI_EXOP_FSMO_RID_REQ_ROLE));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS));
	PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_classSchema", PyInt_FromLong(DRSUAPI_OBJECTCLASS_classSchema));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION));
	PyModule_AddObject(m, "DRSUAPI_ATTID_objectCategory", PyInt_FromLong(DRSUAPI_ATTID_objectCategory));
	PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_SUBORDINATE", PyInt_FromLong(DRSUAPI_CH_REFTYPE_SUBORDINATE));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_MISSING", PyInt_FromLong(DRSUAPI_SECBUFFER_MISSING));
	PyModule_AddObject(m, "DRSUAPI_DRS_DISABLE_PERIODIC_SYNC", PyInt_FromLong(DRSUAPI_DRS_DISABLE_PERIODIC_SYNC));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NOT_FOUND", PyInt_FromLong(DRSUAPI_DS_NAME_STATUS_NOT_FOUND));
	PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_attributeSchema", PyInt_FromLong(DRSUAPI_OBJECTCLASS_attributeSchema));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8));
	PyModule_AddObject(m, "DRSUAPI_DIRERR_UPDATE", PyInt_FromLong(DRSUAPI_DIRERR_UPDATE));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS", PyInt_FromLong(DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA));
	PyModule_AddObject(m, "DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP", PyInt_FromLong(DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP));
	PyModule_AddObject(m, "DRSUAPI_ATTID_supplementalCredentials", PyInt_FromLong(DRSUAPI_ATTID_supplementalCredentials));
	PyModule_AddObject(m, "DRSUAPI_ATTID_searchFlags", PyInt_FromLong(DRSUAPI_ATTID_searchFlags));
	PyModule_AddObject(m, "DRSUAPI_ATTID_transportAddressAttribute", PyInt_FromLong(DRSUAPI_ATTID_transportAddressAttribute));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY", PyInt_FromLong(DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS", PyInt_FromLong(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND));
	PyModule_AddObject(m, "DRSUAPI_EXOP_REPL_SECRET", PyInt_FromLong(DRSUAPI_EXOP_REPL_SECRET));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_NONE", PyInt_FromLong(DRSUAPI_EXOP_ERR_NONE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_whenCreated", PyInt_FromLong(DRSUAPI_ATTID_whenCreated));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_EXTRA", PyInt_FromLong(DRSUAPI_SECBUFFER_EXTRA));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY", PyInt_FromLong(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY));
	PyModule_AddObject(m, "DRSUAPI_ATTID_name", PyInt_FromLong(DRSUAPI_ATTID_name));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI));
	PyModule_AddObject(m, "DRSUAPI_ATTID_systemFlags", PyInt_FromLong(DRSUAPI_ATTID_systemFlags));
	PyModule_AddObject(m, "DRSUAPI_ATTID_userWorkstations", PyInt_FromLong(DRSUAPI_ATTID_userWorkstations));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_SYNC", PyInt_FromLong(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC", PyInt_FromLong(DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY", PyInt_FromLong(DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY));
	PyModule_AddObject(m, "DRSUAPI_ATTID_adminDescription", PyInt_FromLong(DRSUAPI_ATTID_adminDescription));
	PyModule_AddObject(m, "DRSUAPI_COMPRESSION_TYPE_MSZIP", PyInt_FromLong(DRSUAPI_COMPRESSION_TYPE_MSZIP));
	PyModule_AddObject(m, "DRSUAPI_ATTID_cn", PyInt_FromLong(DRSUAPI_ATTID_cn));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX));
	PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_CROSS", PyInt_FromLong(DRSUAPI_CH_REFTYPE_CROSS));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD));
	PyModule_AddObject(m, "DRSUAPI_ATTID_schemaIDGUID", PyInt_FromLong(DRSUAPI_ATTID_schemaIDGUID));
	PyModule_AddObject(m, "DRSUAPI_ATTID_ou", PyInt_FromLong(DRSUAPI_ATTID_ou));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS2", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_CURSORS2));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NO_MAPPING", PyInt_FromLong(DRSUAPI_DS_NAME_STATUS_NO_MAPPING));
	PyModule_AddObject(m, "DRSUAPI_DRS_GETCHG_CHECK", PyInt_FromLong(DRSUAPI_DRS_GETCHG_CHECK));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2));
	PyModule_AddObject(m, "DRSUAPI_ATTID_isMemberOfPartialAttributeSet", PyInt_FromLong(DRSUAPI_ATTID_isMemberOfPartialAttributeSet));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT));
	PyModule_AddObject(m, "DRSUAPI_ATTID_logonCount", PyInt_FromLong(DRSUAPI_ATTID_logonCount));
	PyModule_AddObject(m, "DRSUAPI_ATTID_gPLink", PyInt_FromLong(DRSUAPI_ATTID_gPLink));
	PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_2", PyInt_FromLong(DRSUAPI_DC_INFO_CTR_2));
	PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_REPSTO", PyInt_FromLong(DRSUAPI_DS_REPLICA_INFO_REPSTO));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_profilePath", PyInt_FromLong(DRSUAPI_ATTID_profilePath));
	PyModule_AddObject(m, "DRSUAPI_SECBUFFER_READONLY", PyInt_FromLong(DRSUAPI_SECBUFFER_READONLY));
	PyModule_AddObject(m, "DRSUAPI_ATTID_hasMasterNCs", PyInt_FromLong(DRSUAPI_ATTID_hasMasterNCs));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES", PyInt_FromLong(DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES));
	PyModule_AddObject(m, "DRSUAPI_ATTID_lastLogon", PyInt_FromLong(DRSUAPI_ATTID_lastLogon));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO));
	PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_top", PyInt_FromLong(DRSUAPI_OBJECTCLASS_top));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_RID_ALLOC", PyInt_FromLong(DRSUAPI_EXOP_ERR_RID_ALLOC));
	PyModule_AddObject(m, "DRSUAPI_ATTID_trustAuthIncoming", PyInt_FromLong(DRSUAPI_ATTID_trustAuthIncoming));
	PyModule_AddObject(m, "DRSUAPI_DRS_MAIL_REP", PyInt_FromLong(DRSUAPI_DRS_MAIL_REP));
	PyModule_AddObject(m, "DRSUAPI_ATTID_options", PyInt_FromLong(DRSUAPI_ATTID_options));
	PyModule_AddObject(m, "DRSUAPI_ATTID_dNSHostName", PyInt_FromLong(DRSUAPI_ATTID_dNSHostName));
	PyModule_AddObject(m, "DRSUAPI_ATTID_accountExpires", PyInt_FromLong(DRSUAPI_ATTID_accountExpires));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UPDATE_ERR", PyInt_FromLong(DRSUAPI_EXOP_ERR_UPDATE_ERR));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_EXCEPTION", PyInt_FromLong(DRSUAPI_EXOP_ERR_EXCEPTION));
	PyModule_AddObject(m, "DRSUAPI_DRS_GET_NC_SIZE", PyInt_FromLong(DRSUAPI_DRS_GET_NC_SIZE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_userParameters", PyInt_FromLong(DRSUAPI_ATTID_userParameters));
	PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_ABANDON_ROLE", PyInt_FromLong(DRSUAPI_EXOP_FSMO_ABANDON_ROLE));
	PyModule_AddObject(m, "DRSUAPI_ATTID_ntSecurityDescriptor", PyInt_FromLong(DRSUAPI_ATTID_ntSecurityDescriptor));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS));
	PyModule_AddObject(m, "DRSUAPI_DC_CONNECTION_CTR_01", PyInt_FromLong(DRSUAPI_DC_CONNECTION_CTR_01));
	PyModule_AddObject(m, "DRSUAPI_ATTID_rDNAttId", PyInt_FromLong(DRSUAPI_ATTID_rDNAttId));
	PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER", PyInt_FromLong(DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER));
	PyModule_AddObject(m, "DRSUAPI_ATTID_dBCSPwd", PyInt_FromLong(DRSUAPI_ATTID_dBCSPwd));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX));
	PyModule_AddObject(m, "DRSUAPI_ATTID_lastLogoff", PyInt_FromLong(DRSUAPI_ATTID_lastLogoff));
	PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS", PyInt_FromLong(DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS));
	PyModule_AddObject(m, "DRSUAPI_ATTID_mayContain", PyInt_FromLong(DRSUAPI_ATTID_mayContain));
	PyModule_AddObject(m, "DRSUAPI_ATTID_initialAuthIncoming", PyInt_FromLong(DRSUAPI_ATTID_initialAuthIncoming));
	PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_ADD", PyInt_FromLong(DRSUAPI_DS_SPN_OPERATION_ADD));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2));
	PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_ALL", PyInt_FromLong(DRSUAPI_DRS_SYNC_ALL));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT));
	PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_FORCED", PyInt_FromLong(DRSUAPI_DRS_SYNC_FORCED));
	PyModule_AddObject(m, "DRSUAPI_ATTID_INVALID", PyInt_FromLong(DRSUAPI_ATTID_INVALID));
	PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_PACKET", PyInt_FromLong(DRSUAPI_DRS_FULL_SYNC_PACKET));
	PyModule_AddObject(m, "DRSUAPI_ATTID_mustContain", PyInt_FromLong(DRSUAPI_ATTID_mustContain));
	PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2", PyInt_FromLong(DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2));
	PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_DISPLAY", PyInt_FromLong(DRSUAPI_DS_NAME_FORMAT_DISPLAY));
	Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo24_Type);
	PyModule_AddObject(m, "DsBindInfo24", (PyObject *)(void *)&drsuapi_DsBindInfo24_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo28_Type);
	PyModule_AddObject(m, "DsBindInfo28", (PyObject *)(void *)&drsuapi_DsBindInfo28_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo48_Type);
	PyModule_AddObject(m, "DsBindInfo48", (PyObject *)(void *)&drsuapi_DsBindInfo48_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfoFallBack_Type);
	PyModule_AddObject(m, "DsBindInfoFallBack", (PyObject *)(void *)&drsuapi_DsBindInfoFallBack_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfoCtr_Type);
	PyModule_AddObject(m, "DsBindInfoCtr", (PyObject *)(void *)&drsuapi_DsBindInfoCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier_Type);
	PyModule_AddObject(m, "DsReplicaObjectIdentifier", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaSyncRequest1_Type);
	PyModule_AddObject(m, "DsReplicaSyncRequest1", (PyObject *)(void *)&drsuapi_DsReplicaSyncRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaHighWaterMark_Type);
	PyModule_AddObject(m, "DsReplicaHighWaterMark", (PyObject *)(void *)&drsuapi_DsReplicaHighWaterMark_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor_Type);
	PyModule_AddObject(m, "DsReplicaCursor", (PyObject *)(void *)&drsuapi_DsReplicaCursor_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursorCtrEx_Type);
	PyModule_AddObject(m, "DsReplicaCursorCtrEx", (PyObject *)(void *)&drsuapi_DsReplicaCursorCtrEx_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest5_Type);
	PyModule_AddObject(m, "DsGetNCChangesRequest5", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest5_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOID_Type);
	PyModule_AddObject(m, "DsReplicaOID", (PyObject *)(void *)&drsuapi_DsReplicaOID_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Type);
	PyModule_AddObject(m, "DsReplicaOIDMapping", (PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Ctr_Type);
	PyModule_AddObject(m, "DsReplicaOIDMapping_Ctr", (PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Ctr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsPartialAttributeSet_Type);
	PyModule_AddObject(m, "DsPartialAttributeSet", (PyObject *)(void *)&drsuapi_DsPartialAttributeSet_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest8_Type);
	PyModule_AddObject(m, "DsGetNCChangesRequest8", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest8_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest10_Type);
	PyModule_AddObject(m, "DsGetNCChangesRequest10", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest10_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2_Type);
	PyModule_AddObject(m, "DsReplicaCursor2", (PyObject *)(void *)&drsuapi_DsReplicaCursor2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2CtrEx_Type);
	PyModule_AddObject(m, "DsReplicaCursor2CtrEx", (PyObject *)(void *)&drsuapi_DsReplicaCursor2CtrEx_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAttributeValue_Type);
	PyModule_AddObject(m, "DsAttributeValue", (PyObject *)(void *)&drsuapi_DsAttributeValue_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAttributeValueCtr_Type);
	PyModule_AddObject(m, "DsAttributeValueCtr", (PyObject *)(void *)&drsuapi_DsAttributeValueCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3_Type);
	PyModule_AddObject(m, "DsReplicaObjectIdentifier3", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
	PyModule_AddObject(m, "DsReplicaObjectIdentifier3Binary", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttribute_Type);
	PyModule_AddObject(m, "DsReplicaAttribute", (PyObject *)(void *)&drsuapi_DsReplicaAttribute_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttributeCtr_Type);
	PyModule_AddObject(m, "DsReplicaAttributeCtr", (PyObject *)(void *)&drsuapi_DsReplicaAttributeCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObject_Type);
	PyModule_AddObject(m, "DsReplicaObject", (PyObject *)(void *)&drsuapi_DsReplicaObject_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaMetaData_Type);
	PyModule_AddObject(m, "DsReplicaMetaData", (PyObject *)(void *)&drsuapi_DsReplicaMetaData_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaMetaDataCtr_Type);
	PyModule_AddObject(m, "DsReplicaMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaMetaDataCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectListItemEx_Type);
	PyModule_AddObject(m, "DsReplicaObjectListItemEx", (PyObject *)(void *)&drsuapi_DsReplicaObjectListItemEx_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1_Type);
	PyModule_AddObject(m, "DsGetNCChangesCtr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaLinkedAttribute_Type);
	PyModule_AddObject(m, "DsReplicaLinkedAttribute", (PyObject *)(void *)&drsuapi_DsReplicaLinkedAttribute_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6_Type);
	PyModule_AddObject(m, "DsGetNCChangesCtr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1TS_Type);
	PyModule_AddObject(m, "DsGetNCChangesCtr1TS", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1TS_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6TS_Type);
	PyModule_AddObject(m, "DsGetNCChangesCtr6TS", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6TS_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
	PyModule_AddObject(m, "DsGetNCChangesMSZIPCtr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
	PyModule_AddObject(m, "DsGetNCChangesMSZIPCtr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesXPRESSCtr1_Type);
	PyModule_AddObject(m, "DsGetNCChangesXPRESSCtr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesXPRESSCtr1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesXPRESSCtr6_Type);
	PyModule_AddObject(m, "DsGetNCChangesXPRESSCtr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesXPRESSCtr6_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr2_Type);
	PyModule_AddObject(m, "DsGetNCChangesCtr2", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr7_Type);
	PyModule_AddObject(m, "DsGetNCChangesCtr7", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr7_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest1_Type);
	PyModule_AddObject(m, "DsReplicaUpdateRefsRequest1", (PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAddRequest1_Type);
	PyModule_AddObject(m, "DsReplicaAddRequest1", (PyObject *)(void *)&drsuapi_DsReplicaAddRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAddRequest2_Type);
	PyModule_AddObject(m, "DsReplicaAddRequest2", (PyObject *)(void *)&drsuapi_DsReplicaAddRequest2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaDelRequest1_Type);
	PyModule_AddObject(m, "DsReplicaDelRequest1", (PyObject *)(void *)&drsuapi_DsReplicaDelRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaModRequest1_Type);
	PyModule_AddObject(m, "DsReplicaModRequest1", (PyObject *)(void *)&drsuapi_DsReplicaModRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsCtr1_Type);
	PyModule_AddObject(m, "DsGetMembershipsCtr1", (PyObject *)(void *)&drsuapi_DsGetMembershipsCtr1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsRequest1_Type);
	PyModule_AddObject(m, "DsGetMembershipsRequest1", (PyObject *)(void *)&drsuapi_DsGetMembershipsRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest1_Type);
	PyModule_AddObject(m, "DsGetNT4ChangeLogRequest1", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo1_Type);
	PyModule_AddObject(m, "DsGetNT4ChangeLogInfo1", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsNameString_Type);
	PyModule_AddObject(m, "DsNameString", (PyObject *)(void *)&drsuapi_DsNameString_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsNameRequest1_Type);
	PyModule_AddObject(m, "DsNameRequest1", (PyObject *)(void *)&drsuapi_DsNameRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsNameInfo1_Type);
	PyModule_AddObject(m, "DsNameInfo1", (PyObject *)(void *)&drsuapi_DsNameInfo1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsNameCtr1_Type);
	PyModule_AddObject(m, "DsNameCtr1", (PyObject *)(void *)&drsuapi_DsNameCtr1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest1_Type);
	PyModule_AddObject(m, "DsWriteAccountSpnRequest1", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult1_Type);
	PyModule_AddObject(m, "DsWriteAccountSpnResult1", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest1_Type);
	PyModule_AddObject(m, "DsRemoveDSServerRequest1", (PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerResult1_Type);
	PyModule_AddObject(m, "DsRemoveDSServerResult1", (PyObject *)(void *)&drsuapi_DsRemoveDSServerResult1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoRequest1_Type);
	PyModule_AddObject(m, "DsGetDCInfoRequest1", (PyObject *)(void *)&drsuapi_DsGetDCInfoRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo1_Type);
	PyModule_AddObject(m, "DsGetDCInfo1", (PyObject *)(void *)&drsuapi_DsGetDCInfo1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr1_Type);
	PyModule_AddObject(m, "DsGetDCInfoCtr1", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo2_Type);
	PyModule_AddObject(m, "DsGetDCInfo2", (PyObject *)(void *)&drsuapi_DsGetDCInfo2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr2_Type);
	PyModule_AddObject(m, "DsGetDCInfoCtr2", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo3_Type);
	PyModule_AddObject(m, "DsGetDCInfo3", (PyObject *)(void *)&drsuapi_DsGetDCInfo3_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr3_Type);
	PyModule_AddObject(m, "DsGetDCInfoCtr3", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr3_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCConnection01_Type);
	PyModule_AddObject(m, "DsGetDCConnection01", (PyObject *)(void *)&drsuapi_DsGetDCConnection01_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCConnectionCtr01_Type);
	PyModule_AddObject(m, "DsGetDCConnectionCtr01", (PyObject *)(void *)&drsuapi_DsGetDCConnectionCtr01_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectListItem_Type);
	PyModule_AddObject(m, "DsReplicaObjectListItem", (PyObject *)(void *)&drsuapi_DsReplicaObjectListItem_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryRequest2_Type);
	PyModule_AddObject(m, "DsAddEntryRequest2", (PyObject *)(void *)&drsuapi_DsAddEntryRequest2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_SecBuffer_Type);
	PyModule_AddObject(m, "SecBuffer", (PyObject *)(void *)&drsuapi_SecBuffer_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_SecBufferDesc_Type);
	PyModule_AddObject(m, "SecBufferDesc", (PyObject *)(void *)&drsuapi_SecBufferDesc_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryRequest3_Type);
	PyModule_AddObject(m, "DsAddEntryRequest3", (PyObject *)(void *)&drsuapi_DsAddEntryRequest3_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfoX_Type);
	PyModule_AddObject(m, "DsAddEntryErrorInfoX", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfoX_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_AttrErr_V1_Type);
	PyModule_AddObject(m, "DsAddEntry_AttrErr_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_AttrErr_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
	PyModule_AddObject(m, "DsAddEntry_AttrErrListItem_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
	PyModule_AddObject(m, "DsAddEntryErrorInfo_Attr_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
	PyModule_AddObject(m, "DsAddEntryErrorInfo_Name_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_NameResOp_V1_Type);
	PyModule_AddObject(m, "NameResOp_V1", (PyObject *)(void *)&drsuapi_NameResOp_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsaAddressListItem_V1_Type);
	PyModule_AddObject(m, "DsaAddressListItem_V1", (PyObject *)(void *)&drsuapi_DsaAddressListItem_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
	PyModule_AddObject(m, "DsAddEntry_RefErrListItem_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
	PyModule_AddObject(m, "DsAddEntryErrorInfo_Referr_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_V1_Type);
	PyModule_AddObject(m, "DsAddEntry_ErrData_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_V1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier2_Type);
	PyModule_AddObject(m, "DsReplicaObjectIdentifier2", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryCtr2_Type);
	PyModule_AddObject(m, "DsAddEntryCtr2", (PyObject *)(void *)&drsuapi_DsAddEntryCtr2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryCtr3_Type);
	PyModule_AddObject(m, "DsAddEntryCtr3", (PyObject *)(void *)&drsuapi_DsAddEntryCtr3_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsExecuteKCC1_Type);
	PyModule_AddObject(m, "DsExecuteKCC1", (PyObject *)(void *)&drsuapi_DsExecuteKCC1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest1_Type);
	PyModule_AddObject(m, "DsReplicaGetInfoRequest1", (PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest2_Type);
	PyModule_AddObject(m, "DsReplicaGetInfoRequest2", (PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaNeighbour_Type);
	PyModule_AddObject(m, "DsReplicaNeighbour", (PyObject *)(void *)&drsuapi_DsReplicaNeighbour_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaNeighbourCtr_Type);
	PyModule_AddObject(m, "DsReplicaNeighbourCtr", (PyObject *)(void *)&drsuapi_DsReplicaNeighbourCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursorCtr_Type);
	PyModule_AddObject(m, "DsReplicaCursorCtr", (PyObject *)(void *)&drsuapi_DsReplicaCursorCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData_Type);
	PyModule_AddObject(m, "DsReplicaObjMetaData", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaDataCtr_Type);
	PyModule_AddObject(m, "DsReplicaObjMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaDataCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailure_Type);
	PyModule_AddObject(m, "DsReplicaKccDsaFailure", (PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailure_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
	PyModule_AddObject(m, "DsReplicaKccDsaFailuresCtr", (PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOp_Type);
	PyModule_AddObject(m, "DsReplicaOp", (PyObject *)(void *)&drsuapi_DsReplicaOp_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOpCtr_Type);
	PyModule_AddObject(m, "DsReplicaOpCtr", (PyObject *)(void *)&drsuapi_DsReplicaOpCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData_Type);
	PyModule_AddObject(m, "DsReplicaAttrValMetaData", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
	PyModule_AddObject(m, "DsReplicaAttrValMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2Ctr_Type);
	PyModule_AddObject(m, "DsReplicaCursor2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaCursor2Ctr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor3_Type);
	PyModule_AddObject(m, "DsReplicaCursor3", (PyObject *)(void *)&drsuapi_DsReplicaCursor3_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor3Ctr_Type);
	PyModule_AddObject(m, "DsReplicaCursor3Ctr", (PyObject *)(void *)&drsuapi_DsReplicaCursor3Ctr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2_Type);
	PyModule_AddObject(m, "DsReplicaObjMetaData2", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2Ctr_Type);
	PyModule_AddObject(m, "DsReplicaObjMetaData2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2Ctr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2_Type);
	PyModule_AddObject(m, "DsReplicaAttrValMetaData2", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
	PyModule_AddObject(m, "DsReplicaAttrValMetaData2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaConnection04_Type);
	PyModule_AddObject(m, "DsReplicaConnection04", (PyObject *)(void *)&drsuapi_DsReplicaConnection04_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaConnection04Ctr_Type);
	PyModule_AddObject(m, "DsReplicaConnection04Ctr", (PyObject *)(void *)&drsuapi_DsReplicaConnection04Ctr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplica06_Type);
	PyModule_AddObject(m, "DsReplica06", (PyObject *)(void *)&drsuapi_DsReplica06_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsReplica06Ctr_Type);
	PyModule_AddObject(m, "DsReplica06Ctr", (PyObject *)(void *)&drsuapi_DsReplica06Ctr_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr1_Type);
	PyModule_AddObject(m, "DsGetMemberships2Ctr1", (PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Request1_Type);
	PyModule_AddObject(m, "DsGetMemberships2Request1", (PyObject *)(void *)&drsuapi_DsGetMemberships2Request1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_DsSiteCostInfo_Type);
	PyModule_AddObject(m, "DsSiteCostInfo", (PyObject *)(void *)&drsuapi_DsSiteCostInfo_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostCtr1_Type);
	PyModule_AddObject(m, "QuerySitesByCostCtr1", (PyObject *)(void *)&drsuapi_QuerySitesByCostCtr1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostRequest1_Type);
	PyModule_AddObject(m, "QuerySitesByCostRequest1", (PyObject *)(void *)&drsuapi_QuerySitesByCostRequest1_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_InterfaceType);
	PyModule_AddObject(m, "drsuapi", (PyObject *)(void *)&drsuapi_InterfaceType);
#ifdef PY_MOD_DRSUAPI_PATCH
	PY_MOD_DRSUAPI_PATCH(m);
#endif

}
