
/* Python wrapper functions auto-generated by pidl */
#include <Python.h>
#include "includes.h"
#include <pytalloc.h>
#include "librpc/rpc/pyrpc.h"
#include "librpc/rpc/pyrpc_util.h"
#include "librpc/gen_ndr/ndr_drsblobs.h"
#include "librpc/gen_ndr/ndr_drsblobs_c.h"

#include "librpc/gen_ndr/drsuapi.h"
#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/samr.h"
#include "librpc/gen_ndr/lsa.h"
#include "librpc/gen_ndr/security.h"
staticforward PyTypeObject replPropertyMetaData1_Type;
staticforward PyTypeObject replPropertyMetaDataCtr1_Type;
staticforward PyTypeObject replPropertyMetaDataBlob_Type;
staticforward PyTypeObject replUpToDateVectorCtr1_Type;
staticforward PyTypeObject replUpToDateVectorCtr2_Type;
staticforward PyTypeObject replUpToDateVectorBlob_Type;
staticforward PyTypeObject repsFromTo1OtherInfo_Type;
staticforward PyTypeObject repsFromTo1_Type;
staticforward PyTypeObject repsFromTo2OtherInfo_Type;
staticforward PyTypeObject repsFromTo2_Type;
staticforward PyTypeObject repsFromToBlob_Type;
staticforward PyTypeObject partialAttributeSetCtr1_Type;
staticforward PyTypeObject partialAttributeSetBlob_Type;
staticforward PyTypeObject schemaInfoBlob_Type;
staticforward PyTypeObject drsuapi_MSPrefixMap_Entry_Type;
staticforward PyTypeObject drsuapi_MSPrefixMap_Ctr_Type;
staticforward PyTypeObject prefixMapBlob_Type;
staticforward PyTypeObject ldapControlDirSyncBlob_Type;
staticforward PyTypeObject ldapControlDirSyncCookie_Type;
staticforward PyTypeObject supplementalCredentialsPackage_Type;
staticforward PyTypeObject supplementalCredentialsSubBlob_Type;
staticforward PyTypeObject supplementalCredentialsBlob_Type;
staticforward PyTypeObject package_PackagesBlob_Type;
staticforward PyTypeObject package_PrimaryKerberosString_Type;
staticforward PyTypeObject package_PrimaryKerberosKey3_Type;
staticforward PyTypeObject package_PrimaryKerberosCtr3_Type;
staticforward PyTypeObject package_PrimaryKerberosKey4_Type;
staticforward PyTypeObject package_PrimaryKerberosCtr4_Type;
staticforward PyTypeObject package_PrimaryKerberosBlob_Type;
staticforward PyTypeObject package_PrimaryCLEARTEXTBlob_Type;
staticforward PyTypeObject package_PrimaryWDigestHash_Type;
staticforward PyTypeObject package_PrimaryWDigestBlob_Type;
staticforward PyTypeObject AuthInfoNone_Type;
staticforward PyTypeObject AuthInfoNT4Owf_Type;
staticforward PyTypeObject AuthInfoClear_Type;
staticforward PyTypeObject AuthInfoVersion_Type;
staticforward PyTypeObject AuthenticationInformation_Type;
staticforward PyTypeObject AuthenticationInformationArray_Type;
staticforward PyTypeObject trustAuthInOutBlob_Type;
staticforward PyTypeObject trustDomainPasswords_Type;
staticforward PyTypeObject DsCompressedChunk_Type;
staticforward PyTypeObject ExtendedErrorAString_Type;
staticforward PyTypeObject ExtendedErrorUString_Type;
staticforward PyTypeObject ExtendedErrorBlob_Type;
staticforward PyTypeObject ExtendedErrorComputerName_Type;
staticforward PyTypeObject ExtendedErrorParam_Type;
staticforward PyTypeObject ExtendedErrorInfo_Type;
staticforward PyTypeObject ExtendedErrorInfoPtr_Type;
staticforward PyTypeObject ForestTrustString_Type;
staticforward PyTypeObject ForestTrustDataDomainInfo_Type;
staticforward PyTypeObject ForestTrustDataBinaryData_Type;
staticforward PyTypeObject ForestTrustInfoRecord_Type;
staticforward PyTypeObject ForestTrustInfoRecordArmor_Type;
staticforward PyTypeObject ForestTrustInfo_Type;
staticforward PyTypeObject drsblobs_InterfaceType;

void initdrsblobs(void);static PyTypeObject *dom_sid_Type;
static PyTypeObject *drsuapi_DsReplicaOIDMapping_Ctr_Type;
static PyTypeObject *samr_Password_Type;
static PyTypeObject *drsuapi_DsReplicaCursor_Type;
static PyTypeObject *drsuapi_DsReplicaHighWaterMark_Type;
static PyTypeObject *GUID_Type;
static PyTypeObject *ClientConnection_Type;
static PyTypeObject *drsuapi_DsReplicaCursor2_Type;
static PyTypeObject *Object_Type;

static PyObject *py_replPropertyMetaData1_get_attid(PyObject *obj, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_get_ptr(obj);
	PyObject *py_attid;
	py_attid = PyInt_FromLong(object->attid);
	return py_attid;
}

static int py_replPropertyMetaData1_set_attid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_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_replPropertyMetaData1_get_version(PyObject *obj, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

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

static PyObject *py_replPropertyMetaData1_get_originating_change_time(PyObject *obj, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_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_replPropertyMetaData1_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_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_replPropertyMetaData1_get_originating_invocation_id(PyObject *obj, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_get_ptr(obj);
	PyObject *py_originating_invocation_id;
	py_originating_invocation_id = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->originating_invocation_id);
	return py_originating_invocation_id;
}

static int py_replPropertyMetaData1_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->originating_invocation_id = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_replPropertyMetaData1_get_originating_usn(PyObject *obj, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_get_ptr(obj);
	PyObject *py_originating_usn;
	py_originating_usn = PyLong_FromLongLong(object->originating_usn);
	return py_originating_usn;
}

static int py_replPropertyMetaData1_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_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_replPropertyMetaData1_get_local_usn(PyObject *obj, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_get_ptr(obj);
	PyObject *py_local_usn;
	py_local_usn = PyLong_FromLongLong(object->local_usn);
	return py_local_usn;
}

static int py_replPropertyMetaData1_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaData1 *object = (struct replPropertyMetaData1 *)py_talloc_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_replPropertyMetaData1_getsetters[] = {
	{ discard_const_p(char, "attid"), py_replPropertyMetaData1_get_attid, py_replPropertyMetaData1_set_attid },
	{ discard_const_p(char, "version"), py_replPropertyMetaData1_get_version, py_replPropertyMetaData1_set_version },
	{ discard_const_p(char, "originating_change_time"), py_replPropertyMetaData1_get_originating_change_time, py_replPropertyMetaData1_set_originating_change_time },
	{ discard_const_p(char, "originating_invocation_id"), py_replPropertyMetaData1_get_originating_invocation_id, py_replPropertyMetaData1_set_originating_invocation_id },
	{ discard_const_p(char, "originating_usn"), py_replPropertyMetaData1_get_originating_usn, py_replPropertyMetaData1_set_originating_usn },
	{ discard_const_p(char, "local_usn"), py_replPropertyMetaData1_get_local_usn, py_replPropertyMetaData1_set_local_usn },
	{ NULL }
};

static PyObject *py_replPropertyMetaData1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct replPropertyMetaData1, type);
}


static PyTypeObject replPropertyMetaData1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.replPropertyMetaData1",
	.tp_getset = py_replPropertyMetaData1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_replPropertyMetaData1_new,
};


