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

#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/security.h"
staticforward PyTypeObject bkrp_exported_RSA_key_pair_Type;
staticforward PyTypeObject bkrp_dc_serverwrap_key_Type;
staticforward PyTypeObject bkrp_client_side_wrapped_Type;
staticforward PyTypeObject bkrp_client_side_unwrapped_Type;
staticforward PyTypeObject bkrp_encrypted_secret_v2_Type;
staticforward PyTypeObject bkrp_encrypted_secret_v3_Type;
staticforward PyTypeObject bkrp_access_check_v2_Type;
staticforward PyTypeObject bkrp_access_check_v3_Type;
staticforward PyTypeObject backupkey_InterfaceType;

void initbackupkey(void);static PyTypeObject *dom_sid_Type;
static PyTypeObject *Object_Type;
static PyTypeObject *GUID_Type;
static PyTypeObject *ClientConnection_Type;

static PyObject *py_bkrp_exported_RSA_key_pair_get_header1(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_header1;
	py_header1 = PyInt_FromLong(object->header1);
	return py_header1;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_header2(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_header2;
	py_header2 = PyInt_FromLong(object->header2);
	return py_header2;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_certificate_len(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_certificate_len;
	py_certificate_len = PyInt_FromLong(object->certificate_len);
	return py_certificate_len;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_magic1(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_magic1;
	py_magic1 = PyInt_FromLong(object->magic1);
	return py_magic1;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_magic2(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_magic2;
	py_magic2 = PyInt_FromLong(object->magic2);
	return py_magic2;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_magic3(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_magic3;
	py_magic3 = PyInt_FromLong(object->magic3);
	return py_magic3;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_magic4(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_magic4;
	py_magic4 = PyInt_FromLong(object->magic4);
	return py_magic4;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_public_exponent(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_public_exponent;
	py_public_exponent = PyString_FromStringAndSize((char *)(object->public_exponent).data, (object->public_exponent).length);
	return py_public_exponent;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_modulus(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_modulus;
	py_modulus = PyString_FromStringAndSize((char *)(object->modulus).data, (object->modulus).length);
	return py_modulus;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_prime1(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_prime1;
	py_prime1 = PyString_FromStringAndSize((char *)(object->prime1).data, (object->prime1).length);
	return py_prime1;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_prime2(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_prime2;
	py_prime2 = PyString_FromStringAndSize((char *)(object->prime2).data, (object->prime2).length);
	return py_prime2;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_exponent1(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_exponent1;
	py_exponent1 = PyString_FromStringAndSize((char *)(object->exponent1).data, (object->exponent1).length);
	return py_exponent1;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_exponent2(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_exponent2;
	py_exponent2 = PyString_FromStringAndSize((char *)(object->exponent2).data, (object->exponent2).length);
	return py_exponent2;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_coefficient(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_coefficient;
	py_coefficient = PyString_FromStringAndSize((char *)(object->coefficient).data, (object->coefficient).length);
	return py_coefficient;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_private_exponent(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_private_exponent;
	py_private_exponent = PyString_FromStringAndSize((char *)(object->private_exponent).data, (object->private_exponent).length);
	return py_private_exponent;
}

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

static PyObject *py_bkrp_exported_RSA_key_pair_get_cert(PyObject *obj, void *closure)
{
	struct bkrp_exported_RSA_key_pair *object = (struct bkrp_exported_RSA_key_pair *)pytalloc_get_ptr(obj);
	PyObject *py_cert;
	py_cert = PyString_FromStringAndSize((char *)(object->cert).data, (object->cert).length);
	return py_cert;
}

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

static PyGetSetDef py_bkrp_exported_RSA_key_pair_getsetters[] = {
	{ discard_const_p(char, "header1"), py_bkrp_exported_RSA_key_pair_get_header1, py_bkrp_exported_RSA_key_pair_set_header1 },
	{ discard_const_p(char, "header2"), py_bkrp_exported_RSA_key_pair_get_header2, py_bkrp_exported_RSA_key_pair_set_header2 },
	{ discard_const_p(char, "certificate_len"), py_bkrp_exported_RSA_key_pair_get_certificate_len, py_bkrp_exported_RSA_key_pair_set_certificate_len },
	{ discard_const_p(char, "magic1"), py_bkrp_exported_RSA_key_pair_get_magic1, py_bkrp_exported_RSA_key_pair_set_magic1 },
	{ discard_const_p(char, "magic2"), py_bkrp_exported_RSA_key_pair_get_magic2, py_bkrp_exported_RSA_key_pair_set_magic2 },
	{ discard_const_p(char, "magic3"), py_bkrp_exported_RSA_key_pair_get_magic3, py_bkrp_exported_RSA_key_pair_set_magic3 },
	{ discard_const_p(char, "magic4"), py_bkrp_exported_RSA_key_pair_get_magic4, py_bkrp_exported_RSA_key_pair_set_magic4 },
	{ discard_const_p(char, "public_exponent"), py_bkrp_exported_RSA_key_pair_get_public_exponent, py_bkrp_exported_RSA_key_pair_set_public_exponent },
	{ discard_const_p(char, "modulus"), py_bkrp_exported_RSA_key_pair_get_modulus, py_bkrp_exported_RSA_key_pair_set_modulus },
	{ discard_const_p(char, "prime1"), py_bkrp_exported_RSA_key_pair_get_prime1, py_bkrp_exported_RSA_key_pair_set_prime1 },
	{ discard_const_p(char, "prime2"), py_bkrp_exported_RSA_key_pair_get_prime2, py_bkrp_exported_RSA_key_pair_set_prime2 },
	{ discard_const_p(char, "exponent1"), py_bkrp_exported_RSA_key_pair_get_exponent1, py_bkrp_exported_RSA_key_pair_set_exponent1 },
	{ discard_const_p(char, "exponent2"), py_bkrp_exported_RSA_key_pair_get_exponent2, py_bkrp_exported_RSA_key_pair_set_exponent2 },
	{ discard_const_p(char, "coefficient"), py_bkrp_exported_RSA_key_pair_get_coefficient, py_bkrp_exported_RSA_key_pair_set_coefficient },
	{ discard_const_p(char, "private_exponent"), py_bkrp_exported_RSA_key_pair_get_private_exponent, py_bkrp_exported_RSA_key_pair_set_private_exponent },
	{ discard_const_p(char, "cert"), py_bkrp_exported_RSA_key_pair_get_cert, py_bkrp_exported_RSA_key_pair_set_cert },
	{ NULL }
};

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


static PyTypeObject bkrp_exported_RSA_key_pair_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.bkrp_exported_RSA_key_pair",
	.tp_getset = py_bkrp_exported_RSA_key_pair_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_bkrp_exported_RSA_key_pair_new,
};


static PyObject *py_bkrp_dc_serverwrap_key_get_magic(PyObject *obj, void *closure)
{
	struct bkrp_dc_serverwrap_key *object = (struct bkrp_dc_serverwrap_key *)pytalloc_get_ptr(obj);
	PyObject *py_magic;
	py_magic = PyInt_FromLong(object->magic);
	return py_magic;
}

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

static PyObject *py_bkrp_dc_serverwrap_key_get_key(PyObject *obj, void *closure)
{
	struct bkrp_dc_serverwrap_key *object = (struct bkrp_dc_serverwrap_key *)pytalloc_get_ptr(obj);
	PyObject *py_key;
	py_key = PyList_New(256);
	if (py_key == NULL) {
		return NULL;
	}
	{
		int key_cntr_0;
		for (key_cntr_0 = 0; key_cntr_0 < 256; key_cntr_0++) {
			PyObject *py_key_0;
			py_key_0 = PyInt_FromLong(object->key[key_cntr_0]);
			PyList_SetItem(py_key, key_cntr_0, py_key_0);
		}
	}
	return py_key;
}

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

static PyGetSetDef py_bkrp_dc_serverwrap_key_getsetters[] = {
	{ discard_const_p(char, "magic"), py_bkrp_dc_serverwrap_key_get_magic, py_bkrp_dc_serverwrap_key_set_magic },
	{ discard_const_p(char, "key"), py_bkrp_dc_serverwrap_key_get_key, py_bkrp_dc_serverwrap_key_set_key },
	{ NULL }
};

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


static PyTypeObject bkrp_dc_serverwrap_key_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.bkrp_dc_serverwrap_key",
	.tp_getset = py_bkrp_dc_serverwrap_key_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_bkrp_dc_serverwrap_key_new,
};


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

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

static PyObject *py_bkrp_client_side_wrapped_get_encrypted_secret_len(PyObject *obj, void *closure)
{
	struct bkrp_client_side_wrapped *object = (struct bkrp_client_side_wrapped *)pytalloc_get_ptr(obj);
	PyObject *py_encrypted_secret_len;
	py_encrypted_secret_len = PyInt_FromLong(object->encrypted_secret_len);
	return py_encrypted_secret_len;
}

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

static PyObject *py_bkrp_client_side_wrapped_get_access_check_len(PyObject *obj, void *closure)
{
	struct bkrp_client_side_wrapped *object = (struct bkrp_client_side_wrapped *)pytalloc_get_ptr(obj);
	PyObject *py_access_check_len;
	py_access_check_len = PyInt_FromLong(object->access_check_len);
	return py_access_check_len;
}

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

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

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

static PyObject *py_bkrp_client_side_wrapped_get_encrypted_secret(PyObject *obj, void *closure)
{
	struct bkrp_client_side_wrapped *object = (struct bkrp_client_side_wrapped *)pytalloc_get_ptr(obj);
	PyObject *py_encrypted_secret;
	py_encrypted_secret = PyList_New(object->encrypted_secret_len);
	if (py_encrypted_secret == NULL) {
		return NULL;
	}
	{
		int encrypted_secret_cntr_0;
		for (encrypted_secret_cntr_0 = 0; encrypted_secret_cntr_0 < object->encrypted_secret_len; encrypted_secret_cntr_0++) {
			PyObject *py_encrypted_secret_0;
			py_encrypted_secret_0 = PyInt_FromLong(object->encrypted_secret[encrypted_secret_cntr_0]);
			PyList_SetItem(py_encrypted_secret, encrypted_secret_cntr_0, py_encrypted_secret_0);
		}
	}
	return py_encrypted_secret;
}

static int py_bkrp_client_side_wrapped_set_encrypted_secret(PyObject *py_obj, PyObject *value, void *closure)
{
	struct bkrp_client_side_wrapped *object = (struct bkrp_client_side_wrapped *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int encrypted_secret_cntr_0;
		object->encrypted_secret = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->encrypted_secret, PyList_GET_SIZE(value));
		if (!object->encrypted_secret) { return -1;; }
		talloc_set_name_const(object->encrypted_secret, "ARRAY: object->encrypted_secret");
		for (encrypted_secret_cntr_0 = 0; encrypted_secret_cntr_0 < PyList_GET_SIZE(value); encrypted_secret_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, encrypted_secret_cntr_0), return -1;);
			object->encrypted_secret[encrypted_secret_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, encrypted_secret_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_bkrp_client_side_wrapped_get_access_check(PyObject *obj, void *closure)
{
	struct bkrp_client_side_wrapped *object = (struct bkrp_client_side_wrapped *)pytalloc_get_ptr(obj);
	PyObject *py_access_check;
	py_access_check = PyList_New(object->access_check_len);
	if (py_access_check == NULL) {
		return NULL;
	}
	{
		int access_check_cntr_0;
		for (access_check_cntr_0 = 0; access_check_cntr_0 < object->access_check_len; access_check_cntr_0++) {
			PyObject *py_access_check_0;
			py_access_check_0 = PyInt_FromLong(object->access_check[access_check_cntr_0]);
			PyList_SetItem(py_access_check, access_check_cntr_0, py_access_check_0);
		}
	}
	return py_access_check;
}

static int py_bkrp_client_side_wrapped_set_access_check(PyObject *py_obj, PyObject *value, void *closure)
{
	struct bkrp_client_side_wrapped *object = (struct bkrp_client_side_wrapped *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int access_check_cntr_0;
		object->access_check = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->access_check, PyList_GET_SIZE(value));
		if (!object->access_check) { return -1;; }
		talloc_set_name_const(object->access_check, "ARRAY: object->access_check");
		for (access_check_cntr_0 = 0; access_check_cntr_0 < PyList_GET_SIZE(value); access_check_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, access_check_cntr_0), return -1;);
			object->access_check[access_check_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, access_check_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_bkrp_client_side_wrapped_getsetters[] = {
	{ discard_const_p(char, "version"), py_bkrp_client_side_wrapped_get_version, py_bkrp_client_side_wrapped_set_version },
	{ discard_const_p(char, "encrypted_secret_len"), py_bkrp_client_side_wrapped_get_encrypted_secret_len, py_bkrp_client_side_wrapped_set_encrypted_secret_len },
	{ discard_const_p(char, "access_check_len"), py_bkrp_client_side_wrapped_get_access_check_len, py_bkrp_client_side_wrapped_set_access_check_len },
	{ discard_const_p(char, "guid"), py_bkrp_client_side_wrapped_get_guid, py_bkrp_client_side_wrapped_set_guid },
	{ discard_const_p(char, "encrypted_secret"), py_bkrp_client_side_wrapped_get_encrypted_secret, py_bkrp_client_side_wrapped_set_encrypted_secret },
	{ discard_const_p(char, "access_check"), py_bkrp_client_side_wrapped_get_access_check, py_bkrp_client_side_wrapped_set_access_check },
	{ NULL }
};

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


static PyTypeObject bkrp_client_side_wrapped_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.bkrp_client_side_wrapped",
	.tp_getset = py_bkrp_client_side_wrapped_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_bkrp_client_side_wrapped_new,
};


static PyObject *py_bkrp_client_side_unwrapped_get_magic(PyObject *obj, void *closure)
{
	struct bkrp_client_side_unwrapped *object = (struct bkrp_client_side_unwrapped *)pytalloc_get_ptr(obj);
	PyObject *py_magic;
	py_magic = PyInt_FromLong(object->magic);
	return py_magic;
}

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

static PyObject *py_bkrp_client_side_unwrapped_get_secret(PyObject *obj, void *closure)
{
	struct bkrp_client_side_unwrapped *object = (struct bkrp_client_side_unwrapped *)pytalloc_get_ptr(obj);
	PyObject *py_secret;
	py_secret = PyString_FromStringAndSize((char *)(object->secret).data, (object->secret).length);
	return py_secret;
}

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

static PyGetSetDef py_bkrp_client_side_unwrapped_getsetters[] = {
	{ discard_const_p(char, "magic"), py_bkrp_client_side_unwrapped_get_magic, py_bkrp_client_side_unwrapped_set_magic },
	{ discard_const_p(char, "secret"), py_bkrp_client_side_unwrapped_get_secret, py_bkrp_client_side_unwrapped_set_secret },
	{ NULL }
};

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


static PyTypeObject bkrp_client_side_unwrapped_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.bkrp_client_side_unwrapped",
	.tp_getset = py_bkrp_client_side_unwrapped_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_bkrp_client_side_unwrapped_new,
};


static PyObject *py_bkrp_encrypted_secret_v2_get_secret_len(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v2 *object = (struct bkrp_encrypted_secret_v2 *)pytalloc_get_ptr(obj);
	PyObject *py_secret_len;
	py_secret_len = PyInt_FromLong(object->secret_len);
	return py_secret_len;
}

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

static PyObject *py_bkrp_encrypted_secret_v2_get_magic(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v2 *object = (struct bkrp_encrypted_secret_v2 *)pytalloc_get_ptr(obj);
	PyObject *py_magic;
	py_magic = PyInt_FromLong(object->magic);
	return py_magic;
}

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

static PyObject *py_bkrp_encrypted_secret_v2_get_secret(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v2 *object = (struct bkrp_encrypted_secret_v2 *)pytalloc_get_ptr(obj);
	PyObject *py_secret;
	py_secret = PyList_New(object->secret_len);
	if (py_secret == NULL) {
		return NULL;
	}
	{
		int secret_cntr_0;
		for (secret_cntr_0 = 0; secret_cntr_0 < object->secret_len; secret_cntr_0++) {
			PyObject *py_secret_0;
			py_secret_0 = PyInt_FromLong(object->secret[secret_cntr_0]);
			PyList_SetItem(py_secret, secret_cntr_0, py_secret_0);
		}
	}
	return py_secret;
}

static int py_bkrp_encrypted_secret_v2_set_secret(PyObject *py_obj, PyObject *value, void *closure)
{
	struct bkrp_encrypted_secret_v2 *object = (struct bkrp_encrypted_secret_v2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int secret_cntr_0;
		object->secret = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->secret, PyList_GET_SIZE(value));
		if (!object->secret) { return -1;; }
		talloc_set_name_const(object->secret, "ARRAY: object->secret");
		for (secret_cntr_0 = 0; secret_cntr_0 < PyList_GET_SIZE(value); secret_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, secret_cntr_0), return -1;);
			object->secret[secret_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, secret_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_bkrp_encrypted_secret_v2_get_payload_key(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v2 *object = (struct bkrp_encrypted_secret_v2 *)pytalloc_get_ptr(obj);
	PyObject *py_payload_key;
	py_payload_key = PyList_New(32);
	if (py_payload_key == NULL) {
		return NULL;
	}
	{
		int payload_key_cntr_0;
		for (payload_key_cntr_0 = 0; payload_key_cntr_0 < 32; payload_key_cntr_0++) {
			PyObject *py_payload_key_0;
			py_payload_key_0 = PyInt_FromLong(object->payload_key[payload_key_cntr_0]);
			PyList_SetItem(py_payload_key, payload_key_cntr_0, py_payload_key_0);
		}
	}
	return py_payload_key;
}

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

static PyGetSetDef py_bkrp_encrypted_secret_v2_getsetters[] = {
	{ discard_const_p(char, "secret_len"), py_bkrp_encrypted_secret_v2_get_secret_len, py_bkrp_encrypted_secret_v2_set_secret_len },
	{ discard_const_p(char, "magic"), py_bkrp_encrypted_secret_v2_get_magic, py_bkrp_encrypted_secret_v2_set_magic },
	{ discard_const_p(char, "secret"), py_bkrp_encrypted_secret_v2_get_secret, py_bkrp_encrypted_secret_v2_set_secret },
	{ discard_const_p(char, "payload_key"), py_bkrp_encrypted_secret_v2_get_payload_key, py_bkrp_encrypted_secret_v2_set_payload_key },
	{ NULL }
};

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


static PyTypeObject bkrp_encrypted_secret_v2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.bkrp_encrypted_secret_v2",
	.tp_getset = py_bkrp_encrypted_secret_v2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_bkrp_encrypted_secret_v2_new,
};


static PyObject *py_bkrp_encrypted_secret_v3_get_secret_len(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v3 *object = (struct bkrp_encrypted_secret_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_secret_len;
	py_secret_len = PyInt_FromLong(object->secret_len);
	return py_secret_len;
}

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

static PyObject *py_bkrp_encrypted_secret_v3_get_magic1(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v3 *object = (struct bkrp_encrypted_secret_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_magic1;
	py_magic1 = PyInt_FromLong(object->magic1);
	return py_magic1;
}

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

static PyObject *py_bkrp_encrypted_secret_v3_get_magic2(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v3 *object = (struct bkrp_encrypted_secret_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_magic2;
	py_magic2 = PyInt_FromLong(object->magic2);
	return py_magic2;
}

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

static PyObject *py_bkrp_encrypted_secret_v3_get_magic3(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v3 *object = (struct bkrp_encrypted_secret_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_magic3;
	py_magic3 = PyInt_FromLong(object->magic3);
	return py_magic3;
}

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

static PyObject *py_bkrp_encrypted_secret_v3_get_secret(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v3 *object = (struct bkrp_encrypted_secret_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_secret;
	py_secret = PyList_New(object->secret_len);
	if (py_secret == NULL) {
		return NULL;
	}
	{
		int secret_cntr_0;
		for (secret_cntr_0 = 0; secret_cntr_0 < object->secret_len; secret_cntr_0++) {
			PyObject *py_secret_0;
			py_secret_0 = PyInt_FromLong(object->secret[secret_cntr_0]);
			PyList_SetItem(py_secret, secret_cntr_0, py_secret_0);
		}
	}
	return py_secret;
}

static int py_bkrp_encrypted_secret_v3_set_secret(PyObject *py_obj, PyObject *value, void *closure)
{
	struct bkrp_encrypted_secret_v3 *object = (struct bkrp_encrypted_secret_v3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int secret_cntr_0;
		object->secret = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->secret, PyList_GET_SIZE(value));
		if (!object->secret) { return -1;; }
		talloc_set_name_const(object->secret, "ARRAY: object->secret");
		for (secret_cntr_0 = 0; secret_cntr_0 < PyList_GET_SIZE(value); secret_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, secret_cntr_0), return -1;);
			object->secret[secret_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, secret_cntr_0));
		}
	}
	return 0;
}

static PyObject *py_bkrp_encrypted_secret_v3_get_payload_key(PyObject *obj, void *closure)
{
	struct bkrp_encrypted_secret_v3 *object = (struct bkrp_encrypted_secret_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_payload_key;
	py_payload_key = PyList_New(48);
	if (py_payload_key == NULL) {
		return NULL;
	}
	{
		int payload_key_cntr_0;
		for (payload_key_cntr_0 = 0; payload_key_cntr_0 < 48; payload_key_cntr_0++) {
			PyObject *py_payload_key_0;
			py_payload_key_0 = PyInt_FromLong(object->payload_key[payload_key_cntr_0]);
			PyList_SetItem(py_payload_key, payload_key_cntr_0, py_payload_key_0);
		}
	}
	return py_payload_key;
}

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

static PyGetSetDef py_bkrp_encrypted_secret_v3_getsetters[] = {
	{ discard_const_p(char, "secret_len"), py_bkrp_encrypted_secret_v3_get_secret_len, py_bkrp_encrypted_secret_v3_set_secret_len },
	{ discard_const_p(char, "magic1"), py_bkrp_encrypted_secret_v3_get_magic1, py_bkrp_encrypted_secret_v3_set_magic1 },
	{ discard_const_p(char, "magic2"), py_bkrp_encrypted_secret_v3_get_magic2, py_bkrp_encrypted_secret_v3_set_magic2 },
	{ discard_const_p(char, "magic3"), py_bkrp_encrypted_secret_v3_get_magic3, py_bkrp_encrypted_secret_v3_set_magic3 },
	{ discard_const_p(char, "secret"), py_bkrp_encrypted_secret_v3_get_secret, py_bkrp_encrypted_secret_v3_set_secret },
	{ discard_const_p(char, "payload_key"), py_bkrp_encrypted_secret_v3_get_payload_key, py_bkrp_encrypted_secret_v3_set_payload_key },
	{ NULL }
};

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


static PyTypeObject bkrp_encrypted_secret_v3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.bkrp_encrypted_secret_v3",
	.tp_getset = py_bkrp_encrypted_secret_v3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_bkrp_encrypted_secret_v3_new,
};


static PyObject *py_bkrp_access_check_v2_get_magic(PyObject *obj, void *closure)
{
	struct bkrp_access_check_v2 *object = (struct bkrp_access_check_v2 *)pytalloc_get_ptr(obj);
	PyObject *py_magic;
	py_magic = PyInt_FromLong(object->magic);
	return py_magic;
}

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

static PyObject *py_bkrp_access_check_v2_get_nonce_len(PyObject *obj, void *closure)
{
	struct bkrp_access_check_v2 *object = (struct bkrp_access_check_v2 *)pytalloc_get_ptr(obj);
	PyObject *py_nonce_len;
	py_nonce_len = PyInt_FromLong(object->nonce_len);
	return py_nonce_len;
}

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

static PyObject *py_bkrp_access_check_v2_get_nonce(PyObject *obj, void *closure)
{
	struct bkrp_access_check_v2 *object = (struct bkrp_access_check_v2 *)pytalloc_get_ptr(obj);
	PyObject *py_nonce;
	py_nonce = PyList_New(object->nonce_len);
	if (py_nonce == NULL) {
		return NULL;
	}
	{
		int nonce_cntr_0;
		for (nonce_cntr_0 = 0; nonce_cntr_0 < object->nonce_len; nonce_cntr_0++) {
			PyObject *py_nonce_0;
			py_nonce_0 = PyInt_FromLong(object->nonce[nonce_cntr_0]);
			PyList_SetItem(py_nonce, nonce_cntr_0, py_nonce_0);
		}
	}
	return py_nonce;
}

static int py_bkrp_access_check_v2_set_nonce(PyObject *py_obj, PyObject *value, void *closure)
{
	struct bkrp_access_check_v2 *object = (struct bkrp_access_check_v2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int nonce_cntr_0;
		object->nonce = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->nonce, PyList_GET_SIZE(value));
		if (!object->nonce) { return -1;; }
		talloc_set_name_const(object->nonce, "ARRAY: object->nonce");
		for (nonce_cntr_0 = 0; nonce_cntr_0 < PyList_GET_SIZE(value); nonce_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, nonce_cntr_0), return -1;);
			object->nonce[nonce_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, nonce_cntr_0));
		}
	}
	return 0;
}

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

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

static PyObject *py_bkrp_access_check_v2_get_hash(PyObject *obj, void *closure)
{
	struct bkrp_access_check_v2 *object = (struct bkrp_access_check_v2 *)pytalloc_get_ptr(obj);
	PyObject *py_hash;
	py_hash = PyList_New(20);
	if (py_hash == NULL) {
		return NULL;
	}
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < 20; 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_bkrp_access_check_v2_set_hash(PyObject *py_obj, PyObject *value, void *closure)
{
	struct bkrp_access_check_v2 *object = (struct bkrp_access_check_v2 *)pytalloc_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_bkrp_access_check_v2_getsetters[] = {
	{ discard_const_p(char, "magic"), py_bkrp_access_check_v2_get_magic, py_bkrp_access_check_v2_set_magic },
	{ discard_const_p(char, "nonce_len"), py_bkrp_access_check_v2_get_nonce_len, py_bkrp_access_check_v2_set_nonce_len },
	{ discard_const_p(char, "nonce"), py_bkrp_access_check_v2_get_nonce, py_bkrp_access_check_v2_set_nonce },
	{ discard_const_p(char, "sid"), py_bkrp_access_check_v2_get_sid, py_bkrp_access_check_v2_set_sid },
	{ discard_const_p(char, "hash"), py_bkrp_access_check_v2_get_hash, py_bkrp_access_check_v2_set_hash },
	{ NULL }
};

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


static PyTypeObject bkrp_access_check_v2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.bkrp_access_check_v2",
	.tp_getset = py_bkrp_access_check_v2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_bkrp_access_check_v2_new,
};


static PyObject *py_bkrp_access_check_v3_get_magic(PyObject *obj, void *closure)
{
	struct bkrp_access_check_v3 *object = (struct bkrp_access_check_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_magic;
	py_magic = PyInt_FromLong(object->magic);
	return py_magic;
}

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

static PyObject *py_bkrp_access_check_v3_get_nonce_len(PyObject *obj, void *closure)
{
	struct bkrp_access_check_v3 *object = (struct bkrp_access_check_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_nonce_len;
	py_nonce_len = PyInt_FromLong(object->nonce_len);
	return py_nonce_len;
}

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

static PyObject *py_bkrp_access_check_v3_get_nonce(PyObject *obj, void *closure)
{
	struct bkrp_access_check_v3 *object = (struct bkrp_access_check_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_nonce;
	py_nonce = PyList_New(object->nonce_len);
	if (py_nonce == NULL) {
		return NULL;
	}
	{
		int nonce_cntr_0;
		for (nonce_cntr_0 = 0; nonce_cntr_0 < object->nonce_len; nonce_cntr_0++) {
			PyObject *py_nonce_0;
			py_nonce_0 = PyInt_FromLong(object->nonce[nonce_cntr_0]);
			PyList_SetItem(py_nonce, nonce_cntr_0, py_nonce_0);
		}
	}
	return py_nonce;
}

static int py_bkrp_access_check_v3_set_nonce(PyObject *py_obj, PyObject *value, void *closure)
{
	struct bkrp_access_check_v3 *object = (struct bkrp_access_check_v3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int nonce_cntr_0;
		object->nonce = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->nonce, PyList_GET_SIZE(value));
		if (!object->nonce) { return -1;; }
		talloc_set_name_const(object->nonce, "ARRAY: object->nonce");
		for (nonce_cntr_0 = 0; nonce_cntr_0 < PyList_GET_SIZE(value); nonce_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, nonce_cntr_0), return -1;);
			object->nonce[nonce_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, nonce_cntr_0));
		}
	}
	return 0;
}

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

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

static PyObject *py_bkrp_access_check_v3_get_hash(PyObject *obj, void *closure)
{
	struct bkrp_access_check_v3 *object = (struct bkrp_access_check_v3 *)pytalloc_get_ptr(obj);
	PyObject *py_hash;
	py_hash = PyList_New(64);
	if (py_hash == NULL) {
		return NULL;
	}
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < 64; 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_bkrp_access_check_v3_set_hash(PyObject *py_obj, PyObject *value, void *closure)
{
	struct bkrp_access_check_v3 *object = (struct bkrp_access_check_v3 *)pytalloc_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_bkrp_access_check_v3_getsetters[] = {
	{ discard_const_p(char, "magic"), py_bkrp_access_check_v3_get_magic, py_bkrp_access_check_v3_set_magic },
	{ discard_const_p(char, "nonce_len"), py_bkrp_access_check_v3_get_nonce_len, py_bkrp_access_check_v3_set_nonce_len },
	{ discard_const_p(char, "nonce"), py_bkrp_access_check_v3_get_nonce, py_bkrp_access_check_v3_set_nonce },
	{ discard_const_p(char, "sid"), py_bkrp_access_check_v3_get_sid, py_bkrp_access_check_v3_set_sid },
	{ discard_const_p(char, "hash"), py_bkrp_access_check_v3_get_hash, py_bkrp_access_check_v3_set_hash },
	{ NULL }
};

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


static PyTypeObject bkrp_access_check_v3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.bkrp_access_check_v3",
	.tp_getset = py_bkrp_access_check_v3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_bkrp_access_check_v3_new,
};

PyObject *py_import_bkrp_data_in_blob(TALLOC_CTX *mem_ctx, int level, union bkrp_data_in_blob *in)
{
	PyObject *ret;

	switch (level) {
		case BACKUPKEY_RESTORE_GUID_INTEGER:
			ret = pytalloc_reference_ex(&bkrp_client_side_wrapped_Type, mem_ctx, &in->restore_req);
			return ret;

		case BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER:
			ret = pytalloc_reference_ex(&bkrp_client_side_wrapped_Type, mem_ctx, &in->cert_req);
			return ret;

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

union bkrp_data_in_blob *py_export_bkrp_data_in_blob(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union bkrp_data_in_blob *ret = talloc_zero(mem_ctx, union bkrp_data_in_blob);
	switch (level) {
		case BACKUPKEY_RESTORE_GUID_INTEGER:
			PY_CHECK_TYPE(&bkrp_client_side_wrapped_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->restore_req = *(struct bkrp_client_side_wrapped *)pytalloc_get_ptr(in);
			break;

		case BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER:
			PY_CHECK_TYPE(&bkrp_client_side_wrapped_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->cert_req = *(struct bkrp_client_side_wrapped *)pytalloc_get_ptr(in);
			break;

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

	return ret;
}


static bool pack_py_bkrp_BackupKey_args_in(PyObject *args, PyObject *kwargs, struct bkrp_BackupKey *r)
{
	PyObject *py_guidActionAgent;
	PyObject *py_data_in;
	PyObject *py_param;
	const char *kwnames[] = {
		"guidActionAgent", "data_in", "param", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:bkrp_BackupKey", discard_const_p(char *, kwnames), &py_guidActionAgent, &py_data_in, &py_param)) {
		return false;
	}

	r->in.guidActionAgent = talloc_ptrtype(r, r->in.guidActionAgent);
	PY_CHECK_TYPE(GUID_Type, py_guidActionAgent, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_guidActionAgent)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.guidActionAgent = (struct GUID *)pytalloc_get_ptr(py_guidActionAgent);
	r->in.data_in = talloc_ptrtype(r, r->in.data_in);
	PY_CHECK_TYPE(&PyList_Type, py_data_in, return false;);
	{
		int data_in_cntr_1;
		r->in.data_in = talloc_array_ptrtype(r, r->in.data_in, PyList_GET_SIZE(py_data_in));
		if (!r->in.data_in) { return false;; }
		talloc_set_name_const(r->in.data_in, "ARRAY: r->in.data_in");
		for (data_in_cntr_1 = 0; data_in_cntr_1 < PyList_GET_SIZE(py_data_in); data_in_cntr_1++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_data_in, data_in_cntr_1), return false;);
			r->in.data_in[data_in_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(py_data_in, data_in_cntr_1));
		}
	}
	PY_CHECK_TYPE(&PyList_Type, py_data_in, return false;);
	r->in.data_in_len = PyList_GET_SIZE(py_data_in);
	PY_CHECK_TYPE(&PyInt_Type, py_param, return false;);
	r->in.param = PyInt_AsLong(py_param);
	return true;
}

static PyObject *unpack_py_bkrp_BackupKey_args_out(struct bkrp_BackupKey *r)
{
	PyObject *result;
	PyObject *py_data_out;
	PyObject *py_data_out_len;
	result = PyTuple_New(2);
	if (*r->out.data_out == NULL) {
		py_data_out = Py_None;
		Py_INCREF(py_data_out);
	} else {
		py_data_out = PyList_New(*r->out.data_out_len);
		if (py_data_out == NULL) {
			return NULL;
		}
		{
			int data_out_cntr_2;
			for (data_out_cntr_2 = 0; data_out_cntr_2 < *r->out.data_out_len; data_out_cntr_2++) {
				PyObject *py_data_out_2;
				py_data_out_2 = PyInt_FromLong(*r->out.data_out[data_out_cntr_2]);
				PyList_SetItem(py_data_out, data_out_cntr_2, py_data_out_2);
			}
		}
	}
	PyTuple_SetItem(result, 0, py_data_out);
	py_data_out_len = PyInt_FromLong(*r->out.data_out_len);
	PyTuple_SetItem(result, 1, py_data_out_len);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

const struct PyNdrRpcMethodDef py_ndr_backupkey_methods[] = {
	{ "bkrp_BackupKey", "S.bkrp_BackupKey(guidActionAgent, data_in, param) -> (data_out, data_out_len)", (py_dcerpc_call_fn)dcerpc_bkrp_BackupKey_r, (py_data_pack_fn)pack_py_bkrp_BackupKey_args_in, (py_data_unpack_fn)unpack_py_bkrp_BackupKey_args_out, 0, &ndr_table_backupkey },
	{ NULL }
};

static PyObject *interface_backupkey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_backupkey);
}

#define PY_DOC_BACKUPKEY "Remote Backup Key Storage"
static PyTypeObject backupkey_InterfaceType = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "backupkey.backupkey",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "backupkey(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_BACKUPKEY,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_backupkey_new,
};

static PyMethodDef backupkey_methods[] = {
	{ NULL, NULL, 0, NULL }
};

void initbackupkey(void)
{
	PyObject *m;
	PyObject *dep_samba_dcerpc_security;
	PyObject *dep_talloc;
	PyObject *dep_samba_dcerpc_misc;
	PyObject *dep_samba_dcerpc_base;

	dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
	if (dep_samba_dcerpc_security == NULL)
		return;

	dep_talloc = PyImport_ImportModule("talloc");
	if (dep_talloc == NULL)
		return;

	dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
	if (dep_samba_dcerpc_misc == NULL)
		return;

	dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
	if (dep_samba_dcerpc_base == NULL)
		return;

	dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
	if (dom_sid_Type == NULL)
		return;

	Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
	if (Object_Type == NULL)
		return;

	GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
	if (GUID_Type == NULL)
		return;

	ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
	if (ClientConnection_Type == NULL)
		return;

	bkrp_exported_RSA_key_pair_Type.tp_base = Object_Type;

	bkrp_dc_serverwrap_key_Type.tp_base = Object_Type;

	bkrp_client_side_wrapped_Type.tp_base = Object_Type;

	bkrp_client_side_unwrapped_Type.tp_base = Object_Type;

	bkrp_encrypted_secret_v2_Type.tp_base = Object_Type;

	bkrp_encrypted_secret_v3_Type.tp_base = Object_Type;

	bkrp_access_check_v2_Type.tp_base = Object_Type;

	bkrp_access_check_v3_Type.tp_base = Object_Type;

	backupkey_InterfaceType.tp_base = ClientConnection_Type;

	if (PyType_Ready(&bkrp_exported_RSA_key_pair_Type) < 0)
		return;
	if (PyType_Ready(&bkrp_dc_serverwrap_key_Type) < 0)
		return;
	if (PyType_Ready(&bkrp_client_side_wrapped_Type) < 0)
		return;
	if (PyType_Ready(&bkrp_client_side_unwrapped_Type) < 0)
		return;
	if (PyType_Ready(&bkrp_encrypted_secret_v2_Type) < 0)
		return;
	if (PyType_Ready(&bkrp_encrypted_secret_v3_Type) < 0)
		return;
	if (PyType_Ready(&bkrp_access_check_v2_Type) < 0)
		return;
	if (PyType_Ready(&bkrp_access_check_v3_Type) < 0)
		return;
	if (PyType_Ready(&backupkey_InterfaceType) < 0)
		return;
	if (!PyInterface_AddNdrRpcMethods(&backupkey_InterfaceType, py_ndr_backupkey_methods))
		return;

#ifdef PY_BKRP_EXPORTED_RSA_KEY_PAIR_PATCH
	PY_BKRP_EXPORTED_RSA_KEY_PAIR_PATCH(&bkrp_exported_RSA_key_pair_Type);
#endif
#ifdef PY_BKRP_DC_SERVERWRAP_KEY_PATCH
	PY_BKRP_DC_SERVERWRAP_KEY_PATCH(&bkrp_dc_serverwrap_key_Type);
#endif
#ifdef PY_BKRP_CLIENT_SIDE_WRAPPED_PATCH
	PY_BKRP_CLIENT_SIDE_WRAPPED_PATCH(&bkrp_client_side_wrapped_Type);
#endif
#ifdef PY_BKRP_CLIENT_SIDE_UNWRAPPED_PATCH
	PY_BKRP_CLIENT_SIDE_UNWRAPPED_PATCH(&bkrp_client_side_unwrapped_Type);
#endif
#ifdef PY_BKRP_ENCRYPTED_SECRET_V2_PATCH
	PY_BKRP_ENCRYPTED_SECRET_V2_PATCH(&bkrp_encrypted_secret_v2_Type);
#endif
#ifdef PY_BKRP_ENCRYPTED_SECRET_V3_PATCH
	PY_BKRP_ENCRYPTED_SECRET_V3_PATCH(&bkrp_encrypted_secret_v3_Type);
#endif
#ifdef PY_BKRP_ACCESS_CHECK_V2_PATCH
	PY_BKRP_ACCESS_CHECK_V2_PATCH(&bkrp_access_check_v2_Type);
#endif
#ifdef PY_BKRP_ACCESS_CHECK_V3_PATCH
	PY_BKRP_ACCESS_CHECK_V3_PATCH(&bkrp_access_check_v3_Type);
#endif
#ifdef PY_BACKUPKEY_PATCH
	PY_BACKUPKEY_PATCH(&backupkey_InterfaceType);
#endif

	m = Py_InitModule3("backupkey", backupkey_methods, "backupkey DCE/RPC");
	if (m == NULL)
		return;

	PyModule_AddObject(m, "BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER", PyInt_FromLong(BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER));
	PyModule_AddObject(m, "BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID", PyString_FromString("018FF48A-EABA-40C6-8F6D-72370240E967"));
	PyModule_AddObject(m, "BACKUPKEY_RESTORE_GUID", PyString_FromString("47270C64-2FC7-499B-AC5B-0E37CDCE899A"));
	PyModule_AddObject(m, "BACKUPKEY_BACKUP_GUID", PyString_FromString("7F752B10-178E-11D1-AB8F-00805F14DB40"));
	PyModule_AddObject(m, "BACKUPKEY_RESTORE_GUID_INTEGER", PyInt_FromLong(BACKUPKEY_RESTORE_GUID_INTEGER));
	PyModule_AddObject(m, "BACKUPKEY_INVALID_GUID_INTEGER", PyInt_FromLong(BACKUPKEY_INVALID_GUID_INTEGER));
	PyModule_AddObject(m, "BACKUPKEY_RESTORE_GUID_WIN2K", PyString_FromString("7FE94D50-178E-11D1-AB8F-00805F14DB40"));
	Py_INCREF((PyObject *)(void *)&bkrp_exported_RSA_key_pair_Type);
	PyModule_AddObject(m, "bkrp_exported_RSA_key_pair", (PyObject *)(void *)&bkrp_exported_RSA_key_pair_Type);
	Py_INCREF((PyObject *)(void *)&bkrp_dc_serverwrap_key_Type);
	PyModule_AddObject(m, "bkrp_dc_serverwrap_key", (PyObject *)(void *)&bkrp_dc_serverwrap_key_Type);
	Py_INCREF((PyObject *)(void *)&bkrp_client_side_wrapped_Type);
	PyModule_AddObject(m, "bkrp_client_side_wrapped", (PyObject *)(void *)&bkrp_client_side_wrapped_Type);
	Py_INCREF((PyObject *)(void *)&bkrp_client_side_unwrapped_Type);
	PyModule_AddObject(m, "bkrp_client_side_unwrapped", (PyObject *)(void *)&bkrp_client_side_unwrapped_Type);
	Py_INCREF((PyObject *)(void *)&bkrp_encrypted_secret_v2_Type);
	PyModule_AddObject(m, "bkrp_encrypted_secret_v2", (PyObject *)(void *)&bkrp_encrypted_secret_v2_Type);
	Py_INCREF((PyObject *)(void *)&bkrp_encrypted_secret_v3_Type);
	PyModule_AddObject(m, "bkrp_encrypted_secret_v3", (PyObject *)(void *)&bkrp_encrypted_secret_v3_Type);
	Py_INCREF((PyObject *)(void *)&bkrp_access_check_v2_Type);
	PyModule_AddObject(m, "bkrp_access_check_v2", (PyObject *)(void *)&bkrp_access_check_v2_Type);
	Py_INCREF((PyObject *)(void *)&bkrp_access_check_v3_Type);
	PyModule_AddObject(m, "bkrp_access_check_v3", (PyObject *)(void *)&bkrp_access_check_v3_Type);
	Py_INCREF((PyObject *)(void *)&backupkey_InterfaceType);
	PyModule_AddObject(m, "backupkey", (PyObject *)(void *)&backupkey_InterfaceType);
#ifdef PY_MOD_BACKUPKEY_PATCH
	PY_MOD_BACKUPKEY_PATCH(m);
#endif

}