static PyObject *py_replPropertyMetaDataCtr1_get_count(PyObject *obj, void *closure)
{
	struct replPropertyMetaDataCtr1 *object = (struct replPropertyMetaDataCtr1 *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

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

static PyObject *py_replPropertyMetaDataCtr1_get_reserved(PyObject *obj, void *closure)
{
	struct replPropertyMetaDataCtr1 *object = (struct replPropertyMetaDataCtr1 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_replPropertyMetaDataCtr1_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaDataCtr1 *object = (struct replPropertyMetaDataCtr1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_replPropertyMetaDataCtr1_get_array(PyObject *obj, void *closure)
{
	struct replPropertyMetaDataCtr1 *object = (struct replPropertyMetaDataCtr1 *)py_talloc_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 = py_talloc_reference_ex(&replPropertyMetaData1_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_replPropertyMetaDataCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaDataCtr1 *object = (struct replPropertyMetaDataCtr1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(py_talloc_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(&replPropertyMetaData1_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct replPropertyMetaData1 *)py_talloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_replPropertyMetaDataCtr1_getsetters[] = {
	{ discard_const_p(char, "count"), py_replPropertyMetaDataCtr1_get_count, py_replPropertyMetaDataCtr1_set_count },
	{ discard_const_p(char, "reserved"), py_replPropertyMetaDataCtr1_get_reserved, py_replPropertyMetaDataCtr1_set_reserved },
	{ discard_const_p(char, "array"), py_replPropertyMetaDataCtr1_get_array, py_replPropertyMetaDataCtr1_set_array },
	{ NULL }
};

static PyObject *py_replPropertyMetaDataCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct replPropertyMetaDataCtr1, type);
}


static PyTypeObject replPropertyMetaDataCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.replPropertyMetaDataCtr1",
	.tp_getset = py_replPropertyMetaDataCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_replPropertyMetaDataCtr1_new,
};

PyObject *py_import_replPropertyMetaDataCtr(TALLOC_CTX *mem_ctx, int level, union replPropertyMetaDataCtr *in)
{
	PyObject *ret;

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

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

union replPropertyMetaDataCtr *py_export_replPropertyMetaDataCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union replPropertyMetaDataCtr *ret = talloc_zero(mem_ctx, union replPropertyMetaDataCtr);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&replPropertyMetaDataCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct replPropertyMetaDataCtr1 *)py_talloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_replPropertyMetaDataBlob_get_version(PyObject *obj, void *closure)
{
	struct replPropertyMetaDataBlob *object = (struct replPropertyMetaDataBlob *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

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

static PyObject *py_replPropertyMetaDataBlob_get_reserved(PyObject *obj, void *closure)
{
	struct replPropertyMetaDataBlob *object = (struct replPropertyMetaDataBlob *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_replPropertyMetaDataBlob_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaDataBlob *object = (struct replPropertyMetaDataBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_replPropertyMetaDataBlob_get_ctr(PyObject *obj, void *closure)
{
	struct replPropertyMetaDataBlob *object = (struct replPropertyMetaDataBlob *)py_talloc_get_ptr(obj);
	PyObject *py_ctr;
	py_ctr = py_import_replPropertyMetaDataCtr(py_talloc_get_mem_ctx(obj), object->version, &object->ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	return py_ctr;
}

static int py_replPropertyMetaDataBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replPropertyMetaDataBlob *object = (struct replPropertyMetaDataBlob *)py_talloc_get_ptr(py_obj);
	{
		union replPropertyMetaDataCtr *ctr_switch_0;
		ctr_switch_0 = py_export_replPropertyMetaDataCtr(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (ctr_switch_0 == NULL) {
			return -1;
		}
		object->ctr = *ctr_switch_0;
	}
	return 0;
}

static PyGetSetDef py_replPropertyMetaDataBlob_getsetters[] = {
	{ discard_const_p(char, "version"), py_replPropertyMetaDataBlob_get_version, py_replPropertyMetaDataBlob_set_version },
	{ discard_const_p(char, "reserved"), py_replPropertyMetaDataBlob_get_reserved, py_replPropertyMetaDataBlob_set_reserved },
	{ discard_const_p(char, "ctr"), py_replPropertyMetaDataBlob_get_ctr, py_replPropertyMetaDataBlob_set_ctr },
	{ NULL }
};

static PyObject *py_replPropertyMetaDataBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct replPropertyMetaDataBlob, type);
}

static PyObject *py_replPropertyMetaDataBlob_ndr_pack(PyObject *py_obj)
{
	struct replPropertyMetaDataBlob *object = (struct replPropertyMetaDataBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_replPropertyMetaDataBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct replPropertyMetaDataBlob *object = (struct replPropertyMetaDataBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaDataBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_replPropertyMetaDataBlob_ndr_print(PyObject *py_obj)
{
	struct replPropertyMetaDataBlob *object = (struct replPropertyMetaDataBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_replPropertyMetaDataBlob, "replPropertyMetaDataBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_replPropertyMetaDataBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_replPropertyMetaDataBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_replPropertyMetaDataBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_replPropertyMetaDataBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject replPropertyMetaDataBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.replPropertyMetaDataBlob",
	.tp_getset = py_replPropertyMetaDataBlob_getsetters,
	.tp_methods = py_replPropertyMetaDataBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_replPropertyMetaDataBlob_new,
};


static PyObject *py_replUpToDateVectorCtr1_get_count(PyObject *obj, void *closure)
{
	struct replUpToDateVectorCtr1 *object = (struct replUpToDateVectorCtr1 *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

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

static PyObject *py_replUpToDateVectorCtr1_get_reserved(PyObject *obj, void *closure)
{
	struct replUpToDateVectorCtr1 *object = (struct replUpToDateVectorCtr1 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_replUpToDateVectorCtr1_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replUpToDateVectorCtr1 *object = (struct replUpToDateVectorCtr1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_replUpToDateVectorCtr1_get_cursors(PyObject *obj, void *closure)
{
	struct replUpToDateVectorCtr1 *object = (struct replUpToDateVectorCtr1 *)py_talloc_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 = py_talloc_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_replUpToDateVectorCtr1_set_cursors(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replUpToDateVectorCtr1 *object = (struct replUpToDateVectorCtr1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int cursors_cntr_0;
		object->cursors = talloc_array_ptrtype(py_talloc_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, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, cursors_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->cursors[cursors_cntr_0] = *(struct drsuapi_DsReplicaCursor *)py_talloc_get_ptr(PyList_GET_ITEM(value, cursors_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_replUpToDateVectorCtr1_getsetters[] = {
	{ discard_const_p(char, "count"), py_replUpToDateVectorCtr1_get_count, py_replUpToDateVectorCtr1_set_count },
	{ discard_const_p(char, "reserved"), py_replUpToDateVectorCtr1_get_reserved, py_replUpToDateVectorCtr1_set_reserved },
	{ discard_const_p(char, "cursors"), py_replUpToDateVectorCtr1_get_cursors, py_replUpToDateVectorCtr1_set_cursors },
	{ NULL }
};

static PyObject *py_replUpToDateVectorCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct replUpToDateVectorCtr1, type);
}


static PyTypeObject replUpToDateVectorCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.replUpToDateVectorCtr1",
	.tp_getset = py_replUpToDateVectorCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_replUpToDateVectorCtr1_new,
};


static PyObject *py_replUpToDateVectorCtr2_get_count(PyObject *obj, void *closure)
{
	struct replUpToDateVectorCtr2 *object = (struct replUpToDateVectorCtr2 *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

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

static PyObject *py_replUpToDateVectorCtr2_get_reserved(PyObject *obj, void *closure)
{
	struct replUpToDateVectorCtr2 *object = (struct replUpToDateVectorCtr2 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_replUpToDateVectorCtr2_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replUpToDateVectorCtr2 *object = (struct replUpToDateVectorCtr2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_replUpToDateVectorCtr2_get_cursors(PyObject *obj, void *closure)
{
	struct replUpToDateVectorCtr2 *object = (struct replUpToDateVectorCtr2 *)py_talloc_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 = py_talloc_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_replUpToDateVectorCtr2_set_cursors(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replUpToDateVectorCtr2 *object = (struct replUpToDateVectorCtr2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int cursors_cntr_0;
		object->cursors = talloc_array_ptrtype(py_talloc_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, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, cursors_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->cursors[cursors_cntr_0] = *(struct drsuapi_DsReplicaCursor2 *)py_talloc_get_ptr(PyList_GET_ITEM(value, cursors_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_replUpToDateVectorCtr2_getsetters[] = {
	{ discard_const_p(char, "count"), py_replUpToDateVectorCtr2_get_count, py_replUpToDateVectorCtr2_set_count },
	{ discard_const_p(char, "reserved"), py_replUpToDateVectorCtr2_get_reserved, py_replUpToDateVectorCtr2_set_reserved },
	{ discard_const_p(char, "cursors"), py_replUpToDateVectorCtr2_get_cursors, py_replUpToDateVectorCtr2_set_cursors },
	{ NULL }
};

static PyObject *py_replUpToDateVectorCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct replUpToDateVectorCtr2, type);
}


static PyTypeObject replUpToDateVectorCtr2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.replUpToDateVectorCtr2",
	.tp_getset = py_replUpToDateVectorCtr2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_replUpToDateVectorCtr2_new,
};

PyObject *py_import_replUpToDateVectorCtr(TALLOC_CTX *mem_ctx, int level, union replUpToDateVectorCtr *in)
{
	PyObject *ret;

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

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

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

union replUpToDateVectorCtr *py_export_replUpToDateVectorCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union replUpToDateVectorCtr *ret = talloc_zero(mem_ctx, union replUpToDateVectorCtr);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&replUpToDateVectorCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct replUpToDateVectorCtr1 *)py_talloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&replUpToDateVectorCtr2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr2 = *(struct replUpToDateVectorCtr2 *)py_talloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_replUpToDateVectorBlob_get_version(PyObject *obj, void *closure)
{
	struct replUpToDateVectorBlob *object = (struct replUpToDateVectorBlob *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

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

static PyObject *py_replUpToDateVectorBlob_get_reserved(PyObject *obj, void *closure)
{
	struct replUpToDateVectorBlob *object = (struct replUpToDateVectorBlob *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_replUpToDateVectorBlob_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replUpToDateVectorBlob *object = (struct replUpToDateVectorBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_replUpToDateVectorBlob_get_ctr(PyObject *obj, void *closure)
{
	struct replUpToDateVectorBlob *object = (struct replUpToDateVectorBlob *)py_talloc_get_ptr(obj);
	PyObject *py_ctr;
	py_ctr = py_import_replUpToDateVectorCtr(py_talloc_get_mem_ctx(obj), object->version, &object->ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	return py_ctr;
}

static int py_replUpToDateVectorBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct replUpToDateVectorBlob *object = (struct replUpToDateVectorBlob *)py_talloc_get_ptr(py_obj);
	{
		union replUpToDateVectorCtr *ctr_switch_0;
		ctr_switch_0 = py_export_replUpToDateVectorCtr(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (ctr_switch_0 == NULL) {
			return -1;
		}
		object->ctr = *ctr_switch_0;
	}
	return 0;
}

static PyGetSetDef py_replUpToDateVectorBlob_getsetters[] = {
	{ discard_const_p(char, "version"), py_replUpToDateVectorBlob_get_version, py_replUpToDateVectorBlob_set_version },
	{ discard_const_p(char, "reserved"), py_replUpToDateVectorBlob_get_reserved, py_replUpToDateVectorBlob_set_reserved },
	{ discard_const_p(char, "ctr"), py_replUpToDateVectorBlob_get_ctr, py_replUpToDateVectorBlob_set_ctr },
	{ NULL }
};

static PyObject *py_replUpToDateVectorBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct replUpToDateVectorBlob, type);
}

static PyObject *py_replUpToDateVectorBlob_ndr_pack(PyObject *py_obj)
{
	struct replUpToDateVectorBlob *object = (struct replUpToDateVectorBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_replUpToDateVectorBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_replUpToDateVectorBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct replUpToDateVectorBlob *object = (struct replUpToDateVectorBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_replUpToDateVectorBlob_ndr_print(PyObject *py_obj)
{
	struct replUpToDateVectorBlob *object = (struct replUpToDateVectorBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_replUpToDateVectorBlob, "replUpToDateVectorBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_replUpToDateVectorBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_replUpToDateVectorBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_replUpToDateVectorBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_replUpToDateVectorBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject replUpToDateVectorBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.replUpToDateVectorBlob",
	.tp_getset = py_replUpToDateVectorBlob_getsetters,
	.tp_methods = py_replUpToDateVectorBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_replUpToDateVectorBlob_new,
};


static PyObject *py_repsFromTo1OtherInfo_get___dns_name_size(PyObject *obj, void *closure)
{
	struct repsFromTo1OtherInfo *object = (struct repsFromTo1OtherInfo *)py_talloc_get_ptr(obj);
	PyObject *py___dns_name_size;
	py___dns_name_size = PyInt_FromLong(object->__dns_name_size);
	return py___dns_name_size;
}

static int py_repsFromTo1OtherInfo_set___dns_name_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1OtherInfo *object = (struct repsFromTo1OtherInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__dns_name_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo1OtherInfo_get_dns_name(PyObject *obj, void *closure)
{
	struct repsFromTo1OtherInfo *object = (struct repsFromTo1OtherInfo *)py_talloc_get_ptr(obj);
	PyObject *py_dns_name;
	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_repsFromTo1OtherInfo_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1OtherInfo *object = (struct repsFromTo1OtherInfo *)py_talloc_get_ptr(py_obj);
	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 PyGetSetDef py_repsFromTo1OtherInfo_getsetters[] = {
	{ discard_const_p(char, "__dns_name_size"), py_repsFromTo1OtherInfo_get___dns_name_size, py_repsFromTo1OtherInfo_set___dns_name_size },
	{ discard_const_p(char, "dns_name"), py_repsFromTo1OtherInfo_get_dns_name, py_repsFromTo1OtherInfo_set_dns_name },
	{ NULL }
};

static PyObject *py_repsFromTo1OtherInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct repsFromTo1OtherInfo, type);
}

static PyObject *py_repsFromTo1OtherInfo_ndr_pack(PyObject *py_obj)
{
	struct repsFromTo1OtherInfo *object = (struct repsFromTo1OtherInfo *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_repsFromTo1OtherInfo_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct repsFromTo1OtherInfo *object = (struct repsFromTo1OtherInfo *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo1OtherInfo);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_repsFromTo1OtherInfo_ndr_print(PyObject *py_obj)
{
	struct repsFromTo1OtherInfo *object = (struct repsFromTo1OtherInfo *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromTo1OtherInfo, "repsFromTo1OtherInfo", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_repsFromTo1OtherInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_repsFromTo1OtherInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_repsFromTo1OtherInfo_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_repsFromTo1OtherInfo_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject repsFromTo1OtherInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.repsFromTo1OtherInfo",
	.tp_getset = py_repsFromTo1OtherInfo_getsetters,
	.tp_methods = py_repsFromTo1OtherInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_repsFromTo1OtherInfo_new,
};


static PyObject *py_repsFromTo1_get_blobsize(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_blobsize;
	py_blobsize = PyInt_FromLong(object->blobsize);
	return py_blobsize;
}

static int py_repsFromTo1_set_blobsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->blobsize = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo1_get_consecutive_sync_failures(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_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_repsFromTo1_set_consecutive_sync_failures(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->consecutive_sync_failures = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo1_get_last_success(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_last_success;
	py_last_success = PyLong_FromLongLong(object->last_success);
	return py_last_success;
}

static int py_repsFromTo1_set_last_success(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_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_repsFromTo1_get_last_attempt(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_last_attempt;
	py_last_attempt = PyLong_FromLongLong(object->last_attempt);
	return py_last_attempt;
}

static int py_repsFromTo1_set_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_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_repsFromTo1_get_result_last_attempt(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_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_repsFromTo1_set_result_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	object->result_last_attempt = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_repsFromTo1_get_other_info(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_other_info;
	if (object->other_info == NULL) {
		py_other_info = Py_None;
		Py_INCREF(py_other_info);
	} else {
		py_other_info = py_talloc_reference_ex(&repsFromTo1OtherInfo_Type, object->other_info, object->other_info);
	}
	return py_other_info;
}

static int py_repsFromTo1_set_other_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->other_info);
	if (value == Py_None) {
		object->other_info = NULL;
	} else {
		object->other_info = NULL;
		PY_CHECK_TYPE(&repsFromTo1OtherInfo_Type, value, return -1;);
		if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->other_info = (struct repsFromTo1OtherInfo *)py_talloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_repsFromTo1_get_other_info_length(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_other_info_length;
	py_other_info_length = PyInt_FromLong(object->other_info_length);
	return py_other_info_length;
}

static int py_repsFromTo1_set_other_info_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->other_info_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo1_get_replica_flags(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_replica_flags;
	py_replica_flags = PyInt_FromLong(object->replica_flags);
	return py_replica_flags;
}

static int py_repsFromTo1_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_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_repsFromTo1_get_schedule(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_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_repsFromTo1_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_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_repsFromTo1_get_reserved(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_repsFromTo1_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo1_get_highwatermark(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_highwatermark;
	py_highwatermark = py_talloc_reference_ex(drsuapi_DsReplicaHighWaterMark_Type, py_talloc_get_mem_ctx(obj), &object->highwatermark);
	return py_highwatermark;
}

static int py_repsFromTo1_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_repsFromTo1_get_source_dsa_obj_guid(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_source_dsa_obj_guid;
	py_source_dsa_obj_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->source_dsa_obj_guid);
	return py_source_dsa_obj_guid;
}

static int py_repsFromTo1_set_source_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_obj_guid = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_repsFromTo1_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_repsFromTo1_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_repsFromTo1_get_transport_guid(PyObject *obj, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(obj);
	PyObject *py_transport_guid;
	py_transport_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->transport_guid);
	return py_transport_guid;
}

static int py_repsFromTo1_set_transport_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->transport_guid = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_repsFromTo1_getsetters[] = {
	{ discard_const_p(char, "blobsize"), py_repsFromTo1_get_blobsize, py_repsFromTo1_set_blobsize },
	{ discard_const_p(char, "consecutive_sync_failures"), py_repsFromTo1_get_consecutive_sync_failures, py_repsFromTo1_set_consecutive_sync_failures },
	{ discard_const_p(char, "last_success"), py_repsFromTo1_get_last_success, py_repsFromTo1_set_last_success },
	{ discard_const_p(char, "last_attempt"), py_repsFromTo1_get_last_attempt, py_repsFromTo1_set_last_attempt },
	{ discard_const_p(char, "result_last_attempt"), py_repsFromTo1_get_result_last_attempt, py_repsFromTo1_set_result_last_attempt },
	{ discard_const_p(char, "other_info"), py_repsFromTo1_get_other_info, py_repsFromTo1_set_other_info },
	{ discard_const_p(char, "other_info_length"), py_repsFromTo1_get_other_info_length, py_repsFromTo1_set_other_info_length },
	{ discard_const_p(char, "replica_flags"), py_repsFromTo1_get_replica_flags, py_repsFromTo1_set_replica_flags },
	{ discard_const_p(char, "schedule"), py_repsFromTo1_get_schedule, py_repsFromTo1_set_schedule },
	{ discard_const_p(char, "reserved"), py_repsFromTo1_get_reserved, py_repsFromTo1_set_reserved },
	{ discard_const_p(char, "highwatermark"), py_repsFromTo1_get_highwatermark, py_repsFromTo1_set_highwatermark },
	{ discard_const_p(char, "source_dsa_obj_guid"), py_repsFromTo1_get_source_dsa_obj_guid, py_repsFromTo1_set_source_dsa_obj_guid },
	{ discard_const_p(char, "source_dsa_invocation_id"), py_repsFromTo1_get_source_dsa_invocation_id, py_repsFromTo1_set_source_dsa_invocation_id },
	{ discard_const_p(char, "transport_guid"), py_repsFromTo1_get_transport_guid, py_repsFromTo1_set_transport_guid },
	{ NULL }
};

static PyObject *py_repsFromTo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct repsFromTo1, type);
}

static PyObject *py_repsFromTo1_ndr_pack(PyObject *py_obj)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_repsFromTo1);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_repsFromTo1_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo1);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_repsFromTo1_ndr_print(PyObject *py_obj)
{
	struct repsFromTo1 *object = (struct repsFromTo1 *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromTo1, "repsFromTo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_repsFromTo1_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_repsFromTo1_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_repsFromTo1_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_repsFromTo1_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject repsFromTo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.repsFromTo1",
	.tp_getset = py_repsFromTo1_getsetters,
	.tp_methods = py_repsFromTo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_repsFromTo1_new,
};


static PyObject *py_repsFromTo2OtherInfo_get___ndr_size(PyObject *obj, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

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

static PyObject *py_repsFromTo2OtherInfo_get_dns_name1(PyObject *obj, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(obj);
	PyObject *py_dns_name1;
	if (object->dns_name1 == NULL) {
		py_dns_name1 = Py_None;
		Py_INCREF(py_dns_name1);
	} else {
		py_dns_name1 = PyString_FromStringOrNULL(object->dns_name1);
	}
	return py_dns_name1;
}

static int py_repsFromTo2OtherInfo_set_dns_name1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dns_name1 = NULL;
	} else {
		object->dns_name1 = NULL;
		object->dns_name1 = talloc_strdup(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_repsFromTo2OtherInfo_get_unknown1(PyObject *obj, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyInt_FromLong(object->unknown1);
	return py_unknown1;
}

static int py_repsFromTo2OtherInfo_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo2OtherInfo_get_dns_name2(PyObject *obj, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(obj);
	PyObject *py_dns_name2;
	if (object->dns_name2 == NULL) {
		py_dns_name2 = Py_None;
		Py_INCREF(py_dns_name2);
	} else {
		py_dns_name2 = PyString_FromStringOrNULL(object->dns_name2);
	}
	return py_dns_name2;
}

static int py_repsFromTo2OtherInfo_set_dns_name2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dns_name2 = NULL;
	} else {
		object->dns_name2 = NULL;
		object->dns_name2 = talloc_strdup(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_repsFromTo2OtherInfo_get_unknown2(PyObject *obj, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = PyLong_FromLongLong(object->unknown2);
	return py_unknown2;
}

static int py_repsFromTo2OtherInfo_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->unknown2 = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->unknown2 = 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_repsFromTo2OtherInfo_getsetters[] = {
	{ discard_const_p(char, "__ndr_size"), py_repsFromTo2OtherInfo_get___ndr_size, py_repsFromTo2OtherInfo_set___ndr_size },
	{ discard_const_p(char, "dns_name1"), py_repsFromTo2OtherInfo_get_dns_name1, py_repsFromTo2OtherInfo_set_dns_name1 },
	{ discard_const_p(char, "unknown1"), py_repsFromTo2OtherInfo_get_unknown1, py_repsFromTo2OtherInfo_set_unknown1 },
	{ discard_const_p(char, "dns_name2"), py_repsFromTo2OtherInfo_get_dns_name2, py_repsFromTo2OtherInfo_set_dns_name2 },
	{ discard_const_p(char, "unknown2"), py_repsFromTo2OtherInfo_get_unknown2, py_repsFromTo2OtherInfo_set_unknown2 },
	{ NULL }
};

static PyObject *py_repsFromTo2OtherInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct repsFromTo2OtherInfo, type);
}

static PyObject *py_repsFromTo2OtherInfo_ndr_pack(PyObject *py_obj)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_repsFromTo2OtherInfo);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_repsFromTo2OtherInfo_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo2OtherInfo);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_repsFromTo2OtherInfo_ndr_print(PyObject *py_obj)
{
	struct repsFromTo2OtherInfo *object = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromTo2OtherInfo, "repsFromTo2OtherInfo", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_repsFromTo2OtherInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_repsFromTo2OtherInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_repsFromTo2OtherInfo_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_repsFromTo2OtherInfo_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject repsFromTo2OtherInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.repsFromTo2OtherInfo",
	.tp_getset = py_repsFromTo2OtherInfo_getsetters,
	.tp_methods = py_repsFromTo2OtherInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_repsFromTo2OtherInfo_new,
};


static PyObject *py_repsFromTo2_get_blobsize(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_blobsize;
	py_blobsize = PyInt_FromLong(object->blobsize);
	return py_blobsize;
}

static int py_repsFromTo2_set_blobsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->blobsize = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo2_get_consecutive_sync_failures(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_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_repsFromTo2_set_consecutive_sync_failures(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->consecutive_sync_failures = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo2_get_last_success(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_last_success;
	py_last_success = PyLong_FromLongLong(object->last_success);
	return py_last_success;
}

static int py_repsFromTo2_set_last_success(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_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_repsFromTo2_get_last_attempt(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_last_attempt;
	py_last_attempt = PyLong_FromLongLong(object->last_attempt);
	return py_last_attempt;
}

static int py_repsFromTo2_set_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_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_repsFromTo2_get_result_last_attempt(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_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_repsFromTo2_set_result_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	object->result_last_attempt = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_repsFromTo2_get_other_info(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_other_info;
	if (object->other_info == NULL) {
		py_other_info = Py_None;
		Py_INCREF(py_other_info);
	} else {
		py_other_info = py_talloc_reference_ex(&repsFromTo2OtherInfo_Type, object->other_info, object->other_info);
	}
	return py_other_info;
}

static int py_repsFromTo2_set_other_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->other_info);
	if (value == Py_None) {
		object->other_info = NULL;
	} else {
		object->other_info = NULL;
		PY_CHECK_TYPE(&repsFromTo2OtherInfo_Type, value, return -1;);
		if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->other_info = (struct repsFromTo2OtherInfo *)py_talloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_repsFromTo2_get_other_info_length(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_other_info_length;
	py_other_info_length = PyInt_FromLong(object->other_info_length);
	return py_other_info_length;
}

static int py_repsFromTo2_set_other_info_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->other_info_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo2_get_replica_flags(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_replica_flags;
	py_replica_flags = PyInt_FromLong(object->replica_flags);
	return py_replica_flags;
}

static int py_repsFromTo2_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_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_repsFromTo2_get_schedule(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_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_repsFromTo2_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_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_repsFromTo2_get_reserved(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_repsFromTo2_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromTo2_get_highwatermark(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_highwatermark;
	py_highwatermark = py_talloc_reference_ex(drsuapi_DsReplicaHighWaterMark_Type, py_talloc_get_mem_ctx(obj), &object->highwatermark);
	return py_highwatermark;
}

static int py_repsFromTo2_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_repsFromTo2_get_source_dsa_obj_guid(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_source_dsa_obj_guid;
	py_source_dsa_obj_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->source_dsa_obj_guid);
	return py_source_dsa_obj_guid;
}

static int py_repsFromTo2_set_source_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_obj_guid = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_repsFromTo2_get_source_dsa_invocation_id(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_source_dsa_invocation_id;
	py_source_dsa_invocation_id = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
	return py_source_dsa_invocation_id;
}

static int py_repsFromTo2_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_dsa_invocation_id = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_repsFromTo2_get_transport_guid(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_transport_guid;
	py_transport_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->transport_guid);
	return py_transport_guid;
}

static int py_repsFromTo2_set_transport_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->transport_guid = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_repsFromTo2_get_unknown1(PyObject *obj, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyLong_FromLongLong(object->unknown1);
	return py_unknown1;
}

static int py_repsFromTo2_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->unknown1 = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->unknown1 = 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_repsFromTo2_getsetters[] = {
	{ discard_const_p(char, "blobsize"), py_repsFromTo2_get_blobsize, py_repsFromTo2_set_blobsize },
	{ discard_const_p(char, "consecutive_sync_failures"), py_repsFromTo2_get_consecutive_sync_failures, py_repsFromTo2_set_consecutive_sync_failures },
	{ discard_const_p(char, "last_success"), py_repsFromTo2_get_last_success, py_repsFromTo2_set_last_success },
	{ discard_const_p(char, "last_attempt"), py_repsFromTo2_get_last_attempt, py_repsFromTo2_set_last_attempt },
	{ discard_const_p(char, "result_last_attempt"), py_repsFromTo2_get_result_last_attempt, py_repsFromTo2_set_result_last_attempt },
	{ discard_const_p(char, "other_info"), py_repsFromTo2_get_other_info, py_repsFromTo2_set_other_info },
	{ discard_const_p(char, "other_info_length"), py_repsFromTo2_get_other_info_length, py_repsFromTo2_set_other_info_length },
	{ discard_const_p(char, "replica_flags"), py_repsFromTo2_get_replica_flags, py_repsFromTo2_set_replica_flags },
	{ discard_const_p(char, "schedule"), py_repsFromTo2_get_schedule, py_repsFromTo2_set_schedule },
	{ discard_const_p(char, "reserved"), py_repsFromTo2_get_reserved, py_repsFromTo2_set_reserved },
	{ discard_const_p(char, "highwatermark"), py_repsFromTo2_get_highwatermark, py_repsFromTo2_set_highwatermark },
	{ discard_const_p(char, "source_dsa_obj_guid"), py_repsFromTo2_get_source_dsa_obj_guid, py_repsFromTo2_set_source_dsa_obj_guid },
	{ discard_const_p(char, "source_dsa_invocation_id"), py_repsFromTo2_get_source_dsa_invocation_id, py_repsFromTo2_set_source_dsa_invocation_id },
	{ discard_const_p(char, "transport_guid"), py_repsFromTo2_get_transport_guid, py_repsFromTo2_set_transport_guid },
	{ discard_const_p(char, "unknown1"), py_repsFromTo2_get_unknown1, py_repsFromTo2_set_unknown1 },
	{ NULL }
};

static PyObject *py_repsFromTo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct repsFromTo2, type);
}

static PyObject *py_repsFromTo2_ndr_pack(PyObject *py_obj)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_repsFromTo2);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_repsFromTo2_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo2);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_repsFromTo2_ndr_print(PyObject *py_obj)
{
	struct repsFromTo2 *object = (struct repsFromTo2 *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromTo2, "repsFromTo2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_repsFromTo2_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_repsFromTo2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_repsFromTo2_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_repsFromTo2_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject repsFromTo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.repsFromTo2",
	.tp_getset = py_repsFromTo2_getsetters,
	.tp_methods = py_repsFromTo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_repsFromTo2_new,
};

PyObject *py_import_repsFromTo(TALLOC_CTX *mem_ctx, int level, union repsFromTo *in)
{
	PyObject *ret;

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

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

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

union repsFromTo *py_export_repsFromTo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union repsFromTo *ret = talloc_zero(mem_ctx, union repsFromTo);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&repsFromTo1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct repsFromTo1 *)py_talloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&repsFromTo2_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr2 = *(struct repsFromTo2 *)py_talloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_repsFromToBlob_get_version(PyObject *obj, void *closure)
{
	struct repsFromToBlob *object = (struct repsFromToBlob *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

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

static PyObject *py_repsFromToBlob_get_reserved(PyObject *obj, void *closure)
{
	struct repsFromToBlob *object = (struct repsFromToBlob *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_repsFromToBlob_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromToBlob *object = (struct repsFromToBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_repsFromToBlob_get_ctr(PyObject *obj, void *closure)
{
	struct repsFromToBlob *object = (struct repsFromToBlob *)py_talloc_get_ptr(obj);
	PyObject *py_ctr;
	py_ctr = py_import_repsFromTo(py_talloc_get_mem_ctx(obj), object->version, &object->ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	return py_ctr;
}

static int py_repsFromToBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct repsFromToBlob *object = (struct repsFromToBlob *)py_talloc_get_ptr(py_obj);
	{
		union repsFromTo *ctr_switch_0;
		ctr_switch_0 = py_export_repsFromTo(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (ctr_switch_0 == NULL) {
			return -1;
		}
		object->ctr = *ctr_switch_0;
	}
	return 0;
}

static PyGetSetDef py_repsFromToBlob_getsetters[] = {
	{ discard_const_p(char, "version"), py_repsFromToBlob_get_version, py_repsFromToBlob_set_version },
	{ discard_const_p(char, "reserved"), py_repsFromToBlob_get_reserved, py_repsFromToBlob_set_reserved },
	{ discard_const_p(char, "ctr"), py_repsFromToBlob_get_ctr, py_repsFromToBlob_set_ctr },
	{ NULL }
};

static PyObject *py_repsFromToBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct repsFromToBlob, type);
}

static PyObject *py_repsFromToBlob_ndr_pack(PyObject *py_obj)
{
	struct repsFromToBlob *object = (struct repsFromToBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_repsFromToBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_repsFromToBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct repsFromToBlob *object = (struct repsFromToBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_repsFromToBlob_ndr_print(PyObject *py_obj)
{
	struct repsFromToBlob *object = (struct repsFromToBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromToBlob, "repsFromToBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_repsFromToBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_repsFromToBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_repsFromToBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_repsFromToBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject repsFromToBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.repsFromToBlob",
	.tp_getset = py_repsFromToBlob_getsetters,
	.tp_methods = py_repsFromToBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_repsFromToBlob_new,
};


static PyObject *py_partialAttributeSetCtr1_get_count(PyObject *obj, void *closure)
{
	struct partialAttributeSetCtr1 *object = (struct partialAttributeSetCtr1 *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

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

static PyObject *py_partialAttributeSetCtr1_get_array(PyObject *obj, void *closure)
{
	struct partialAttributeSetCtr1 *object = (struct partialAttributeSetCtr1 *)py_talloc_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 = PyInt_FromLong(object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_partialAttributeSetCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct partialAttributeSetCtr1 *object = (struct partialAttributeSetCtr1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(py_talloc_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++) {
			if (PyLong_Check(PyList_GET_ITEM(value, array_cntr_0))) {
				object->array[array_cntr_0] = PyLong_AsLongLong(PyList_GET_ITEM(value, array_cntr_0));
			} else if (PyInt_Check(PyList_GET_ITEM(value, array_cntr_0))) {
				object->array[array_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, array_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_partialAttributeSetCtr1_getsetters[] = {
	{ discard_const_p(char, "count"), py_partialAttributeSetCtr1_get_count, py_partialAttributeSetCtr1_set_count },
	{ discard_const_p(char, "array"), py_partialAttributeSetCtr1_get_array, py_partialAttributeSetCtr1_set_array },
	{ NULL }
};

static PyObject *py_partialAttributeSetCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct partialAttributeSetCtr1, type);
}


static PyTypeObject partialAttributeSetCtr1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.partialAttributeSetCtr1",
	.tp_getset = py_partialAttributeSetCtr1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_partialAttributeSetCtr1_new,
};

PyObject *py_import_partialAttributeSetCtr(TALLOC_CTX *mem_ctx, int level, union partialAttributeSetCtr *in)
{
	PyObject *ret;

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

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

union partialAttributeSetCtr *py_export_partialAttributeSetCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union partialAttributeSetCtr *ret = talloc_zero(mem_ctx, union partialAttributeSetCtr);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&partialAttributeSetCtr1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr1 = *(struct partialAttributeSetCtr1 *)py_talloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_partialAttributeSetBlob_get_version(PyObject *obj, void *closure)
{
	struct partialAttributeSetBlob *object = (struct partialAttributeSetBlob *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

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

static PyObject *py_partialAttributeSetBlob_get_reserved(PyObject *obj, void *closure)
{
	struct partialAttributeSetBlob *object = (struct partialAttributeSetBlob *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_partialAttributeSetBlob_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct partialAttributeSetBlob *object = (struct partialAttributeSetBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_partialAttributeSetBlob_get_ctr(PyObject *obj, void *closure)
{
	struct partialAttributeSetBlob *object = (struct partialAttributeSetBlob *)py_talloc_get_ptr(obj);
	PyObject *py_ctr;
	py_ctr = py_import_partialAttributeSetCtr(py_talloc_get_mem_ctx(obj), object->version, &object->ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	return py_ctr;
}

static int py_partialAttributeSetBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct partialAttributeSetBlob *object = (struct partialAttributeSetBlob *)py_talloc_get_ptr(py_obj);
	{
		union partialAttributeSetCtr *ctr_switch_0;
		ctr_switch_0 = py_export_partialAttributeSetCtr(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (ctr_switch_0 == NULL) {
			return -1;
		}
		object->ctr = *ctr_switch_0;
	}
	return 0;
}

static PyGetSetDef py_partialAttributeSetBlob_getsetters[] = {
	{ discard_const_p(char, "version"), py_partialAttributeSetBlob_get_version, py_partialAttributeSetBlob_set_version },
	{ discard_const_p(char, "reserved"), py_partialAttributeSetBlob_get_reserved, py_partialAttributeSetBlob_set_reserved },
	{ discard_const_p(char, "ctr"), py_partialAttributeSetBlob_get_ctr, py_partialAttributeSetBlob_set_ctr },
	{ NULL }
};

static PyObject *py_partialAttributeSetBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct partialAttributeSetBlob, type);
}

static PyObject *py_partialAttributeSetBlob_ndr_pack(PyObject *py_obj)
{
	struct partialAttributeSetBlob *object = (struct partialAttributeSetBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_partialAttributeSetBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_partialAttributeSetBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct partialAttributeSetBlob *object = (struct partialAttributeSetBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_partialAttributeSetBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_partialAttributeSetBlob_ndr_print(PyObject *py_obj)
{
	struct partialAttributeSetBlob *object = (struct partialAttributeSetBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_partialAttributeSetBlob, "partialAttributeSetBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_partialAttributeSetBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_partialAttributeSetBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_partialAttributeSetBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_partialAttributeSetBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject partialAttributeSetBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.partialAttributeSetBlob",
	.tp_getset = py_partialAttributeSetBlob_getsetters,
	.tp_methods = py_partialAttributeSetBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_partialAttributeSetBlob_new,
};


static PyObject *py_schemaInfoBlob_get_marker(PyObject *obj, void *closure)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(obj);
	PyObject *py_marker;
	py_marker = PyInt_FromLong(object->marker);
	return py_marker;
}

static int py_schemaInfoBlob_set_marker(PyObject *py_obj, PyObject *value, void *closure)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->marker = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_schemaInfoBlob_get_revision(PyObject *obj, void *closure)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(obj);
	PyObject *py_revision;
	py_revision = PyInt_FromLong(object->revision);
	return py_revision;
}

static int py_schemaInfoBlob_set_revision(PyObject *py_obj, PyObject *value, void *closure)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->revision = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_schemaInfoBlob_get_invocation_id(PyObject *obj, void *closure)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(obj);
	PyObject *py_invocation_id;
	py_invocation_id = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->invocation_id);
	return py_invocation_id;
}

static int py_schemaInfoBlob_set_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->invocation_id = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_schemaInfoBlob_getsetters[] = {
	{ discard_const_p(char, "marker"), py_schemaInfoBlob_get_marker, py_schemaInfoBlob_set_marker },
	{ discard_const_p(char, "revision"), py_schemaInfoBlob_get_revision, py_schemaInfoBlob_set_revision },
	{ discard_const_p(char, "invocation_id"), py_schemaInfoBlob_get_invocation_id, py_schemaInfoBlob_set_invocation_id },
	{ NULL }
};

static PyObject *py_schemaInfoBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct schemaInfoBlob, type);
}

static PyObject *py_schemaInfoBlob_ndr_pack(PyObject *py_obj)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_schemaInfoBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_schemaInfoBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_schemaInfoBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_schemaInfoBlob_ndr_print(PyObject *py_obj)
{
	struct schemaInfoBlob *object = (struct schemaInfoBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_schemaInfoBlob, "schemaInfoBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_schemaInfoBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_schemaInfoBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_schemaInfoBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_schemaInfoBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject schemaInfoBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.schemaInfoBlob",
	.tp_getset = py_schemaInfoBlob_getsetters,
	.tp_methods = py_schemaInfoBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_schemaInfoBlob_new,
};


static PyObject *py_drsuapi_MSPrefixMap_Entry_get_entryID(PyObject *obj, void *closure)
{
	struct drsuapi_MSPrefixMap_Entry *object = (struct drsuapi_MSPrefixMap_Entry *)py_talloc_get_ptr(obj);
	PyObject *py_entryID;
	py_entryID = PyInt_FromLong(object->entryID);
	return py_entryID;
}

static int py_drsuapi_MSPrefixMap_Entry_set_entryID(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_MSPrefixMap_Entry *object = (struct drsuapi_MSPrefixMap_Entry *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->entryID = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_MSPrefixMap_Entry_get_length(PyObject *obj, void *closure)
{
	struct drsuapi_MSPrefixMap_Entry *object = (struct drsuapi_MSPrefixMap_Entry *)py_talloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyInt_FromLong(object->length);
	return py_length;
}

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

static PyObject *py_drsuapi_MSPrefixMap_Entry_get_binary_oid(PyObject *obj, void *closure)
{
	struct drsuapi_MSPrefixMap_Entry *object = (struct drsuapi_MSPrefixMap_Entry *)py_talloc_get_ptr(obj);
	PyObject *py_binary_oid;
	py_binary_oid = PyList_New(object->length);
	if (py_binary_oid == NULL) {
		return NULL;
	}
	{
		int binary_oid_cntr_0;
		for (binary_oid_cntr_0 = 0; binary_oid_cntr_0 < object->length; binary_oid_cntr_0++) {
			PyObject *py_binary_oid_0;
			py_binary_oid_0 = PyInt_FromLong(object->binary_oid[binary_oid_cntr_0]);
			PyList_SetItem(py_binary_oid, binary_oid_cntr_0, py_binary_oid_0);
		}
	}
	return py_binary_oid;
}

static int py_drsuapi_MSPrefixMap_Entry_set_binary_oid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_MSPrefixMap_Entry *object = (struct drsuapi_MSPrefixMap_Entry *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int binary_oid_cntr_0;
		object->binary_oid = talloc_array_ptrtype(py_talloc_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_0 = 0; binary_oid_cntr_0 < PyList_GET_SIZE(value); binary_oid_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, binary_oid_cntr_0), return -1;);
			object->binary_oid[binary_oid_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, binary_oid_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_MSPrefixMap_Entry_getsetters[] = {
	{ discard_const_p(char, "entryID"), py_drsuapi_MSPrefixMap_Entry_get_entryID, py_drsuapi_MSPrefixMap_Entry_set_entryID },
	{ discard_const_p(char, "length"), py_drsuapi_MSPrefixMap_Entry_get_length, py_drsuapi_MSPrefixMap_Entry_set_length },
	{ discard_const_p(char, "binary_oid"), py_drsuapi_MSPrefixMap_Entry_get_binary_oid, py_drsuapi_MSPrefixMap_Entry_set_binary_oid },
	{ NULL }
};

static PyObject *py_drsuapi_MSPrefixMap_Entry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct drsuapi_MSPrefixMap_Entry, type);
}


static PyTypeObject drsuapi_MSPrefixMap_Entry_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.drsuapi_MSPrefixMap_Entry",
	.tp_getset = py_drsuapi_MSPrefixMap_Entry_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_drsuapi_MSPrefixMap_Entry_new,
};


static PyObject *py_drsuapi_MSPrefixMap_Ctr_get_num_entries(PyObject *obj, void *closure)
{
	struct drsuapi_MSPrefixMap_Ctr *object = (struct drsuapi_MSPrefixMap_Ctr *)py_talloc_get_ptr(obj);
	PyObject *py_num_entries;
	py_num_entries = PyInt_FromLong(object->num_entries);
	return py_num_entries;
}

static int py_drsuapi_MSPrefixMap_Ctr_set_num_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_MSPrefixMap_Ctr *object = (struct drsuapi_MSPrefixMap_Ctr *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_entries = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_drsuapi_MSPrefixMap_Ctr_get___ndr_size(PyObject *obj, void *closure)
{
	struct drsuapi_MSPrefixMap_Ctr *object = (struct drsuapi_MSPrefixMap_Ctr *)py_talloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

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

static PyObject *py_drsuapi_MSPrefixMap_Ctr_get_entries(PyObject *obj, void *closure)
{
	struct drsuapi_MSPrefixMap_Ctr *object = (struct drsuapi_MSPrefixMap_Ctr *)py_talloc_get_ptr(obj);
	PyObject *py_entries;
	py_entries = PyList_New(object->num_entries);
	if (py_entries == NULL) {
		return NULL;
	}
	{
		int entries_cntr_0;
		for (entries_cntr_0 = 0; entries_cntr_0 < object->num_entries; entries_cntr_0++) {
			PyObject *py_entries_0;
			py_entries_0 = py_talloc_reference_ex(&drsuapi_MSPrefixMap_Entry_Type, object->entries, &object->entries[entries_cntr_0]);
			PyList_SetItem(py_entries, entries_cntr_0, py_entries_0);
		}
	}
	return py_entries;
}

static int py_drsuapi_MSPrefixMap_Ctr_set_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct drsuapi_MSPrefixMap_Ctr *object = (struct drsuapi_MSPrefixMap_Ctr *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int entries_cntr_0;
		object->entries = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
		if (!object->entries) { return -1;; }
		talloc_set_name_const(object->entries, "ARRAY: object->entries");
		for (entries_cntr_0 = 0; entries_cntr_0 < PyList_GET_SIZE(value); entries_cntr_0++) {
			PY_CHECK_TYPE(&drsuapi_MSPrefixMap_Entry_Type, PyList_GET_ITEM(value, entries_cntr_0), return -1;);
			if (talloc_reference(object->entries, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->entries[entries_cntr_0] = *(struct drsuapi_MSPrefixMap_Entry *)py_talloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_drsuapi_MSPrefixMap_Ctr_getsetters[] = {
	{ discard_const_p(char, "num_entries"), py_drsuapi_MSPrefixMap_Ctr_get_num_entries, py_drsuapi_MSPrefixMap_Ctr_set_num_entries },
	{ discard_const_p(char, "__ndr_size"), py_drsuapi_MSPrefixMap_Ctr_get___ndr_size, py_drsuapi_MSPrefixMap_Ctr_set___ndr_size },
	{ discard_const_p(char, "entries"), py_drsuapi_MSPrefixMap_Ctr_get_entries, py_drsuapi_MSPrefixMap_Ctr_set_entries },
	{ NULL }
};

static PyObject *py_drsuapi_MSPrefixMap_Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct drsuapi_MSPrefixMap_Ctr, type);
}

static PyObject *py_drsuapi_MSPrefixMap_Ctr_ndr_pack(PyObject *py_obj)
{
	struct drsuapi_MSPrefixMap_Ctr *object = (struct drsuapi_MSPrefixMap_Ctr *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_drsuapi_MSPrefixMap_Ctr);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_drsuapi_MSPrefixMap_Ctr_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct drsuapi_MSPrefixMap_Ctr *object = (struct drsuapi_MSPrefixMap_Ctr *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_MSPrefixMap_Ctr);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_drsuapi_MSPrefixMap_Ctr_ndr_print(PyObject *py_obj)
{
	struct drsuapi_MSPrefixMap_Ctr *object = (struct drsuapi_MSPrefixMap_Ctr *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_MSPrefixMap_Ctr, "drsuapi_MSPrefixMap_Ctr", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_drsuapi_MSPrefixMap_Ctr_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_drsuapi_MSPrefixMap_Ctr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_drsuapi_MSPrefixMap_Ctr_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_drsuapi_MSPrefixMap_Ctr_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject drsuapi_MSPrefixMap_Ctr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.drsuapi_MSPrefixMap_Ctr",
	.tp_getset = py_drsuapi_MSPrefixMap_Ctr_getsetters,
	.tp_methods = py_drsuapi_MSPrefixMap_Ctr_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_drsuapi_MSPrefixMap_Ctr_new,
};

PyObject *py_import_prefixMapCtr(TALLOC_CTX *mem_ctx, int level, union prefixMapCtr *in)
{
	PyObject *ret;

	switch (level) {
		case PREFIX_MAP_VERSION_DSDB:
			ret = py_talloc_reference_ex(drsuapi_DsReplicaOIDMapping_Ctr_Type, mem_ctx, &in->dsdb);
			return ret;

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

union prefixMapCtr *py_export_prefixMapCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union prefixMapCtr *ret = talloc_zero(mem_ctx, union prefixMapCtr);
	switch (level) {
		case PREFIX_MAP_VERSION_DSDB:
			PY_CHECK_TYPE(drsuapi_DsReplicaOIDMapping_Ctr_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->dsdb = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)py_talloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_prefixMapBlob_get_version(PyObject *obj, void *closure)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_prefixMapBlob_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->version = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_prefixMapBlob_get_reserved(PyObject *obj, void *closure)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_prefixMapBlob_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_prefixMapBlob_get_ctr(PyObject *obj, void *closure)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(obj);
	PyObject *py_ctr;
	py_ctr = py_import_prefixMapCtr(py_talloc_get_mem_ctx(obj), object->version, &object->ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	return py_ctr;
}

static int py_prefixMapBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(py_obj);
	{
		union prefixMapCtr *ctr_switch_0;
		ctr_switch_0 = py_export_prefixMapCtr(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (ctr_switch_0 == NULL) {
			return -1;
		}
		object->ctr = *ctr_switch_0;
	}
	return 0;
}

static PyGetSetDef py_prefixMapBlob_getsetters[] = {
	{ discard_const_p(char, "version"), py_prefixMapBlob_get_version, py_prefixMapBlob_set_version },
	{ discard_const_p(char, "reserved"), py_prefixMapBlob_get_reserved, py_prefixMapBlob_set_reserved },
	{ discard_const_p(char, "ctr"), py_prefixMapBlob_get_ctr, py_prefixMapBlob_set_ctr },
	{ NULL }
};

static PyObject *py_prefixMapBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct prefixMapBlob, type);
}

static PyObject *py_prefixMapBlob_ndr_pack(PyObject *py_obj)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_prefixMapBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_prefixMapBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_prefixMapBlob_ndr_print(PyObject *py_obj)
{
	struct prefixMapBlob *object = (struct prefixMapBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_prefixMapBlob, "prefixMapBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_prefixMapBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_prefixMapBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_prefixMapBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_prefixMapBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject prefixMapBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.prefixMapBlob",
	.tp_getset = py_prefixMapBlob_getsetters,
	.tp_methods = py_prefixMapBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_prefixMapBlob_new,
};

PyObject *py_import_ldapControlDirSyncExtra(TALLOC_CTX *mem_ctx, int level, union ldapControlDirSyncExtra *in)
{
	PyObject *ret;

	switch (level) {
		case 0:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

		default:
			ret = py_talloc_reference_ex(&replUpToDateVectorBlob_Type, mem_ctx, &in->uptodateness_vector);
			return ret;

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

union ldapControlDirSyncExtra *py_export_ldapControlDirSyncExtra(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union ldapControlDirSyncExtra *ret = talloc_zero(mem_ctx, union ldapControlDirSyncExtra);
	switch (level) {
		case 0:
			break;

		default:
			PY_CHECK_TYPE(&replUpToDateVectorBlob_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->uptodateness_vector = *(struct replUpToDateVectorBlob *)py_talloc_get_ptr(in);
			break;

	}

	return ret;
}


static PyObject *py_ldapControlDirSyncBlob_get_u1(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(obj);
	PyObject *py_u1;
	py_u1 = PyInt_FromLong(object->u1);
	return py_u1;
}

static int py_ldapControlDirSyncBlob_set_u1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ldapControlDirSyncBlob_get_time(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(obj);
	PyObject *py_time;
	py_time = PyLong_FromLongLong(object->time);
	return py_time;
}

static int py_ldapControlDirSyncBlob_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_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_ldapControlDirSyncBlob_get_u2(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(obj);
	PyObject *py_u2;
	py_u2 = PyInt_FromLong(object->u2);
	return py_u2;
}

static int py_ldapControlDirSyncBlob_set_u2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ldapControlDirSyncBlob_get_u3(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(obj);
	PyObject *py_u3;
	py_u3 = PyInt_FromLong(object->u3);
	return py_u3;
}

static int py_ldapControlDirSyncBlob_set_u3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ldapControlDirSyncBlob_get_extra_length(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(obj);
	PyObject *py_extra_length;
	py_extra_length = PyInt_FromLong(object->extra_length);
	return py_extra_length;
}

static int py_ldapControlDirSyncBlob_set_extra_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->extra_length = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ldapControlDirSyncBlob_get_highwatermark(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(obj);
	PyObject *py_highwatermark;
	py_highwatermark = py_talloc_reference_ex(drsuapi_DsReplicaHighWaterMark_Type, py_talloc_get_mem_ctx(obj), &object->highwatermark);
	return py_highwatermark;
}

static int py_ldapControlDirSyncBlob_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_ldapControlDirSyncBlob_get_guid1(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(obj);
	PyObject *py_guid1;
	py_guid1 = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->guid1);
	return py_guid1;
}

static int py_ldapControlDirSyncBlob_set_guid1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid1 = *(struct GUID *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_ldapControlDirSyncBlob_get_extra(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(obj);
	PyObject *py_extra;
	py_extra = py_import_ldapControlDirSyncExtra(py_talloc_get_mem_ctx(obj), object->extra_length, &object->extra);
	if (py_extra == NULL) {
		return NULL;
	}
	return py_extra;
}

static int py_ldapControlDirSyncBlob_set_extra(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncBlob *object = (struct ldapControlDirSyncBlob *)py_talloc_get_ptr(py_obj);
	{
		union ldapControlDirSyncExtra *extra_switch_0;
		extra_switch_0 = py_export_ldapControlDirSyncExtra(py_talloc_get_mem_ctx(py_obj), object->extra_length, value);
		if (extra_switch_0 == NULL) {
			return -1;
		}
		object->extra = *extra_switch_0;
	}
	return 0;
}

static PyGetSetDef py_ldapControlDirSyncBlob_getsetters[] = {
	{ discard_const_p(char, "u1"), py_ldapControlDirSyncBlob_get_u1, py_ldapControlDirSyncBlob_set_u1 },
	{ discard_const_p(char, "time"), py_ldapControlDirSyncBlob_get_time, py_ldapControlDirSyncBlob_set_time },
	{ discard_const_p(char, "u2"), py_ldapControlDirSyncBlob_get_u2, py_ldapControlDirSyncBlob_set_u2 },
	{ discard_const_p(char, "u3"), py_ldapControlDirSyncBlob_get_u3, py_ldapControlDirSyncBlob_set_u3 },
	{ discard_const_p(char, "extra_length"), py_ldapControlDirSyncBlob_get_extra_length, py_ldapControlDirSyncBlob_set_extra_length },
	{ discard_const_p(char, "highwatermark"), py_ldapControlDirSyncBlob_get_highwatermark, py_ldapControlDirSyncBlob_set_highwatermark },
	{ discard_const_p(char, "guid1"), py_ldapControlDirSyncBlob_get_guid1, py_ldapControlDirSyncBlob_set_guid1 },
	{ discard_const_p(char, "extra"), py_ldapControlDirSyncBlob_get_extra, py_ldapControlDirSyncBlob_set_extra },
	{ NULL }
};

static PyObject *py_ldapControlDirSyncBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ldapControlDirSyncBlob, type);
}


static PyTypeObject ldapControlDirSyncBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ldapControlDirSyncBlob",
	.tp_getset = py_ldapControlDirSyncBlob_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ldapControlDirSyncBlob_new,
};


static PyObject *py_ldapControlDirSyncCookie_get_msds(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncCookie *object = (struct ldapControlDirSyncCookie *)py_talloc_get_ptr(obj);
	PyObject *py_msds;
	if (object->msds == NULL) {
		py_msds = Py_None;
		Py_INCREF(py_msds);
	} else {
		py_msds = PyUnicode_Decode(object->msds, strlen(object->msds), "utf-8", "ignore");
	}
	return py_msds;
}

static int py_ldapControlDirSyncCookie_set_msds(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncCookie *object = (struct ldapControlDirSyncCookie *)py_talloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->msds = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->msds = 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_ldapControlDirSyncCookie_get_blob(PyObject *obj, void *closure)
{
	struct ldapControlDirSyncCookie *object = (struct ldapControlDirSyncCookie *)py_talloc_get_ptr(obj);
	PyObject *py_blob;
	py_blob = py_talloc_reference_ex(&ldapControlDirSyncBlob_Type, py_talloc_get_mem_ctx(obj), &object->blob);
	return py_blob;
}

static int py_ldapControlDirSyncCookie_set_blob(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ldapControlDirSyncCookie *object = (struct ldapControlDirSyncCookie *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&ldapControlDirSyncBlob_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->blob = *(struct ldapControlDirSyncBlob *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_ldapControlDirSyncCookie_getsetters[] = {
	{ discard_const_p(char, "msds"), py_ldapControlDirSyncCookie_get_msds, py_ldapControlDirSyncCookie_set_msds },
	{ discard_const_p(char, "blob"), py_ldapControlDirSyncCookie_get_blob, py_ldapControlDirSyncCookie_set_blob },
	{ NULL }
};

static PyObject *py_ldapControlDirSyncCookie_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ldapControlDirSyncCookie, type);
}

static PyObject *py_ldapControlDirSyncCookie_ndr_pack(PyObject *py_obj)
{
	struct ldapControlDirSyncCookie *object = (struct ldapControlDirSyncCookie *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncCookie);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_ldapControlDirSyncCookie_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct ldapControlDirSyncCookie *object = (struct ldapControlDirSyncCookie *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ldapControlDirSyncCookie);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_ldapControlDirSyncCookie_ndr_print(PyObject *py_obj)
{
	struct ldapControlDirSyncCookie *object = (struct ldapControlDirSyncCookie *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ldapControlDirSyncCookie, "ldapControlDirSyncCookie", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_ldapControlDirSyncCookie_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_ldapControlDirSyncCookie_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_ldapControlDirSyncCookie_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_ldapControlDirSyncCookie_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject ldapControlDirSyncCookie_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ldapControlDirSyncCookie",
	.tp_getset = py_ldapControlDirSyncCookie_getsetters,
	.tp_methods = py_ldapControlDirSyncCookie_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ldapControlDirSyncCookie_new,
};


static PyObject *py_supplementalCredentialsPackage_get_name_len(PyObject *obj, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(obj);
	PyObject *py_name_len;
	py_name_len = PyInt_FromLong(object->name_len);
	return py_name_len;
}

static int py_supplementalCredentialsPackage_set_name_len(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->name_len = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_supplementalCredentialsPackage_get_data_len(PyObject *obj, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(obj);
	PyObject *py_data_len;
	py_data_len = PyInt_FromLong(object->data_len);
	return py_data_len;
}

static int py_supplementalCredentialsPackage_set_data_len(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->data_len = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_supplementalCredentialsPackage_get_reserved(PyObject *obj, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_supplementalCredentialsPackage_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_supplementalCredentialsPackage_get_name(PyObject *obj, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(obj);
	PyObject *py_name;
	if (object->name == NULL) {
		py_name = Py_None;
		Py_INCREF(py_name);
	} else {
		py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
	}
	return py_name;
}

static int py_supplementalCredentialsPackage_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->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_supplementalCredentialsPackage_get_data(PyObject *obj, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyUnicode_Decode(object->data, strlen(object->data), "utf-8", "ignore");
	}
	return py_data;
}

static int py_supplementalCredentialsPackage_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsPackage *object = (struct supplementalCredentialsPackage *)py_talloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->data = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->data = 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_supplementalCredentialsPackage_getsetters[] = {
	{ discard_const_p(char, "name_len"), py_supplementalCredentialsPackage_get_name_len, py_supplementalCredentialsPackage_set_name_len },
	{ discard_const_p(char, "data_len"), py_supplementalCredentialsPackage_get_data_len, py_supplementalCredentialsPackage_set_data_len },
	{ discard_const_p(char, "reserved"), py_supplementalCredentialsPackage_get_reserved, py_supplementalCredentialsPackage_set_reserved },
	{ discard_const_p(char, "name"), py_supplementalCredentialsPackage_get_name, py_supplementalCredentialsPackage_set_name },
	{ discard_const_p(char, "data"), py_supplementalCredentialsPackage_get_data, py_supplementalCredentialsPackage_set_data },
	{ NULL }
};

static PyObject *py_supplementalCredentialsPackage_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct supplementalCredentialsPackage, type);
}


static PyTypeObject supplementalCredentialsPackage_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.supplementalCredentialsPackage",
	.tp_getset = py_supplementalCredentialsPackage_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_supplementalCredentialsPackage_new,
};


static PyObject *py_supplementalCredentialsSubBlob_get_prefix(PyObject *obj, void *closure)
{
	struct supplementalCredentialsSubBlob *object = (struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(obj);
	PyObject *py_prefix;
	if (object->prefix == NULL) {
		py_prefix = Py_None;
		Py_INCREF(py_prefix);
	} else {
		py_prefix = PyUnicode_Decode(object->prefix, strlen(object->prefix), "utf-8", "ignore");
	}
	return py_prefix;
}

static int py_supplementalCredentialsSubBlob_set_prefix(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsSubBlob *object = (struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->prefix = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->prefix = 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_supplementalCredentialsSubBlob_get_signature(PyObject *obj, void *closure)
{
	struct supplementalCredentialsSubBlob *object = (struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(obj);
	PyObject *py_signature;
	py_signature = PyInt_FromLong(object->signature);
	return py_signature;
}

static int py_supplementalCredentialsSubBlob_set_signature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsSubBlob *object = (struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->signature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->signature = 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_supplementalCredentialsSubBlob_get_num_packages(PyObject *obj, void *closure)
{
	struct supplementalCredentialsSubBlob *object = (struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(obj);
	PyObject *py_num_packages;
	py_num_packages = PyInt_FromLong(object->num_packages);
	return py_num_packages;
}

static int py_supplementalCredentialsSubBlob_set_num_packages(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsSubBlob *object = (struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_packages = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_supplementalCredentialsSubBlob_get_packages(PyObject *obj, void *closure)
{
	struct supplementalCredentialsSubBlob *object = (struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(obj);
	PyObject *py_packages;
	py_packages = PyList_New(object->num_packages);
	if (py_packages == NULL) {
		return NULL;
	}
	{
		int packages_cntr_0;
		for (packages_cntr_0 = 0; packages_cntr_0 < object->num_packages; packages_cntr_0++) {
			PyObject *py_packages_0;
			py_packages_0 = py_talloc_reference_ex(&supplementalCredentialsPackage_Type, object->packages, &object->packages[packages_cntr_0]);
			PyList_SetItem(py_packages, packages_cntr_0, py_packages_0);
		}
	}
	return py_packages;
}

static int py_supplementalCredentialsSubBlob_set_packages(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsSubBlob *object = (struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int packages_cntr_0;
		object->packages = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->packages, PyList_GET_SIZE(value));
		if (!object->packages) { return -1;; }
		talloc_set_name_const(object->packages, "ARRAY: object->packages");
		for (packages_cntr_0 = 0; packages_cntr_0 < PyList_GET_SIZE(value); packages_cntr_0++) {
			PY_CHECK_TYPE(&supplementalCredentialsPackage_Type, PyList_GET_ITEM(value, packages_cntr_0), return -1;);
			if (talloc_reference(object->packages, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, packages_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->packages[packages_cntr_0] = *(struct supplementalCredentialsPackage *)py_talloc_get_ptr(PyList_GET_ITEM(value, packages_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_supplementalCredentialsSubBlob_getsetters[] = {
	{ discard_const_p(char, "prefix"), py_supplementalCredentialsSubBlob_get_prefix, py_supplementalCredentialsSubBlob_set_prefix },
	{ discard_const_p(char, "signature"), py_supplementalCredentialsSubBlob_get_signature, py_supplementalCredentialsSubBlob_set_signature },
	{ discard_const_p(char, "num_packages"), py_supplementalCredentialsSubBlob_get_num_packages, py_supplementalCredentialsSubBlob_set_num_packages },
	{ discard_const_p(char, "packages"), py_supplementalCredentialsSubBlob_get_packages, py_supplementalCredentialsSubBlob_set_packages },
	{ NULL }
};

static PyObject *py_supplementalCredentialsSubBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct supplementalCredentialsSubBlob, type);
}


static PyTypeObject supplementalCredentialsSubBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.supplementalCredentialsSubBlob",
	.tp_getset = py_supplementalCredentialsSubBlob_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_supplementalCredentialsSubBlob_new,
};


static PyObject *py_supplementalCredentialsBlob_get_unknown1(PyObject *obj, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyInt_FromLong(object->unknown1);
	return py_unknown1;
}

static int py_supplementalCredentialsBlob_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_supplementalCredentialsBlob_get___ndr_size(PyObject *obj, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(obj);
	PyObject *py___ndr_size;
	py___ndr_size = PyInt_FromLong(object->__ndr_size);
	return py___ndr_size;
}

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

static PyObject *py_supplementalCredentialsBlob_get_unknown2(PyObject *obj, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = PyInt_FromLong(object->unknown2);
	return py_unknown2;
}

static int py_supplementalCredentialsBlob_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_supplementalCredentialsBlob_get_sub(PyObject *obj, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(obj);
	PyObject *py_sub;
	py_sub = py_talloc_reference_ex(&supplementalCredentialsSubBlob_Type, py_talloc_get_mem_ctx(obj), &object->sub);
	return py_sub;
}

static int py_supplementalCredentialsBlob_set_sub(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&supplementalCredentialsSubBlob_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sub = *(struct supplementalCredentialsSubBlob *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_supplementalCredentialsBlob_get_unknown3(PyObject *obj, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = PyInt_FromLong(object->unknown3);
	return py_unknown3;
}

static int py_supplementalCredentialsBlob_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown3 = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_supplementalCredentialsBlob_getsetters[] = {
	{ discard_const_p(char, "unknown1"), py_supplementalCredentialsBlob_get_unknown1, py_supplementalCredentialsBlob_set_unknown1 },
	{ discard_const_p(char, "__ndr_size"), py_supplementalCredentialsBlob_get___ndr_size, py_supplementalCredentialsBlob_set___ndr_size },
	{ discard_const_p(char, "unknown2"), py_supplementalCredentialsBlob_get_unknown2, py_supplementalCredentialsBlob_set_unknown2 },
	{ discard_const_p(char, "sub"), py_supplementalCredentialsBlob_get_sub, py_supplementalCredentialsBlob_set_sub },
	{ discard_const_p(char, "unknown3"), py_supplementalCredentialsBlob_get_unknown3, py_supplementalCredentialsBlob_set_unknown3 },
	{ NULL }
};

static PyObject *py_supplementalCredentialsBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct supplementalCredentialsBlob, type);
}

static PyObject *py_supplementalCredentialsBlob_ndr_pack(PyObject *py_obj)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_supplementalCredentialsBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_supplementalCredentialsBlob_ndr_print(PyObject *py_obj)
{
	struct supplementalCredentialsBlob *object = (struct supplementalCredentialsBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_supplementalCredentialsBlob, "supplementalCredentialsBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_supplementalCredentialsBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_supplementalCredentialsBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_supplementalCredentialsBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_supplementalCredentialsBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject supplementalCredentialsBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.supplementalCredentialsBlob",
	.tp_getset = py_supplementalCredentialsBlob_getsetters,
	.tp_methods = py_supplementalCredentialsBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_supplementalCredentialsBlob_new,
};


static PyObject *py_package_PackagesBlob_get_names(PyObject *obj, void *closure)
{
	struct package_PackagesBlob *object = (struct package_PackagesBlob *)py_talloc_get_ptr(obj);
	PyObject *py_names;
	py_names = PyCObject_FromTallocPtr(object->names);
	return py_names;
}

static int py_package_PackagesBlob_set_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PackagesBlob *object = (struct package_PackagesBlob *)py_talloc_get_ptr(py_obj);
	object->names = PyCObject_AsVoidPtr(value);
	return 0;
}

static PyGetSetDef py_package_PackagesBlob_getsetters[] = {
	{ discard_const_p(char, "names"), py_package_PackagesBlob_get_names, py_package_PackagesBlob_set_names },
	{ NULL }
};

static PyObject *py_package_PackagesBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PackagesBlob, type);
}

static PyObject *py_package_PackagesBlob_ndr_pack(PyObject *py_obj)
{
	struct package_PackagesBlob *object = (struct package_PackagesBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_package_PackagesBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_package_PackagesBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct package_PackagesBlob *object = (struct package_PackagesBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PackagesBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_package_PackagesBlob_ndr_print(PyObject *py_obj)
{
	struct package_PackagesBlob *object = (struct package_PackagesBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PackagesBlob, "package_PackagesBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_package_PackagesBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_package_PackagesBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_package_PackagesBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_package_PackagesBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject package_PackagesBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PackagesBlob",
	.tp_getset = py_package_PackagesBlob_getsetters,
	.tp_methods = py_package_PackagesBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PackagesBlob_new,
};


static PyObject *py_package_PrimaryKerberosString_get_length(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosString *object = (struct package_PrimaryKerberosString *)py_talloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyInt_FromLong(object->length);
	return py_length;
}

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

static PyObject *py_package_PrimaryKerberosString_get_size(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosString *object = (struct package_PrimaryKerberosString *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_package_PrimaryKerberosString_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosString *object = (struct package_PrimaryKerberosString *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosString_get_string(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosString *object = (struct package_PrimaryKerberosString *)py_talloc_get_ptr(obj);
	PyObject *py_string;
	if (object->string == NULL) {
		py_string = Py_None;
		Py_INCREF(py_string);
	} else {
		py_string = PyString_FromStringOrNULL(object->string);
	}
	return py_string;
}

static int py_package_PrimaryKerberosString_set_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosString *object = (struct package_PrimaryKerberosString *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->string);
	if (value == Py_None) {
		object->string = NULL;
	} else {
		object->string = NULL;
		object->string = talloc_strdup(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_package_PrimaryKerberosString_getsetters[] = {
	{ discard_const_p(char, "length"), py_package_PrimaryKerberosString_get_length, py_package_PrimaryKerberosString_set_length },
	{ discard_const_p(char, "size"), py_package_PrimaryKerberosString_get_size, py_package_PrimaryKerberosString_set_size },
	{ discard_const_p(char, "string"), py_package_PrimaryKerberosString_get_string, py_package_PrimaryKerberosString_set_string },
	{ NULL }
};

static PyObject *py_package_PrimaryKerberosString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryKerberosString, type);
}


static PyTypeObject package_PrimaryKerberosString_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryKerberosString",
	.tp_getset = py_package_PrimaryKerberosString_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryKerberosString_new,
};


static PyObject *py_package_PrimaryKerberosKey3_get_reserved1(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved1;
	py_reserved1 = PyInt_FromLong(object->reserved1);
	return py_reserved1;
}

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

static PyObject *py_package_PrimaryKerberosKey3_get_reserved2(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved2;
	py_reserved2 = PyInt_FromLong(object->reserved2);
	return py_reserved2;
}

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

static PyObject *py_package_PrimaryKerberosKey3_get_reserved3(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved3;
	py_reserved3 = PyInt_FromLong(object->reserved3);
	return py_reserved3;
}

static int py_package_PrimaryKerberosKey3_set_reserved3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosKey3_get_keytype(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(obj);
	PyObject *py_keytype;
	py_keytype = PyInt_FromLong(object->keytype);
	return py_keytype;
}

static int py_package_PrimaryKerberosKey3_set_keytype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->keytype = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosKey3_get_value_len(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(obj);
	PyObject *py_value_len;
	py_value_len = PyInt_FromLong(object->value_len);
	return py_value_len;
}

static int py_package_PrimaryKerberosKey3_set_value_len(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->value_len = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosKey3_get_value(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(obj);
	PyObject *py_value;
	if (object->value == NULL) {
		py_value = Py_None;
		Py_INCREF(py_value);
	} else {
		py_value = PyString_FromStringAndSize((char *)(*object->value).data, (*object->value).length);
	}
	return py_value;
}

static int py_package_PrimaryKerberosKey3_set_value(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey3 *object = (struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->value);
	if (value == Py_None) {
		object->value = NULL;
	} else {
		object->value = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->value);
		*object->value = data_blob_talloc(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	}
	return 0;
}

static PyGetSetDef py_package_PrimaryKerberosKey3_getsetters[] = {
	{ discard_const_p(char, "reserved1"), py_package_PrimaryKerberosKey3_get_reserved1, py_package_PrimaryKerberosKey3_set_reserved1 },
	{ discard_const_p(char, "reserved2"), py_package_PrimaryKerberosKey3_get_reserved2, py_package_PrimaryKerberosKey3_set_reserved2 },
	{ discard_const_p(char, "reserved3"), py_package_PrimaryKerberosKey3_get_reserved3, py_package_PrimaryKerberosKey3_set_reserved3 },
	{ discard_const_p(char, "keytype"), py_package_PrimaryKerberosKey3_get_keytype, py_package_PrimaryKerberosKey3_set_keytype },
	{ discard_const_p(char, "value_len"), py_package_PrimaryKerberosKey3_get_value_len, py_package_PrimaryKerberosKey3_set_value_len },
	{ discard_const_p(char, "value"), py_package_PrimaryKerberosKey3_get_value, py_package_PrimaryKerberosKey3_set_value },
	{ NULL }
};

static PyObject *py_package_PrimaryKerberosKey3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryKerberosKey3, type);
}


static PyTypeObject package_PrimaryKerberosKey3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryKerberosKey3",
	.tp_getset = py_package_PrimaryKerberosKey3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryKerberosKey3_new,
};


static PyObject *py_package_PrimaryKerberosCtr3_get_num_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_num_keys;
	py_num_keys = PyInt_FromLong(object->num_keys);
	return py_num_keys;
}

static int py_package_PrimaryKerberosCtr3_set_num_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_keys = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_num_old_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_num_old_keys;
	py_num_old_keys = PyInt_FromLong(object->num_old_keys);
	return py_num_old_keys;
}

static int py_package_PrimaryKerberosCtr3_set_num_old_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_old_keys = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_salt(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_salt;
	py_salt = py_talloc_reference_ex(&package_PrimaryKerberosString_Type, py_talloc_get_mem_ctx(obj), &object->salt);
	return py_salt;
}

static int py_package_PrimaryKerberosCtr3_set_salt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&package_PrimaryKerberosString_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->salt = *(struct package_PrimaryKerberosString *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_keys;
	py_keys = PyList_New(object->num_keys);
	if (py_keys == NULL) {
		return NULL;
	}
	{
		int keys_cntr_0;
		for (keys_cntr_0 = 0; keys_cntr_0 < object->num_keys; keys_cntr_0++) {
			PyObject *py_keys_0;
			py_keys_0 = py_talloc_reference_ex(&package_PrimaryKerberosKey3_Type, object->keys, &object->keys[keys_cntr_0]);
			PyList_SetItem(py_keys, keys_cntr_0, py_keys_0);
		}
	}
	return py_keys;
}

static int py_package_PrimaryKerberosCtr3_set_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int keys_cntr_0;
		object->keys = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->keys, PyList_GET_SIZE(value));
		if (!object->keys) { return -1;; }
		talloc_set_name_const(object->keys, "ARRAY: object->keys");
		for (keys_cntr_0 = 0; keys_cntr_0 < PyList_GET_SIZE(value); keys_cntr_0++) {
			PY_CHECK_TYPE(&package_PrimaryKerberosKey3_Type, PyList_GET_ITEM(value, keys_cntr_0), return -1;);
			if (talloc_reference(object->keys, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, keys_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->keys[keys_cntr_0] = *(struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(PyList_GET_ITEM(value, keys_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_old_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_old_keys;
	py_old_keys = PyList_New(object->num_old_keys);
	if (py_old_keys == NULL) {
		return NULL;
	}
	{
		int old_keys_cntr_0;
		for (old_keys_cntr_0 = 0; old_keys_cntr_0 < object->num_old_keys; old_keys_cntr_0++) {
			PyObject *py_old_keys_0;
			py_old_keys_0 = py_talloc_reference_ex(&package_PrimaryKerberosKey3_Type, object->old_keys, &object->old_keys[old_keys_cntr_0]);
			PyList_SetItem(py_old_keys, old_keys_cntr_0, py_old_keys_0);
		}
	}
	return py_old_keys;
}

static int py_package_PrimaryKerberosCtr3_set_old_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int old_keys_cntr_0;
		object->old_keys = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->old_keys, PyList_GET_SIZE(value));
		if (!object->old_keys) { return -1;; }
		talloc_set_name_const(object->old_keys, "ARRAY: object->old_keys");
		for (old_keys_cntr_0 = 0; old_keys_cntr_0 < PyList_GET_SIZE(value); old_keys_cntr_0++) {
			PY_CHECK_TYPE(&package_PrimaryKerberosKey3_Type, PyList_GET_ITEM(value, old_keys_cntr_0), return -1;);
			if (talloc_reference(object->old_keys, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, old_keys_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->old_keys[old_keys_cntr_0] = *(struct package_PrimaryKerberosKey3 *)py_talloc_get_ptr(PyList_GET_ITEM(value, old_keys_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_padding1(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_padding1;
	py_padding1 = PyInt_FromLong(object->padding1);
	return py_padding1;
}

static int py_package_PrimaryKerberosCtr3_set_padding1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->padding1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_padding2(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_padding2;
	py_padding2 = PyInt_FromLong(object->padding2);
	return py_padding2;
}

static int py_package_PrimaryKerberosCtr3_set_padding2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->padding2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_padding3(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_padding3;
	py_padding3 = PyInt_FromLong(object->padding3);
	return py_padding3;
}

static int py_package_PrimaryKerberosCtr3_set_padding3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->padding3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_padding4(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_padding4;
	py_padding4 = PyInt_FromLong(object->padding4);
	return py_padding4;
}

static int py_package_PrimaryKerberosCtr3_set_padding4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->padding4 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr3_get_padding5(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(obj);
	PyObject *py_padding5;
	py_padding5 = PyInt_FromLong(object->padding5);
	return py_padding5;
}

static int py_package_PrimaryKerberosCtr3_set_padding5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr3 *object = (struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->padding5 = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_package_PrimaryKerberosCtr3_getsetters[] = {
	{ discard_const_p(char, "num_keys"), py_package_PrimaryKerberosCtr3_get_num_keys, py_package_PrimaryKerberosCtr3_set_num_keys },
	{ discard_const_p(char, "num_old_keys"), py_package_PrimaryKerberosCtr3_get_num_old_keys, py_package_PrimaryKerberosCtr3_set_num_old_keys },
	{ discard_const_p(char, "salt"), py_package_PrimaryKerberosCtr3_get_salt, py_package_PrimaryKerberosCtr3_set_salt },
	{ discard_const_p(char, "keys"), py_package_PrimaryKerberosCtr3_get_keys, py_package_PrimaryKerberosCtr3_set_keys },
	{ discard_const_p(char, "old_keys"), py_package_PrimaryKerberosCtr3_get_old_keys, py_package_PrimaryKerberosCtr3_set_old_keys },
	{ discard_const_p(char, "padding1"), py_package_PrimaryKerberosCtr3_get_padding1, py_package_PrimaryKerberosCtr3_set_padding1 },
	{ discard_const_p(char, "padding2"), py_package_PrimaryKerberosCtr3_get_padding2, py_package_PrimaryKerberosCtr3_set_padding2 },
	{ discard_const_p(char, "padding3"), py_package_PrimaryKerberosCtr3_get_padding3, py_package_PrimaryKerberosCtr3_set_padding3 },
	{ discard_const_p(char, "padding4"), py_package_PrimaryKerberosCtr3_get_padding4, py_package_PrimaryKerberosCtr3_set_padding4 },
	{ discard_const_p(char, "padding5"), py_package_PrimaryKerberosCtr3_get_padding5, py_package_PrimaryKerberosCtr3_set_padding5 },
	{ NULL }
};

static PyObject *py_package_PrimaryKerberosCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryKerberosCtr3, type);
}


static PyTypeObject package_PrimaryKerberosCtr3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryKerberosCtr3",
	.tp_getset = py_package_PrimaryKerberosCtr3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryKerberosCtr3_new,
};


static PyObject *py_package_PrimaryKerberosKey4_get_reserved1(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved1;
	py_reserved1 = PyInt_FromLong(object->reserved1);
	return py_reserved1;
}

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

static PyObject *py_package_PrimaryKerberosKey4_get_reserved2(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved2;
	py_reserved2 = PyInt_FromLong(object->reserved2);
	return py_reserved2;
}

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

static PyObject *py_package_PrimaryKerberosKey4_get_reserved3(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(obj);
	PyObject *py_reserved3;
	py_reserved3 = PyInt_FromLong(object->reserved3);
	return py_reserved3;
}

static int py_package_PrimaryKerberosKey4_set_reserved3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosKey4_get_iteration_count(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(obj);
	PyObject *py_iteration_count;
	py_iteration_count = PyInt_FromLong(object->iteration_count);
	return py_iteration_count;
}

static int py_package_PrimaryKerberosKey4_set_iteration_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->iteration_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosKey4_get_keytype(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(obj);
	PyObject *py_keytype;
	py_keytype = PyInt_FromLong(object->keytype);
	return py_keytype;
}

static int py_package_PrimaryKerberosKey4_set_keytype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->keytype = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosKey4_get_value_len(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(obj);
	PyObject *py_value_len;
	py_value_len = PyInt_FromLong(object->value_len);
	return py_value_len;
}

static int py_package_PrimaryKerberosKey4_set_value_len(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->value_len = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosKey4_get_value(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(obj);
	PyObject *py_value;
	if (object->value == NULL) {
		py_value = Py_None;
		Py_INCREF(py_value);
	} else {
		py_value = PyString_FromStringAndSize((char *)(*object->value).data, (*object->value).length);
	}
	return py_value;
}

static int py_package_PrimaryKerberosKey4_set_value(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosKey4 *object = (struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->value);
	if (value == Py_None) {
		object->value = NULL;
	} else {
		object->value = talloc_ptrtype(py_talloc_get_mem_ctx(py_obj), object->value);
		*object->value = data_blob_talloc(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	}
	return 0;
}

static PyGetSetDef py_package_PrimaryKerberosKey4_getsetters[] = {
	{ discard_const_p(char, "reserved1"), py_package_PrimaryKerberosKey4_get_reserved1, py_package_PrimaryKerberosKey4_set_reserved1 },
	{ discard_const_p(char, "reserved2"), py_package_PrimaryKerberosKey4_get_reserved2, py_package_PrimaryKerberosKey4_set_reserved2 },
	{ discard_const_p(char, "reserved3"), py_package_PrimaryKerberosKey4_get_reserved3, py_package_PrimaryKerberosKey4_set_reserved3 },
	{ discard_const_p(char, "iteration_count"), py_package_PrimaryKerberosKey4_get_iteration_count, py_package_PrimaryKerberosKey4_set_iteration_count },
	{ discard_const_p(char, "keytype"), py_package_PrimaryKerberosKey4_get_keytype, py_package_PrimaryKerberosKey4_set_keytype },
	{ discard_const_p(char, "value_len"), py_package_PrimaryKerberosKey4_get_value_len, py_package_PrimaryKerberosKey4_set_value_len },
	{ discard_const_p(char, "value"), py_package_PrimaryKerberosKey4_get_value, py_package_PrimaryKerberosKey4_set_value },
	{ NULL }
};

static PyObject *py_package_PrimaryKerberosKey4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryKerberosKey4, type);
}


static PyTypeObject package_PrimaryKerberosKey4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryKerberosKey4",
	.tp_getset = py_package_PrimaryKerberosKey4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryKerberosKey4_new,
};


static PyObject *py_package_PrimaryKerberosCtr4_get_num_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_num_keys;
	py_num_keys = PyInt_FromLong(object->num_keys);
	return py_num_keys;
}

static int py_package_PrimaryKerberosCtr4_set_num_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_keys = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_num_service_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_num_service_keys;
	py_num_service_keys = PyInt_FromLong(object->num_service_keys);
	return py_num_service_keys;
}

static int py_package_PrimaryKerberosCtr4_set_num_service_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_service_keys = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_num_old_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_num_old_keys;
	py_num_old_keys = PyInt_FromLong(object->num_old_keys);
	return py_num_old_keys;
}

static int py_package_PrimaryKerberosCtr4_set_num_old_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_old_keys = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_num_older_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_num_older_keys;
	py_num_older_keys = PyInt_FromLong(object->num_older_keys);
	return py_num_older_keys;
}

static int py_package_PrimaryKerberosCtr4_set_num_older_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_older_keys = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_salt(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_salt;
	py_salt = py_talloc_reference_ex(&package_PrimaryKerberosString_Type, py_talloc_get_mem_ctx(obj), &object->salt);
	return py_salt;
}

static int py_package_PrimaryKerberosCtr4_set_salt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&package_PrimaryKerberosString_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->salt = *(struct package_PrimaryKerberosString *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_default_iteration_count(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_default_iteration_count;
	py_default_iteration_count = PyInt_FromLong(object->default_iteration_count);
	return py_default_iteration_count;
}

static int py_package_PrimaryKerberosCtr4_set_default_iteration_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->default_iteration_count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_keys;
	py_keys = PyList_New(object->num_keys);
	if (py_keys == NULL) {
		return NULL;
	}
	{
		int keys_cntr_0;
		for (keys_cntr_0 = 0; keys_cntr_0 < object->num_keys; keys_cntr_0++) {
			PyObject *py_keys_0;
			py_keys_0 = py_talloc_reference_ex(&package_PrimaryKerberosKey4_Type, object->keys, &object->keys[keys_cntr_0]);
			PyList_SetItem(py_keys, keys_cntr_0, py_keys_0);
		}
	}
	return py_keys;
}

static int py_package_PrimaryKerberosCtr4_set_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int keys_cntr_0;
		object->keys = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->keys, PyList_GET_SIZE(value));
		if (!object->keys) { return -1;; }
		talloc_set_name_const(object->keys, "ARRAY: object->keys");
		for (keys_cntr_0 = 0; keys_cntr_0 < PyList_GET_SIZE(value); keys_cntr_0++) {
			PY_CHECK_TYPE(&package_PrimaryKerberosKey4_Type, PyList_GET_ITEM(value, keys_cntr_0), return -1;);
			if (talloc_reference(object->keys, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, keys_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->keys[keys_cntr_0] = *(struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(PyList_GET_ITEM(value, keys_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_service_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_service_keys;
	py_service_keys = PyList_New(object->num_service_keys);
	if (py_service_keys == NULL) {
		return NULL;
	}
	{
		int service_keys_cntr_0;
		for (service_keys_cntr_0 = 0; service_keys_cntr_0 < object->num_service_keys; service_keys_cntr_0++) {
			PyObject *py_service_keys_0;
			py_service_keys_0 = py_talloc_reference_ex(&package_PrimaryKerberosKey4_Type, object->service_keys, &object->service_keys[service_keys_cntr_0]);
			PyList_SetItem(py_service_keys, service_keys_cntr_0, py_service_keys_0);
		}
	}
	return py_service_keys;
}

static int py_package_PrimaryKerberosCtr4_set_service_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int service_keys_cntr_0;
		object->service_keys = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->service_keys, PyList_GET_SIZE(value));
		if (!object->service_keys) { return -1;; }
		talloc_set_name_const(object->service_keys, "ARRAY: object->service_keys");
		for (service_keys_cntr_0 = 0; service_keys_cntr_0 < PyList_GET_SIZE(value); service_keys_cntr_0++) {
			PY_CHECK_TYPE(&package_PrimaryKerberosKey4_Type, PyList_GET_ITEM(value, service_keys_cntr_0), return -1;);
			if (talloc_reference(object->service_keys, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, service_keys_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->service_keys[service_keys_cntr_0] = *(struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(PyList_GET_ITEM(value, service_keys_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_old_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_old_keys;
	py_old_keys = PyList_New(object->num_old_keys);
	if (py_old_keys == NULL) {
		return NULL;
	}
	{
		int old_keys_cntr_0;
		for (old_keys_cntr_0 = 0; old_keys_cntr_0 < object->num_old_keys; old_keys_cntr_0++) {
			PyObject *py_old_keys_0;
			py_old_keys_0 = py_talloc_reference_ex(&package_PrimaryKerberosKey4_Type, object->old_keys, &object->old_keys[old_keys_cntr_0]);
			PyList_SetItem(py_old_keys, old_keys_cntr_0, py_old_keys_0);
		}
	}
	return py_old_keys;
}

static int py_package_PrimaryKerberosCtr4_set_old_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int old_keys_cntr_0;
		object->old_keys = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->old_keys, PyList_GET_SIZE(value));
		if (!object->old_keys) { return -1;; }
		talloc_set_name_const(object->old_keys, "ARRAY: object->old_keys");
		for (old_keys_cntr_0 = 0; old_keys_cntr_0 < PyList_GET_SIZE(value); old_keys_cntr_0++) {
			PY_CHECK_TYPE(&package_PrimaryKerberosKey4_Type, PyList_GET_ITEM(value, old_keys_cntr_0), return -1;);
			if (talloc_reference(object->old_keys, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, old_keys_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->old_keys[old_keys_cntr_0] = *(struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(PyList_GET_ITEM(value, old_keys_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_package_PrimaryKerberosCtr4_get_older_keys(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(obj);
	PyObject *py_older_keys;
	py_older_keys = PyList_New(object->num_older_keys);
	if (py_older_keys == NULL) {
		return NULL;
	}
	{
		int older_keys_cntr_0;
		for (older_keys_cntr_0 = 0; older_keys_cntr_0 < object->num_older_keys; older_keys_cntr_0++) {
			PyObject *py_older_keys_0;
			py_older_keys_0 = py_talloc_reference_ex(&package_PrimaryKerberosKey4_Type, object->older_keys, &object->older_keys[older_keys_cntr_0]);
			PyList_SetItem(py_older_keys, older_keys_cntr_0, py_older_keys_0);
		}
	}
	return py_older_keys;
}

static int py_package_PrimaryKerberosCtr4_set_older_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosCtr4 *object = (struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int older_keys_cntr_0;
		object->older_keys = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->older_keys, PyList_GET_SIZE(value));
		if (!object->older_keys) { return -1;; }
		talloc_set_name_const(object->older_keys, "ARRAY: object->older_keys");
		for (older_keys_cntr_0 = 0; older_keys_cntr_0 < PyList_GET_SIZE(value); older_keys_cntr_0++) {
			PY_CHECK_TYPE(&package_PrimaryKerberosKey4_Type, PyList_GET_ITEM(value, older_keys_cntr_0), return -1;);
			if (talloc_reference(object->older_keys, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, older_keys_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->older_keys[older_keys_cntr_0] = *(struct package_PrimaryKerberosKey4 *)py_talloc_get_ptr(PyList_GET_ITEM(value, older_keys_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_package_PrimaryKerberosCtr4_getsetters[] = {
	{ discard_const_p(char, "num_keys"), py_package_PrimaryKerberosCtr4_get_num_keys, py_package_PrimaryKerberosCtr4_set_num_keys },
	{ discard_const_p(char, "num_service_keys"), py_package_PrimaryKerberosCtr4_get_num_service_keys, py_package_PrimaryKerberosCtr4_set_num_service_keys },
	{ discard_const_p(char, "num_old_keys"), py_package_PrimaryKerberosCtr4_get_num_old_keys, py_package_PrimaryKerberosCtr4_set_num_old_keys },
	{ discard_const_p(char, "num_older_keys"), py_package_PrimaryKerberosCtr4_get_num_older_keys, py_package_PrimaryKerberosCtr4_set_num_older_keys },
	{ discard_const_p(char, "salt"), py_package_PrimaryKerberosCtr4_get_salt, py_package_PrimaryKerberosCtr4_set_salt },
	{ discard_const_p(char, "default_iteration_count"), py_package_PrimaryKerberosCtr4_get_default_iteration_count, py_package_PrimaryKerberosCtr4_set_default_iteration_count },
	{ discard_const_p(char, "keys"), py_package_PrimaryKerberosCtr4_get_keys, py_package_PrimaryKerberosCtr4_set_keys },
	{ discard_const_p(char, "service_keys"), py_package_PrimaryKerberosCtr4_get_service_keys, py_package_PrimaryKerberosCtr4_set_service_keys },
	{ discard_const_p(char, "old_keys"), py_package_PrimaryKerberosCtr4_get_old_keys, py_package_PrimaryKerberosCtr4_set_old_keys },
	{ discard_const_p(char, "older_keys"), py_package_PrimaryKerberosCtr4_get_older_keys, py_package_PrimaryKerberosCtr4_set_older_keys },
	{ NULL }
};

static PyObject *py_package_PrimaryKerberosCtr4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryKerberosCtr4, type);
}


static PyTypeObject package_PrimaryKerberosCtr4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryKerberosCtr4",
	.tp_getset = py_package_PrimaryKerberosCtr4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryKerberosCtr4_new,
};

PyObject *py_import_package_PrimaryKerberosCtr(TALLOC_CTX *mem_ctx, int level, union package_PrimaryKerberosCtr *in)
{
	PyObject *ret;

	switch (level) {
		case 3:
			ret = py_talloc_reference_ex(&package_PrimaryKerberosCtr3_Type, mem_ctx, &in->ctr3);
			return ret;

		case 4:
			ret = py_talloc_reference_ex(&package_PrimaryKerberosCtr4_Type, mem_ctx, &in->ctr4);
			return ret;

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

union package_PrimaryKerberosCtr *py_export_package_PrimaryKerberosCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union package_PrimaryKerberosCtr *ret = talloc_zero(mem_ctx, union package_PrimaryKerberosCtr);
	switch (level) {
		case 3:
			PY_CHECK_TYPE(&package_PrimaryKerberosCtr3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr3 = *(struct package_PrimaryKerberosCtr3 *)py_talloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&package_PrimaryKerberosCtr4_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->ctr4 = *(struct package_PrimaryKerberosCtr4 *)py_talloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_package_PrimaryKerberosBlob_get_version(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosBlob *object = (struct package_PrimaryKerberosBlob *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

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

static PyObject *py_package_PrimaryKerberosBlob_get_flags(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosBlob *object = (struct package_PrimaryKerberosBlob *)py_talloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

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

static PyObject *py_package_PrimaryKerberosBlob_get_ctr(PyObject *obj, void *closure)
{
	struct package_PrimaryKerberosBlob *object = (struct package_PrimaryKerberosBlob *)py_talloc_get_ptr(obj);
	PyObject *py_ctr;
	py_ctr = py_import_package_PrimaryKerberosCtr(py_talloc_get_mem_ctx(obj), object->version, &object->ctr);
	if (py_ctr == NULL) {
		return NULL;
	}
	return py_ctr;
}

static int py_package_PrimaryKerberosBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryKerberosBlob *object = (struct package_PrimaryKerberosBlob *)py_talloc_get_ptr(py_obj);
	{
		union package_PrimaryKerberosCtr *ctr_switch_0;
		ctr_switch_0 = py_export_package_PrimaryKerberosCtr(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (ctr_switch_0 == NULL) {
			return -1;
		}
		object->ctr = *ctr_switch_0;
	}
	return 0;
}

static PyGetSetDef py_package_PrimaryKerberosBlob_getsetters[] = {
	{ discard_const_p(char, "version"), py_package_PrimaryKerberosBlob_get_version, py_package_PrimaryKerberosBlob_set_version },
	{ discard_const_p(char, "flags"), py_package_PrimaryKerberosBlob_get_flags, py_package_PrimaryKerberosBlob_set_flags },
	{ discard_const_p(char, "ctr"), py_package_PrimaryKerberosBlob_get_ctr, py_package_PrimaryKerberosBlob_set_ctr },
	{ NULL }
};

static PyObject *py_package_PrimaryKerberosBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryKerberosBlob, type);
}

static PyObject *py_package_PrimaryKerberosBlob_ndr_pack(PyObject *py_obj)
{
	struct package_PrimaryKerberosBlob *object = (struct package_PrimaryKerberosBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_package_PrimaryKerberosBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_package_PrimaryKerberosBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct package_PrimaryKerberosBlob *object = (struct package_PrimaryKerberosBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryKerberosBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_package_PrimaryKerberosBlob_ndr_print(PyObject *py_obj)
{
	struct package_PrimaryKerberosBlob *object = (struct package_PrimaryKerberosBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PrimaryKerberosBlob, "package_PrimaryKerberosBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_package_PrimaryKerberosBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_package_PrimaryKerberosBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_package_PrimaryKerberosBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_package_PrimaryKerberosBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject package_PrimaryKerberosBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryKerberosBlob",
	.tp_getset = py_package_PrimaryKerberosBlob_getsetters,
	.tp_methods = py_package_PrimaryKerberosBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryKerberosBlob_new,
};


static PyObject *py_package_PrimaryCLEARTEXTBlob_get_cleartext(PyObject *obj, void *closure)
{
	struct package_PrimaryCLEARTEXTBlob *object = (struct package_PrimaryCLEARTEXTBlob *)py_talloc_get_ptr(obj);
	PyObject *py_cleartext;
	py_cleartext = PyString_FromStringAndSize((char *)(object->cleartext).data, (object->cleartext).length);
	return py_cleartext;
}

static int py_package_PrimaryCLEARTEXTBlob_set_cleartext(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryCLEARTEXTBlob *object = (struct package_PrimaryCLEARTEXTBlob *)py_talloc_get_ptr(py_obj);
	object->cleartext = data_blob_talloc(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	return 0;
}

static PyGetSetDef py_package_PrimaryCLEARTEXTBlob_getsetters[] = {
	{ discard_const_p(char, "cleartext"), py_package_PrimaryCLEARTEXTBlob_get_cleartext, py_package_PrimaryCLEARTEXTBlob_set_cleartext },
	{ NULL }
};

static PyObject *py_package_PrimaryCLEARTEXTBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryCLEARTEXTBlob, type);
}

static PyObject *py_package_PrimaryCLEARTEXTBlob_ndr_pack(PyObject *py_obj)
{
	struct package_PrimaryCLEARTEXTBlob *object = (struct package_PrimaryCLEARTEXTBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_package_PrimaryCLEARTEXTBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_package_PrimaryCLEARTEXTBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct package_PrimaryCLEARTEXTBlob *object = (struct package_PrimaryCLEARTEXTBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryCLEARTEXTBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_package_PrimaryCLEARTEXTBlob_ndr_print(PyObject *py_obj)
{
	struct package_PrimaryCLEARTEXTBlob *object = (struct package_PrimaryCLEARTEXTBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PrimaryCLEARTEXTBlob, "package_PrimaryCLEARTEXTBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_package_PrimaryCLEARTEXTBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_package_PrimaryCLEARTEXTBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_package_PrimaryCLEARTEXTBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_package_PrimaryCLEARTEXTBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject package_PrimaryCLEARTEXTBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryCLEARTEXTBlob",
	.tp_getset = py_package_PrimaryCLEARTEXTBlob_getsetters,
	.tp_methods = py_package_PrimaryCLEARTEXTBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryCLEARTEXTBlob_new,
};


static PyObject *py_package_PrimaryWDigestHash_get_hash(PyObject *obj, void *closure)
{
	struct package_PrimaryWDigestHash *object = (struct package_PrimaryWDigestHash *)py_talloc_get_ptr(obj);
	PyObject *py_hash;
	py_hash = PyList_New(16);
	if (py_hash == NULL) {
		return NULL;
	}
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < 16; hash_cntr_0++) {
			PyObject *py_hash_0;
			py_hash_0 = PyInt_FromLong(object->hash[hash_cntr_0]);
			PyList_SetItem(py_hash, hash_cntr_0, py_hash_0);
		}
	}
	return py_hash;
}

static int py_package_PrimaryWDigestHash_set_hash(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryWDigestHash *object = (struct package_PrimaryWDigestHash *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < PyList_GET_SIZE(value); hash_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, hash_cntr_0), return -1;);
			object->hash[hash_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, hash_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_package_PrimaryWDigestHash_getsetters[] = {
	{ discard_const_p(char, "hash"), py_package_PrimaryWDigestHash_get_hash, py_package_PrimaryWDigestHash_set_hash },
	{ NULL }
};

static PyObject *py_package_PrimaryWDigestHash_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryWDigestHash, type);
}


static PyTypeObject package_PrimaryWDigestHash_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryWDigestHash",
	.tp_getset = py_package_PrimaryWDigestHash_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryWDigestHash_new,
};


static PyObject *py_package_PrimaryWDigestBlob_get_unknown1(PyObject *obj, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyInt_FromLong(object->unknown1);
	return py_unknown1;
}

static int py_package_PrimaryWDigestBlob_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryWDigestBlob_get_unknown2(PyObject *obj, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = PyInt_FromLong(object->unknown2);
	return py_unknown2;
}

static int py_package_PrimaryWDigestBlob_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryWDigestBlob_get_num_hashes(PyObject *obj, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(obj);
	PyObject *py_num_hashes;
	py_num_hashes = PyInt_FromLong(object->num_hashes);
	return py_num_hashes;
}

static int py_package_PrimaryWDigestBlob_set_num_hashes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_hashes = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryWDigestBlob_get_unknown3(PyObject *obj, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = PyInt_FromLong(object->unknown3);
	return py_unknown3;
}

static int py_package_PrimaryWDigestBlob_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->unknown3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_package_PrimaryWDigestBlob_get_uuknown4(PyObject *obj, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(obj);
	PyObject *py_uuknown4;
	py_uuknown4 = PyLong_FromLongLong(object->uuknown4);
	return py_uuknown4;
}

static int py_package_PrimaryWDigestBlob_set_uuknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->uuknown4 = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->uuknown4 = 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_package_PrimaryWDigestBlob_get_hashes(PyObject *obj, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(obj);
	PyObject *py_hashes;
	py_hashes = PyList_New(object->num_hashes);
	if (py_hashes == NULL) {
		return NULL;
	}
	{
		int hashes_cntr_0;
		for (hashes_cntr_0 = 0; hashes_cntr_0 < object->num_hashes; hashes_cntr_0++) {
			PyObject *py_hashes_0;
			py_hashes_0 = py_talloc_reference_ex(&package_PrimaryWDigestHash_Type, object->hashes, &object->hashes[hashes_cntr_0]);
			PyList_SetItem(py_hashes, hashes_cntr_0, py_hashes_0);
		}
	}
	return py_hashes;
}

static int py_package_PrimaryWDigestBlob_set_hashes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int hashes_cntr_0;
		object->hashes = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->hashes, PyList_GET_SIZE(value));
		if (!object->hashes) { return -1;; }
		talloc_set_name_const(object->hashes, "ARRAY: object->hashes");
		for (hashes_cntr_0 = 0; hashes_cntr_0 < PyList_GET_SIZE(value); hashes_cntr_0++) {
			PY_CHECK_TYPE(&package_PrimaryWDigestHash_Type, PyList_GET_ITEM(value, hashes_cntr_0), return -1;);
			if (talloc_reference(object->hashes, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, hashes_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->hashes[hashes_cntr_0] = *(struct package_PrimaryWDigestHash *)py_talloc_get_ptr(PyList_GET_ITEM(value, hashes_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_package_PrimaryWDigestBlob_getsetters[] = {
	{ discard_const_p(char, "unknown1"), py_package_PrimaryWDigestBlob_get_unknown1, py_package_PrimaryWDigestBlob_set_unknown1 },
	{ discard_const_p(char, "unknown2"), py_package_PrimaryWDigestBlob_get_unknown2, py_package_PrimaryWDigestBlob_set_unknown2 },
	{ discard_const_p(char, "num_hashes"), py_package_PrimaryWDigestBlob_get_num_hashes, py_package_PrimaryWDigestBlob_set_num_hashes },
	{ discard_const_p(char, "unknown3"), py_package_PrimaryWDigestBlob_get_unknown3, py_package_PrimaryWDigestBlob_set_unknown3 },
	{ discard_const_p(char, "uuknown4"), py_package_PrimaryWDigestBlob_get_uuknown4, py_package_PrimaryWDigestBlob_set_uuknown4 },
	{ discard_const_p(char, "hashes"), py_package_PrimaryWDigestBlob_get_hashes, py_package_PrimaryWDigestBlob_set_hashes },
	{ NULL }
};

static PyObject *py_package_PrimaryWDigestBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct package_PrimaryWDigestBlob, type);
}

static PyObject *py_package_PrimaryWDigestBlob_ndr_pack(PyObject *py_obj)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_package_PrimaryWDigestBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_package_PrimaryWDigestBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryWDigestBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_package_PrimaryWDigestBlob_ndr_print(PyObject *py_obj)
{
	struct package_PrimaryWDigestBlob *object = (struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PrimaryWDigestBlob, "package_PrimaryWDigestBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_package_PrimaryWDigestBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_package_PrimaryWDigestBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_package_PrimaryWDigestBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_package_PrimaryWDigestBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject package_PrimaryWDigestBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.package_PrimaryWDigestBlob",
	.tp_getset = py_package_PrimaryWDigestBlob_getsetters,
	.tp_methods = py_package_PrimaryWDigestBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_package_PrimaryWDigestBlob_new,
};


static PyObject *py_AuthInfoNone_get_size(PyObject *obj, void *closure)
{
	struct AuthInfoNone *object = (struct AuthInfoNone *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_AuthInfoNone_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthInfoNone *object = (struct AuthInfoNone *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_AuthInfoNone_getsetters[] = {
	{ discard_const_p(char, "size"), py_AuthInfoNone_get_size, py_AuthInfoNone_set_size },
	{ NULL }
};

static PyObject *py_AuthInfoNone_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct AuthInfoNone, type);
}


static PyTypeObject AuthInfoNone_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.AuthInfoNone",
	.tp_getset = py_AuthInfoNone_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_AuthInfoNone_new,
};


static PyObject *py_AuthInfoNT4Owf_get_size(PyObject *obj, void *closure)
{
	struct AuthInfoNT4Owf *object = (struct AuthInfoNT4Owf *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_AuthInfoNT4Owf_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthInfoNT4Owf *object = (struct AuthInfoNT4Owf *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_AuthInfoNT4Owf_get_password(PyObject *obj, void *closure)
{
	struct AuthInfoNT4Owf *object = (struct AuthInfoNT4Owf *)py_talloc_get_ptr(obj);
	PyObject *py_password;
	py_password = py_talloc_reference_ex(samr_Password_Type, py_talloc_get_mem_ctx(obj), &object->password);
	return py_password;
}

static int py_AuthInfoNT4Owf_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthInfoNT4Owf *object = (struct AuthInfoNT4Owf *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->password = *(struct samr_Password *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_AuthInfoNT4Owf_getsetters[] = {
	{ discard_const_p(char, "size"), py_AuthInfoNT4Owf_get_size, py_AuthInfoNT4Owf_set_size },
	{ discard_const_p(char, "password"), py_AuthInfoNT4Owf_get_password, py_AuthInfoNT4Owf_set_password },
	{ NULL }
};

static PyObject *py_AuthInfoNT4Owf_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct AuthInfoNT4Owf, type);
}


static PyTypeObject AuthInfoNT4Owf_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.AuthInfoNT4Owf",
	.tp_getset = py_AuthInfoNT4Owf_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_AuthInfoNT4Owf_new,
};


static PyObject *py_AuthInfoClear_get_size(PyObject *obj, void *closure)
{
	struct AuthInfoClear *object = (struct AuthInfoClear *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_AuthInfoClear_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthInfoClear *object = (struct AuthInfoClear *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_AuthInfoClear_get_password(PyObject *obj, void *closure)
{
	struct AuthInfoClear *object = (struct AuthInfoClear *)py_talloc_get_ptr(obj);
	PyObject *py_password;
	py_password = PyList_New(object->size);
	if (py_password == NULL) {
		return NULL;
	}
	{
		int password_cntr_0;
		for (password_cntr_0 = 0; password_cntr_0 < object->size; password_cntr_0++) {
			PyObject *py_password_0;
			py_password_0 = PyInt_FromLong(object->password[password_cntr_0]);
			PyList_SetItem(py_password, password_cntr_0, py_password_0);
		}
	}
	return py_password;
}

static int py_AuthInfoClear_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthInfoClear *object = (struct AuthInfoClear *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int password_cntr_0;
		object->password = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->password, PyList_GET_SIZE(value));
		if (!object->password) { return -1;; }
		talloc_set_name_const(object->password, "ARRAY: object->password");
		for (password_cntr_0 = 0; password_cntr_0 < PyList_GET_SIZE(value); password_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, password_cntr_0), return -1;);
			object->password[password_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, password_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_AuthInfoClear_getsetters[] = {
	{ discard_const_p(char, "size"), py_AuthInfoClear_get_size, py_AuthInfoClear_set_size },
	{ discard_const_p(char, "password"), py_AuthInfoClear_get_password, py_AuthInfoClear_set_password },
	{ NULL }
};

static PyObject *py_AuthInfoClear_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct AuthInfoClear, type);
}


static PyTypeObject AuthInfoClear_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.AuthInfoClear",
	.tp_getset = py_AuthInfoClear_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_AuthInfoClear_new,
};


static PyObject *py_AuthInfoVersion_get_size(PyObject *obj, void *closure)
{
	struct AuthInfoVersion *object = (struct AuthInfoVersion *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_AuthInfoVersion_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthInfoVersion *object = (struct AuthInfoVersion *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_AuthInfoVersion_get_version(PyObject *obj, void *closure)
{
	struct AuthInfoVersion *object = (struct AuthInfoVersion *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

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

static PyGetSetDef py_AuthInfoVersion_getsetters[] = {
	{ discard_const_p(char, "size"), py_AuthInfoVersion_get_size, py_AuthInfoVersion_set_size },
	{ discard_const_p(char, "version"), py_AuthInfoVersion_get_version, py_AuthInfoVersion_set_version },
	{ NULL }
};

static PyObject *py_AuthInfoVersion_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct AuthInfoVersion, type);
}


static PyTypeObject AuthInfoVersion_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.AuthInfoVersion",
	.tp_getset = py_AuthInfoVersion_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_AuthInfoVersion_new,
};

PyObject *py_import_AuthInfo(TALLOC_CTX *mem_ctx, int level, union AuthInfo *in)
{
	PyObject *ret;

	switch (level) {
		case TRUST_AUTH_TYPE_NONE:
			ret = py_talloc_reference_ex(&AuthInfoNone_Type, mem_ctx, &in->none);
			return ret;

		case TRUST_AUTH_TYPE_NT4OWF:
			ret = py_talloc_reference_ex(&AuthInfoNT4Owf_Type, mem_ctx, &in->nt4owf);
			return ret;

		case TRUST_AUTH_TYPE_CLEAR:
			ret = py_talloc_reference_ex(&AuthInfoClear_Type, mem_ctx, &in->clear);
			return ret;

		case TRUST_AUTH_TYPE_VERSION:
			ret = py_talloc_reference_ex(&AuthInfoVersion_Type, mem_ctx, &in->version);
			return ret;

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

union AuthInfo *py_export_AuthInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union AuthInfo *ret = talloc_zero(mem_ctx, union AuthInfo);
	switch (level) {
		case TRUST_AUTH_TYPE_NONE:
			PY_CHECK_TYPE(&AuthInfoNone_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->none = *(struct AuthInfoNone *)py_talloc_get_ptr(in);
			break;

		case TRUST_AUTH_TYPE_NT4OWF:
			PY_CHECK_TYPE(&AuthInfoNT4Owf_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->nt4owf = *(struct AuthInfoNT4Owf *)py_talloc_get_ptr(in);
			break;

		case TRUST_AUTH_TYPE_CLEAR:
			PY_CHECK_TYPE(&AuthInfoClear_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->clear = *(struct AuthInfoClear *)py_talloc_get_ptr(in);
			break;

		case TRUST_AUTH_TYPE_VERSION:
			PY_CHECK_TYPE(&AuthInfoVersion_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->version = *(struct AuthInfoVersion *)py_talloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_AuthenticationInformation_get_LastUpdateTime(PyObject *obj, void *closure)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(obj);
	PyObject *py_LastUpdateTime;
	py_LastUpdateTime = PyLong_FromLongLong(object->LastUpdateTime);
	return py_LastUpdateTime;
}

static int py_AuthenticationInformation_set_LastUpdateTime(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->LastUpdateTime = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->LastUpdateTime = 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_AuthenticationInformation_get_AuthType(PyObject *obj, void *closure)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(obj);
	PyObject *py_AuthType;
	py_AuthType = PyInt_FromLong(object->AuthType);
	return py_AuthType;
}

static int py_AuthenticationInformation_set_AuthType(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->AuthType = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->AuthType = 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_AuthenticationInformation_get_AuthInfo(PyObject *obj, void *closure)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(obj);
	PyObject *py_AuthInfo;
	py_AuthInfo = py_import_AuthInfo(py_talloc_get_mem_ctx(obj), object->AuthType, &object->AuthInfo);
	if (py_AuthInfo == NULL) {
		return NULL;
	}
	return py_AuthInfo;
}

static int py_AuthenticationInformation_set_AuthInfo(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(py_obj);
	{
		union AuthInfo *AuthInfo_switch_0;
		AuthInfo_switch_0 = py_export_AuthInfo(py_talloc_get_mem_ctx(py_obj), object->AuthType, value);
		if (AuthInfo_switch_0 == NULL) {
			return -1;
		}
		object->AuthInfo = *AuthInfo_switch_0;
	}
	return 0;
}

static PyObject *py_AuthenticationInformation_get__pad(PyObject *obj, void *closure)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(obj);
	PyObject *py__pad;
	py__pad = PyString_FromStringAndSize((char *)(object->_pad).data, (object->_pad).length);
	return py__pad;
}

static int py_AuthenticationInformation_set__pad(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(py_obj);
	object->_pad = data_blob_talloc(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	return 0;
}

static PyGetSetDef py_AuthenticationInformation_getsetters[] = {
	{ discard_const_p(char, "LastUpdateTime"), py_AuthenticationInformation_get_LastUpdateTime, py_AuthenticationInformation_set_LastUpdateTime },
	{ discard_const_p(char, "AuthType"), py_AuthenticationInformation_get_AuthType, py_AuthenticationInformation_set_AuthType },
	{ discard_const_p(char, "AuthInfo"), py_AuthenticationInformation_get_AuthInfo, py_AuthenticationInformation_set_AuthInfo },
	{ discard_const_p(char, "_pad"), py_AuthenticationInformation_get__pad, py_AuthenticationInformation_set__pad },
	{ NULL }
};

static PyObject *py_AuthenticationInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct AuthenticationInformation, type);
}

static PyObject *py_AuthenticationInformation_ndr_pack(PyObject *py_obj)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_AuthenticationInformation);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_AuthenticationInformation_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_AuthenticationInformation);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_AuthenticationInformation_ndr_print(PyObject *py_obj)
{
	struct AuthenticationInformation *object = (struct AuthenticationInformation *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_AuthenticationInformation, "AuthenticationInformation", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_AuthenticationInformation_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_AuthenticationInformation_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_AuthenticationInformation_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_AuthenticationInformation_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject AuthenticationInformation_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.AuthenticationInformation",
	.tp_getset = py_AuthenticationInformation_getsetters,
	.tp_methods = py_AuthenticationInformation_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_AuthenticationInformation_new,
};


static PyObject *py_AuthenticationInformationArray_get_count(PyObject *obj, void *closure)
{
	struct AuthenticationInformationArray *object = (struct AuthenticationInformationArray *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

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

static PyObject *py_AuthenticationInformationArray_get_array(PyObject *obj, void *closure)
{
	struct AuthenticationInformationArray *object = (struct AuthenticationInformationArray *)py_talloc_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 = py_talloc_reference_ex(&AuthenticationInformation_Type, object->array, &object->array[array_cntr_0]);
			PyList_SetItem(py_array, array_cntr_0, py_array_0);
		}
	}
	return py_array;
}

static int py_AuthenticationInformationArray_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct AuthenticationInformationArray *object = (struct AuthenticationInformationArray *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int array_cntr_0;
		object->array = talloc_array_ptrtype(py_talloc_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(&AuthenticationInformation_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
			if (talloc_reference(object->array, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->array[array_cntr_0] = *(struct AuthenticationInformation *)py_talloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_AuthenticationInformationArray_getsetters[] = {
	{ discard_const_p(char, "count"), py_AuthenticationInformationArray_get_count, py_AuthenticationInformationArray_set_count },
	{ discard_const_p(char, "array"), py_AuthenticationInformationArray_get_array, py_AuthenticationInformationArray_set_array },
	{ NULL }
};

static PyObject *py_AuthenticationInformationArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct AuthenticationInformationArray, type);
}

static PyObject *py_AuthenticationInformationArray_ndr_pack(PyObject *py_obj)
{
	struct AuthenticationInformationArray *object = (struct AuthenticationInformationArray *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_AuthenticationInformationArray);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_AuthenticationInformationArray_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct AuthenticationInformationArray *object = (struct AuthenticationInformationArray *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_AuthenticationInformationArray);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_AuthenticationInformationArray_ndr_print(PyObject *py_obj)
{
	struct AuthenticationInformationArray *object = (struct AuthenticationInformationArray *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_AuthenticationInformationArray, "AuthenticationInformationArray", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_AuthenticationInformationArray_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_AuthenticationInformationArray_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_AuthenticationInformationArray_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_AuthenticationInformationArray_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject AuthenticationInformationArray_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.AuthenticationInformationArray",
	.tp_getset = py_AuthenticationInformationArray_getsetters,
	.tp_methods = py_AuthenticationInformationArray_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_AuthenticationInformationArray_new,
};


static PyObject *py_trustAuthInOutBlob_get_count(PyObject *obj, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

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

static PyObject *py_trustAuthInOutBlob_get_current_offset(PyObject *obj, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(obj);
	PyObject *py_current_offset;
	py_current_offset = PyInt_FromLong(object->current_offset);
	return py_current_offset;
}

static int py_trustAuthInOutBlob_set_current_offset(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->current_offset = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_trustAuthInOutBlob_get_previous_offset(PyObject *obj, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(obj);
	PyObject *py_previous_offset;
	py_previous_offset = PyInt_FromLong(object->previous_offset);
	return py_previous_offset;
}

static int py_trustAuthInOutBlob_set_previous_offset(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->previous_offset = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_trustAuthInOutBlob_get_current(PyObject *obj, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(obj);
	PyObject *py_current;
	py_current = py_talloc_reference_ex(&AuthenticationInformationArray_Type, py_talloc_get_mem_ctx(obj), &object->current);
	return py_current;
}

static int py_trustAuthInOutBlob_set_current(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&AuthenticationInformationArray_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->current = *(struct AuthenticationInformationArray *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_trustAuthInOutBlob_get_previous(PyObject *obj, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(obj);
	PyObject *py_previous;
	py_previous = py_talloc_reference_ex(&AuthenticationInformationArray_Type, py_talloc_get_mem_ctx(obj), &object->previous);
	return py_previous;
}

static int py_trustAuthInOutBlob_set_previous(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&AuthenticationInformationArray_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->previous = *(struct AuthenticationInformationArray *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_trustAuthInOutBlob_getsetters[] = {
	{ discard_const_p(char, "count"), py_trustAuthInOutBlob_get_count, py_trustAuthInOutBlob_set_count },
	{ discard_const_p(char, "current_offset"), py_trustAuthInOutBlob_get_current_offset, py_trustAuthInOutBlob_set_current_offset },
	{ discard_const_p(char, "previous_offset"), py_trustAuthInOutBlob_get_previous_offset, py_trustAuthInOutBlob_set_previous_offset },
	{ discard_const_p(char, "current"), py_trustAuthInOutBlob_get_current, py_trustAuthInOutBlob_set_current },
	{ discard_const_p(char, "previous"), py_trustAuthInOutBlob_get_previous, py_trustAuthInOutBlob_set_previous },
	{ NULL }
};

static PyObject *py_trustAuthInOutBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct trustAuthInOutBlob, type);
}

static PyObject *py_trustAuthInOutBlob_ndr_pack(PyObject *py_obj)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_trustAuthInOutBlob_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_trustAuthInOutBlob);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_trustAuthInOutBlob_ndr_print(PyObject *py_obj)
{
	struct trustAuthInOutBlob *object = (struct trustAuthInOutBlob *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_trustAuthInOutBlob, "trustAuthInOutBlob", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_trustAuthInOutBlob_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_trustAuthInOutBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_trustAuthInOutBlob_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_trustAuthInOutBlob_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject trustAuthInOutBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.trustAuthInOutBlob",
	.tp_getset = py_trustAuthInOutBlob_getsetters,
	.tp_methods = py_trustAuthInOutBlob_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_trustAuthInOutBlob_new,
};


static PyObject *py_trustDomainPasswords_get_confounder(PyObject *obj, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(obj);
	PyObject *py_confounder;
	py_confounder = PyList_New(512);
	if (py_confounder == NULL) {
		return NULL;
	}
	{
		int confounder_cntr_0;
		for (confounder_cntr_0 = 0; confounder_cntr_0 < 512; confounder_cntr_0++) {
			PyObject *py_confounder_0;
			py_confounder_0 = PyInt_FromLong(object->confounder[confounder_cntr_0]);
			PyList_SetItem(py_confounder, confounder_cntr_0, py_confounder_0);
		}
	}
	return py_confounder;
}

static int py_trustDomainPasswords_set_confounder(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int confounder_cntr_0;
		for (confounder_cntr_0 = 0; confounder_cntr_0 < PyList_GET_SIZE(value); confounder_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, confounder_cntr_0), return -1;);
			object->confounder[confounder_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, confounder_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_trustDomainPasswords_get_outgoing(PyObject *obj, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(obj);
	PyObject *py_outgoing;
	py_outgoing = py_talloc_reference_ex(&trustAuthInOutBlob_Type, py_talloc_get_mem_ctx(obj), &object->outgoing);
	return py_outgoing;
}

static int py_trustDomainPasswords_set_outgoing(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&trustAuthInOutBlob_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->outgoing = *(struct trustAuthInOutBlob *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_trustDomainPasswords_get_incoming(PyObject *obj, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(obj);
	PyObject *py_incoming;
	py_incoming = py_talloc_reference_ex(&trustAuthInOutBlob_Type, py_talloc_get_mem_ctx(obj), &object->incoming);
	return py_incoming;
}

static int py_trustDomainPasswords_set_incoming(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&trustAuthInOutBlob_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->incoming = *(struct trustAuthInOutBlob *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_trustDomainPasswords_get_outgoing_size(PyObject *obj, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(obj);
	PyObject *py_outgoing_size;
	py_outgoing_size = PyInt_FromLong(object->outgoing_size);
	return py_outgoing_size;
}

static int py_trustDomainPasswords_set_outgoing_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->outgoing_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_trustDomainPasswords_get_incoming_size(PyObject *obj, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(obj);
	PyObject *py_incoming_size;
	py_incoming_size = PyInt_FromLong(object->incoming_size);
	return py_incoming_size;
}

static int py_trustDomainPasswords_set_incoming_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->incoming_size = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_trustDomainPasswords_getsetters[] = {
	{ discard_const_p(char, "confounder"), py_trustDomainPasswords_get_confounder, py_trustDomainPasswords_set_confounder },
	{ discard_const_p(char, "outgoing"), py_trustDomainPasswords_get_outgoing, py_trustDomainPasswords_set_outgoing },
	{ discard_const_p(char, "incoming"), py_trustDomainPasswords_get_incoming, py_trustDomainPasswords_set_incoming },
	{ discard_const_p(char, "outgoing_size"), py_trustDomainPasswords_get_outgoing_size, py_trustDomainPasswords_set_outgoing_size },
	{ discard_const_p(char, "incoming_size"), py_trustDomainPasswords_get_incoming_size, py_trustDomainPasswords_set_incoming_size },
	{ NULL }
};

static PyObject *py_trustDomainPasswords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct trustDomainPasswords, type);
}

static PyObject *py_trustDomainPasswords_ndr_pack(PyObject *py_obj)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_trustDomainPasswords);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_trustDomainPasswords_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_trustDomainPasswords);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_trustDomainPasswords_ndr_print(PyObject *py_obj)
{
	struct trustDomainPasswords *object = (struct trustDomainPasswords *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_trustDomainPasswords, "trustDomainPasswords", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_trustDomainPasswords_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_trustDomainPasswords_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_trustDomainPasswords_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_trustDomainPasswords_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject trustDomainPasswords_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.trustDomainPasswords",
	.tp_getset = py_trustDomainPasswords_getsetters,
	.tp_methods = py_trustDomainPasswords_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_trustDomainPasswords_new,
};


static PyObject *py_DsCompressedChunk_get_marker(PyObject *obj, void *closure)
{
	struct DsCompressedChunk *object = (struct DsCompressedChunk *)py_talloc_get_ptr(obj);
	PyObject *py_marker;
	py_marker = PyInt_FromLong(object->marker);
	return py_marker;
}

static int py_DsCompressedChunk_set_marker(PyObject *py_obj, PyObject *value, void *closure)
{
	struct DsCompressedChunk *object = (struct DsCompressedChunk *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->marker = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_DsCompressedChunk_get_data(PyObject *obj, void *closure)
{
	struct DsCompressedChunk *object = (struct DsCompressedChunk *)py_talloc_get_ptr(obj);
	PyObject *py_data;
	py_data = PyString_FromStringAndSize((char *)(object->data).data, (object->data).length);
	return py_data;
}

static int py_DsCompressedChunk_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct DsCompressedChunk *object = (struct DsCompressedChunk *)py_talloc_get_ptr(py_obj);
	object->data = data_blob_talloc(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	return 0;
}

static PyGetSetDef py_DsCompressedChunk_getsetters[] = {
	{ discard_const_p(char, "marker"), py_DsCompressedChunk_get_marker, py_DsCompressedChunk_set_marker },
	{ discard_const_p(char, "data"), py_DsCompressedChunk_get_data, py_DsCompressedChunk_set_data },
	{ NULL }
};

static PyObject *py_DsCompressedChunk_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct DsCompressedChunk, type);
}

static PyObject *py_DsCompressedChunk_ndr_pack(PyObject *py_obj)
{
	struct DsCompressedChunk *object = (struct DsCompressedChunk *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_DsCompressedChunk);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_DsCompressedChunk_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct DsCompressedChunk *object = (struct DsCompressedChunk *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DsCompressedChunk);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_DsCompressedChunk_ndr_print(PyObject *py_obj)
{
	struct DsCompressedChunk *object = (struct DsCompressedChunk *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DsCompressedChunk, "DsCompressedChunk", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_DsCompressedChunk_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_DsCompressedChunk_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_DsCompressedChunk_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_DsCompressedChunk_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject DsCompressedChunk_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.DsCompressedChunk",
	.tp_getset = py_DsCompressedChunk_getsetters,
	.tp_methods = py_DsCompressedChunk_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_DsCompressedChunk_new,
};


static PyObject *py_ExtendedErrorAString_get___size(PyObject *obj, void *closure)
{
	struct ExtendedErrorAString *object = (struct ExtendedErrorAString *)py_talloc_get_ptr(obj);
	PyObject *py___size;
	py___size = PyInt_FromLong(object->__size);
	return py___size;
}

static int py_ExtendedErrorAString_set___size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorAString *object = (struct ExtendedErrorAString *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ExtendedErrorAString_get_string(PyObject *obj, void *closure)
{
	struct ExtendedErrorAString *object = (struct ExtendedErrorAString *)py_talloc_get_ptr(obj);
	PyObject *py_string;
	if (object->string == NULL) {
		py_string = Py_None;
		Py_INCREF(py_string);
	} else {
		if (object->string == NULL) {
			py_string = Py_None;
			Py_INCREF(py_string);
		} else {
			py_string = PyUnicode_Decode(object->string, strlen(object->string), "utf-8", "ignore");
		}
	}
	return py_string;
}

static int py_ExtendedErrorAString_set_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorAString *object = (struct ExtendedErrorAString *)py_talloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->string = NULL;
	} else {
		object->string = NULL;
		if (PyUnicode_Check(value)) {
			object->string = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->string = 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_ExtendedErrorAString_getsetters[] = {
	{ discard_const_p(char, "__size"), py_ExtendedErrorAString_get___size, py_ExtendedErrorAString_set___size },
	{ discard_const_p(char, "string"), py_ExtendedErrorAString_get_string, py_ExtendedErrorAString_set_string },
	{ NULL }
};

static PyObject *py_ExtendedErrorAString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ExtendedErrorAString, type);
}


static PyTypeObject ExtendedErrorAString_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ExtendedErrorAString",
	.tp_getset = py_ExtendedErrorAString_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ExtendedErrorAString_new,
};


static PyObject *py_ExtendedErrorUString_get___size(PyObject *obj, void *closure)
{
	struct ExtendedErrorUString *object = (struct ExtendedErrorUString *)py_talloc_get_ptr(obj);
	PyObject *py___size;
	py___size = PyInt_FromLong(object->__size);
	return py___size;
}

static int py_ExtendedErrorUString_set___size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorUString *object = (struct ExtendedErrorUString *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->__size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ExtendedErrorUString_get_string(PyObject *obj, void *closure)
{
	struct ExtendedErrorUString *object = (struct ExtendedErrorUString *)py_talloc_get_ptr(obj);
	PyObject *py_string;
	if (object->string == NULL) {
		py_string = Py_None;
		Py_INCREF(py_string);
	} else {
		if (object->string == NULL) {
			py_string = Py_None;
			Py_INCREF(py_string);
		} else {
			py_string = PyUnicode_Decode(object->string, strlen(object->string), "utf-8", "ignore");
		}
	}
	return py_string;
}

static int py_ExtendedErrorUString_set_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorUString *object = (struct ExtendedErrorUString *)py_talloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->string = NULL;
	} else {
		object->string = NULL;
		if (PyUnicode_Check(value)) {
			object->string = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->string = 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_ExtendedErrorUString_getsetters[] = {
	{ discard_const_p(char, "__size"), py_ExtendedErrorUString_get___size, py_ExtendedErrorUString_set___size },
	{ discard_const_p(char, "string"), py_ExtendedErrorUString_get_string, py_ExtendedErrorUString_set_string },
	{ NULL }
};

static PyObject *py_ExtendedErrorUString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ExtendedErrorUString, type);
}


static PyTypeObject ExtendedErrorUString_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ExtendedErrorUString",
	.tp_getset = py_ExtendedErrorUString_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ExtendedErrorUString_new,
};


static PyObject *py_ExtendedErrorBlob_get_length(PyObject *obj, void *closure)
{
	struct ExtendedErrorBlob *object = (struct ExtendedErrorBlob *)py_talloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyInt_FromLong(object->length);
	return py_length;
}

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

static PyObject *py_ExtendedErrorBlob_get_data(PyObject *obj, void *closure)
{
	struct ExtendedErrorBlob *object = (struct ExtendedErrorBlob *)py_talloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyList_New(object->length);
		if (py_data == NULL) {
			return NULL;
		}
		{
			int data_cntr_1;
			for (data_cntr_1 = 0; data_cntr_1 < object->length; data_cntr_1++) {
				PyObject *py_data_1;
				py_data_1 = PyInt_FromLong(object->data[data_cntr_1]);
				PyList_SetItem(py_data, data_cntr_1, py_data_1);
			}
		}
	}
	return py_data;
}

static int py_ExtendedErrorBlob_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorBlob *object = (struct ExtendedErrorBlob *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
	if (value == Py_None) {
		object->data = NULL;
	} else {
		object->data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int data_cntr_1;
			object->data = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
			if (!object->data) { return -1;; }
			talloc_set_name_const(object->data, "ARRAY: object->data");
			for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, data_cntr_1), return -1;);
				object->data[data_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, data_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_ExtendedErrorBlob_getsetters[] = {
	{ discard_const_p(char, "length"), py_ExtendedErrorBlob_get_length, py_ExtendedErrorBlob_set_length },
	{ discard_const_p(char, "data"), py_ExtendedErrorBlob_get_data, py_ExtendedErrorBlob_set_data },
	{ NULL }
};

static PyObject *py_ExtendedErrorBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ExtendedErrorBlob, type);
}


static PyTypeObject ExtendedErrorBlob_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ExtendedErrorBlob",
	.tp_getset = py_ExtendedErrorBlob_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ExtendedErrorBlob_new,
};

PyObject *py_import_ExtendedErrorComputerNameU(TALLOC_CTX *mem_ctx, int level, union ExtendedErrorComputerNameU *in)
{
	PyObject *ret;

	switch (level) {
		case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
			ret = py_talloc_reference_ex(&ExtendedErrorUString_Type, mem_ctx, &in->name);
			return ret;

		case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

union ExtendedErrorComputerNameU *py_export_ExtendedErrorComputerNameU(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union ExtendedErrorComputerNameU *ret = talloc_zero(mem_ctx, union ExtendedErrorComputerNameU);
	switch (level) {
		case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
			PY_CHECK_TYPE(&ExtendedErrorUString_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->name = *(struct ExtendedErrorUString *)py_talloc_get_ptr(in);
			break;

		case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
			break;

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

	return ret;
}


static PyObject *py_ExtendedErrorComputerName_get_present(PyObject *obj, void *closure)
{
	struct ExtendedErrorComputerName *object = (struct ExtendedErrorComputerName *)py_talloc_get_ptr(obj);
	PyObject *py_present;
	py_present = PyInt_FromLong(object->present);
	return py_present;
}

static int py_ExtendedErrorComputerName_set_present(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorComputerName *object = (struct ExtendedErrorComputerName *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->present = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->present = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_ExtendedErrorComputerName_get_n(PyObject *obj, void *closure)
{
	struct ExtendedErrorComputerName *object = (struct ExtendedErrorComputerName *)py_talloc_get_ptr(obj);
	PyObject *py_n;
	py_n = py_import_ExtendedErrorComputerNameU(py_talloc_get_mem_ctx(obj), object->present, &object->n);
	if (py_n == NULL) {
		return NULL;
	}
	return py_n;
}

static int py_ExtendedErrorComputerName_set_n(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorComputerName *object = (struct ExtendedErrorComputerName *)py_talloc_get_ptr(py_obj);
	{
		union ExtendedErrorComputerNameU *n_switch_0;
		n_switch_0 = py_export_ExtendedErrorComputerNameU(py_talloc_get_mem_ctx(py_obj), object->present, value);
		if (n_switch_0 == NULL) {
			return -1;
		}
		object->n = *n_switch_0;
	}
	return 0;
}

static PyGetSetDef py_ExtendedErrorComputerName_getsetters[] = {
	{ discard_const_p(char, "present"), py_ExtendedErrorComputerName_get_present, py_ExtendedErrorComputerName_set_present },
	{ discard_const_p(char, "n"), py_ExtendedErrorComputerName_get_n, py_ExtendedErrorComputerName_set_n },
	{ NULL }
};

static PyObject *py_ExtendedErrorComputerName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ExtendedErrorComputerName, type);
}


static PyTypeObject ExtendedErrorComputerName_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ExtendedErrorComputerName",
	.tp_getset = py_ExtendedErrorComputerName_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ExtendedErrorComputerName_new,
};

PyObject *py_import_ExtendedErrorParamU(TALLOC_CTX *mem_ctx, int level, union ExtendedErrorParamU *in)
{
	PyObject *ret;

	switch (level) {
		case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
			ret = py_talloc_reference_ex(&ExtendedErrorAString_Type, mem_ctx, &in->a_string);
			return ret;

		case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
			ret = py_talloc_reference_ex(&ExtendedErrorUString_Type, mem_ctx, &in->u_string);
			return ret;

		case EXTENDED_ERROR_PARAM_TYPE_UINT32:
			ret = PyInt_FromLong(in->uint32);
			return ret;

		case EXTENDED_ERROR_PARAM_TYPE_UINT16:
			ret = PyInt_FromLong(in->uint16);
			return ret;

		case EXTENDED_ERROR_PARAM_TYPE_UINT64:
			ret = PyLong_FromLongLong(in->uint64);
			return ret;

		case EXTENDED_ERROR_PARAM_TYPE_NONE:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

		case EXTENDED_ERROR_PARAM_TYPE_BLOB:
			ret = py_talloc_reference_ex(&ExtendedErrorBlob_Type, mem_ctx, &in->blob);
			return ret;

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

union ExtendedErrorParamU *py_export_ExtendedErrorParamU(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union ExtendedErrorParamU *ret = talloc_zero(mem_ctx, union ExtendedErrorParamU);
	switch (level) {
		case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
			PY_CHECK_TYPE(&ExtendedErrorAString_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->a_string = *(struct ExtendedErrorAString *)py_talloc_get_ptr(in);
			break;

		case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
			PY_CHECK_TYPE(&ExtendedErrorUString_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->u_string = *(struct ExtendedErrorUString *)py_talloc_get_ptr(in);
			break;

		case EXTENDED_ERROR_PARAM_TYPE_UINT32:
			PY_CHECK_TYPE(&PyInt_Type, in, talloc_free(ret); return NULL;);
			ret->uint32 = PyInt_AsLong(in);
			break;

		case EXTENDED_ERROR_PARAM_TYPE_UINT16:
			PY_CHECK_TYPE(&PyInt_Type, in, talloc_free(ret); return NULL;);
			ret->uint16 = PyInt_AsLong(in);
			break;

		case EXTENDED_ERROR_PARAM_TYPE_UINT64:
			if (PyLong_Check(in)) {
				ret->uint64 = PyLong_AsLongLong(in);
			} else if (PyInt_Check(in)) {
				ret->uint64 = PyInt_AsLong(in);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
				  PyInt_Type.tp_name, PyLong_Type.tp_name);
				talloc_free(ret); return NULL;
			}
			break;

		case EXTENDED_ERROR_PARAM_TYPE_NONE:
			break;

		case EXTENDED_ERROR_PARAM_TYPE_BLOB:
			PY_CHECK_TYPE(&ExtendedErrorBlob_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->blob = *(struct ExtendedErrorBlob *)py_talloc_get_ptr(in);
			break;

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

	return ret;
}


static PyObject *py_ExtendedErrorParam_get_type(PyObject *obj, void *closure)
{
	struct ExtendedErrorParam *object = (struct ExtendedErrorParam *)py_talloc_get_ptr(obj);
	PyObject *py_type;
	py_type = PyInt_FromLong(object->type);
	return py_type;
}

static int py_ExtendedErrorParam_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorParam *object = (struct ExtendedErrorParam *)py_talloc_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_ExtendedErrorParam_get_p(PyObject *obj, void *closure)
{
	struct ExtendedErrorParam *object = (struct ExtendedErrorParam *)py_talloc_get_ptr(obj);
	PyObject *py_p;
	py_p = py_import_ExtendedErrorParamU(py_talloc_get_mem_ctx(obj), object->type, &object->p);
	if (py_p == NULL) {
		return NULL;
	}
	return py_p;
}

static int py_ExtendedErrorParam_set_p(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorParam *object = (struct ExtendedErrorParam *)py_talloc_get_ptr(py_obj);
	{
		union ExtendedErrorParamU *p_switch_0;
		p_switch_0 = py_export_ExtendedErrorParamU(py_talloc_get_mem_ctx(py_obj), object->type, value);
		if (p_switch_0 == NULL) {
			return -1;
		}
		object->p = *p_switch_0;
	}
	return 0;
}

static PyGetSetDef py_ExtendedErrorParam_getsetters[] = {
	{ discard_const_p(char, "type"), py_ExtendedErrorParam_get_type, py_ExtendedErrorParam_set_type },
	{ discard_const_p(char, "p"), py_ExtendedErrorParam_get_p, py_ExtendedErrorParam_set_p },
	{ NULL }
};

static PyObject *py_ExtendedErrorParam_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ExtendedErrorParam, type);
}


static PyTypeObject ExtendedErrorParam_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ExtendedErrorParam",
	.tp_getset = py_ExtendedErrorParam_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ExtendedErrorParam_new,
};


static PyObject *py_ExtendedErrorInfo_get_next(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_next;
	if (object->next == NULL) {
		py_next = Py_None;
		Py_INCREF(py_next);
	} else {
		py_next = py_talloc_reference_ex(&ExtendedErrorInfo_Type, object->next, object->next);
	}
	return py_next;
}

static int py_ExtendedErrorInfo_set_next(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->next);
	if (value == Py_None) {
		object->next = NULL;
	} else {
		object->next = NULL;
		PY_CHECK_TYPE(&ExtendedErrorInfo_Type, value, return -1;);
		if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->next = (struct ExtendedErrorInfo *)py_talloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_ExtendedErrorInfo_get_computer_name(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_computer_name;
	py_computer_name = py_talloc_reference_ex(&ExtendedErrorComputerName_Type, py_talloc_get_mem_ctx(obj), &object->computer_name);
	return py_computer_name;
}

static int py_ExtendedErrorInfo_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&ExtendedErrorComputerName_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->computer_name = *(struct ExtendedErrorComputerName *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_ExtendedErrorInfo_get_pid(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_pid;
	py_pid = PyLong_FromLongLong(object->pid);
	return py_pid;
}

static int py_ExtendedErrorInfo_set_pid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->pid = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->pid = 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_ExtendedErrorInfo_get_time(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_time;
	py_time = PyLong_FromLongLong(object->time);
	return py_time;
}

static int py_ExtendedErrorInfo_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_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_ExtendedErrorInfo_get_generating_component(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_generating_component;
	py_generating_component = PyInt_FromLong(object->generating_component);
	return py_generating_component;
}

static int py_ExtendedErrorInfo_set_generating_component(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->generating_component = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ExtendedErrorInfo_get_status(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyErr_FromWERROR(object->status);
	return py_status;
}

static int py_ExtendedErrorInfo_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	object->status = W_ERROR(PyInt_AsLong(value));
	return 0;
}

static PyObject *py_ExtendedErrorInfo_get_detection_location(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_detection_location;
	py_detection_location = PyInt_FromLong(object->detection_location);
	return py_detection_location;
}

static int py_ExtendedErrorInfo_set_detection_location(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->detection_location = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ExtendedErrorInfo_get_flags(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

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

static PyObject *py_ExtendedErrorInfo_get_num_params(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_num_params;
	py_num_params = PyInt_FromLong(object->num_params);
	return py_num_params;
}

static int py_ExtendedErrorInfo_set_num_params(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_params = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ExtendedErrorInfo_get_params(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(obj);
	PyObject *py_params;
	py_params = PyList_New(object->num_params);
	if (py_params == NULL) {
		return NULL;
	}
	{
		int params_cntr_0;
		for (params_cntr_0 = 0; params_cntr_0 < object->num_params; params_cntr_0++) {
			PyObject *py_params_0;
			py_params_0 = py_talloc_reference_ex(&ExtendedErrorParam_Type, object->params, &object->params[params_cntr_0]);
			PyList_SetItem(py_params, params_cntr_0, py_params_0);
		}
	}
	return py_params;
}

static int py_ExtendedErrorInfo_set_params(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int params_cntr_0;
		object->params = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->params, PyList_GET_SIZE(value));
		if (!object->params) { return -1;; }
		talloc_set_name_const(object->params, "ARRAY: object->params");
		for (params_cntr_0 = 0; params_cntr_0 < PyList_GET_SIZE(value); params_cntr_0++) {
			PY_CHECK_TYPE(&ExtendedErrorParam_Type, PyList_GET_ITEM(value, params_cntr_0), return -1;);
			if (talloc_reference(object->params, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, params_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->params[params_cntr_0] = *(struct ExtendedErrorParam *)py_talloc_get_ptr(PyList_GET_ITEM(value, params_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_ExtendedErrorInfo_getsetters[] = {
	{ discard_const_p(char, "next"), py_ExtendedErrorInfo_get_next, py_ExtendedErrorInfo_set_next },
	{ discard_const_p(char, "computer_name"), py_ExtendedErrorInfo_get_computer_name, py_ExtendedErrorInfo_set_computer_name },
	{ discard_const_p(char, "pid"), py_ExtendedErrorInfo_get_pid, py_ExtendedErrorInfo_set_pid },
	{ discard_const_p(char, "time"), py_ExtendedErrorInfo_get_time, py_ExtendedErrorInfo_set_time },
	{ discard_const_p(char, "generating_component"), py_ExtendedErrorInfo_get_generating_component, py_ExtendedErrorInfo_set_generating_component },
	{ discard_const_p(char, "status"), py_ExtendedErrorInfo_get_status, py_ExtendedErrorInfo_set_status },
	{ discard_const_p(char, "detection_location"), py_ExtendedErrorInfo_get_detection_location, py_ExtendedErrorInfo_set_detection_location },
	{ discard_const_p(char, "flags"), py_ExtendedErrorInfo_get_flags, py_ExtendedErrorInfo_set_flags },
	{ discard_const_p(char, "num_params"), py_ExtendedErrorInfo_get_num_params, py_ExtendedErrorInfo_set_num_params },
	{ discard_const_p(char, "params"), py_ExtendedErrorInfo_get_params, py_ExtendedErrorInfo_set_params },
	{ NULL }
};

static PyObject *py_ExtendedErrorInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ExtendedErrorInfo, type);
}

static PyObject *py_ExtendedErrorInfo_ndr_pack(PyObject *py_obj)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_ExtendedErrorInfo);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_ExtendedErrorInfo_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ExtendedErrorInfo);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_ExtendedErrorInfo_ndr_print(PyObject *py_obj)
{
	struct ExtendedErrorInfo *object = (struct ExtendedErrorInfo *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ExtendedErrorInfo, "ExtendedErrorInfo", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_ExtendedErrorInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_ExtendedErrorInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_ExtendedErrorInfo_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_ExtendedErrorInfo_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject ExtendedErrorInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ExtendedErrorInfo",
	.tp_getset = py_ExtendedErrorInfo_getsetters,
	.tp_methods = py_ExtendedErrorInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ExtendedErrorInfo_new,
};


static PyObject *py_ExtendedErrorInfoPtr_get_info(PyObject *obj, void *closure)
{
	struct ExtendedErrorInfoPtr *object = (struct ExtendedErrorInfoPtr *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	if (object->info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_talloc_reference_ex(&ExtendedErrorInfo_Type, object->info, object->info);
	}
	return py_info;
}

static int py_ExtendedErrorInfoPtr_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ExtendedErrorInfoPtr *object = (struct ExtendedErrorInfoPtr *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->info);
	if (value == Py_None) {
		object->info = NULL;
	} else {
		object->info = NULL;
		PY_CHECK_TYPE(&ExtendedErrorInfo_Type, value, return -1;);
		if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->info = (struct ExtendedErrorInfo *)py_talloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_ExtendedErrorInfoPtr_getsetters[] = {
	{ discard_const_p(char, "info"), py_ExtendedErrorInfoPtr_get_info, py_ExtendedErrorInfoPtr_set_info },
	{ NULL }
};

static PyObject *py_ExtendedErrorInfoPtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ExtendedErrorInfoPtr, type);
}


static PyTypeObject ExtendedErrorInfoPtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ExtendedErrorInfoPtr",
	.tp_getset = py_ExtendedErrorInfoPtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ExtendedErrorInfoPtr_new,
};


static PyObject *py_ForestTrustString_get_size(PyObject *obj, void *closure)
{
	struct ForestTrustString *object = (struct ForestTrustString *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_ForestTrustString_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustString *object = (struct ForestTrustString *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ForestTrustString_get_string(PyObject *obj, void *closure)
{
	struct ForestTrustString *object = (struct ForestTrustString *)py_talloc_get_ptr(obj);
	PyObject *py_string;
	if (object->string == NULL) {
		py_string = Py_None;
		Py_INCREF(py_string);
	} else {
		py_string = PyUnicode_Decode(object->string, strlen(object->string), "utf-8", "ignore");
	}
	return py_string;
}

static int py_ForestTrustString_set_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustString *object = (struct ForestTrustString *)py_talloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->string = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->string = 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_ForestTrustString_getsetters[] = {
	{ discard_const_p(char, "size"), py_ForestTrustString_get_size, py_ForestTrustString_set_size },
	{ discard_const_p(char, "string"), py_ForestTrustString_get_string, py_ForestTrustString_set_string },
	{ NULL }
};

static PyObject *py_ForestTrustString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ForestTrustString, type);
}


static PyTypeObject ForestTrustString_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ForestTrustString",
	.tp_getset = py_ForestTrustString_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ForestTrustString_new,
};


static PyObject *py_ForestTrustDataDomainInfo_get_sid_size(PyObject *obj, void *closure)
{
	struct ForestTrustDataDomainInfo *object = (struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(obj);
	PyObject *py_sid_size;
	py_sid_size = PyInt_FromLong(object->sid_size);
	return py_sid_size;
}

static int py_ForestTrustDataDomainInfo_set_sid_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustDataDomainInfo *object = (struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->sid_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ForestTrustDataDomainInfo_get_sid(PyObject *obj, void *closure)
{
	struct ForestTrustDataDomainInfo *object = (struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(obj);
	PyObject *py_sid;
	py_sid = py_talloc_reference_ex(dom_sid_Type, py_talloc_get_mem_ctx(obj), &object->sid);
	return py_sid;
}

static int py_ForestTrustDataDomainInfo_set_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustDataDomainInfo *object = (struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sid = *(struct dom_sid *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_ForestTrustDataDomainInfo_get_dns_name(PyObject *obj, void *closure)
{
	struct ForestTrustDataDomainInfo *object = (struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(obj);
	PyObject *py_dns_name;
	py_dns_name = py_talloc_reference_ex(&ForestTrustString_Type, py_talloc_get_mem_ctx(obj), &object->dns_name);
	return py_dns_name;
}

static int py_ForestTrustDataDomainInfo_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustDataDomainInfo *object = (struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&ForestTrustString_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dns_name = *(struct ForestTrustString *)py_talloc_get_ptr(value);
	return 0;
}

static PyObject *py_ForestTrustDataDomainInfo_get_netbios_name(PyObject *obj, void *closure)
{
	struct ForestTrustDataDomainInfo *object = (struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(obj);
	PyObject *py_netbios_name;
	py_netbios_name = py_talloc_reference_ex(&ForestTrustString_Type, py_talloc_get_mem_ctx(obj), &object->netbios_name);
	return py_netbios_name;
}

static int py_ForestTrustDataDomainInfo_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustDataDomainInfo *object = (struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&ForestTrustString_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->netbios_name = *(struct ForestTrustString *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_ForestTrustDataDomainInfo_getsetters[] = {
	{ discard_const_p(char, "sid_size"), py_ForestTrustDataDomainInfo_get_sid_size, py_ForestTrustDataDomainInfo_set_sid_size },
	{ discard_const_p(char, "sid"), py_ForestTrustDataDomainInfo_get_sid, py_ForestTrustDataDomainInfo_set_sid },
	{ discard_const_p(char, "dns_name"), py_ForestTrustDataDomainInfo_get_dns_name, py_ForestTrustDataDomainInfo_set_dns_name },
	{ discard_const_p(char, "netbios_name"), py_ForestTrustDataDomainInfo_get_netbios_name, py_ForestTrustDataDomainInfo_set_netbios_name },
	{ NULL }
};

static PyObject *py_ForestTrustDataDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ForestTrustDataDomainInfo, type);
}


static PyTypeObject ForestTrustDataDomainInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ForestTrustDataDomainInfo",
	.tp_getset = py_ForestTrustDataDomainInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ForestTrustDataDomainInfo_new,
};


static PyObject *py_ForestTrustDataBinaryData_get_size(PyObject *obj, void *closure)
{
	struct ForestTrustDataBinaryData *object = (struct ForestTrustDataBinaryData *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_ForestTrustDataBinaryData_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustDataBinaryData *object = (struct ForestTrustDataBinaryData *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ForestTrustDataBinaryData_get_data(PyObject *obj, void *closure)
{
	struct ForestTrustDataBinaryData *object = (struct ForestTrustDataBinaryData *)py_talloc_get_ptr(obj);
	PyObject *py_data;
	py_data = PyList_New(object->size);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_0;
		for (data_cntr_0 = 0; data_cntr_0 < object->size; data_cntr_0++) {
			PyObject *py_data_0;
			py_data_0 = PyInt_FromLong(object->data[data_cntr_0]);
			PyList_SetItem(py_data, data_cntr_0, py_data_0);
		}
	}
	return py_data;
}

static int py_ForestTrustDataBinaryData_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustDataBinaryData *object = (struct ForestTrustDataBinaryData *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int data_cntr_0;
		object->data = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
		if (!object->data) { return -1;; }
		talloc_set_name_const(object->data, "ARRAY: object->data");
		for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, data_cntr_0), return -1;);
			object->data[data_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, data_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_ForestTrustDataBinaryData_getsetters[] = {
	{ discard_const_p(char, "size"), py_ForestTrustDataBinaryData_get_size, py_ForestTrustDataBinaryData_set_size },
	{ discard_const_p(char, "data"), py_ForestTrustDataBinaryData_get_data, py_ForestTrustDataBinaryData_set_data },
	{ NULL }
};

static PyObject *py_ForestTrustDataBinaryData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ForestTrustDataBinaryData, type);
}


static PyTypeObject ForestTrustDataBinaryData_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ForestTrustDataBinaryData",
	.tp_getset = py_ForestTrustDataBinaryData_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ForestTrustDataBinaryData_new,
};

PyObject *py_import_ForestTrustData(TALLOC_CTX *mem_ctx, int level, union ForestTrustData *in)
{
	PyObject *ret;

	switch (level) {
		case FOREST_TRUST_TOP_LEVEL_NAME:
			ret = py_talloc_reference_ex(&ForestTrustString_Type, mem_ctx, &in->name);
			return ret;

		case FOREST_TRUST_TOP_LEVEL_NAME_EX:
			ret = py_talloc_reference_ex(&ForestTrustString_Type, mem_ctx, &in->name);
			return ret;

		case FOREST_TRUST_DOMAIN_INFO:
			ret = py_talloc_reference_ex(&ForestTrustDataDomainInfo_Type, mem_ctx, &in->info);
			return ret;

		default:
			ret = py_talloc_reference_ex(&ForestTrustDataBinaryData_Type, mem_ctx, &in->data);
			return ret;

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

union ForestTrustData *py_export_ForestTrustData(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union ForestTrustData *ret = talloc_zero(mem_ctx, union ForestTrustData);
	switch (level) {
		case FOREST_TRUST_TOP_LEVEL_NAME:
			PY_CHECK_TYPE(&ForestTrustString_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->name = *(struct ForestTrustString *)py_talloc_get_ptr(in);
			break;

		case FOREST_TRUST_TOP_LEVEL_NAME_EX:
			PY_CHECK_TYPE(&ForestTrustString_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->name = *(struct ForestTrustString *)py_talloc_get_ptr(in);
			break;

		case FOREST_TRUST_DOMAIN_INFO:
			PY_CHECK_TYPE(&ForestTrustDataDomainInfo_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info = *(struct ForestTrustDataDomainInfo *)py_talloc_get_ptr(in);
			break;

		default:
			PY_CHECK_TYPE(&ForestTrustDataBinaryData_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->data = *(struct ForestTrustDataBinaryData *)py_talloc_get_ptr(in);
			break;

	}

	return ret;
}


static PyObject *py_ForestTrustInfoRecord_get_flags(PyObject *obj, void *closure)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

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

static PyObject *py_ForestTrustInfoRecord_get_timestamp(PyObject *obj, void *closure)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(obj);
	PyObject *py_timestamp;
	py_timestamp = PyLong_FromLongLong(object->timestamp);
	return py_timestamp;
}

static int py_ForestTrustInfoRecord_set_timestamp(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->timestamp = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->timestamp = 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_ForestTrustInfoRecord_get_type(PyObject *obj, void *closure)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(obj);
	PyObject *py_type;
	py_type = PyInt_FromLong(object->type);
	return py_type;
}

static int py_ForestTrustInfoRecord_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_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_ForestTrustInfoRecord_get_data(PyObject *obj, void *closure)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(obj);
	PyObject *py_data;
	py_data = py_import_ForestTrustData(py_talloc_get_mem_ctx(obj), object->type, &object->data);
	if (py_data == NULL) {
		return NULL;
	}
	return py_data;
}

static int py_ForestTrustInfoRecord_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(py_obj);
	{
		union ForestTrustData *data_switch_0;
		data_switch_0 = py_export_ForestTrustData(py_talloc_get_mem_ctx(py_obj), object->type, value);
		if (data_switch_0 == NULL) {
			return -1;
		}
		object->data = *data_switch_0;
	}
	return 0;
}

static PyGetSetDef py_ForestTrustInfoRecord_getsetters[] = {
	{ discard_const_p(char, "flags"), py_ForestTrustInfoRecord_get_flags, py_ForestTrustInfoRecord_set_flags },
	{ discard_const_p(char, "timestamp"), py_ForestTrustInfoRecord_get_timestamp, py_ForestTrustInfoRecord_set_timestamp },
	{ discard_const_p(char, "type"), py_ForestTrustInfoRecord_get_type, py_ForestTrustInfoRecord_set_type },
	{ discard_const_p(char, "data"), py_ForestTrustInfoRecord_get_data, py_ForestTrustInfoRecord_set_data },
	{ NULL }
};

static PyObject *py_ForestTrustInfoRecord_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ForestTrustInfoRecord, type);
}

static PyObject *py_ForestTrustInfoRecord_ndr_pack(PyObject *py_obj)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_ForestTrustInfoRecord);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_ForestTrustInfoRecord_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfoRecord);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_ForestTrustInfoRecord_ndr_print(PyObject *py_obj)
{
	struct ForestTrustInfoRecord *object = (struct ForestTrustInfoRecord *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ForestTrustInfoRecord, "ForestTrustInfoRecord", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_ForestTrustInfoRecord_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_ForestTrustInfoRecord_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_ForestTrustInfoRecord_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_ForestTrustInfoRecord_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject ForestTrustInfoRecord_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ForestTrustInfoRecord",
	.tp_getset = py_ForestTrustInfoRecord_getsetters,
	.tp_methods = py_ForestTrustInfoRecord_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ForestTrustInfoRecord_new,
};


static PyObject *py_ForestTrustInfoRecordArmor_get_record_size(PyObject *obj, void *closure)
{
	struct ForestTrustInfoRecordArmor *object = (struct ForestTrustInfoRecordArmor *)py_talloc_get_ptr(obj);
	PyObject *py_record_size;
	py_record_size = PyInt_FromLong(object->record_size);
	return py_record_size;
}

static int py_ForestTrustInfoRecordArmor_set_record_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustInfoRecordArmor *object = (struct ForestTrustInfoRecordArmor *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->record_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_ForestTrustInfoRecordArmor_get_record(PyObject *obj, void *closure)
{
	struct ForestTrustInfoRecordArmor *object = (struct ForestTrustInfoRecordArmor *)py_talloc_get_ptr(obj);
	PyObject *py_record;
	py_record = py_talloc_reference_ex(&ForestTrustInfoRecord_Type, py_talloc_get_mem_ctx(obj), &object->record);
	return py_record;
}

static int py_ForestTrustInfoRecordArmor_set_record(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustInfoRecordArmor *object = (struct ForestTrustInfoRecordArmor *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&ForestTrustInfoRecord_Type, value, return -1;);
	if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->record = *(struct ForestTrustInfoRecord *)py_talloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_ForestTrustInfoRecordArmor_getsetters[] = {
	{ discard_const_p(char, "record_size"), py_ForestTrustInfoRecordArmor_get_record_size, py_ForestTrustInfoRecordArmor_set_record_size },
	{ discard_const_p(char, "record"), py_ForestTrustInfoRecordArmor_get_record, py_ForestTrustInfoRecordArmor_set_record },
	{ NULL }
};

static PyObject *py_ForestTrustInfoRecordArmor_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ForestTrustInfoRecordArmor, type);
}


static PyTypeObject ForestTrustInfoRecordArmor_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ForestTrustInfoRecordArmor",
	.tp_getset = py_ForestTrustInfoRecordArmor_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ForestTrustInfoRecordArmor_new,
};


static PyObject *py_ForestTrustInfo_get_version(PyObject *obj, void *closure)
{
	struct ForestTrustInfo *object = (struct ForestTrustInfo *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

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

static PyObject *py_ForestTrustInfo_get_count(PyObject *obj, void *closure)
{
	struct ForestTrustInfo *object = (struct ForestTrustInfo *)py_talloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

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

static PyObject *py_ForestTrustInfo_get_records(PyObject *obj, void *closure)
{
	struct ForestTrustInfo *object = (struct ForestTrustInfo *)py_talloc_get_ptr(obj);
	PyObject *py_records;
	py_records = PyList_New(object->count);
	if (py_records == NULL) {
		return NULL;
	}
	{
		int records_cntr_0;
		for (records_cntr_0 = 0; records_cntr_0 < object->count; records_cntr_0++) {
			PyObject *py_records_0;
			py_records_0 = py_talloc_reference_ex(&ForestTrustInfoRecordArmor_Type, object->records, &object->records[records_cntr_0]);
			PyList_SetItem(py_records, records_cntr_0, py_records_0);
		}
	}
	return py_records;
}

static int py_ForestTrustInfo_set_records(PyObject *py_obj, PyObject *value, void *closure)
{
	struct ForestTrustInfo *object = (struct ForestTrustInfo *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int records_cntr_0;
		object->records = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->records, PyList_GET_SIZE(value));
		if (!object->records) { return -1;; }
		talloc_set_name_const(object->records, "ARRAY: object->records");
		for (records_cntr_0 = 0; records_cntr_0 < PyList_GET_SIZE(value); records_cntr_0++) {
			PY_CHECK_TYPE(&ForestTrustInfoRecordArmor_Type, PyList_GET_ITEM(value, records_cntr_0), return -1;);
			if (talloc_reference(object->records, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, records_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->records[records_cntr_0] = *(struct ForestTrustInfoRecordArmor *)py_talloc_get_ptr(PyList_GET_ITEM(value, records_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_ForestTrustInfo_getsetters[] = {
	{ discard_const_p(char, "version"), py_ForestTrustInfo_get_version, py_ForestTrustInfo_set_version },
	{ discard_const_p(char, "count"), py_ForestTrustInfo_get_count, py_ForestTrustInfo_set_count },
	{ discard_const_p(char, "records"), py_ForestTrustInfo_get_records, py_ForestTrustInfo_set_records },
	{ NULL }
};

static PyObject *py_ForestTrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct ForestTrustInfo, type);
}

static PyObject *py_ForestTrustInfo_ndr_pack(PyObject *py_obj)
{
	struct ForestTrustInfo *object = (struct ForestTrustInfo *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_ForestTrustInfo);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

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

static PyObject *py_ForestTrustInfo_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct ForestTrustInfo *object = (struct ForestTrustInfo *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfo);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_ForestTrustInfo_ndr_print(PyObject *py_obj)
{
	struct ForestTrustInfo *object = (struct ForestTrustInfo *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ForestTrustInfo, "ForestTrustInfo", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_ForestTrustInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_ForestTrustInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_ForestTrustInfo_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_ForestTrustInfo_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject ForestTrustInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.ForestTrustInfo",
	.tp_getset = py_ForestTrustInfo_getsetters,
	.tp_methods = py_ForestTrustInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_ForestTrustInfo_new,
};


static bool pack_py_decode_replPropertyMetaData_args_in(PyObject *args, PyObject *kwargs, struct decode_replPropertyMetaData *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_replPropertyMetaData", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&replPropertyMetaDataBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct replPropertyMetaDataBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_replPropertyMetaData_args_out(struct decode_replPropertyMetaData *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_replUpToDateVector_args_in(PyObject *args, PyObject *kwargs, struct decode_replUpToDateVector *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_replUpToDateVector", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&replUpToDateVectorBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct replUpToDateVectorBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_replUpToDateVector_args_out(struct decode_replUpToDateVector *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_repsFromTo_args_in(PyObject *args, PyObject *kwargs, struct decode_repsFromTo *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_repsFromTo", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&repsFromToBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct repsFromToBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_repsFromTo_args_out(struct decode_repsFromTo *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_partialAttributeSet_args_in(PyObject *args, PyObject *kwargs, struct decode_partialAttributeSet *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_partialAttributeSet", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&partialAttributeSetBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct partialAttributeSetBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_partialAttributeSet_args_out(struct decode_partialAttributeSet *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_prefixMap_args_in(PyObject *args, PyObject *kwargs, struct decode_prefixMap *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_prefixMap", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&prefixMapBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct prefixMapBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_prefixMap_args_out(struct decode_prefixMap *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_ldapControlDirSync_args_in(PyObject *args, PyObject *kwargs, struct decode_ldapControlDirSync *r)
{
	PyObject *py_cookie;
	const char *kwnames[] = {
		"cookie", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_ldapControlDirSync", discard_const_p(char *, kwnames), &py_cookie)) {
		return false;
	}

	PY_CHECK_TYPE(&ldapControlDirSyncCookie_Type, py_cookie, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_cookie)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.cookie = *(struct ldapControlDirSyncCookie *)py_talloc_get_ptr(py_cookie);
	return true;
}

static PyObject *unpack_py_decode_ldapControlDirSync_args_out(struct decode_ldapControlDirSync *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_supplementalCredentials_args_in(PyObject *args, PyObject *kwargs, struct decode_supplementalCredentials *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_supplementalCredentials", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&supplementalCredentialsBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct supplementalCredentialsBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_supplementalCredentials_args_out(struct decode_supplementalCredentials *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_Packages_args_in(PyObject *args, PyObject *kwargs, struct decode_Packages *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_Packages", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&package_PackagesBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct package_PackagesBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_Packages_args_out(struct decode_Packages *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_PrimaryKerberos_args_in(PyObject *args, PyObject *kwargs, struct decode_PrimaryKerberos *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_PrimaryKerberos", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&package_PrimaryKerberosBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct package_PrimaryKerberosBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_PrimaryKerberos_args_out(struct decode_PrimaryKerberos *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_PrimaryCLEARTEXT_args_in(PyObject *args, PyObject *kwargs, struct decode_PrimaryCLEARTEXT *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_PrimaryCLEARTEXT", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&package_PrimaryCLEARTEXTBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct package_PrimaryCLEARTEXTBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_PrimaryCLEARTEXT_args_out(struct decode_PrimaryCLEARTEXT *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

static bool pack_py_decode_PrimaryWDigest_args_in(PyObject *args, PyObject *kwargs, struct decode_PrimaryWDigest *r)
{
	PyObject *py_blob;
	const char *kwnames[] = {
		"blob", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:decode_PrimaryWDigest", discard_const_p(char *, kwnames), &py_blob)) {
		return false;
	}

	PY_CHECK_TYPE(&package_PrimaryWDigestBlob_Type, py_blob, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_blob)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.blob = *(struct package_PrimaryWDigestBlob *)py_talloc_get_ptr(py_blob);
	return true;
}

static PyObject *unpack_py_decode_PrimaryWDigest_args_out(struct decode_PrimaryWDigest *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

const struct PyNdrRpcMethodDef py_ndr_drsblobs_methods[] = {
	{ "decode_replPropertyMetaData", "S.decode_replPropertyMetaData(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_replPropertyMetaData_r, (py_data_pack_fn)pack_py_decode_replPropertyMetaData_args_in, (py_data_unpack_fn)unpack_py_decode_replPropertyMetaData_args_out, 0, &ndr_table_drsblobs },
	{ "decode_replUpToDateVector", "S.decode_replUpToDateVector(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_replUpToDateVector_r, (py_data_pack_fn)pack_py_decode_replUpToDateVector_args_in, (py_data_unpack_fn)unpack_py_decode_replUpToDateVector_args_out, 1, &ndr_table_drsblobs },
	{ "decode_repsFromTo", "S.decode_repsFromTo(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_repsFromTo_r, (py_data_pack_fn)pack_py_decode_repsFromTo_args_in, (py_data_unpack_fn)unpack_py_decode_repsFromTo_args_out, 2, &ndr_table_drsblobs },
	{ "decode_partialAttributeSet", "S.decode_partialAttributeSet(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_partialAttributeSet_r, (py_data_pack_fn)pack_py_decode_partialAttributeSet_args_in, (py_data_unpack_fn)unpack_py_decode_partialAttributeSet_args_out, 3, &ndr_table_drsblobs },
	{ "decode_prefixMap", "S.decode_prefixMap(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_prefixMap_r, (py_data_pack_fn)pack_py_decode_prefixMap_args_in, (py_data_unpack_fn)unpack_py_decode_prefixMap_args_out, 4, &ndr_table_drsblobs },
	{ "decode_ldapControlDirSync", "S.decode_ldapControlDirSync(cookie) -> None", (py_dcerpc_call_fn)dcerpc_decode_ldapControlDirSync_r, (py_data_pack_fn)pack_py_decode_ldapControlDirSync_args_in, (py_data_unpack_fn)unpack_py_decode_ldapControlDirSync_args_out, 5, &ndr_table_drsblobs },
	{ "decode_supplementalCredentials", "S.decode_supplementalCredentials(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_supplementalCredentials_r, (py_data_pack_fn)pack_py_decode_supplementalCredentials_args_in, (py_data_unpack_fn)unpack_py_decode_supplementalCredentials_args_out, 6, &ndr_table_drsblobs },
	{ "decode_Packages", "S.decode_Packages(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_Packages_r, (py_data_pack_fn)pack_py_decode_Packages_args_in, (py_data_unpack_fn)unpack_py_decode_Packages_args_out, 7, &ndr_table_drsblobs },
	{ "decode_PrimaryKerberos", "S.decode_PrimaryKerberos(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_PrimaryKerberos_r, (py_data_pack_fn)pack_py_decode_PrimaryKerberos_args_in, (py_data_unpack_fn)unpack_py_decode_PrimaryKerberos_args_out, 8, &ndr_table_drsblobs },
	{ "decode_PrimaryCLEARTEXT", "S.decode_PrimaryCLEARTEXT(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_PrimaryCLEARTEXT_r, (py_data_pack_fn)pack_py_decode_PrimaryCLEARTEXT_args_in, (py_data_unpack_fn)unpack_py_decode_PrimaryCLEARTEXT_args_out, 9, &ndr_table_drsblobs },
	{ "decode_PrimaryWDigest", "S.decode_PrimaryWDigest(blob) -> None", (py_dcerpc_call_fn)dcerpc_decode_PrimaryWDigest_r, (py_data_pack_fn)pack_py_decode_PrimaryWDigest_args_in, (py_data_unpack_fn)unpack_py_decode_PrimaryWDigest_args_out, 10, &ndr_table_drsblobs },
	{ NULL }
};

static PyObject *interface_drsblobs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_drsblobs);
}

#define PY_DOC_DRSBLOBS "Active Directory Replication LDAP Blobs"
static PyTypeObject drsblobs_InterfaceType = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "drsblobs.drsblobs",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "drsblobs(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_DRSBLOBS,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_drsblobs_new,
};

static PyMethodDef drsblobs_methods[] = {
	{ NULL, NULL, 0, NULL }
};

void initdrsblobs(void)
{
	PyObject *m;
	PyObject *dep_samba_dcerpc_security;
	PyObject *dep_samba_dcerpc_samr;
	PyObject *dep_talloc;
	PyObject *dep_samba_dcerpc_misc;
	PyObject *dep_samba_dcerpc_base;
	PyObject *dep_samba_dcerpc_drsuapi;
	PyObject *dep_samba_dcerpc_lsa;

	dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
	if (dep_samba_dcerpc_security == NULL)
		return;

	dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
	if (dep_samba_dcerpc_samr == 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_drsuapi = PyImport_ImportModule("samba.dcerpc.drsuapi");
	if (dep_samba_dcerpc_drsuapi == NULL)
		return;

	dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
	if (dep_samba_dcerpc_lsa == NULL)
		return;

	dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
	if (dom_sid_Type == NULL)
		return;

	drsuapi_DsReplicaOIDMapping_Ctr_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_drsuapi, "DsReplicaOIDMapping_Ctr");
	if (drsuapi_DsReplicaOIDMapping_Ctr_Type == NULL)
		return;

	samr_Password_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "Password");
	if (samr_Password_Type == NULL)
		return;

	drsuapi_DsReplicaCursor_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_drsuapi, "DsReplicaCursor");
	if (drsuapi_DsReplicaCursor_Type == NULL)
		return;

	drsuapi_DsReplicaHighWaterMark_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_drsuapi, "DsReplicaHighWaterMark");
	if (drsuapi_DsReplicaHighWaterMark_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_DsReplicaCursor2_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_drsuapi, "DsReplicaCursor2");
	if (drsuapi_DsReplicaCursor2_Type == NULL)
		return;

	Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
	if (Object_Type == NULL)
		return;

	replPropertyMetaData1_Type.tp_base = Object_Type;

	replPropertyMetaDataCtr1_Type.tp_base = Object_Type;

	replPropertyMetaDataBlob_Type.tp_base = Object_Type;

	replUpToDateVectorCtr1_Type.tp_base = Object_Type;

	replUpToDateVectorCtr2_Type.tp_base = Object_Type;

	replUpToDateVectorBlob_Type.tp_base = Object_Type;

	repsFromTo1OtherInfo_Type.tp_base = Object_Type;

	repsFromTo1_Type.tp_base = Object_Type;

	repsFromTo2OtherInfo_Type.tp_base = Object_Type;

	repsFromTo2_Type.tp_base = Object_Type;

	repsFromToBlob_Type.tp_base = Object_Type;

	partialAttributeSetCtr1_Type.tp_base = Object_Type;

	partialAttributeSetBlob_Type.tp_base = Object_Type;

	schemaInfoBlob_Type.tp_base = Object_Type;

	drsuapi_MSPrefixMap_Entry_Type.tp_base = Object_Type;

	drsuapi_MSPrefixMap_Ctr_Type.tp_base = Object_Type;

	prefixMapBlob_Type.tp_base = Object_Type;

	ldapControlDirSyncBlob_Type.tp_base = Object_Type;

	ldapControlDirSyncCookie_Type.tp_base = Object_Type;

	supplementalCredentialsPackage_Type.tp_base = Object_Type;

	supplementalCredentialsSubBlob_Type.tp_base = Object_Type;

	supplementalCredentialsBlob_Type.tp_base = Object_Type;

	package_PackagesBlob_Type.tp_base = Object_Type;

	package_PrimaryKerberosString_Type.tp_base = Object_Type;

	package_PrimaryKerberosKey3_Type.tp_base = Object_Type;

	package_PrimaryKerberosCtr3_Type.tp_base = Object_Type;

	package_PrimaryKerberosKey4_Type.tp_base = Object_Type;

	package_PrimaryKerberosCtr4_Type.tp_base = Object_Type;

	package_PrimaryKerberosBlob_Type.tp_base = Object_Type;

	package_PrimaryCLEARTEXTBlob_Type.tp_base = Object_Type;

	package_PrimaryWDigestHash_Type.tp_base = Object_Type;

	package_PrimaryWDigestBlob_Type.tp_base = Object_Type;

	AuthInfoNone_Type.tp_base = Object_Type;

	AuthInfoNT4Owf_Type.tp_base = Object_Type;

	AuthInfoClear_Type.tp_base = Object_Type;

	AuthInfoVersion_Type.tp_base = Object_Type;

	AuthenticationInformation_Type.tp_base = Object_Type;

	AuthenticationInformationArray_Type.tp_base = Object_Type;

	trustAuthInOutBlob_Type.tp_base = Object_Type;

	trustDomainPasswords_Type.tp_base = Object_Type;

	DsCompressedChunk_Type.tp_base = Object_Type;

	ExtendedErrorAString_Type.tp_base = Object_Type;

	ExtendedErrorUString_Type.tp_base = Object_Type;

	ExtendedErrorBlob_Type.tp_base = Object_Type;

	ExtendedErrorComputerName_Type.tp_base = Object_Type;

	ExtendedErrorParam_Type.tp_base = Object_Type;

	ExtendedErrorInfo_Type.tp_base = Object_Type;

	ExtendedErrorInfoPtr_Type.tp_base = Object_Type;

	ForestTrustString_Type.tp_base = Object_Type;

	ForestTrustDataDomainInfo_Type.tp_base = Object_Type;

	ForestTrustDataBinaryData_Type.tp_base = Object_Type;

	ForestTrustInfoRecord_Type.tp_base = Object_Type;

	ForestTrustInfoRecordArmor_Type.tp_base = Object_Type;

	ForestTrustInfo_Type.tp_base = Object_Type;

	drsblobs_InterfaceType.tp_base = ClientConnection_Type;

	if (PyType_Ready(&replPropertyMetaData1_Type) < 0)
		return;
	if (PyType_Ready(&replPropertyMetaDataCtr1_Type) < 0)
		return;
	if (PyType_Ready(&replPropertyMetaDataBlob_Type) < 0)
		return;
	if (PyType_Ready(&replUpToDateVectorCtr1_Type) < 0)
		return;
	if (PyType_Ready(&replUpToDateVectorCtr2_Type) < 0)
		return;
	if (PyType_Ready(&replUpToDateVectorBlob_Type) < 0)
		return;
	if (PyType_Ready(&repsFromTo1OtherInfo_Type) < 0)
		return;
	if (PyType_Ready(&repsFromTo1_Type) < 0)
		return;
	if (PyType_Ready(&repsFromTo2OtherInfo_Type) < 0)
		return;
	if (PyType_Ready(&repsFromTo2_Type) < 0)
		return;
	if (PyType_Ready(&repsFromToBlob_Type) < 0)
		return;
	if (PyType_Ready(&partialAttributeSetCtr1_Type) < 0)
		return;
	if (PyType_Ready(&partialAttributeSetBlob_Type) < 0)
		return;
	if (PyType_Ready(&schemaInfoBlob_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_MSPrefixMap_Entry_Type) < 0)
		return;
	if (PyType_Ready(&drsuapi_MSPrefixMap_Ctr_Type) < 0)
		return;
	if (PyType_Ready(&prefixMapBlob_Type) < 0)
		return;
	if (PyType_Ready(&ldapControlDirSyncBlob_Type) < 0)
		return;
	if (PyType_Ready(&ldapControlDirSyncCookie_Type) < 0)
		return;
	if (PyType_Ready(&supplementalCredentialsPackage_Type) < 0)
		return;
	if (PyType_Ready(&supplementalCredentialsSubBlob_Type) < 0)
		return;
	if (PyType_Ready(&supplementalCredentialsBlob_Type) < 0)
		return;
	if (PyType_Ready(&package_PackagesBlob_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryKerberosString_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryKerberosKey3_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryKerberosCtr3_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryKerberosKey4_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryKerberosCtr4_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryKerberosBlob_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryCLEARTEXTBlob_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryWDigestHash_Type) < 0)
		return;
	if (PyType_Ready(&package_PrimaryWDigestBlob_Type) < 0)
		return;
	if (PyType_Ready(&AuthInfoNone_Type) < 0)
		return;
	if (PyType_Ready(&AuthInfoNT4Owf_Type) < 0)
		return;
	if (PyType_Ready(&AuthInfoClear_Type) < 0)
		return;
	if (PyType_Ready(&AuthInfoVersion_Type) < 0)
		return;
	if (PyType_Ready(&AuthenticationInformation_Type) < 0)
		return;
	if (PyType_Ready(&AuthenticationInformationArray_Type) < 0)
		return;
	if (PyType_Ready(&trustAuthInOutBlob_Type) < 0)
		return;
	if (PyType_Ready(&trustDomainPasswords_Type) < 0)
		return;
	if (PyType_Ready(&DsCompressedChunk_Type) < 0)
		return;
	if (PyType_Ready(&ExtendedErrorAString_Type) < 0)
		return;
	if (PyType_Ready(&ExtendedErrorUString_Type) < 0)
		return;
	if (PyType_Ready(&ExtendedErrorBlob_Type) < 0)
		return;
	if (PyType_Ready(&ExtendedErrorComputerName_Type) < 0)
		return;
	if (PyType_Ready(&ExtendedErrorParam_Type) < 0)
		return;
	if (PyType_Ready(&ExtendedErrorInfo_Type) < 0)
		return;
	if (PyType_Ready(&ExtendedErrorInfoPtr_Type) < 0)
		return;
	if (PyType_Ready(&ForestTrustString_Type) < 0)
		return;
	if (PyType_Ready(&ForestTrustDataDomainInfo_Type) < 0)
		return;
	if (PyType_Ready(&ForestTrustDataBinaryData_Type) < 0)
		return;
	if (PyType_Ready(&ForestTrustInfoRecord_Type) < 0)
		return;
	if (PyType_Ready(&ForestTrustInfoRecordArmor_Type) < 0)
		return;
	if (PyType_Ready(&ForestTrustInfo_Type) < 0)
		return;
	if (PyType_Ready(&drsblobs_InterfaceType) < 0)
		return;
	if (!PyInterface_AddNdrRpcMethods(&drsblobs_InterfaceType, py_ndr_drsblobs_methods))
		return;

#ifdef PY_REPLPROPERTYMETADATA1_PATCH
	PY_REPLPROPERTYMETADATA1_PATCH(&replPropertyMetaData1_Type);
#endif
#ifdef PY_REPLPROPERTYMETADATACTR1_PATCH
	PY_REPLPROPERTYMETADATACTR1_PATCH(&replPropertyMetaDataCtr1_Type);
#endif
#ifdef PY_REPLPROPERTYMETADATABLOB_PATCH
	PY_REPLPROPERTYMETADATABLOB_PATCH(&replPropertyMetaDataBlob_Type);
#endif
#ifdef PY_REPLUPTODATEVECTORCTR1_PATCH
	PY_REPLUPTODATEVECTORCTR1_PATCH(&replUpToDateVectorCtr1_Type);
#endif
#ifdef PY_REPLUPTODATEVECTORCTR2_PATCH
	PY_REPLUPTODATEVECTORCTR2_PATCH(&replUpToDateVectorCtr2_Type);
#endif
#ifdef PY_REPLUPTODATEVECTORBLOB_PATCH
	PY_REPLUPTODATEVECTORBLOB_PATCH(&replUpToDateVectorBlob_Type);
#endif
#ifdef PY_REPSFROMTO1OTHERINFO_PATCH
	PY_REPSFROMTO1OTHERINFO_PATCH(&repsFromTo1OtherInfo_Type);
#endif
#ifdef PY_REPSFROMTO1_PATCH
	PY_REPSFROMTO1_PATCH(&repsFromTo1_Type);
#endif
#ifdef PY_REPSFROMTO2OTHERINFO_PATCH
	PY_REPSFROMTO2OTHERINFO_PATCH(&repsFromTo2OtherInfo_Type);
#endif
#ifdef PY_REPSFROMTO2_PATCH
	PY_REPSFROMTO2_PATCH(&repsFromTo2_Type);
#endif
#ifdef PY_REPSFROMTOBLOB_PATCH
	PY_REPSFROMTOBLOB_PATCH(&repsFromToBlob_Type);
#endif
#ifdef PY_PARTIALATTRIBUTESETCTR1_PATCH
	PY_PARTIALATTRIBUTESETCTR1_PATCH(&partialAttributeSetCtr1_Type);
#endif
#ifdef PY_PARTIALATTRIBUTESETBLOB_PATCH
	PY_PARTIALATTRIBUTESETBLOB_PATCH(&partialAttributeSetBlob_Type);
#endif
#ifdef PY_SCHEMAINFOBLOB_PATCH
	PY_SCHEMAINFOBLOB_PATCH(&schemaInfoBlob_Type);
#endif
#ifdef PY_DRSUAPI_MSPREFIXMAP_ENTRY_PATCH
	PY_DRSUAPI_MSPREFIXMAP_ENTRY_PATCH(&drsuapi_MSPrefixMap_Entry_Type);
#endif
#ifdef PY_DRSUAPI_MSPREFIXMAP_CTR_PATCH
	PY_DRSUAPI_MSPREFIXMAP_CTR_PATCH(&drsuapi_MSPrefixMap_Ctr_Type);
#endif
#ifdef PY_PREFIXMAPBLOB_PATCH
	PY_PREFIXMAPBLOB_PATCH(&prefixMapBlob_Type);
#endif
#ifdef PY_LDAPCONTROLDIRSYNCBLOB_PATCH
	PY_LDAPCONTROLDIRSYNCBLOB_PATCH(&ldapControlDirSyncBlob_Type);
#endif
#ifdef PY_LDAPCONTROLDIRSYNCCOOKIE_PATCH
	PY_LDAPCONTROLDIRSYNCCOOKIE_PATCH(&ldapControlDirSyncCookie_Type);
#endif
#ifdef PY_SUPPLEMENTALCREDENTIALSPACKAGE_PATCH
	PY_SUPPLEMENTALCREDENTIALSPACKAGE_PATCH(&supplementalCredentialsPackage_Type);
#endif
#ifdef PY_SUPPLEMENTALCREDENTIALSSUBBLOB_PATCH
	PY_SUPPLEMENTALCREDENTIALSSUBBLOB_PATCH(&supplementalCredentialsSubBlob_Type);
#endif
#ifdef PY_SUPPLEMENTALCREDENTIALSBLOB_PATCH
	PY_SUPPLEMENTALCREDENTIALSBLOB_PATCH(&supplementalCredentialsBlob_Type);
#endif
#ifdef PY_PACKAGE_PACKAGESBLOB_PATCH
	PY_PACKAGE_PACKAGESBLOB_PATCH(&package_PackagesBlob_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYKERBEROSSTRING_PATCH
	PY_PACKAGE_PRIMARYKERBEROSSTRING_PATCH(&package_PrimaryKerberosString_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYKERBEROSKEY3_PATCH
	PY_PACKAGE_PRIMARYKERBEROSKEY3_PATCH(&package_PrimaryKerberosKey3_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYKERBEROSCTR3_PATCH
	PY_PACKAGE_PRIMARYKERBEROSCTR3_PATCH(&package_PrimaryKerberosCtr3_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYKERBEROSKEY4_PATCH
	PY_PACKAGE_PRIMARYKERBEROSKEY4_PATCH(&package_PrimaryKerberosKey4_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYKERBEROSCTR4_PATCH
	PY_PACKAGE_PRIMARYKERBEROSCTR4_PATCH(&package_PrimaryKerberosCtr4_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYKERBEROSBLOB_PATCH
	PY_PACKAGE_PRIMARYKERBEROSBLOB_PATCH(&package_PrimaryKerberosBlob_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYCLEARTEXTBLOB_PATCH
	PY_PACKAGE_PRIMARYCLEARTEXTBLOB_PATCH(&package_PrimaryCLEARTEXTBlob_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYWDIGESTHASH_PATCH
	PY_PACKAGE_PRIMARYWDIGESTHASH_PATCH(&package_PrimaryWDigestHash_Type);
#endif
#ifdef PY_PACKAGE_PRIMARYWDIGESTBLOB_PATCH
	PY_PACKAGE_PRIMARYWDIGESTBLOB_PATCH(&package_PrimaryWDigestBlob_Type);
#endif
#ifdef PY_AUTHINFONONE_PATCH
	PY_AUTHINFONONE_PATCH(&AuthInfoNone_Type);
#endif
#ifdef PY_AUTHINFONT4OWF_PATCH
	PY_AUTHINFONT4OWF_PATCH(&AuthInfoNT4Owf_Type);
#endif
#ifdef PY_AUTHINFOCLEAR_PATCH
	PY_AUTHINFOCLEAR_PATCH(&AuthInfoClear_Type);
#endif
#ifdef PY_AUTHINFOVERSION_PATCH
	PY_AUTHINFOVERSION_PATCH(&AuthInfoVersion_Type);
#endif
#ifdef PY_AUTHENTICATIONINFORMATION_PATCH
	PY_AUTHENTICATIONINFORMATION_PATCH(&AuthenticationInformation_Type);
#endif
#ifdef PY_AUTHENTICATIONINFORMATIONARRAY_PATCH
	PY_AUTHENTICATIONINFORMATIONARRAY_PATCH(&AuthenticationInformationArray_Type);
#endif
#ifdef PY_TRUSTAUTHINOUTBLOB_PATCH
	PY_TRUSTAUTHINOUTBLOB_PATCH(&trustAuthInOutBlob_Type);
#endif
#ifdef PY_TRUSTDOMAINPASSWORDS_PATCH
	PY_TRUSTDOMAINPASSWORDS_PATCH(&trustDomainPasswords_Type);
#endif
#ifdef PY_DSCOMPRESSEDCHUNK_PATCH
	PY_DSCOMPRESSEDCHUNK_PATCH(&DsCompressedChunk_Type);
#endif
#ifdef PY_EXTENDEDERRORASTRING_PATCH
	PY_EXTENDEDERRORASTRING_PATCH(&ExtendedErrorAString_Type);
#endif
#ifdef PY_EXTENDEDERRORUSTRING_PATCH
	PY_EXTENDEDERRORUSTRING_PATCH(&ExtendedErrorUString_Type);
#endif
#ifdef PY_EXTENDEDERRORBLOB_PATCH
	PY_EXTENDEDERRORBLOB_PATCH(&ExtendedErrorBlob_Type);
#endif
#ifdef PY_EXTENDEDERRORCOMPUTERNAME_PATCH
	PY_EXTENDEDERRORCOMPUTERNAME_PATCH(&ExtendedErrorComputerName_Type);
#endif
#ifdef PY_EXTENDEDERRORPARAM_PATCH
	PY_EXTENDEDERRORPARAM_PATCH(&ExtendedErrorParam_Type);
#endif
#ifdef PY_EXTENDEDERRORINFO_PATCH
	PY_EXTENDEDERRORINFO_PATCH(&ExtendedErrorInfo_Type);
#endif
#ifdef PY_EXTENDEDERRORINFOPTR_PATCH
	PY_EXTENDEDERRORINFOPTR_PATCH(&ExtendedErrorInfoPtr_Type);
#endif
#ifdef PY_FORESTTRUSTSTRING_PATCH
	PY_FORESTTRUSTSTRING_PATCH(&ForestTrustString_Type);
#endif
#ifdef PY_FORESTTRUSTDATADOMAININFO_PATCH
	PY_FORESTTRUSTDATADOMAININFO_PATCH(&ForestTrustDataDomainInfo_Type);
#endif
#ifdef PY_FORESTTRUSTDATABINARYDATA_PATCH
	PY_FORESTTRUSTDATABINARYDATA_PATCH(&ForestTrustDataBinaryData_Type);
#endif
#ifdef PY_FORESTTRUSTINFORECORD_PATCH
	PY_FORESTTRUSTINFORECORD_PATCH(&ForestTrustInfoRecord_Type);
#endif
#ifdef PY_FORESTTRUSTINFORECORDARMOR_PATCH
	PY_FORESTTRUSTINFORECORDARMOR_PATCH(&ForestTrustInfoRecordArmor_Type);
#endif
#ifdef PY_FORESTTRUSTINFO_PATCH
	PY_FORESTTRUSTINFO_PATCH(&ForestTrustInfo_Type);
#endif
#ifdef PY_DRSBLOBS_PATCH
	PY_DRSBLOBS_PATCH(&drsblobs_InterfaceType);
#endif

	m = Py_InitModule3("drsblobs", drsblobs_methods, "drsblobs DCE/RPC");
	if (m == NULL)
		return;

	PyModule_AddObject(m, "FOREST_TRUST_TOP_LEVEL_NAME_EX", PyInt_FromLong(FOREST_TRUST_TOP_LEVEL_NAME_EX));
	PyModule_AddObject(m, "EXTENDED_ERROR_COMPUTER_NAME_PRESENT", PyInt_FromLong(EXTENDED_ERROR_COMPUTER_NAME_PRESENT));
	PyModule_AddObject(m, "PREFIX_MAP_VERSION_DSDB", PyInt_FromLong(PREFIX_MAP_VERSION_DSDB));
	PyModule_AddObject(m, "FOREST_TRUST_DOMAIN_INFO", PyInt_FromLong(FOREST_TRUST_DOMAIN_INFO));
	PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING", PyInt_FromLong(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING));
	PyModule_AddObject(m, "SUPPLEMENTAL_CREDENTIALS_SIGNATURE", PyInt_FromLong(SUPPLEMENTAL_CREDENTIALS_SIGNATURE));
	PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_UINT16", PyInt_FromLong(EXTENDED_ERROR_PARAM_TYPE_UINT16));
	PyModule_AddObject(m, "FOREST_TRUST_TOP_LEVEL_NAME", PyInt_FromLong(FOREST_TRUST_TOP_LEVEL_NAME));
	PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_NONE", PyInt_FromLong(EXTENDED_ERROR_PARAM_TYPE_NONE));
	PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_UINT64", PyInt_FromLong(EXTENDED_ERROR_PARAM_TYPE_UINT64));
	PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_UINT32", PyInt_FromLong(EXTENDED_ERROR_PARAM_TYPE_UINT32));
	PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_BLOB", PyInt_FromLong(EXTENDED_ERROR_PARAM_TYPE_BLOB));
	PyModule_AddObject(m, "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT", PyInt_FromLong(EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT));
	PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING", PyInt_FromLong(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING));
	PyModule_AddObject(m, "SUPPLEMENTAL_CREDENTIALS_PREFIX", PyString_FromString("                                                "));
	Py_INCREF((PyObject *)(void *)&replPropertyMetaData1_Type);
	PyModule_AddObject(m, "replPropertyMetaData1", (PyObject *)(void *)&replPropertyMetaData1_Type);
	Py_INCREF((PyObject *)(void *)&replPropertyMetaDataCtr1_Type);
	PyModule_AddObject(m, "replPropertyMetaDataCtr1", (PyObject *)(void *)&replPropertyMetaDataCtr1_Type);
	Py_INCREF((PyObject *)(void *)&replPropertyMetaDataBlob_Type);
	PyModule_AddObject(m, "replPropertyMetaDataBlob", (PyObject *)(void *)&replPropertyMetaDataBlob_Type);
	Py_INCREF((PyObject *)(void *)&replUpToDateVectorCtr1_Type);
	PyModule_AddObject(m, "replUpToDateVectorCtr1", (PyObject *)(void *)&replUpToDateVectorCtr1_Type);
	Py_INCREF((PyObject *)(void *)&replUpToDateVectorCtr2_Type);
	PyModule_AddObject(m, "replUpToDateVectorCtr2", (PyObject *)(void *)&replUpToDateVectorCtr2_Type);
	Py_INCREF((PyObject *)(void *)&replUpToDateVectorBlob_Type);
	PyModule_AddObject(m, "replUpToDateVectorBlob", (PyObject *)(void *)&replUpToDateVectorBlob_Type);
	Py_INCREF((PyObject *)(void *)&repsFromTo1OtherInfo_Type);
	PyModule_AddObject(m, "repsFromTo1OtherInfo", (PyObject *)(void *)&repsFromTo1OtherInfo_Type);
	Py_INCREF((PyObject *)(void *)&repsFromTo1_Type);
	PyModule_AddObject(m, "repsFromTo1", (PyObject *)(void *)&repsFromTo1_Type);
	Py_INCREF((PyObject *)(void *)&repsFromTo2OtherInfo_Type);
	PyModule_AddObject(m, "repsFromTo2OtherInfo", (PyObject *)(void *)&repsFromTo2OtherInfo_Type);
	Py_INCREF((PyObject *)(void *)&repsFromTo2_Type);
	PyModule_AddObject(m, "repsFromTo2", (PyObject *)(void *)&repsFromTo2_Type);
	Py_INCREF((PyObject *)(void *)&repsFromToBlob_Type);
	PyModule_AddObject(m, "repsFromToBlob", (PyObject *)(void *)&repsFromToBlob_Type);
	Py_INCREF((PyObject *)(void *)&partialAttributeSetCtr1_Type);
	PyModule_AddObject(m, "partialAttributeSetCtr1", (PyObject *)(void *)&partialAttributeSetCtr1_Type);
	Py_INCREF((PyObject *)(void *)&partialAttributeSetBlob_Type);
	PyModule_AddObject(m, "partialAttributeSetBlob", (PyObject *)(void *)&partialAttributeSetBlob_Type);
	Py_INCREF((PyObject *)(void *)&schemaInfoBlob_Type);
	PyModule_AddObject(m, "schemaInfoBlob", (PyObject *)(void *)&schemaInfoBlob_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_MSPrefixMap_Entry_Type);
	PyModule_AddObject(m, "drsuapi_MSPrefixMap_Entry", (PyObject *)(void *)&drsuapi_MSPrefixMap_Entry_Type);
	Py_INCREF((PyObject *)(void *)&drsuapi_MSPrefixMap_Ctr_Type);
	PyModule_AddObject(m, "drsuapi_MSPrefixMap_Ctr", (PyObject *)(void *)&drsuapi_MSPrefixMap_Ctr_Type);
	Py_INCREF((PyObject *)(void *)&prefixMapBlob_Type);
	PyModule_AddObject(m, "prefixMapBlob", (PyObject *)(void *)&prefixMapBlob_Type);
	Py_INCREF((PyObject *)(void *)&ldapControlDirSyncBlob_Type);
	PyModule_AddObject(m, "ldapControlDirSyncBlob", (PyObject *)(void *)&ldapControlDirSyncBlob_Type);
	Py_INCREF((PyObject *)(void *)&ldapControlDirSyncCookie_Type);
	PyModule_AddObject(m, "ldapControlDirSyncCookie", (PyObject *)(void *)&ldapControlDirSyncCookie_Type);
	Py_INCREF((PyObject *)(void *)&supplementalCredentialsPackage_Type);
	PyModule_AddObject(m, "supplementalCredentialsPackage", (PyObject *)(void *)&supplementalCredentialsPackage_Type);
	Py_INCREF((PyObject *)(void *)&supplementalCredentialsSubBlob_Type);
	PyModule_AddObject(m, "supplementalCredentialsSubBlob", (PyObject *)(void *)&supplementalCredentialsSubBlob_Type);
	Py_INCREF((PyObject *)(void *)&supplementalCredentialsBlob_Type);
	PyModule_AddObject(m, "supplementalCredentialsBlob", (PyObject *)(void *)&supplementalCredentialsBlob_Type);
	Py_INCREF((PyObject *)(void *)&package_PackagesBlob_Type);
	PyModule_AddObject(m, "package_PackagesBlob", (PyObject *)(void *)&package_PackagesBlob_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosString_Type);
	PyModule_AddObject(m, "package_PrimaryKerberosString", (PyObject *)(void *)&package_PrimaryKerberosString_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosKey3_Type);
	PyModule_AddObject(m, "package_PrimaryKerberosKey3", (PyObject *)(void *)&package_PrimaryKerberosKey3_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosCtr3_Type);
	PyModule_AddObject(m, "package_PrimaryKerberosCtr3", (PyObject *)(void *)&package_PrimaryKerberosCtr3_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosKey4_Type);
	PyModule_AddObject(m, "package_PrimaryKerberosKey4", (PyObject *)(void *)&package_PrimaryKerberosKey4_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosCtr4_Type);
	PyModule_AddObject(m, "package_PrimaryKerberosCtr4", (PyObject *)(void *)&package_PrimaryKerberosCtr4_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosBlob_Type);
	PyModule_AddObject(m, "package_PrimaryKerberosBlob", (PyObject *)(void *)&package_PrimaryKerberosBlob_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryCLEARTEXTBlob_Type);
	PyModule_AddObject(m, "package_PrimaryCLEARTEXTBlob", (PyObject *)(void *)&package_PrimaryCLEARTEXTBlob_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryWDigestHash_Type);
	PyModule_AddObject(m, "package_PrimaryWDigestHash", (PyObject *)(void *)&package_PrimaryWDigestHash_Type);
	Py_INCREF((PyObject *)(void *)&package_PrimaryWDigestBlob_Type);
	PyModule_AddObject(m, "package_PrimaryWDigestBlob", (PyObject *)(void *)&package_PrimaryWDigestBlob_Type);
	Py_INCREF((PyObject *)(void *)&AuthInfoNone_Type);
	PyModule_AddObject(m, "AuthInfoNone", (PyObject *)(void *)&AuthInfoNone_Type);
	Py_INCREF((PyObject *)(void *)&AuthInfoNT4Owf_Type);
	PyModule_AddObject(m, "AuthInfoNT4Owf", (PyObject *)(void *)&AuthInfoNT4Owf_Type);
	Py_INCREF((PyObject *)(void *)&AuthInfoClear_Type);
	PyModule_AddObject(m, "AuthInfoClear", (PyObject *)(void *)&AuthInfoClear_Type);
	Py_INCREF((PyObject *)(void *)&AuthInfoVersion_Type);
	PyModule_AddObject(m, "AuthInfoVersion", (PyObject *)(void *)&AuthInfoVersion_Type);
	Py_INCREF((PyObject *)(void *)&AuthenticationInformation_Type);
	PyModule_AddObject(m, "AuthenticationInformation", (PyObject *)(void *)&AuthenticationInformation_Type);
	Py_INCREF((PyObject *)(void *)&AuthenticationInformationArray_Type);
	PyModule_AddObject(m, "AuthenticationInformationArray", (PyObject *)(void *)&AuthenticationInformationArray_Type);
	Py_INCREF((PyObject *)(void *)&trustAuthInOutBlob_Type);
	PyModule_AddObject(m, "trustAuthInOutBlob", (PyObject *)(void *)&trustAuthInOutBlob_Type);
	Py_INCREF((PyObject *)(void *)&trustDomainPasswords_Type);
	PyModule_AddObject(m, "trustDomainPasswords", (PyObject *)(void *)&trustDomainPasswords_Type);
	Py_INCREF((PyObject *)(void *)&DsCompressedChunk_Type);
	PyModule_AddObject(m, "DsCompressedChunk", (PyObject *)(void *)&DsCompressedChunk_Type);
	Py_INCREF((PyObject *)(void *)&ExtendedErrorAString_Type);
	PyModule_AddObject(m, "ExtendedErrorAString", (PyObject *)(void *)&ExtendedErrorAString_Type);
	Py_INCREF((PyObject *)(void *)&ExtendedErrorUString_Type);
	PyModule_AddObject(m, "ExtendedErrorUString", (PyObject *)(void *)&ExtendedErrorUString_Type);
	Py_INCREF((PyObject *)(void *)&ExtendedErrorBlob_Type);
	PyModule_AddObject(m, "ExtendedErrorBlob", (PyObject *)(void *)&ExtendedErrorBlob_Type);
	Py_INCREF((PyObject *)(void *)&ExtendedErrorComputerName_Type);
	PyModule_AddObject(m, "ExtendedErrorComputerName", (PyObject *)(void *)&ExtendedErrorComputerName_Type);
	Py_INCREF((PyObject *)(void *)&ExtendedErrorParam_Type);
	PyModule_AddObject(m, "ExtendedErrorParam", (PyObject *)(void *)&ExtendedErrorParam_Type);
	Py_INCREF((PyObject *)(void *)&ExtendedErrorInfo_Type);
	PyModule_AddObject(m, "ExtendedErrorInfo", (PyObject *)(void *)&ExtendedErrorInfo_Type);
	Py_INCREF((PyObject *)(void *)&ExtendedErrorInfoPtr_Type);
	PyModule_AddObject(m, "ExtendedErrorInfoPtr", (PyObject *)(void *)&ExtendedErrorInfoPtr_Type);
	Py_INCREF((PyObject *)(void *)&ForestTrustString_Type);
	PyModule_AddObject(m, "ForestTrustString", (PyObject *)(void *)&ForestTrustString_Type);
	Py_INCREF((PyObject *)(void *)&ForestTrustDataDomainInfo_Type);
	PyModule_AddObject(m, "ForestTrustDataDomainInfo", (PyObject *)(void *)&ForestTrustDataDomainInfo_Type);
	Py_INCREF((PyObject *)(void *)&ForestTrustDataBinaryData_Type);
	PyModule_AddObject(m, "ForestTrustDataBinaryData", (PyObject *)(void *)&ForestTrustDataBinaryData_Type);
	Py_INCREF((PyObject *)(void *)&ForestTrustInfoRecord_Type);
	PyModule_AddObject(m, "ForestTrustInfoRecord", (PyObject *)(void *)&ForestTrustInfoRecord_Type);
	Py_INCREF((PyObject *)(void *)&ForestTrustInfoRecordArmor_Type);
	PyModule_AddObject(m, "ForestTrustInfoRecordArmor", (PyObject *)(void *)&ForestTrustInfoRecordArmor_Type);
	Py_INCREF((PyObject *)(void *)&ForestTrustInfo_Type);
	PyModule_AddObject(m, "ForestTrustInfo", (PyObject *)(void *)&ForestTrustInfo_Type);
	Py_INCREF((PyObject *)(void *)&drsblobs_InterfaceType);
	PyModule_AddObject(m, "drsblobs", (PyObject *)(void *)&drsblobs_InterfaceType);
#ifdef PY_MOD_DRSBLOBS_PATCH
	PY_MOD_DRSBLOBS_PATCH(m);
#endif

}
