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

#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/security.h"
#include "librpc/gen_ndr/winreg.h"
staticforward PyTypeObject spoolss_Time_Type;
staticforward PyTypeObject spoolss_TimeCtr_Type;
staticforward PyTypeObject spoolss_PrinterInfo0_Type;
staticforward PyTypeObject spoolss_PSDRVEXTRA351_Type;
staticforward PyTypeObject spoolss_PSDRVEXTRA400_Type;
staticforward PyTypeObject spoolss_PSDRVEXTRA500_Type;
staticforward PyTypeObject spoolss_PSDRVEXTRA_Type;
staticforward PyTypeObject spoolss_UNIDRVEXTRA3_4_Type;
staticforward PyTypeObject spoolss_UNIDRVEXTRA500_Type;
staticforward PyTypeObject spoolss_UNIDRVEXTRA_Type;
staticforward PyTypeObject spoolss_JTEXP_Type;
staticforward PyTypeObject spoolss_OEM_DMEXTRA_Type;
staticforward PyTypeObject spoolss_DeviceMode_Type;
staticforward PyTypeObject spoolss_PrinterInfo1_Type;
staticforward PyTypeObject spoolss_PrinterInfo2_Type;
staticforward PyTypeObject spoolss_PrinterInfo3_Type;
staticforward PyTypeObject spoolss_PrinterInfo4_Type;
staticforward PyTypeObject spoolss_PrinterInfo5_Type;
staticforward PyTypeObject spoolss_PrinterInfo6_Type;
staticforward PyTypeObject spoolss_PrinterInfo7_Type;
staticforward PyTypeObject spoolss_DeviceModeInfo_Type;
staticforward PyTypeObject spoolss_DevmodeContainer_Type;
staticforward PyTypeObject spoolss_JobInfo1_Type;
staticforward PyTypeObject spoolss_JobInfo2_Type;
staticforward PyTypeObject spoolss_JobInfo3_Type;
staticforward PyTypeObject spoolss_JobInfo4_Type;
staticforward PyTypeObject spoolss_SetJobInfo1_Type;
staticforward PyTypeObject spoolss_SetJobInfo2_Type;
staticforward PyTypeObject spoolss_SetJobInfo4_Type;
staticforward PyTypeObject spoolss_JobInfoContainer_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo0_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo1_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo2_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo3_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo4_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo5_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo6_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo7_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo8_Type;
staticforward PyTypeObject spoolss_SetPrinterInfo9_Type;
staticforward PyTypeObject spoolss_SetPrinterInfoCtr_Type;
staticforward PyTypeObject spoolss_StringArray_Type;
staticforward PyTypeObject spoolss_AddDriverInfo1_Type;
staticforward PyTypeObject spoolss_AddDriverInfo2_Type;
staticforward PyTypeObject spoolss_AddDriverInfo3_Type;
staticforward PyTypeObject spoolss_AddDriverInfo4_Type;
staticforward PyTypeObject spoolss_AddDriverInfo5_Type;
staticforward PyTypeObject spoolss_AddDriverInfo6_Type;
staticforward PyTypeObject spoolss_AddDriverInfo8_Type;
staticforward PyTypeObject spoolss_AddDriverInfoCtr_Type;
staticforward PyTypeObject spoolss_DriverInfo1_Type;
staticforward PyTypeObject spoolss_DriverInfo2_Type;
staticforward PyTypeObject spoolss_DriverInfo3_Type;
staticforward PyTypeObject spoolss_DriverInfo4_Type;
staticforward PyTypeObject spoolss_DriverInfo5_Type;
staticforward PyTypeObject spoolss_DriverInfo6_Type;
staticforward PyTypeObject spoolss_DriverInfo7_Type;
staticforward PyTypeObject spoolss_DriverInfo8_Type;
staticforward PyTypeObject spoolss_DriverFileInfo_Type;
staticforward PyTypeObject spoolss_DriverInfo101_Type;
staticforward PyTypeObject spoolss_DriverDirectoryInfo1_Type;
staticforward PyTypeObject spoolss_PrintProcessorInfo1_Type;
staticforward PyTypeObject spoolss_PrintProcessorDirectoryInfo1_Type;
staticforward PyTypeObject spoolss_DocumentInfo1_Type;
staticforward PyTypeObject spoolss_OSVersion_Type;
staticforward PyTypeObject spoolss_OSVersionEx_Type;
staticforward PyTypeObject spoolss_FormSize_Type;
staticforward PyTypeObject spoolss_FormArea_Type;
staticforward PyTypeObject spoolss_FormInfo1_Type;
staticforward PyTypeObject spoolss_FormInfo2_Type;
staticforward PyTypeObject spoolss_AddFormInfo1_Type;
staticforward PyTypeObject spoolss_AddFormInfo2_Type;
staticforward PyTypeObject spoolss_PortInfo1_Type;
staticforward PyTypeObject spoolss_PortInfo2_Type;
staticforward PyTypeObject spoolss_PortInfo3_Type;
staticforward PyTypeObject spoolss_PortInfoFF_Type;
staticforward PyTypeObject spoolss_MonitorInfo1_Type;
staticforward PyTypeObject spoolss_MonitorInfo2_Type;
staticforward PyTypeObject spoolss_SetPortInfo1_Type;
staticforward PyTypeObject spoolss_SetPortInfo2_Type;
staticforward PyTypeObject spoolss_SetPortInfo3_Type;
staticforward PyTypeObject spoolss_SetPortInfoFF_Type;
staticforward PyTypeObject spoolss_SetPortInfoContainer_Type;
staticforward PyTypeObject spoolss_PrintProcDataTypesInfo1_Type;
staticforward PyTypeObject spoolss_PortVarContainer_Type;
staticforward PyTypeObject spoolss_NotifyOptionType_Type;
staticforward PyTypeObject spoolss_NotifyOption_Type;
staticforward PyTypeObject spoolss_NotifyString_Type;
staticforward PyTypeObject spoolss_Notify_Type;
staticforward PyTypeObject spoolss_NotifyInfo_Type;
staticforward PyTypeObject spoolss_UserLevel1_Type;
staticforward PyTypeObject spoolss_UserLevel2_Type;
staticforward PyTypeObject spoolss_UserLevel3_Type;
staticforward PyTypeObject spoolss_UserLevelCtr_Type;
staticforward PyTypeObject spoolss_PrinterEnumValues_Type;
staticforward PyTypeObject spoolss_PortData1_Type;
staticforward PyTypeObject spoolss_PortData2_Type;
staticforward PyTypeObject spoolss_MonitorUi_Type;
staticforward PyTypeObject spoolss_CorePrinterDriver_Type;
staticforward PyTypeObject spoolss_InterfaceType;

void initspoolss(void);static PyTypeObject *sec_desc_buf_Type;
static PyTypeObject *policy_handle_Type;
static PyTypeObject *Object_Type;
static PyTypeObject *GUID_Type;
static PyTypeObject *security_descriptor_Type;
static PyTypeObject *ClientConnection_Type;

static PyObject *py_spoolss_Time_get_year(PyObject *obj, void *closure)
{
	struct spoolss_Time *object = (struct spoolss_Time *)pytalloc_get_ptr(obj);
	PyObject *py_year;
	py_year = PyInt_FromLong(object->year);
	return py_year;
}

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

static PyObject *py_spoolss_Time_get_month(PyObject *obj, void *closure)
{
	struct spoolss_Time *object = (struct spoolss_Time *)pytalloc_get_ptr(obj);
	PyObject *py_month;
	py_month = PyInt_FromLong(object->month);
	return py_month;
}

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

static PyObject *py_spoolss_Time_get_day_of_week(PyObject *obj, void *closure)
{
	struct spoolss_Time *object = (struct spoolss_Time *)pytalloc_get_ptr(obj);
	PyObject *py_day_of_week;
	py_day_of_week = PyInt_FromLong(object->day_of_week);
	return py_day_of_week;
}

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

static PyObject *py_spoolss_Time_get_day(PyObject *obj, void *closure)
{
	struct spoolss_Time *object = (struct spoolss_Time *)pytalloc_get_ptr(obj);
	PyObject *py_day;
	py_day = PyInt_FromLong(object->day);
	return py_day;
}

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

static PyObject *py_spoolss_Time_get_hour(PyObject *obj, void *closure)
{
	struct spoolss_Time *object = (struct spoolss_Time *)pytalloc_get_ptr(obj);
	PyObject *py_hour;
	py_hour = PyInt_FromLong(object->hour);
	return py_hour;
}

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

static PyObject *py_spoolss_Time_get_minute(PyObject *obj, void *closure)
{
	struct spoolss_Time *object = (struct spoolss_Time *)pytalloc_get_ptr(obj);
	PyObject *py_minute;
	py_minute = PyInt_FromLong(object->minute);
	return py_minute;
}

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

static PyObject *py_spoolss_Time_get_second(PyObject *obj, void *closure)
{
	struct spoolss_Time *object = (struct spoolss_Time *)pytalloc_get_ptr(obj);
	PyObject *py_second;
	py_second = PyInt_FromLong(object->second);
	return py_second;
}

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

static PyObject *py_spoolss_Time_get_millisecond(PyObject *obj, void *closure)
{
	struct spoolss_Time *object = (struct spoolss_Time *)pytalloc_get_ptr(obj);
	PyObject *py_millisecond;
	py_millisecond = PyInt_FromLong(object->millisecond);
	return py_millisecond;
}

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

static PyGetSetDef py_spoolss_Time_getsetters[] = {
	{ discard_const_p(char, "year"), py_spoolss_Time_get_year, py_spoolss_Time_set_year },
	{ discard_const_p(char, "month"), py_spoolss_Time_get_month, py_spoolss_Time_set_month },
	{ discard_const_p(char, "day_of_week"), py_spoolss_Time_get_day_of_week, py_spoolss_Time_set_day_of_week },
	{ discard_const_p(char, "day"), py_spoolss_Time_get_day, py_spoolss_Time_set_day },
	{ discard_const_p(char, "hour"), py_spoolss_Time_get_hour, py_spoolss_Time_set_hour },
	{ discard_const_p(char, "minute"), py_spoolss_Time_get_minute, py_spoolss_Time_set_minute },
	{ discard_const_p(char, "second"), py_spoolss_Time_get_second, py_spoolss_Time_set_second },
	{ discard_const_p(char, "millisecond"), py_spoolss_Time_get_millisecond, py_spoolss_Time_set_millisecond },
	{ NULL }
};

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


static PyTypeObject spoolss_Time_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.Time",
	.tp_getset = py_spoolss_Time_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_Time_new,
};


static PyObject *py_spoolss_TimeCtr_get_size(PyObject *obj, void *closure)
{
	struct spoolss_TimeCtr *object = (struct spoolss_TimeCtr *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

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

static PyObject *py_spoolss_TimeCtr_get_time(PyObject *obj, void *closure)
{
	struct spoolss_TimeCtr *object = (struct spoolss_TimeCtr *)pytalloc_get_ptr(obj);
	PyObject *py_time;
	if (object->time == NULL) {
		py_time = Py_None;
		Py_INCREF(py_time);
	} else {
		py_time = pytalloc_reference_ex(&spoolss_Time_Type, object->time, object->time);
	}
	return py_time;
}

static int py_spoolss_TimeCtr_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_TimeCtr *object = (struct spoolss_TimeCtr *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->time);
	if (value == Py_None) {
		object->time = NULL;
	} else {
		object->time = NULL;
		PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->time = (struct spoolss_Time *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_spoolss_TimeCtr_getsetters[] = {
	{ discard_const_p(char, "size"), py_spoolss_TimeCtr_get_size, py_spoolss_TimeCtr_set_size },
	{ discard_const_p(char, "time"), py_spoolss_TimeCtr_get_time, py_spoolss_TimeCtr_set_time },
	{ NULL }
};

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


static PyTypeObject spoolss_TimeCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.TimeCtr",
	.tp_getset = py_spoolss_TimeCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_TimeCtr_new,
};


static PyObject *py_spoolss_PrinterInfo0_get_printername(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_printername;
	if (object->printername == NULL) {
		py_printername = Py_None;
		Py_INCREF(py_printername);
	} else {
		py_printername = PyString_FromStringOrNULL(object->printername);
	}
	return py_printername;
}

static int py_spoolss_PrinterInfo0_set_printername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printername = NULL;
	} else {
		object->printername = NULL;
		object->printername = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo0_get_servername(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyString_FromStringOrNULL(object->servername);
	}
	return py_servername;
}

static int py_spoolss_PrinterInfo0_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->servername = NULL;
	} else {
		object->servername = NULL;
		object->servername = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo0_get_cjobs(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_cjobs;
	py_cjobs = PyInt_FromLong(object->cjobs);
	return py_cjobs;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_total_jobs(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_total_jobs;
	py_total_jobs = PyInt_FromLong(object->total_jobs);
	return py_total_jobs;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_total_bytes(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_total_bytes;
	py_total_bytes = PyInt_FromLong(object->total_bytes);
	return py_total_bytes;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_time(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_time;
	py_time = pytalloc_reference_ex(&spoolss_Time_Type, pytalloc_get_mem_ctx(obj), &object->time);
	return py_time;
}

static int py_spoolss_PrinterInfo0_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->time = *(struct spoolss_Time *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_PrinterInfo0_get_global_counter(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_global_counter;
	py_global_counter = PyInt_FromLong(object->global_counter);
	return py_global_counter;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_total_pages(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_total_pages;
	py_total_pages = PyInt_FromLong(object->total_pages);
	return py_total_pages;
}

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

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

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

static PyObject *py_spoolss_PrinterInfo0_get_free_build(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_free_build;
	py_free_build = PyInt_FromLong(object->free_build);
	return py_free_build;
}

static int py_spoolss_PrinterInfo0_set_free_build(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->free_build = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->free_build = 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_spoolss_PrinterInfo0_get_spooling(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_spooling;
	py_spooling = PyInt_FromLong(object->spooling);
	return py_spooling;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_max_spooling(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_max_spooling;
	py_max_spooling = PyInt_FromLong(object->max_spooling);
	return py_max_spooling;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_session_counter(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_session_counter;
	py_session_counter = PyInt_FromLong(object->session_counter);
	return py_session_counter;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_num_error_out_of_paper(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_num_error_out_of_paper;
	py_num_error_out_of_paper = PyInt_FromLong(object->num_error_out_of_paper);
	return py_num_error_out_of_paper;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_num_error_not_ready(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_num_error_not_ready;
	py_num_error_not_ready = PyInt_FromLong(object->num_error_not_ready);
	return py_num_error_not_ready;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_job_error(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_job_error;
	py_job_error = PyInt_FromLong(object->job_error);
	return py_job_error;
}

static int py_spoolss_PrinterInfo0_set_job_error(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->job_error = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->job_error = 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_spoolss_PrinterInfo0_get_number_of_processors(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_number_of_processors;
	py_number_of_processors = PyInt_FromLong(object->number_of_processors);
	return py_number_of_processors;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_processor_type(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_processor_type;
	py_processor_type = PyInt_FromLong(object->processor_type);
	return py_processor_type;
}

static int py_spoolss_PrinterInfo0_set_processor_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->processor_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->processor_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_spoolss_PrinterInfo0_get_high_part_total_bytes(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_high_part_total_bytes;
	py_high_part_total_bytes = PyInt_FromLong(object->high_part_total_bytes);
	return py_high_part_total_bytes;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_change_id(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_change_id;
	py_change_id = PyInt_FromLong(object->change_id);
	return py_change_id;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_last_error(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_last_error;
	py_last_error = PyErr_FromWERROR(object->last_error);
	return py_last_error;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_status(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_enumerate_network_printers(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_enumerate_network_printers;
	py_enumerate_network_printers = PyInt_FromLong(object->enumerate_network_printers);
	return py_enumerate_network_printers;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_c_setprinter(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_c_setprinter;
	py_c_setprinter = PyInt_FromLong(object->c_setprinter);
	return py_c_setprinter;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_processor_architecture(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_processor_architecture;
	py_processor_architecture = PyInt_FromLong(object->processor_architecture);
	return py_processor_architecture;
}

static int py_spoolss_PrinterInfo0_set_processor_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->processor_architecture = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->processor_architecture = 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_spoolss_PrinterInfo0_get_processor_level(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_processor_level;
	py_processor_level = PyInt_FromLong(object->processor_level);
	return py_processor_level;
}

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

static PyObject *py_spoolss_PrinterInfo0_get_ref_ic(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_ref_ic;
	py_ref_ic = PyInt_FromLong(object->ref_ic);
	return py_ref_ic;
}

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

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

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

static PyObject *py_spoolss_PrinterInfo0_get_reserved3(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_reserved3;
	py_reserved3 = PyInt_FromLong(object->reserved3);
	return py_reserved3;
}

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

static PyGetSetDef py_spoolss_PrinterInfo0_getsetters[] = {
	{ discard_const_p(char, "printername"), py_spoolss_PrinterInfo0_get_printername, py_spoolss_PrinterInfo0_set_printername },
	{ discard_const_p(char, "servername"), py_spoolss_PrinterInfo0_get_servername, py_spoolss_PrinterInfo0_set_servername },
	{ discard_const_p(char, "cjobs"), py_spoolss_PrinterInfo0_get_cjobs, py_spoolss_PrinterInfo0_set_cjobs },
	{ discard_const_p(char, "total_jobs"), py_spoolss_PrinterInfo0_get_total_jobs, py_spoolss_PrinterInfo0_set_total_jobs },
	{ discard_const_p(char, "total_bytes"), py_spoolss_PrinterInfo0_get_total_bytes, py_spoolss_PrinterInfo0_set_total_bytes },
	{ discard_const_p(char, "time"), py_spoolss_PrinterInfo0_get_time, py_spoolss_PrinterInfo0_set_time },
	{ discard_const_p(char, "global_counter"), py_spoolss_PrinterInfo0_get_global_counter, py_spoolss_PrinterInfo0_set_global_counter },
	{ discard_const_p(char, "total_pages"), py_spoolss_PrinterInfo0_get_total_pages, py_spoolss_PrinterInfo0_set_total_pages },
	{ discard_const_p(char, "version"), py_spoolss_PrinterInfo0_get_version, py_spoolss_PrinterInfo0_set_version },
	{ discard_const_p(char, "free_build"), py_spoolss_PrinterInfo0_get_free_build, py_spoolss_PrinterInfo0_set_free_build },
	{ discard_const_p(char, "spooling"), py_spoolss_PrinterInfo0_get_spooling, py_spoolss_PrinterInfo0_set_spooling },
	{ discard_const_p(char, "max_spooling"), py_spoolss_PrinterInfo0_get_max_spooling, py_spoolss_PrinterInfo0_set_max_spooling },
	{ discard_const_p(char, "session_counter"), py_spoolss_PrinterInfo0_get_session_counter, py_spoolss_PrinterInfo0_set_session_counter },
	{ discard_const_p(char, "num_error_out_of_paper"), py_spoolss_PrinterInfo0_get_num_error_out_of_paper, py_spoolss_PrinterInfo0_set_num_error_out_of_paper },
	{ discard_const_p(char, "num_error_not_ready"), py_spoolss_PrinterInfo0_get_num_error_not_ready, py_spoolss_PrinterInfo0_set_num_error_not_ready },
	{ discard_const_p(char, "job_error"), py_spoolss_PrinterInfo0_get_job_error, py_spoolss_PrinterInfo0_set_job_error },
	{ discard_const_p(char, "number_of_processors"), py_spoolss_PrinterInfo0_get_number_of_processors, py_spoolss_PrinterInfo0_set_number_of_processors },
	{ discard_const_p(char, "processor_type"), py_spoolss_PrinterInfo0_get_processor_type, py_spoolss_PrinterInfo0_set_processor_type },
	{ discard_const_p(char, "high_part_total_bytes"), py_spoolss_PrinterInfo0_get_high_part_total_bytes, py_spoolss_PrinterInfo0_set_high_part_total_bytes },
	{ discard_const_p(char, "change_id"), py_spoolss_PrinterInfo0_get_change_id, py_spoolss_PrinterInfo0_set_change_id },
	{ discard_const_p(char, "last_error"), py_spoolss_PrinterInfo0_get_last_error, py_spoolss_PrinterInfo0_set_last_error },
	{ discard_const_p(char, "status"), py_spoolss_PrinterInfo0_get_status, py_spoolss_PrinterInfo0_set_status },
	{ discard_const_p(char, "enumerate_network_printers"), py_spoolss_PrinterInfo0_get_enumerate_network_printers, py_spoolss_PrinterInfo0_set_enumerate_network_printers },
	{ discard_const_p(char, "c_setprinter"), py_spoolss_PrinterInfo0_get_c_setprinter, py_spoolss_PrinterInfo0_set_c_setprinter },
	{ discard_const_p(char, "processor_architecture"), py_spoolss_PrinterInfo0_get_processor_architecture, py_spoolss_PrinterInfo0_set_processor_architecture },
	{ discard_const_p(char, "processor_level"), py_spoolss_PrinterInfo0_get_processor_level, py_spoolss_PrinterInfo0_set_processor_level },
	{ discard_const_p(char, "ref_ic"), py_spoolss_PrinterInfo0_get_ref_ic, py_spoolss_PrinterInfo0_set_ref_ic },
	{ discard_const_p(char, "reserved2"), py_spoolss_PrinterInfo0_get_reserved2, py_spoolss_PrinterInfo0_set_reserved2 },
	{ discard_const_p(char, "reserved3"), py_spoolss_PrinterInfo0_get_reserved3, py_spoolss_PrinterInfo0_set_reserved3 },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterInfo0_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterInfo0 *object = (struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterInfo0, "spoolss_PrinterInfo0", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrinterInfo0_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterInfo0",
	.tp_getset = py_spoolss_PrinterInfo0_getsetters,
	.tp_methods = py_spoolss_PrinterInfo0_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterInfo0_new,
};


static PyObject *py_spoolss_PSDRVEXTRA351_get_dwSignature(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_dwSignature;
	py_dwSignature = PyInt_FromLong(object->dwSignature);
	return py_dwSignature;
}

static int py_spoolss_PSDRVEXTRA351_set_dwSignature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwSignature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwSignature = 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_spoolss_PSDRVEXTRA351_get_dwFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_dwFlags;
	py_dwFlags = PyInt_FromLong(object->dwFlags);
	return py_dwFlags;
}

static int py_spoolss_PSDRVEXTRA351_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwFlags = 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_spoolss_PSDRVEXTRA351_get_wchEPSFile(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_wchEPSFile;
	py_wchEPSFile = PyList_New(12);
	if (py_wchEPSFile == NULL) {
		return NULL;
	}
	{
		int wchEPSFile_cntr_0;
		for (wchEPSFile_cntr_0 = 0; wchEPSFile_cntr_0 < 12; wchEPSFile_cntr_0++) {
			PyObject *py_wchEPSFile_0;
			py_wchEPSFile_0 = PyInt_FromLong(object->wchEPSFile[wchEPSFile_cntr_0]);
			PyList_SetItem(py_wchEPSFile, wchEPSFile_cntr_0, py_wchEPSFile_0);
		}
	}
	return py_wchEPSFile;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caSize(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caSize;
	py_caSize = PyInt_FromLong(object->caSize);
	return py_caSize;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caFlags;
	py_caFlags = PyInt_FromLong(object->caFlags);
	return py_caFlags;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caIlluminantIndex(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caIlluminantIndex;
	py_caIlluminantIndex = PyInt_FromLong(object->caIlluminantIndex);
	return py_caIlluminantIndex;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caRedGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caRedGamma;
	py_caRedGamma = PyInt_FromLong(object->caRedGamma);
	return py_caRedGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caGreenGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caGreenGamma;
	py_caGreenGamma = PyInt_FromLong(object->caGreenGamma);
	return py_caGreenGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caBlueGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caBlueGamma;
	py_caBlueGamma = PyInt_FromLong(object->caBlueGamma);
	return py_caBlueGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caReferenceBlack(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caReferenceBlack;
	py_caReferenceBlack = PyInt_FromLong(object->caReferenceBlack);
	return py_caReferenceBlack;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caReferenceWhite(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caReferenceWhite;
	py_caReferenceWhite = PyInt_FromLong(object->caReferenceWhite);
	return py_caReferenceWhite;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caContrast(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caContrast;
	py_caContrast = PyInt_FromLong(object->caContrast);
	return py_caContrast;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caBrightness(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caBrightness;
	py_caBrightness = PyInt_FromLong(object->caBrightness);
	return py_caBrightness;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caColorfulness(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caColorfulness;
	py_caColorfulness = PyInt_FromLong(object->caColorfulness);
	return py_caColorfulness;
}

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

static PyObject *py_spoolss_PSDRVEXTRA351_get_caRedGreenTint(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA351 *object = (struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(obj);
	PyObject *py_caRedGreenTint;
	py_caRedGreenTint = PyInt_FromLong(object->caRedGreenTint);
	return py_caRedGreenTint;
}

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

static PyGetSetDef py_spoolss_PSDRVEXTRA351_getsetters[] = {
	{ discard_const_p(char, "dwSignature"), py_spoolss_PSDRVEXTRA351_get_dwSignature, py_spoolss_PSDRVEXTRA351_set_dwSignature },
	{ discard_const_p(char, "dwFlags"), py_spoolss_PSDRVEXTRA351_get_dwFlags, py_spoolss_PSDRVEXTRA351_set_dwFlags },
	{ discard_const_p(char, "wchEPSFile"), py_spoolss_PSDRVEXTRA351_get_wchEPSFile, py_spoolss_PSDRVEXTRA351_set_wchEPSFile },
	{ discard_const_p(char, "caSize"), py_spoolss_PSDRVEXTRA351_get_caSize, py_spoolss_PSDRVEXTRA351_set_caSize },
	{ discard_const_p(char, "caFlags"), py_spoolss_PSDRVEXTRA351_get_caFlags, py_spoolss_PSDRVEXTRA351_set_caFlags },
	{ discard_const_p(char, "caIlluminantIndex"), py_spoolss_PSDRVEXTRA351_get_caIlluminantIndex, py_spoolss_PSDRVEXTRA351_set_caIlluminantIndex },
	{ discard_const_p(char, "caRedGamma"), py_spoolss_PSDRVEXTRA351_get_caRedGamma, py_spoolss_PSDRVEXTRA351_set_caRedGamma },
	{ discard_const_p(char, "caGreenGamma"), py_spoolss_PSDRVEXTRA351_get_caGreenGamma, py_spoolss_PSDRVEXTRA351_set_caGreenGamma },
	{ discard_const_p(char, "caBlueGamma"), py_spoolss_PSDRVEXTRA351_get_caBlueGamma, py_spoolss_PSDRVEXTRA351_set_caBlueGamma },
	{ discard_const_p(char, "caReferenceBlack"), py_spoolss_PSDRVEXTRA351_get_caReferenceBlack, py_spoolss_PSDRVEXTRA351_set_caReferenceBlack },
	{ discard_const_p(char, "caReferenceWhite"), py_spoolss_PSDRVEXTRA351_get_caReferenceWhite, py_spoolss_PSDRVEXTRA351_set_caReferenceWhite },
	{ discard_const_p(char, "caContrast"), py_spoolss_PSDRVEXTRA351_get_caContrast, py_spoolss_PSDRVEXTRA351_set_caContrast },
	{ discard_const_p(char, "caBrightness"), py_spoolss_PSDRVEXTRA351_get_caBrightness, py_spoolss_PSDRVEXTRA351_set_caBrightness },
	{ discard_const_p(char, "caColorfulness"), py_spoolss_PSDRVEXTRA351_get_caColorfulness, py_spoolss_PSDRVEXTRA351_set_caColorfulness },
	{ discard_const_p(char, "caRedGreenTint"), py_spoolss_PSDRVEXTRA351_get_caRedGreenTint, py_spoolss_PSDRVEXTRA351_set_caRedGreenTint },
	{ NULL }
};

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


static PyTypeObject spoolss_PSDRVEXTRA351_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PSDRVEXTRA351",
	.tp_getset = py_spoolss_PSDRVEXTRA351_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PSDRVEXTRA351_new,
};


static PyObject *py_spoolss_PSDRVEXTRA400_get_dwSignature(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_dwSignature;
	py_dwSignature = PyInt_FromLong(object->dwSignature);
	return py_dwSignature;
}

static int py_spoolss_PSDRVEXTRA400_set_dwSignature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwSignature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwSignature = 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_spoolss_PSDRVEXTRA400_get_dwFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_dwFlags;
	py_dwFlags = PyInt_FromLong(object->dwFlags);
	return py_dwFlags;
}

static int py_spoolss_PSDRVEXTRA400_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwFlags = 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_spoolss_PSDRVEXTRA400_get_wchEPSFile(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_wchEPSFile;
	py_wchEPSFile = PyList_New(12);
	if (py_wchEPSFile == NULL) {
		return NULL;
	}
	{
		int wchEPSFile_cntr_0;
		for (wchEPSFile_cntr_0 = 0; wchEPSFile_cntr_0 < 12; wchEPSFile_cntr_0++) {
			PyObject *py_wchEPSFile_0;
			py_wchEPSFile_0 = PyInt_FromLong(object->wchEPSFile[wchEPSFile_cntr_0]);
			PyList_SetItem(py_wchEPSFile, wchEPSFile_cntr_0, py_wchEPSFile_0);
		}
	}
	return py_wchEPSFile;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caSize(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caSize;
	py_caSize = PyInt_FromLong(object->caSize);
	return py_caSize;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caFlags;
	py_caFlags = PyInt_FromLong(object->caFlags);
	return py_caFlags;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caIlluminantIndex(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caIlluminantIndex;
	py_caIlluminantIndex = PyInt_FromLong(object->caIlluminantIndex);
	return py_caIlluminantIndex;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caRedGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caRedGamma;
	py_caRedGamma = PyInt_FromLong(object->caRedGamma);
	return py_caRedGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caGreenGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caGreenGamma;
	py_caGreenGamma = PyInt_FromLong(object->caGreenGamma);
	return py_caGreenGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caBlueGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caBlueGamma;
	py_caBlueGamma = PyInt_FromLong(object->caBlueGamma);
	return py_caBlueGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caReferenceBlack(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caReferenceBlack;
	py_caReferenceBlack = PyInt_FromLong(object->caReferenceBlack);
	return py_caReferenceBlack;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caReferenceWhite(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caReferenceWhite;
	py_caReferenceWhite = PyInt_FromLong(object->caReferenceWhite);
	return py_caReferenceWhite;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caContrast(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caContrast;
	py_caContrast = PyInt_FromLong(object->caContrast);
	return py_caContrast;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caBrightness(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caBrightness;
	py_caBrightness = PyInt_FromLong(object->caBrightness);
	return py_caBrightness;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caColorfulness(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caColorfulness;
	py_caColorfulness = PyInt_FromLong(object->caColorfulness);
	return py_caColorfulness;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_caRedGreenTint(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_caRedGreenTint;
	py_caRedGreenTint = PyInt_FromLong(object->caRedGreenTint);
	return py_caRedGreenTint;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_wChecksum(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_wChecksum;
	py_wChecksum = PyInt_FromLong(object->wChecksum);
	return py_wChecksum;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_wOptions(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_wOptions;
	py_wOptions = PyInt_FromLong(object->wOptions);
	return py_wOptions;
}

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

static PyObject *py_spoolss_PSDRVEXTRA400_get_aubOptions(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA400 *object = (struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(obj);
	PyObject *py_aubOptions;
	py_aubOptions = PyList_New(8);
	if (py_aubOptions == NULL) {
		return NULL;
	}
	{
		int aubOptions_cntr_0;
		for (aubOptions_cntr_0 = 0; aubOptions_cntr_0 < 8; aubOptions_cntr_0++) {
			PyObject *py_aubOptions_0;
			py_aubOptions_0 = PyInt_FromLong(object->aubOptions[aubOptions_cntr_0]);
			PyList_SetItem(py_aubOptions, aubOptions_cntr_0, py_aubOptions_0);
		}
	}
	return py_aubOptions;
}

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

static PyGetSetDef py_spoolss_PSDRVEXTRA400_getsetters[] = {
	{ discard_const_p(char, "dwSignature"), py_spoolss_PSDRVEXTRA400_get_dwSignature, py_spoolss_PSDRVEXTRA400_set_dwSignature },
	{ discard_const_p(char, "dwFlags"), py_spoolss_PSDRVEXTRA400_get_dwFlags, py_spoolss_PSDRVEXTRA400_set_dwFlags },
	{ discard_const_p(char, "wchEPSFile"), py_spoolss_PSDRVEXTRA400_get_wchEPSFile, py_spoolss_PSDRVEXTRA400_set_wchEPSFile },
	{ discard_const_p(char, "caSize"), py_spoolss_PSDRVEXTRA400_get_caSize, py_spoolss_PSDRVEXTRA400_set_caSize },
	{ discard_const_p(char, "caFlags"), py_spoolss_PSDRVEXTRA400_get_caFlags, py_spoolss_PSDRVEXTRA400_set_caFlags },
	{ discard_const_p(char, "caIlluminantIndex"), py_spoolss_PSDRVEXTRA400_get_caIlluminantIndex, py_spoolss_PSDRVEXTRA400_set_caIlluminantIndex },
	{ discard_const_p(char, "caRedGamma"), py_spoolss_PSDRVEXTRA400_get_caRedGamma, py_spoolss_PSDRVEXTRA400_set_caRedGamma },
	{ discard_const_p(char, "caGreenGamma"), py_spoolss_PSDRVEXTRA400_get_caGreenGamma, py_spoolss_PSDRVEXTRA400_set_caGreenGamma },
	{ discard_const_p(char, "caBlueGamma"), py_spoolss_PSDRVEXTRA400_get_caBlueGamma, py_spoolss_PSDRVEXTRA400_set_caBlueGamma },
	{ discard_const_p(char, "caReferenceBlack"), py_spoolss_PSDRVEXTRA400_get_caReferenceBlack, py_spoolss_PSDRVEXTRA400_set_caReferenceBlack },
	{ discard_const_p(char, "caReferenceWhite"), py_spoolss_PSDRVEXTRA400_get_caReferenceWhite, py_spoolss_PSDRVEXTRA400_set_caReferenceWhite },
	{ discard_const_p(char, "caContrast"), py_spoolss_PSDRVEXTRA400_get_caContrast, py_spoolss_PSDRVEXTRA400_set_caContrast },
	{ discard_const_p(char, "caBrightness"), py_spoolss_PSDRVEXTRA400_get_caBrightness, py_spoolss_PSDRVEXTRA400_set_caBrightness },
	{ discard_const_p(char, "caColorfulness"), py_spoolss_PSDRVEXTRA400_get_caColorfulness, py_spoolss_PSDRVEXTRA400_set_caColorfulness },
	{ discard_const_p(char, "caRedGreenTint"), py_spoolss_PSDRVEXTRA400_get_caRedGreenTint, py_spoolss_PSDRVEXTRA400_set_caRedGreenTint },
	{ discard_const_p(char, "wChecksum"), py_spoolss_PSDRVEXTRA400_get_wChecksum, py_spoolss_PSDRVEXTRA400_set_wChecksum },
	{ discard_const_p(char, "wOptions"), py_spoolss_PSDRVEXTRA400_get_wOptions, py_spoolss_PSDRVEXTRA400_set_wOptions },
	{ discard_const_p(char, "aubOptions"), py_spoolss_PSDRVEXTRA400_get_aubOptions, py_spoolss_PSDRVEXTRA400_set_aubOptions },
	{ NULL }
};

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


static PyTypeObject spoolss_PSDRVEXTRA400_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PSDRVEXTRA400",
	.tp_getset = py_spoolss_PSDRVEXTRA400_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PSDRVEXTRA400_new,
};


static PyObject *py_spoolss_PSDRVEXTRA500_get_dwSignature(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwSignature;
	py_dwSignature = PyInt_FromLong(object->dwSignature);
	return py_dwSignature;
}

static int py_spoolss_PSDRVEXTRA500_set_dwSignature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwSignature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwSignature = 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_spoolss_PSDRVEXTRA500_get_dwFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwFlags;
	py_dwFlags = PyInt_FromLong(object->dwFlags);
	return py_dwFlags;
}

static int py_spoolss_PSDRVEXTRA500_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwFlags = 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_spoolss_PSDRVEXTRA500_get_wchEPSFile(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wchEPSFile;
	py_wchEPSFile = PyList_New(12);
	if (py_wchEPSFile == NULL) {
		return NULL;
	}
	{
		int wchEPSFile_cntr_0;
		for (wchEPSFile_cntr_0 = 0; wchEPSFile_cntr_0 < 12; wchEPSFile_cntr_0++) {
			PyObject *py_wchEPSFile_0;
			py_wchEPSFile_0 = PyInt_FromLong(object->wchEPSFile[wchEPSFile_cntr_0]);
			PyList_SetItem(py_wchEPSFile, wchEPSFile_cntr_0, py_wchEPSFile_0);
		}
	}
	return py_wchEPSFile;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caSize(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caSize;
	py_caSize = PyInt_FromLong(object->caSize);
	return py_caSize;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caFlags;
	py_caFlags = PyInt_FromLong(object->caFlags);
	return py_caFlags;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caIlluminantIndex(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caIlluminantIndex;
	py_caIlluminantIndex = PyInt_FromLong(object->caIlluminantIndex);
	return py_caIlluminantIndex;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caRedGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caRedGamma;
	py_caRedGamma = PyInt_FromLong(object->caRedGamma);
	return py_caRedGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caGreenGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caGreenGamma;
	py_caGreenGamma = PyInt_FromLong(object->caGreenGamma);
	return py_caGreenGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caBlueGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caBlueGamma;
	py_caBlueGamma = PyInt_FromLong(object->caBlueGamma);
	return py_caBlueGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caReferenceBlack(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caReferenceBlack;
	py_caReferenceBlack = PyInt_FromLong(object->caReferenceBlack);
	return py_caReferenceBlack;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caReferenceWhite(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caReferenceWhite;
	py_caReferenceWhite = PyInt_FromLong(object->caReferenceWhite);
	return py_caReferenceWhite;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caContrast(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caContrast;
	py_caContrast = PyInt_FromLong(object->caContrast);
	return py_caContrast;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caBrightness(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caBrightness;
	py_caBrightness = PyInt_FromLong(object->caBrightness);
	return py_caBrightness;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caColorfulness(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caColorfulness;
	py_caColorfulness = PyInt_FromLong(object->caColorfulness);
	return py_caColorfulness;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_caRedGreenTint(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_caRedGreenTint;
	py_caRedGreenTint = PyInt_FromLong(object->caRedGreenTint);
	return py_caRedGreenTint;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_wReserved1(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wReserved1;
	py_wReserved1 = PyInt_FromLong(object->wReserved1);
	return py_wReserved1;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_wSize(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wSize;
	py_wSize = PyInt_FromLong(object->wSize);
	return py_wSize;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_fxScrFreq(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_fxScrFreq;
	py_fxScrFreq = PyInt_FromLong(object->fxScrFreq);
	return py_fxScrFreq;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_fxScrAngle(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_fxScrAngle;
	py_fxScrAngle = PyInt_FromLong(object->fxScrAngle);
	return py_fxScrAngle;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_iDialect(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_iDialect;
	py_iDialect = PyInt_FromLong(object->iDialect);
	return py_iDialect;
}

static int py_spoolss_PSDRVEXTRA500_set_iDialect(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iDialect = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iDialect = 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_spoolss_PSDRVEXTRA500_get_iTTDLFmt(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_iTTDLFmt;
	py_iTTDLFmt = PyInt_FromLong(object->iTTDLFmt);
	return py_iTTDLFmt;
}

static int py_spoolss_PSDRVEXTRA500_set_iTTDLFmt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iTTDLFmt = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iTTDLFmt = 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_spoolss_PSDRVEXTRA500_get_bReversePrint(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_bReversePrint;
	py_bReversePrint = PyInt_FromLong(object->bReversePrint);
	return py_bReversePrint;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_iLayout(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_iLayout;
	py_iLayout = PyInt_FromLong(object->iLayout);
	return py_iLayout;
}

static int py_spoolss_PSDRVEXTRA500_set_iLayout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iLayout = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iLayout = 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_spoolss_PSDRVEXTRA500_get_iPSLevel(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_iPSLevel;
	py_iPSLevel = PyInt_FromLong(object->iPSLevel);
	return py_iPSLevel;
}

static int py_spoolss_PSDRVEXTRA500_set_iPSLevel(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iPSLevel = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iPSLevel = 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_spoolss_PSDRVEXTRA500_get_dwReserved2(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwReserved2;
	py_dwReserved2 = PyInt_FromLong(object->dwReserved2);
	return py_dwReserved2;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_wOEMExtra(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wOEMExtra;
	py_wOEMExtra = PyInt_FromLong(object->wOEMExtra);
	return py_wOEMExtra;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_wVer(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wVer;
	py_wVer = PyInt_FromLong(object->wVer);
	return py_wVer;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_dwX(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwX;
	py_dwX = PyInt_FromLong(object->dwX);
	return py_dwX;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_dwY(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwY;
	py_dwY = PyInt_FromLong(object->dwY);
	return py_dwY;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_dwWidthOffset(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwWidthOffset;
	py_dwWidthOffset = PyInt_FromLong(object->dwWidthOffset);
	return py_dwWidthOffset;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_dwHeightOffset(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwHeightOffset;
	py_dwHeightOffset = PyInt_FromLong(object->dwHeightOffset);
	return py_dwHeightOffset;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_wFeedDirection(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wFeedDirection;
	py_wFeedDirection = PyInt_FromLong(object->wFeedDirection);
	return py_wFeedDirection;
}

static int py_spoolss_PSDRVEXTRA500_set_wFeedDirection(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->wFeedDirection = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->wFeedDirection = 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_spoolss_PSDRVEXTRA500_get_wCutSheet(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wCutSheet;
	py_wCutSheet = PyInt_FromLong(object->wCutSheet);
	return py_wCutSheet;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_dwReserved3(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwReserved3;
	py_dwReserved3 = PyList_New(4);
	if (py_dwReserved3 == NULL) {
		return NULL;
	}
	{
		int dwReserved3_cntr_0;
		for (dwReserved3_cntr_0 = 0; dwReserved3_cntr_0 < 4; dwReserved3_cntr_0++) {
			PyObject *py_dwReserved3_0;
			py_dwReserved3_0 = PyInt_FromLong(object->dwReserved3[dwReserved3_cntr_0]);
			PyList_SetItem(py_dwReserved3, dwReserved3_cntr_0, py_dwReserved3_0);
		}
	}
	return py_dwReserved3;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_dwChecksum32(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwChecksum32;
	py_dwChecksum32 = PyInt_FromLong(object->dwChecksum32);
	return py_dwChecksum32;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_dwOptions(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwOptions;
	py_dwOptions = PyInt_FromLong(object->dwOptions);
	return py_dwOptions;
}

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

static PyObject *py_spoolss_PSDRVEXTRA500_get_aOptions(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA500 *object = (struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_aOptions;
	py_aOptions = PyList_New(128);
	if (py_aOptions == NULL) {
		return NULL;
	}
	{
		int aOptions_cntr_0;
		for (aOptions_cntr_0 = 0; aOptions_cntr_0 < 128; aOptions_cntr_0++) {
			PyObject *py_aOptions_0;
			py_aOptions_0 = PyInt_FromLong(object->aOptions[aOptions_cntr_0]);
			PyList_SetItem(py_aOptions, aOptions_cntr_0, py_aOptions_0);
		}
	}
	return py_aOptions;
}

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

static PyGetSetDef py_spoolss_PSDRVEXTRA500_getsetters[] = {
	{ discard_const_p(char, "dwSignature"), py_spoolss_PSDRVEXTRA500_get_dwSignature, py_spoolss_PSDRVEXTRA500_set_dwSignature },
	{ discard_const_p(char, "dwFlags"), py_spoolss_PSDRVEXTRA500_get_dwFlags, py_spoolss_PSDRVEXTRA500_set_dwFlags },
	{ discard_const_p(char, "wchEPSFile"), py_spoolss_PSDRVEXTRA500_get_wchEPSFile, py_spoolss_PSDRVEXTRA500_set_wchEPSFile },
	{ discard_const_p(char, "caSize"), py_spoolss_PSDRVEXTRA500_get_caSize, py_spoolss_PSDRVEXTRA500_set_caSize },
	{ discard_const_p(char, "caFlags"), py_spoolss_PSDRVEXTRA500_get_caFlags, py_spoolss_PSDRVEXTRA500_set_caFlags },
	{ discard_const_p(char, "caIlluminantIndex"), py_spoolss_PSDRVEXTRA500_get_caIlluminantIndex, py_spoolss_PSDRVEXTRA500_set_caIlluminantIndex },
	{ discard_const_p(char, "caRedGamma"), py_spoolss_PSDRVEXTRA500_get_caRedGamma, py_spoolss_PSDRVEXTRA500_set_caRedGamma },
	{ discard_const_p(char, "caGreenGamma"), py_spoolss_PSDRVEXTRA500_get_caGreenGamma, py_spoolss_PSDRVEXTRA500_set_caGreenGamma },
	{ discard_const_p(char, "caBlueGamma"), py_spoolss_PSDRVEXTRA500_get_caBlueGamma, py_spoolss_PSDRVEXTRA500_set_caBlueGamma },
	{ discard_const_p(char, "caReferenceBlack"), py_spoolss_PSDRVEXTRA500_get_caReferenceBlack, py_spoolss_PSDRVEXTRA500_set_caReferenceBlack },
	{ discard_const_p(char, "caReferenceWhite"), py_spoolss_PSDRVEXTRA500_get_caReferenceWhite, py_spoolss_PSDRVEXTRA500_set_caReferenceWhite },
	{ discard_const_p(char, "caContrast"), py_spoolss_PSDRVEXTRA500_get_caContrast, py_spoolss_PSDRVEXTRA500_set_caContrast },
	{ discard_const_p(char, "caBrightness"), py_spoolss_PSDRVEXTRA500_get_caBrightness, py_spoolss_PSDRVEXTRA500_set_caBrightness },
	{ discard_const_p(char, "caColorfulness"), py_spoolss_PSDRVEXTRA500_get_caColorfulness, py_spoolss_PSDRVEXTRA500_set_caColorfulness },
	{ discard_const_p(char, "caRedGreenTint"), py_spoolss_PSDRVEXTRA500_get_caRedGreenTint, py_spoolss_PSDRVEXTRA500_set_caRedGreenTint },
	{ discard_const_p(char, "wReserved1"), py_spoolss_PSDRVEXTRA500_get_wReserved1, py_spoolss_PSDRVEXTRA500_set_wReserved1 },
	{ discard_const_p(char, "wSize"), py_spoolss_PSDRVEXTRA500_get_wSize, py_spoolss_PSDRVEXTRA500_set_wSize },
	{ discard_const_p(char, "fxScrFreq"), py_spoolss_PSDRVEXTRA500_get_fxScrFreq, py_spoolss_PSDRVEXTRA500_set_fxScrFreq },
	{ discard_const_p(char, "fxScrAngle"), py_spoolss_PSDRVEXTRA500_get_fxScrAngle, py_spoolss_PSDRVEXTRA500_set_fxScrAngle },
	{ discard_const_p(char, "iDialect"), py_spoolss_PSDRVEXTRA500_get_iDialect, py_spoolss_PSDRVEXTRA500_set_iDialect },
	{ discard_const_p(char, "iTTDLFmt"), py_spoolss_PSDRVEXTRA500_get_iTTDLFmt, py_spoolss_PSDRVEXTRA500_set_iTTDLFmt },
	{ discard_const_p(char, "bReversePrint"), py_spoolss_PSDRVEXTRA500_get_bReversePrint, py_spoolss_PSDRVEXTRA500_set_bReversePrint },
	{ discard_const_p(char, "iLayout"), py_spoolss_PSDRVEXTRA500_get_iLayout, py_spoolss_PSDRVEXTRA500_set_iLayout },
	{ discard_const_p(char, "iPSLevel"), py_spoolss_PSDRVEXTRA500_get_iPSLevel, py_spoolss_PSDRVEXTRA500_set_iPSLevel },
	{ discard_const_p(char, "dwReserved2"), py_spoolss_PSDRVEXTRA500_get_dwReserved2, py_spoolss_PSDRVEXTRA500_set_dwReserved2 },
	{ discard_const_p(char, "wOEMExtra"), py_spoolss_PSDRVEXTRA500_get_wOEMExtra, py_spoolss_PSDRVEXTRA500_set_wOEMExtra },
	{ discard_const_p(char, "wVer"), py_spoolss_PSDRVEXTRA500_get_wVer, py_spoolss_PSDRVEXTRA500_set_wVer },
	{ discard_const_p(char, "dwX"), py_spoolss_PSDRVEXTRA500_get_dwX, py_spoolss_PSDRVEXTRA500_set_dwX },
	{ discard_const_p(char, "dwY"), py_spoolss_PSDRVEXTRA500_get_dwY, py_spoolss_PSDRVEXTRA500_set_dwY },
	{ discard_const_p(char, "dwWidthOffset"), py_spoolss_PSDRVEXTRA500_get_dwWidthOffset, py_spoolss_PSDRVEXTRA500_set_dwWidthOffset },
	{ discard_const_p(char, "dwHeightOffset"), py_spoolss_PSDRVEXTRA500_get_dwHeightOffset, py_spoolss_PSDRVEXTRA500_set_dwHeightOffset },
	{ discard_const_p(char, "wFeedDirection"), py_spoolss_PSDRVEXTRA500_get_wFeedDirection, py_spoolss_PSDRVEXTRA500_set_wFeedDirection },
	{ discard_const_p(char, "wCutSheet"), py_spoolss_PSDRVEXTRA500_get_wCutSheet, py_spoolss_PSDRVEXTRA500_set_wCutSheet },
	{ discard_const_p(char, "dwReserved3"), py_spoolss_PSDRVEXTRA500_get_dwReserved3, py_spoolss_PSDRVEXTRA500_set_dwReserved3 },
	{ discard_const_p(char, "dwChecksum32"), py_spoolss_PSDRVEXTRA500_get_dwChecksum32, py_spoolss_PSDRVEXTRA500_set_dwChecksum32 },
	{ discard_const_p(char, "dwOptions"), py_spoolss_PSDRVEXTRA500_get_dwOptions, py_spoolss_PSDRVEXTRA500_set_dwOptions },
	{ discard_const_p(char, "aOptions"), py_spoolss_PSDRVEXTRA500_get_aOptions, py_spoolss_PSDRVEXTRA500_set_aOptions },
	{ NULL }
};

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


static PyTypeObject spoolss_PSDRVEXTRA500_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PSDRVEXTRA500",
	.tp_getset = py_spoolss_PSDRVEXTRA500_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PSDRVEXTRA500_new,
};


static PyObject *py_spoolss_PSDRVEXTRA_get_dwSignature(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwSignature;
	py_dwSignature = PyInt_FromLong(object->dwSignature);
	return py_dwSignature;
}

static int py_spoolss_PSDRVEXTRA_set_dwSignature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwSignature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwSignature = 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_spoolss_PSDRVEXTRA_get_dwFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwFlags;
	py_dwFlags = PyInt_FromLong(object->dwFlags);
	return py_dwFlags;
}

static int py_spoolss_PSDRVEXTRA_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwFlags = 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_spoolss_PSDRVEXTRA_get_wchEPSFile(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wchEPSFile;
	py_wchEPSFile = PyList_New(12);
	if (py_wchEPSFile == NULL) {
		return NULL;
	}
	{
		int wchEPSFile_cntr_0;
		for (wchEPSFile_cntr_0 = 0; wchEPSFile_cntr_0 < 12; wchEPSFile_cntr_0++) {
			PyObject *py_wchEPSFile_0;
			py_wchEPSFile_0 = PyInt_FromLong(object->wchEPSFile[wchEPSFile_cntr_0]);
			PyList_SetItem(py_wchEPSFile, wchEPSFile_cntr_0, py_wchEPSFile_0);
		}
	}
	return py_wchEPSFile;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caSize(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caSize;
	py_caSize = PyInt_FromLong(object->caSize);
	return py_caSize;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caFlags;
	py_caFlags = PyInt_FromLong(object->caFlags);
	return py_caFlags;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caIlluminantIndex(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caIlluminantIndex;
	py_caIlluminantIndex = PyInt_FromLong(object->caIlluminantIndex);
	return py_caIlluminantIndex;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caRedGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caRedGamma;
	py_caRedGamma = PyInt_FromLong(object->caRedGamma);
	return py_caRedGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caGreenGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caGreenGamma;
	py_caGreenGamma = PyInt_FromLong(object->caGreenGamma);
	return py_caGreenGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caBlueGamma(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caBlueGamma;
	py_caBlueGamma = PyInt_FromLong(object->caBlueGamma);
	return py_caBlueGamma;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caReferenceBlack(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caReferenceBlack;
	py_caReferenceBlack = PyInt_FromLong(object->caReferenceBlack);
	return py_caReferenceBlack;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caReferenceWhite(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caReferenceWhite;
	py_caReferenceWhite = PyInt_FromLong(object->caReferenceWhite);
	return py_caReferenceWhite;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caContrast(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caContrast;
	py_caContrast = PyInt_FromLong(object->caContrast);
	return py_caContrast;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caBrightness(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caBrightness;
	py_caBrightness = PyInt_FromLong(object->caBrightness);
	return py_caBrightness;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caColorfulness(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caColorfulness;
	py_caColorfulness = PyInt_FromLong(object->caColorfulness);
	return py_caColorfulness;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_caRedGreenTint(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_caRedGreenTint;
	py_caRedGreenTint = PyInt_FromLong(object->caRedGreenTint);
	return py_caRedGreenTint;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_wCoreJTExpSize(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wCoreJTExpSize;
	py_wCoreJTExpSize = PyInt_FromLong(object->wCoreJTExpSize);
	return py_wCoreJTExpSize;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_wCoreFullSize(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wCoreFullSize;
	py_wCoreFullSize = PyInt_FromLong(object->wCoreFullSize);
	return py_wCoreFullSize;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_fxScrFreq(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_fxScrFreq;
	py_fxScrFreq = PyInt_FromLong(object->fxScrFreq);
	return py_fxScrFreq;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_fxScrAngle(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_fxScrAngle;
	py_fxScrAngle = PyInt_FromLong(object->fxScrAngle);
	return py_fxScrAngle;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_iDialect(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_iDialect;
	py_iDialect = PyInt_FromLong(object->iDialect);
	return py_iDialect;
}

static int py_spoolss_PSDRVEXTRA_set_iDialect(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iDialect = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iDialect = 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_spoolss_PSDRVEXTRA_get_iTTDLFmt(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_iTTDLFmt;
	py_iTTDLFmt = PyInt_FromLong(object->iTTDLFmt);
	return py_iTTDLFmt;
}

static int py_spoolss_PSDRVEXTRA_set_iTTDLFmt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iTTDLFmt = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iTTDLFmt = 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_spoolss_PSDRVEXTRA_get_bReversePrint(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_bReversePrint;
	py_bReversePrint = PyInt_FromLong(object->bReversePrint);
	return py_bReversePrint;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_iLayout(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_iLayout;
	py_iLayout = PyInt_FromLong(object->iLayout);
	return py_iLayout;
}

static int py_spoolss_PSDRVEXTRA_set_iLayout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iLayout = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iLayout = 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_spoolss_PSDRVEXTRA_get_iPSLevel(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_iPSLevel;
	py_iPSLevel = PyInt_FromLong(object->iPSLevel);
	return py_iPSLevel;
}

static int py_spoolss_PSDRVEXTRA_set_iPSLevel(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iPSLevel = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iPSLevel = 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_spoolss_PSDRVEXTRA_get_dwReserved2(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwReserved2;
	py_dwReserved2 = PyInt_FromLong(object->dwReserved2);
	return py_dwReserved2;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_wOEMExtra(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wOEMExtra;
	py_wOEMExtra = PyInt_FromLong(object->wOEMExtra);
	return py_wOEMExtra;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_wVer(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wVer;
	py_wVer = PyInt_FromLong(object->wVer);
	return py_wVer;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_dwX(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwX;
	py_dwX = PyInt_FromLong(object->dwX);
	return py_dwX;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_dwY(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwY;
	py_dwY = PyInt_FromLong(object->dwY);
	return py_dwY;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_dwWidthOffset(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwWidthOffset;
	py_dwWidthOffset = PyInt_FromLong(object->dwWidthOffset);
	return py_dwWidthOffset;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_dwHeightOffset(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwHeightOffset;
	py_dwHeightOffset = PyInt_FromLong(object->dwHeightOffset);
	return py_dwHeightOffset;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_wFeedDirection(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wFeedDirection;
	py_wFeedDirection = PyInt_FromLong(object->wFeedDirection);
	return py_wFeedDirection;
}

static int py_spoolss_PSDRVEXTRA_set_wFeedDirection(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->wFeedDirection = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->wFeedDirection = 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_spoolss_PSDRVEXTRA_get_wCutSheet(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wCutSheet;
	py_wCutSheet = PyInt_FromLong(object->wCutSheet);
	return py_wCutSheet;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_dwReserved3(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwReserved3;
	py_dwReserved3 = PyList_New(4);
	if (py_dwReserved3 == NULL) {
		return NULL;
	}
	{
		int dwReserved3_cntr_0;
		for (dwReserved3_cntr_0 = 0; dwReserved3_cntr_0 < 4; dwReserved3_cntr_0++) {
			PyObject *py_dwReserved3_0;
			py_dwReserved3_0 = PyInt_FromLong(object->dwReserved3[dwReserved3_cntr_0]);
			PyList_SetItem(py_dwReserved3, dwReserved3_cntr_0, py_dwReserved3_0);
		}
	}
	return py_dwReserved3;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_dwChecksum32(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwChecksum32;
	py_dwChecksum32 = PyInt_FromLong(object->dwChecksum32);
	return py_dwChecksum32;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_dwOptions(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwOptions;
	py_dwOptions = PyInt_FromLong(object->dwOptions);
	return py_dwOptions;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_aOptions(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_aOptions;
	py_aOptions = PyList_New(128);
	if (py_aOptions == NULL) {
		return NULL;
	}
	{
		int aOptions_cntr_0;
		for (aOptions_cntr_0 = 0; aOptions_cntr_0 < 128; aOptions_cntr_0++) {
			PyObject *py_aOptions_0;
			py_aOptions_0 = PyInt_FromLong(object->aOptions[aOptions_cntr_0]);
			PyList_SetItem(py_aOptions, aOptions_cntr_0, py_aOptions_0);
		}
	}
	return py_aOptions;
}

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

static PyObject *py_spoolss_PSDRVEXTRA_get_dwNupDirection(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwNupDirection;
	py_dwNupDirection = PyInt_FromLong(object->dwNupDirection);
	return py_dwNupDirection;
}

static int py_spoolss_PSDRVEXTRA_set_dwNupDirection(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwNupDirection = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwNupDirection = 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_spoolss_PSDRVEXTRA_get_dwNupBorderFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwNupBorderFlags;
	py_dwNupBorderFlags = PyInt_FromLong(object->dwNupBorderFlags);
	return py_dwNupBorderFlags;
}

static int py_spoolss_PSDRVEXTRA_set_dwNupBorderFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwNupBorderFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwNupBorderFlags = 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_spoolss_PSDRVEXTRA_get_dwBookletFlags(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwBookletFlags;
	py_dwBookletFlags = PyInt_FromLong(object->dwBookletFlags);
	return py_dwBookletFlags;
}

static int py_spoolss_PSDRVEXTRA_set_dwBookletFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwBookletFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwBookletFlags = 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_spoolss_PSDRVEXTRA_get_dwPadding(PyObject *obj, void *closure)
{
	struct spoolss_PSDRVEXTRA *object = (struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwPadding;
	py_dwPadding = PyInt_FromLong(object->dwPadding);
	return py_dwPadding;
}

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

static PyGetSetDef py_spoolss_PSDRVEXTRA_getsetters[] = {
	{ discard_const_p(char, "dwSignature"), py_spoolss_PSDRVEXTRA_get_dwSignature, py_spoolss_PSDRVEXTRA_set_dwSignature },
	{ discard_const_p(char, "dwFlags"), py_spoolss_PSDRVEXTRA_get_dwFlags, py_spoolss_PSDRVEXTRA_set_dwFlags },
	{ discard_const_p(char, "wchEPSFile"), py_spoolss_PSDRVEXTRA_get_wchEPSFile, py_spoolss_PSDRVEXTRA_set_wchEPSFile },
	{ discard_const_p(char, "caSize"), py_spoolss_PSDRVEXTRA_get_caSize, py_spoolss_PSDRVEXTRA_set_caSize },
	{ discard_const_p(char, "caFlags"), py_spoolss_PSDRVEXTRA_get_caFlags, py_spoolss_PSDRVEXTRA_set_caFlags },
	{ discard_const_p(char, "caIlluminantIndex"), py_spoolss_PSDRVEXTRA_get_caIlluminantIndex, py_spoolss_PSDRVEXTRA_set_caIlluminantIndex },
	{ discard_const_p(char, "caRedGamma"), py_spoolss_PSDRVEXTRA_get_caRedGamma, py_spoolss_PSDRVEXTRA_set_caRedGamma },
	{ discard_const_p(char, "caGreenGamma"), py_spoolss_PSDRVEXTRA_get_caGreenGamma, py_spoolss_PSDRVEXTRA_set_caGreenGamma },
	{ discard_const_p(char, "caBlueGamma"), py_spoolss_PSDRVEXTRA_get_caBlueGamma, py_spoolss_PSDRVEXTRA_set_caBlueGamma },
	{ discard_const_p(char, "caReferenceBlack"), py_spoolss_PSDRVEXTRA_get_caReferenceBlack, py_spoolss_PSDRVEXTRA_set_caReferenceBlack },
	{ discard_const_p(char, "caReferenceWhite"), py_spoolss_PSDRVEXTRA_get_caReferenceWhite, py_spoolss_PSDRVEXTRA_set_caReferenceWhite },
	{ discard_const_p(char, "caContrast"), py_spoolss_PSDRVEXTRA_get_caContrast, py_spoolss_PSDRVEXTRA_set_caContrast },
	{ discard_const_p(char, "caBrightness"), py_spoolss_PSDRVEXTRA_get_caBrightness, py_spoolss_PSDRVEXTRA_set_caBrightness },
	{ discard_const_p(char, "caColorfulness"), py_spoolss_PSDRVEXTRA_get_caColorfulness, py_spoolss_PSDRVEXTRA_set_caColorfulness },
	{ discard_const_p(char, "caRedGreenTint"), py_spoolss_PSDRVEXTRA_get_caRedGreenTint, py_spoolss_PSDRVEXTRA_set_caRedGreenTint },
	{ discard_const_p(char, "wCoreJTExpSize"), py_spoolss_PSDRVEXTRA_get_wCoreJTExpSize, py_spoolss_PSDRVEXTRA_set_wCoreJTExpSize },
	{ discard_const_p(char, "wCoreFullSize"), py_spoolss_PSDRVEXTRA_get_wCoreFullSize, py_spoolss_PSDRVEXTRA_set_wCoreFullSize },
	{ discard_const_p(char, "fxScrFreq"), py_spoolss_PSDRVEXTRA_get_fxScrFreq, py_spoolss_PSDRVEXTRA_set_fxScrFreq },
	{ discard_const_p(char, "fxScrAngle"), py_spoolss_PSDRVEXTRA_get_fxScrAngle, py_spoolss_PSDRVEXTRA_set_fxScrAngle },
	{ discard_const_p(char, "iDialect"), py_spoolss_PSDRVEXTRA_get_iDialect, py_spoolss_PSDRVEXTRA_set_iDialect },
	{ discard_const_p(char, "iTTDLFmt"), py_spoolss_PSDRVEXTRA_get_iTTDLFmt, py_spoolss_PSDRVEXTRA_set_iTTDLFmt },
	{ discard_const_p(char, "bReversePrint"), py_spoolss_PSDRVEXTRA_get_bReversePrint, py_spoolss_PSDRVEXTRA_set_bReversePrint },
	{ discard_const_p(char, "iLayout"), py_spoolss_PSDRVEXTRA_get_iLayout, py_spoolss_PSDRVEXTRA_set_iLayout },
	{ discard_const_p(char, "iPSLevel"), py_spoolss_PSDRVEXTRA_get_iPSLevel, py_spoolss_PSDRVEXTRA_set_iPSLevel },
	{ discard_const_p(char, "dwReserved2"), py_spoolss_PSDRVEXTRA_get_dwReserved2, py_spoolss_PSDRVEXTRA_set_dwReserved2 },
	{ discard_const_p(char, "wOEMExtra"), py_spoolss_PSDRVEXTRA_get_wOEMExtra, py_spoolss_PSDRVEXTRA_set_wOEMExtra },
	{ discard_const_p(char, "wVer"), py_spoolss_PSDRVEXTRA_get_wVer, py_spoolss_PSDRVEXTRA_set_wVer },
	{ discard_const_p(char, "dwX"), py_spoolss_PSDRVEXTRA_get_dwX, py_spoolss_PSDRVEXTRA_set_dwX },
	{ discard_const_p(char, "dwY"), py_spoolss_PSDRVEXTRA_get_dwY, py_spoolss_PSDRVEXTRA_set_dwY },
	{ discard_const_p(char, "dwWidthOffset"), py_spoolss_PSDRVEXTRA_get_dwWidthOffset, py_spoolss_PSDRVEXTRA_set_dwWidthOffset },
	{ discard_const_p(char, "dwHeightOffset"), py_spoolss_PSDRVEXTRA_get_dwHeightOffset, py_spoolss_PSDRVEXTRA_set_dwHeightOffset },
	{ discard_const_p(char, "wFeedDirection"), py_spoolss_PSDRVEXTRA_get_wFeedDirection, py_spoolss_PSDRVEXTRA_set_wFeedDirection },
	{ discard_const_p(char, "wCutSheet"), py_spoolss_PSDRVEXTRA_get_wCutSheet, py_spoolss_PSDRVEXTRA_set_wCutSheet },
	{ discard_const_p(char, "dwReserved3"), py_spoolss_PSDRVEXTRA_get_dwReserved3, py_spoolss_PSDRVEXTRA_set_dwReserved3 },
	{ discard_const_p(char, "dwChecksum32"), py_spoolss_PSDRVEXTRA_get_dwChecksum32, py_spoolss_PSDRVEXTRA_set_dwChecksum32 },
	{ discard_const_p(char, "dwOptions"), py_spoolss_PSDRVEXTRA_get_dwOptions, py_spoolss_PSDRVEXTRA_set_dwOptions },
	{ discard_const_p(char, "aOptions"), py_spoolss_PSDRVEXTRA_get_aOptions, py_spoolss_PSDRVEXTRA_set_aOptions },
	{ discard_const_p(char, "dwNupDirection"), py_spoolss_PSDRVEXTRA_get_dwNupDirection, py_spoolss_PSDRVEXTRA_set_dwNupDirection },
	{ discard_const_p(char, "dwNupBorderFlags"), py_spoolss_PSDRVEXTRA_get_dwNupBorderFlags, py_spoolss_PSDRVEXTRA_set_dwNupBorderFlags },
	{ discard_const_p(char, "dwBookletFlags"), py_spoolss_PSDRVEXTRA_get_dwBookletFlags, py_spoolss_PSDRVEXTRA_set_dwBookletFlags },
	{ discard_const_p(char, "dwPadding"), py_spoolss_PSDRVEXTRA_get_dwPadding, py_spoolss_PSDRVEXTRA_set_dwPadding },
	{ NULL }
};

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


static PyTypeObject spoolss_PSDRVEXTRA_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PSDRVEXTRA",
	.tp_getset = py_spoolss_PSDRVEXTRA_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PSDRVEXTRA_new,
};


static PyObject *py_spoolss_UNIDRVEXTRA3_4_get_wReserved(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA3_4 *object = (struct spoolss_UNIDRVEXTRA3_4 *)pytalloc_get_ptr(obj);
	PyObject *py_wReserved;
	py_wReserved = PyList_New(56);
	if (py_wReserved == NULL) {
		return NULL;
	}
	{
		int wReserved_cntr_0;
		for (wReserved_cntr_0 = 0; wReserved_cntr_0 < 56; wReserved_cntr_0++) {
			PyObject *py_wReserved_0;
			py_wReserved_0 = PyInt_FromLong(object->wReserved[wReserved_cntr_0]);
			PyList_SetItem(py_wReserved, wReserved_cntr_0, py_wReserved_0);
		}
	}
	return py_wReserved;
}

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

static PyGetSetDef py_spoolss_UNIDRVEXTRA3_4_getsetters[] = {
	{ discard_const_p(char, "wReserved"), py_spoolss_UNIDRVEXTRA3_4_get_wReserved, py_spoolss_UNIDRVEXTRA3_4_set_wReserved },
	{ NULL }
};

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


static PyTypeObject spoolss_UNIDRVEXTRA3_4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.UNIDRVEXTRA3_4",
	.tp_getset = py_spoolss_UNIDRVEXTRA3_4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_UNIDRVEXTRA3_4_new,
};


static PyObject *py_spoolss_UNIDRVEXTRA500_get_dwSignature(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwSignature;
	py_dwSignature = PyInt_FromLong(object->dwSignature);
	return py_dwSignature;
}

static int py_spoolss_UNIDRVEXTRA500_set_dwSignature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwSignature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwSignature = 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_spoolss_UNIDRVEXTRA500_get_wVer(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wVer;
	py_wVer = PyInt_FromLong(object->wVer);
	return py_wVer;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA500_get_sPadding(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_sPadding;
	py_sPadding = PyInt_FromLong(object->sPadding);
	return py_sPadding;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA500_get_wSize(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wSize;
	py_wSize = PyInt_FromLong(object->wSize);
	return py_wSize;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA500_get_wOEMExtra(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wOEMExtra;
	py_wOEMExtra = PyInt_FromLong(object->wOEMExtra);
	return py_wOEMExtra;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA500_get_dwChecksum32(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwChecksum32;
	py_dwChecksum32 = PyInt_FromLong(object->dwChecksum32);
	return py_dwChecksum32;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA500_get_dwFlags(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwFlags;
	py_dwFlags = PyInt_FromLong(object->dwFlags);
	return py_dwFlags;
}

static int py_spoolss_UNIDRVEXTRA500_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwFlags = 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_spoolss_UNIDRVEXTRA500_get_bReversePrint(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_bReversePrint;
	py_bReversePrint = PyInt_FromLong(object->bReversePrint);
	return py_bReversePrint;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA500_get_iLayout(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_iLayout;
	py_iLayout = PyInt_FromLong(object->iLayout);
	return py_iLayout;
}

static int py_spoolss_UNIDRVEXTRA500_set_iLayout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iLayout = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iLayout = 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_spoolss_UNIDRVEXTRA500_get_iQuality(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_iQuality;
	py_iQuality = PyInt_FromLong(object->iQuality);
	return py_iQuality;
}

static int py_spoolss_UNIDRVEXTRA500_set_iQuality(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iQuality = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iQuality = 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_spoolss_UNIDRVEXTRA500_get_wReserved(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_wReserved;
	py_wReserved = PyList_New(6);
	if (py_wReserved == NULL) {
		return NULL;
	}
	{
		int wReserved_cntr_0;
		for (wReserved_cntr_0 = 0; wReserved_cntr_0 < 6; wReserved_cntr_0++) {
			PyObject *py_wReserved_0;
			py_wReserved_0 = PyInt_FromLong(object->wReserved[wReserved_cntr_0]);
			PyList_SetItem(py_wReserved, wReserved_cntr_0, py_wReserved_0);
		}
	}
	return py_wReserved;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA500_get_dwOptions(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_dwOptions;
	py_dwOptions = PyInt_FromLong(object->dwOptions);
	return py_dwOptions;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA500_get_aOptions(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA500 *object = (struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(obj);
	PyObject *py_aOptions;
	py_aOptions = PyList_New(128);
	if (py_aOptions == NULL) {
		return NULL;
	}
	{
		int aOptions_cntr_0;
		for (aOptions_cntr_0 = 0; aOptions_cntr_0 < 128; aOptions_cntr_0++) {
			PyObject *py_aOptions_0;
			py_aOptions_0 = PyInt_FromLong(object->aOptions[aOptions_cntr_0]);
			PyList_SetItem(py_aOptions, aOptions_cntr_0, py_aOptions_0);
		}
	}
	return py_aOptions;
}

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

static PyGetSetDef py_spoolss_UNIDRVEXTRA500_getsetters[] = {
	{ discard_const_p(char, "dwSignature"), py_spoolss_UNIDRVEXTRA500_get_dwSignature, py_spoolss_UNIDRVEXTRA500_set_dwSignature },
	{ discard_const_p(char, "wVer"), py_spoolss_UNIDRVEXTRA500_get_wVer, py_spoolss_UNIDRVEXTRA500_set_wVer },
	{ discard_const_p(char, "sPadding"), py_spoolss_UNIDRVEXTRA500_get_sPadding, py_spoolss_UNIDRVEXTRA500_set_sPadding },
	{ discard_const_p(char, "wSize"), py_spoolss_UNIDRVEXTRA500_get_wSize, py_spoolss_UNIDRVEXTRA500_set_wSize },
	{ discard_const_p(char, "wOEMExtra"), py_spoolss_UNIDRVEXTRA500_get_wOEMExtra, py_spoolss_UNIDRVEXTRA500_set_wOEMExtra },
	{ discard_const_p(char, "dwChecksum32"), py_spoolss_UNIDRVEXTRA500_get_dwChecksum32, py_spoolss_UNIDRVEXTRA500_set_dwChecksum32 },
	{ discard_const_p(char, "dwFlags"), py_spoolss_UNIDRVEXTRA500_get_dwFlags, py_spoolss_UNIDRVEXTRA500_set_dwFlags },
	{ discard_const_p(char, "bReversePrint"), py_spoolss_UNIDRVEXTRA500_get_bReversePrint, py_spoolss_UNIDRVEXTRA500_set_bReversePrint },
	{ discard_const_p(char, "iLayout"), py_spoolss_UNIDRVEXTRA500_get_iLayout, py_spoolss_UNIDRVEXTRA500_set_iLayout },
	{ discard_const_p(char, "iQuality"), py_spoolss_UNIDRVEXTRA500_get_iQuality, py_spoolss_UNIDRVEXTRA500_set_iQuality },
	{ discard_const_p(char, "wReserved"), py_spoolss_UNIDRVEXTRA500_get_wReserved, py_spoolss_UNIDRVEXTRA500_set_wReserved },
	{ discard_const_p(char, "dwOptions"), py_spoolss_UNIDRVEXTRA500_get_dwOptions, py_spoolss_UNIDRVEXTRA500_set_dwOptions },
	{ discard_const_p(char, "aOptions"), py_spoolss_UNIDRVEXTRA500_get_aOptions, py_spoolss_UNIDRVEXTRA500_set_aOptions },
	{ NULL }
};

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


static PyTypeObject spoolss_UNIDRVEXTRA500_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.UNIDRVEXTRA500",
	.tp_getset = py_spoolss_UNIDRVEXTRA500_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_UNIDRVEXTRA500_new,
};


static PyObject *py_spoolss_UNIDRVEXTRA_get_dwSignature(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwSignature;
	py_dwSignature = PyInt_FromLong(object->dwSignature);
	return py_dwSignature;
}

static int py_spoolss_UNIDRVEXTRA_set_dwSignature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwSignature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwSignature = 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_spoolss_UNIDRVEXTRA_get_wVer(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wVer;
	py_wVer = PyInt_FromLong(object->wVer);
	return py_wVer;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_wCoreJTExpSize(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wCoreJTExpSize;
	py_wCoreJTExpSize = PyInt_FromLong(object->wCoreJTExpSize);
	return py_wCoreJTExpSize;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_wCoreFullSize(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wCoreFullSize;
	py_wCoreFullSize = PyInt_FromLong(object->wCoreFullSize);
	return py_wCoreFullSize;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_wOEMExtra(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wOEMExtra;
	py_wOEMExtra = PyInt_FromLong(object->wOEMExtra);
	return py_wOEMExtra;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_dwChecksum32(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwChecksum32;
	py_dwChecksum32 = PyInt_FromLong(object->dwChecksum32);
	return py_dwChecksum32;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_dwFlags(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwFlags;
	py_dwFlags = PyInt_FromLong(object->dwFlags);
	return py_dwFlags;
}

static int py_spoolss_UNIDRVEXTRA_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwFlags = 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_spoolss_UNIDRVEXTRA_get_bReversePrint(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_bReversePrint;
	py_bReversePrint = PyInt_FromLong(object->bReversePrint);
	return py_bReversePrint;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_iLayout(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_iLayout;
	py_iLayout = PyInt_FromLong(object->iLayout);
	return py_iLayout;
}

static int py_spoolss_UNIDRVEXTRA_set_iLayout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iLayout = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iLayout = 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_spoolss_UNIDRVEXTRA_get_iQuality(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_iQuality;
	py_iQuality = PyInt_FromLong(object->iQuality);
	return py_iQuality;
}

static int py_spoolss_UNIDRVEXTRA_set_iQuality(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->iQuality = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->iQuality = 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_spoolss_UNIDRVEXTRA_get_wReserved(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_wReserved;
	py_wReserved = PyList_New(6);
	if (py_wReserved == NULL) {
		return NULL;
	}
	{
		int wReserved_cntr_0;
		for (wReserved_cntr_0 = 0; wReserved_cntr_0 < 6; wReserved_cntr_0++) {
			PyObject *py_wReserved_0;
			py_wReserved_0 = PyInt_FromLong(object->wReserved[wReserved_cntr_0]);
			PyList_SetItem(py_wReserved, wReserved_cntr_0, py_wReserved_0);
		}
	}
	return py_wReserved;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_dwOptions(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwOptions;
	py_dwOptions = PyInt_FromLong(object->dwOptions);
	return py_dwOptions;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_aOptions(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_aOptions;
	py_aOptions = PyList_New(128);
	if (py_aOptions == NULL) {
		return NULL;
	}
	{
		int aOptions_cntr_0;
		for (aOptions_cntr_0 = 0; aOptions_cntr_0 < 128; aOptions_cntr_0++) {
			PyObject *py_aOptions_0;
			py_aOptions_0 = PyInt_FromLong(object->aOptions[aOptions_cntr_0]);
			PyList_SetItem(py_aOptions, aOptions_cntr_0, py_aOptions_0);
		}
	}
	return py_aOptions;
}

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

static PyObject *py_spoolss_UNIDRVEXTRA_get_dwNupDirection(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwNupDirection;
	py_dwNupDirection = PyInt_FromLong(object->dwNupDirection);
	return py_dwNupDirection;
}

static int py_spoolss_UNIDRVEXTRA_set_dwNupDirection(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwNupDirection = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwNupDirection = 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_spoolss_UNIDRVEXTRA_get_dwNupBorderFlags(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwNupBorderFlags;
	py_dwNupBorderFlags = PyInt_FromLong(object->dwNupBorderFlags);
	return py_dwNupBorderFlags;
}

static int py_spoolss_UNIDRVEXTRA_set_dwNupBorderFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwNupBorderFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwNupBorderFlags = 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_spoolss_UNIDRVEXTRA_get_dwBookletFlags(PyObject *obj, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwBookletFlags;
	py_dwBookletFlags = PyInt_FromLong(object->dwBookletFlags);
	return py_dwBookletFlags;
}

static int py_spoolss_UNIDRVEXTRA_set_dwBookletFlags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwBookletFlags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwBookletFlags = 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_spoolss_UNIDRVEXTRA_getsetters[] = {
	{ discard_const_p(char, "dwSignature"), py_spoolss_UNIDRVEXTRA_get_dwSignature, py_spoolss_UNIDRVEXTRA_set_dwSignature },
	{ discard_const_p(char, "wVer"), py_spoolss_UNIDRVEXTRA_get_wVer, py_spoolss_UNIDRVEXTRA_set_wVer },
	{ discard_const_p(char, "wCoreJTExpSize"), py_spoolss_UNIDRVEXTRA_get_wCoreJTExpSize, py_spoolss_UNIDRVEXTRA_set_wCoreJTExpSize },
	{ discard_const_p(char, "wCoreFullSize"), py_spoolss_UNIDRVEXTRA_get_wCoreFullSize, py_spoolss_UNIDRVEXTRA_set_wCoreFullSize },
	{ discard_const_p(char, "wOEMExtra"), py_spoolss_UNIDRVEXTRA_get_wOEMExtra, py_spoolss_UNIDRVEXTRA_set_wOEMExtra },
	{ discard_const_p(char, "dwChecksum32"), py_spoolss_UNIDRVEXTRA_get_dwChecksum32, py_spoolss_UNIDRVEXTRA_set_dwChecksum32 },
	{ discard_const_p(char, "dwFlags"), py_spoolss_UNIDRVEXTRA_get_dwFlags, py_spoolss_UNIDRVEXTRA_set_dwFlags },
	{ discard_const_p(char, "bReversePrint"), py_spoolss_UNIDRVEXTRA_get_bReversePrint, py_spoolss_UNIDRVEXTRA_set_bReversePrint },
	{ discard_const_p(char, "iLayout"), py_spoolss_UNIDRVEXTRA_get_iLayout, py_spoolss_UNIDRVEXTRA_set_iLayout },
	{ discard_const_p(char, "iQuality"), py_spoolss_UNIDRVEXTRA_get_iQuality, py_spoolss_UNIDRVEXTRA_set_iQuality },
	{ discard_const_p(char, "wReserved"), py_spoolss_UNIDRVEXTRA_get_wReserved, py_spoolss_UNIDRVEXTRA_set_wReserved },
	{ discard_const_p(char, "dwOptions"), py_spoolss_UNIDRVEXTRA_get_dwOptions, py_spoolss_UNIDRVEXTRA_set_dwOptions },
	{ discard_const_p(char, "aOptions"), py_spoolss_UNIDRVEXTRA_get_aOptions, py_spoolss_UNIDRVEXTRA_set_aOptions },
	{ discard_const_p(char, "dwNupDirection"), py_spoolss_UNIDRVEXTRA_get_dwNupDirection, py_spoolss_UNIDRVEXTRA_set_dwNupDirection },
	{ discard_const_p(char, "dwNupBorderFlags"), py_spoolss_UNIDRVEXTRA_get_dwNupBorderFlags, py_spoolss_UNIDRVEXTRA_set_dwNupBorderFlags },
	{ discard_const_p(char, "dwBookletFlags"), py_spoolss_UNIDRVEXTRA_get_dwBookletFlags, py_spoolss_UNIDRVEXTRA_set_dwBookletFlags },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_UNIDRVEXTRA_ndr_print(PyObject *py_obj)
{
	struct spoolss_UNIDRVEXTRA *object = (struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_UNIDRVEXTRA, "spoolss_UNIDRVEXTRA", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_UNIDRVEXTRA_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.UNIDRVEXTRA",
	.tp_getset = py_spoolss_UNIDRVEXTRA_getsetters,
	.tp_methods = py_spoolss_UNIDRVEXTRA_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_UNIDRVEXTRA_new,
};


static PyObject *py_spoolss_JTEXP_get_dwSize(PyObject *obj, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(obj);
	PyObject *py_dwSize;
	py_dwSize = PyInt_FromLong(object->dwSize);
	return py_dwSize;
}

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

static PyObject *py_spoolss_JTEXP_get_dwSignature(PyObject *obj, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(obj);
	PyObject *py_dwSignature;
	py_dwSignature = PyInt_FromLong(object->dwSignature);
	return py_dwSignature;
}

static int py_spoolss_JTEXP_set_dwSignature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwSignature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwSignature = 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_spoolss_JTEXP_get_dwVersion(PyObject *obj, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(obj);
	PyObject *py_dwVersion;
	py_dwVersion = PyInt_FromLong(object->dwVersion);
	return py_dwVersion;
}

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

static PyObject *py_spoolss_JTEXP_get_wJTHdrSize(PyObject *obj, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(obj);
	PyObject *py_wJTHdrSize;
	py_wJTHdrSize = PyInt_FromLong(object->wJTHdrSize);
	return py_wJTHdrSize;
}

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

static PyObject *py_spoolss_JTEXP_get_wCoreMFOSize(PyObject *obj, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(obj);
	PyObject *py_wCoreMFOSize;
	py_wCoreMFOSize = PyInt_FromLong(object->wCoreMFOSize);
	return py_wCoreMFOSize;
}

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

static PyObject *py_spoolss_JTEXP_get_ModelName(PyObject *obj, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(obj);
	PyObject *py_ModelName;
	if (object->ModelName == NULL) {
		py_ModelName = Py_None;
		Py_INCREF(py_ModelName);
	} else {
		if (object->ModelName == NULL) {
			py_ModelName = Py_None;
			Py_INCREF(py_ModelName);
		} else {
			py_ModelName = PyUnicode_Decode(object->ModelName, strlen(object->ModelName), "utf-8", "ignore");
		}
	}
	return py_ModelName;
}

static int py_spoolss_JTEXP_set_ModelName(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->ModelName = NULL;
	} else {
		object->ModelName = NULL;
		if (PyUnicode_Check(value)) {
			object->ModelName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->ModelName = 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_spoolss_JTEXP_get_FeatureOptionPairs(PyObject *obj, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(obj);
	PyObject *py_FeatureOptionPairs;
	py_FeatureOptionPairs = pytalloc_CObject_FromTallocPtr(object->FeatureOptionPairs);
	return py_FeatureOptionPairs;
}

static int py_spoolss_JTEXP_set_FeatureOptionPairs(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JTEXP *object = (struct spoolss_JTEXP *)pytalloc_get_ptr(py_obj);
	object->FeatureOptionPairs = PyCObject_AsVoidPtr(value);
	return 0;
}

static PyGetSetDef py_spoolss_JTEXP_getsetters[] = {
	{ discard_const_p(char, "dwSize"), py_spoolss_JTEXP_get_dwSize, py_spoolss_JTEXP_set_dwSize },
	{ discard_const_p(char, "dwSignature"), py_spoolss_JTEXP_get_dwSignature, py_spoolss_JTEXP_set_dwSignature },
	{ discard_const_p(char, "dwVersion"), py_spoolss_JTEXP_get_dwVersion, py_spoolss_JTEXP_set_dwVersion },
	{ discard_const_p(char, "wJTHdrSize"), py_spoolss_JTEXP_get_wJTHdrSize, py_spoolss_JTEXP_set_wJTHdrSize },
	{ discard_const_p(char, "wCoreMFOSize"), py_spoolss_JTEXP_get_wCoreMFOSize, py_spoolss_JTEXP_set_wCoreMFOSize },
	{ discard_const_p(char, "ModelName"), py_spoolss_JTEXP_get_ModelName, py_spoolss_JTEXP_set_ModelName },
	{ discard_const_p(char, "FeatureOptionPairs"), py_spoolss_JTEXP_get_FeatureOptionPairs, py_spoolss_JTEXP_set_FeatureOptionPairs },
	{ NULL }
};

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


static PyTypeObject spoolss_JTEXP_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.JTEXP",
	.tp_getset = py_spoolss_JTEXP_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_JTEXP_new,
};


static PyObject *py_spoolss_OEM_DMEXTRA_get_dwSize(PyObject *obj, void *closure)
{
	struct spoolss_OEM_DMEXTRA *object = (struct spoolss_OEM_DMEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwSize;
	py_dwSize = PyInt_FromLong(object->dwSize);
	return py_dwSize;
}

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

static PyObject *py_spoolss_OEM_DMEXTRA_get_dwSignature(PyObject *obj, void *closure)
{
	struct spoolss_OEM_DMEXTRA *object = (struct spoolss_OEM_DMEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwSignature;
	py_dwSignature = PyInt_FromLong(object->dwSignature);
	return py_dwSignature;
}

static int py_spoolss_OEM_DMEXTRA_set_dwSignature(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_OEM_DMEXTRA *object = (struct spoolss_OEM_DMEXTRA *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dwSignature = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dwSignature = 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_spoolss_OEM_DMEXTRA_get_dwVersion(PyObject *obj, void *closure)
{
	struct spoolss_OEM_DMEXTRA *object = (struct spoolss_OEM_DMEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_dwVersion;
	py_dwVersion = PyInt_FromLong(object->dwVersion);
	return py_dwVersion;
}

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

static PyObject *py_spoolss_OEM_DMEXTRA_get_Data(PyObject *obj, void *closure)
{
	struct spoolss_OEM_DMEXTRA *object = (struct spoolss_OEM_DMEXTRA *)pytalloc_get_ptr(obj);
	PyObject *py_Data;
	py_Data = PyString_FromStringAndSize((char *)(object->Data).data, (object->Data).length);
	return py_Data;
}

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

static PyGetSetDef py_spoolss_OEM_DMEXTRA_getsetters[] = {
	{ discard_const_p(char, "dwSize"), py_spoolss_OEM_DMEXTRA_get_dwSize, py_spoolss_OEM_DMEXTRA_set_dwSize },
	{ discard_const_p(char, "dwSignature"), py_spoolss_OEM_DMEXTRA_get_dwSignature, py_spoolss_OEM_DMEXTRA_set_dwSignature },
	{ discard_const_p(char, "dwVersion"), py_spoolss_OEM_DMEXTRA_get_dwVersion, py_spoolss_OEM_DMEXTRA_set_dwVersion },
	{ discard_const_p(char, "Data"), py_spoolss_OEM_DMEXTRA_get_Data, py_spoolss_OEM_DMEXTRA_set_Data },
	{ NULL }
};

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


static PyTypeObject spoolss_OEM_DMEXTRA_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.OEM_DMEXTRA",
	.tp_getset = py_spoolss_OEM_DMEXTRA_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_OEM_DMEXTRA_new,
};

PyObject *py_import_spoolss_DeviceModeExtraDataPostScript(TALLOC_CTX *mem_ctx, int level, union spoolss_DeviceModeExtraDataPostScript *in)
{
	PyObject *ret;

	switch (level) {
		case 0x0350:
			ret = pytalloc_reference_ex(&spoolss_PSDRVEXTRA351_Type, mem_ctx, &in->psdrvextra351);
			return ret;

		case 0x0400:
			ret = pytalloc_reference_ex(&spoolss_PSDRVEXTRA400_Type, mem_ctx, &in->psdrvextra400);
			return ret;

		case 0x0501:
			ret = pytalloc_reference_ex(&spoolss_PSDRVEXTRA500_Type, mem_ctx, &in->psdrvextra500);
			return ret;

		case 0x0600:
			ret = pytalloc_reference_ex(&spoolss_PSDRVEXTRA_Type, mem_ctx, &in->psdrvextra);
			return ret;

		default:
			ret = PyString_FromStringAndSize((char *)(in->psblob).data, (in->psblob).length);
			return ret;

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

union spoolss_DeviceModeExtraDataPostScript *py_export_spoolss_DeviceModeExtraDataPostScript(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_DeviceModeExtraDataPostScript *ret = talloc_zero(mem_ctx, union spoolss_DeviceModeExtraDataPostScript);
	switch (level) {
		case 0x0350:
			PY_CHECK_TYPE(&spoolss_PSDRVEXTRA351_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->psdrvextra351 = *(struct spoolss_PSDRVEXTRA351 *)pytalloc_get_ptr(in);
			break;

		case 0x0400:
			PY_CHECK_TYPE(&spoolss_PSDRVEXTRA400_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->psdrvextra400 = *(struct spoolss_PSDRVEXTRA400 *)pytalloc_get_ptr(in);
			break;

		case 0x0501:
			PY_CHECK_TYPE(&spoolss_PSDRVEXTRA500_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->psdrvextra500 = *(struct spoolss_PSDRVEXTRA500 *)pytalloc_get_ptr(in);
			break;

		case 0x0600:
			PY_CHECK_TYPE(&spoolss_PSDRVEXTRA_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->psdrvextra = *(struct spoolss_PSDRVEXTRA *)pytalloc_get_ptr(in);
			break;

		default:
			ret->psblob = data_blob_talloc(mem_ctx, PyString_AS_STRING(in), PyString_GET_SIZE(in));
			break;

	}

	return ret;
}

PyObject *py_import_spoolss_DeviceModeExtraDataUniDriver(TALLOC_CTX *mem_ctx, int level, union spoolss_DeviceModeExtraDataUniDriver *in)
{
	PyObject *ret;

	switch (level) {
		case 0x0301:
			ret = pytalloc_reference_ex(&spoolss_UNIDRVEXTRA3_4_Type, mem_ctx, &in->unidrvextra3_4);
			return ret;

		case 0x0500:
			ret = pytalloc_reference_ex(&spoolss_UNIDRVEXTRA500_Type, mem_ctx, &in->unidrvextra500);
			return ret;

		case 0x0600:
			ret = pytalloc_reference_ex(&spoolss_UNIDRVEXTRA_Type, mem_ctx, &in->unidrvextra);
			return ret;

		default:
			ret = PyString_FromStringAndSize((char *)(in->uniblob).data, (in->uniblob).length);
			return ret;

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

union spoolss_DeviceModeExtraDataUniDriver *py_export_spoolss_DeviceModeExtraDataUniDriver(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_DeviceModeExtraDataUniDriver *ret = talloc_zero(mem_ctx, union spoolss_DeviceModeExtraDataUniDriver);
	switch (level) {
		case 0x0301:
			PY_CHECK_TYPE(&spoolss_UNIDRVEXTRA3_4_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->unidrvextra3_4 = *(struct spoolss_UNIDRVEXTRA3_4 *)pytalloc_get_ptr(in);
			break;

		case 0x0500:
			PY_CHECK_TYPE(&spoolss_UNIDRVEXTRA500_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->unidrvextra500 = *(struct spoolss_UNIDRVEXTRA500 *)pytalloc_get_ptr(in);
			break;

		case 0x0600:
			PY_CHECK_TYPE(&spoolss_UNIDRVEXTRA_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->unidrvextra = *(struct spoolss_UNIDRVEXTRA *)pytalloc_get_ptr(in);
			break;

		default:
			ret->uniblob = data_blob_talloc(mem_ctx, PyString_AS_STRING(in), PyString_GET_SIZE(in));
			break;

	}

	return ret;
}


static PyObject *py_spoolss_DeviceMode_get_devicename(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_devicename;
	if (object->devicename == NULL) {
		py_devicename = Py_None;
		Py_INCREF(py_devicename);
	} else {
		py_devicename = PyUnicode_Decode(object->devicename, strlen(object->devicename), "utf-8", "ignore");
	}
	return py_devicename;
}

static int py_spoolss_DeviceMode_set_devicename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->devicename = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->devicename = 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_spoolss_DeviceMode_get_specversion(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_specversion;
	py_specversion = PyInt_FromLong(object->specversion);
	return py_specversion;
}

static int py_spoolss_DeviceMode_set_specversion(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->specversion = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->specversion = 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_spoolss_DeviceMode_get_driverversion(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_driverversion;
	py_driverversion = PyInt_FromLong(object->driverversion);
	return py_driverversion;
}

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

static PyObject *py_spoolss_DeviceMode_get_size(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

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

static PyObject *py_spoolss_DeviceMode_get___driverextra_length(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py___driverextra_length;
	py___driverextra_length = PyInt_FromLong(object->__driverextra_length);
	return py___driverextra_length;
}

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

static PyObject *py_spoolss_DeviceMode_get_fields(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_fields;
	py_fields = PyInt_FromLong(object->fields);
	return py_fields;
}

static int py_spoolss_DeviceMode_set_fields(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->fields = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->fields = 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_spoolss_DeviceMode_get_orientation(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_orientation;
	py_orientation = PyInt_FromLong(object->orientation);
	return py_orientation;
}

static int py_spoolss_DeviceMode_set_orientation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->orientation = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->orientation = 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_spoolss_DeviceMode_get_papersize(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_papersize;
	py_papersize = PyInt_FromLong(object->papersize);
	return py_papersize;
}

static int py_spoolss_DeviceMode_set_papersize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->papersize = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->papersize = 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_spoolss_DeviceMode_get_paperlength(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_paperlength;
	py_paperlength = PyInt_FromLong(object->paperlength);
	return py_paperlength;
}

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

static PyObject *py_spoolss_DeviceMode_get_paperwidth(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_paperwidth;
	py_paperwidth = PyInt_FromLong(object->paperwidth);
	return py_paperwidth;
}

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

static PyObject *py_spoolss_DeviceMode_get_scale(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_scale;
	py_scale = PyInt_FromLong(object->scale);
	return py_scale;
}

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

static PyObject *py_spoolss_DeviceMode_get_copies(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_copies;
	py_copies = PyInt_FromLong(object->copies);
	return py_copies;
}

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

static PyObject *py_spoolss_DeviceMode_get_defaultsource(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_defaultsource;
	py_defaultsource = PyInt_FromLong(object->defaultsource);
	return py_defaultsource;
}

static int py_spoolss_DeviceMode_set_defaultsource(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->defaultsource = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->defaultsource = 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_spoolss_DeviceMode_get_printquality(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_printquality;
	py_printquality = PyInt_FromLong(object->printquality);
	return py_printquality;
}

static int py_spoolss_DeviceMode_set_printquality(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->printquality = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->printquality = 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_spoolss_DeviceMode_get_color(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_color;
	py_color = PyInt_FromLong(object->color);
	return py_color;
}

static int py_spoolss_DeviceMode_set_color(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->color = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->color = 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_spoolss_DeviceMode_get_duplex(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_duplex;
	py_duplex = PyInt_FromLong(object->duplex);
	return py_duplex;
}

static int py_spoolss_DeviceMode_set_duplex(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->duplex = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->duplex = 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_spoolss_DeviceMode_get_yresolution(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_yresolution;
	py_yresolution = PyInt_FromLong(object->yresolution);
	return py_yresolution;
}

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

static PyObject *py_spoolss_DeviceMode_get_ttoption(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_ttoption;
	py_ttoption = PyInt_FromLong(object->ttoption);
	return py_ttoption;
}

static int py_spoolss_DeviceMode_set_ttoption(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->ttoption = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->ttoption = 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_spoolss_DeviceMode_get_collate(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_collate;
	py_collate = PyInt_FromLong(object->collate);
	return py_collate;
}

static int py_spoolss_DeviceMode_set_collate(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->collate = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->collate = 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_spoolss_DeviceMode_get_formname(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_formname;
	if (object->formname == NULL) {
		py_formname = Py_None;
		Py_INCREF(py_formname);
	} else {
		py_formname = PyUnicode_Decode(object->formname, strlen(object->formname), "utf-8", "ignore");
	}
	return py_formname;
}

static int py_spoolss_DeviceMode_set_formname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->formname = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->formname = 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_spoolss_DeviceMode_get_logpixels(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_logpixels;
	py_logpixels = PyInt_FromLong(object->logpixels);
	return py_logpixels;
}

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

static PyObject *py_spoolss_DeviceMode_get_bitsperpel(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_bitsperpel;
	py_bitsperpel = PyInt_FromLong(object->bitsperpel);
	return py_bitsperpel;
}

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

static PyObject *py_spoolss_DeviceMode_get_pelswidth(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_pelswidth;
	py_pelswidth = PyInt_FromLong(object->pelswidth);
	return py_pelswidth;
}

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

static PyObject *py_spoolss_DeviceMode_get_pelsheight(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_pelsheight;
	py_pelsheight = PyInt_FromLong(object->pelsheight);
	return py_pelsheight;
}

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

static PyObject *py_spoolss_DeviceMode_get_displayflags(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_displayflags;
	py_displayflags = PyInt_FromLong(object->displayflags);
	return py_displayflags;
}

static int py_spoolss_DeviceMode_set_displayflags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->displayflags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->displayflags = 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_spoolss_DeviceMode_get_displayfrequency(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_displayfrequency;
	py_displayfrequency = PyInt_FromLong(object->displayfrequency);
	return py_displayfrequency;
}

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

static PyObject *py_spoolss_DeviceMode_get_icmmethod(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_icmmethod;
	py_icmmethod = PyInt_FromLong(object->icmmethod);
	return py_icmmethod;
}

static int py_spoolss_DeviceMode_set_icmmethod(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->icmmethod = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->icmmethod = 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_spoolss_DeviceMode_get_icmintent(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_icmintent;
	py_icmintent = PyInt_FromLong(object->icmintent);
	return py_icmintent;
}

static int py_spoolss_DeviceMode_set_icmintent(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->icmintent = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->icmintent = 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_spoolss_DeviceMode_get_mediatype(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_mediatype;
	py_mediatype = PyInt_FromLong(object->mediatype);
	return py_mediatype;
}

static int py_spoolss_DeviceMode_set_mediatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->mediatype = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->mediatype = 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_spoolss_DeviceMode_get_dithertype(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_dithertype;
	py_dithertype = PyInt_FromLong(object->dithertype);
	return py_dithertype;
}

static int py_spoolss_DeviceMode_set_dithertype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->dithertype = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->dithertype = 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_spoolss_DeviceMode_get_reserved1(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_reserved1;
	py_reserved1 = PyInt_FromLong(object->reserved1);
	return py_reserved1;
}

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

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

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

static PyObject *py_spoolss_DeviceMode_get_panningwidth(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_panningwidth;
	py_panningwidth = PyInt_FromLong(object->panningwidth);
	return py_panningwidth;
}

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

static PyObject *py_spoolss_DeviceMode_get_panningheight(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_panningheight;
	py_panningheight = PyInt_FromLong(object->panningheight);
	return py_panningheight;
}

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

static PyObject *py_spoolss_DeviceMode_get_driverextra_data(PyObject *obj, void *closure)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(obj);
	PyObject *py_driverextra_data;
	py_driverextra_data = PyString_FromStringAndSize((char *)(object->driverextra_data).data, (object->driverextra_data).length);
	return py_driverextra_data;
}

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

static PyGetSetDef py_spoolss_DeviceMode_getsetters[] = {
	{ discard_const_p(char, "devicename"), py_spoolss_DeviceMode_get_devicename, py_spoolss_DeviceMode_set_devicename },
	{ discard_const_p(char, "specversion"), py_spoolss_DeviceMode_get_specversion, py_spoolss_DeviceMode_set_specversion },
	{ discard_const_p(char, "driverversion"), py_spoolss_DeviceMode_get_driverversion, py_spoolss_DeviceMode_set_driverversion },
	{ discard_const_p(char, "size"), py_spoolss_DeviceMode_get_size, py_spoolss_DeviceMode_set_size },
	{ discard_const_p(char, "__driverextra_length"), py_spoolss_DeviceMode_get___driverextra_length, py_spoolss_DeviceMode_set___driverextra_length },
	{ discard_const_p(char, "fields"), py_spoolss_DeviceMode_get_fields, py_spoolss_DeviceMode_set_fields },
	{ discard_const_p(char, "orientation"), py_spoolss_DeviceMode_get_orientation, py_spoolss_DeviceMode_set_orientation },
	{ discard_const_p(char, "papersize"), py_spoolss_DeviceMode_get_papersize, py_spoolss_DeviceMode_set_papersize },
	{ discard_const_p(char, "paperlength"), py_spoolss_DeviceMode_get_paperlength, py_spoolss_DeviceMode_set_paperlength },
	{ discard_const_p(char, "paperwidth"), py_spoolss_DeviceMode_get_paperwidth, py_spoolss_DeviceMode_set_paperwidth },
	{ discard_const_p(char, "scale"), py_spoolss_DeviceMode_get_scale, py_spoolss_DeviceMode_set_scale },
	{ discard_const_p(char, "copies"), py_spoolss_DeviceMode_get_copies, py_spoolss_DeviceMode_set_copies },
	{ discard_const_p(char, "defaultsource"), py_spoolss_DeviceMode_get_defaultsource, py_spoolss_DeviceMode_set_defaultsource },
	{ discard_const_p(char, "printquality"), py_spoolss_DeviceMode_get_printquality, py_spoolss_DeviceMode_set_printquality },
	{ discard_const_p(char, "color"), py_spoolss_DeviceMode_get_color, py_spoolss_DeviceMode_set_color },
	{ discard_const_p(char, "duplex"), py_spoolss_DeviceMode_get_duplex, py_spoolss_DeviceMode_set_duplex },
	{ discard_const_p(char, "yresolution"), py_spoolss_DeviceMode_get_yresolution, py_spoolss_DeviceMode_set_yresolution },
	{ discard_const_p(char, "ttoption"), py_spoolss_DeviceMode_get_ttoption, py_spoolss_DeviceMode_set_ttoption },
	{ discard_const_p(char, "collate"), py_spoolss_DeviceMode_get_collate, py_spoolss_DeviceMode_set_collate },
	{ discard_const_p(char, "formname"), py_spoolss_DeviceMode_get_formname, py_spoolss_DeviceMode_set_formname },
	{ discard_const_p(char, "logpixels"), py_spoolss_DeviceMode_get_logpixels, py_spoolss_DeviceMode_set_logpixels },
	{ discard_const_p(char, "bitsperpel"), py_spoolss_DeviceMode_get_bitsperpel, py_spoolss_DeviceMode_set_bitsperpel },
	{ discard_const_p(char, "pelswidth"), py_spoolss_DeviceMode_get_pelswidth, py_spoolss_DeviceMode_set_pelswidth },
	{ discard_const_p(char, "pelsheight"), py_spoolss_DeviceMode_get_pelsheight, py_spoolss_DeviceMode_set_pelsheight },
	{ discard_const_p(char, "displayflags"), py_spoolss_DeviceMode_get_displayflags, py_spoolss_DeviceMode_set_displayflags },
	{ discard_const_p(char, "displayfrequency"), py_spoolss_DeviceMode_get_displayfrequency, py_spoolss_DeviceMode_set_displayfrequency },
	{ discard_const_p(char, "icmmethod"), py_spoolss_DeviceMode_get_icmmethod, py_spoolss_DeviceMode_set_icmmethod },
	{ discard_const_p(char, "icmintent"), py_spoolss_DeviceMode_get_icmintent, py_spoolss_DeviceMode_set_icmintent },
	{ discard_const_p(char, "mediatype"), py_spoolss_DeviceMode_get_mediatype, py_spoolss_DeviceMode_set_mediatype },
	{ discard_const_p(char, "dithertype"), py_spoolss_DeviceMode_get_dithertype, py_spoolss_DeviceMode_set_dithertype },
	{ discard_const_p(char, "reserved1"), py_spoolss_DeviceMode_get_reserved1, py_spoolss_DeviceMode_set_reserved1 },
	{ discard_const_p(char, "reserved2"), py_spoolss_DeviceMode_get_reserved2, py_spoolss_DeviceMode_set_reserved2 },
	{ discard_const_p(char, "panningwidth"), py_spoolss_DeviceMode_get_panningwidth, py_spoolss_DeviceMode_set_panningwidth },
	{ discard_const_p(char, "panningheight"), py_spoolss_DeviceMode_get_panningheight, py_spoolss_DeviceMode_set_panningheight },
	{ discard_const_p(char, "driverextra_data"), py_spoolss_DeviceMode_get_driverextra_data, py_spoolss_DeviceMode_set_driverextra_data },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DeviceMode_ndr_print(PyObject *py_obj)
{
	struct spoolss_DeviceMode *object = (struct spoolss_DeviceMode *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DeviceMode, "spoolss_DeviceMode", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DeviceMode_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DeviceMode",
	.tp_getset = py_spoolss_DeviceMode_getsetters,
	.tp_methods = py_spoolss_DeviceMode_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DeviceMode_new,
};


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

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

static PyObject *py_spoolss_PrinterInfo1_get_description(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo1 *object = (struct spoolss_PrinterInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_description;
	if (object->description == NULL) {
		py_description = Py_None;
		Py_INCREF(py_description);
	} else {
		py_description = PyString_FromStringOrNULL(object->description);
	}
	return py_description;
}

static int py_spoolss_PrinterInfo1_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo1 *object = (struct spoolss_PrinterInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->description = NULL;
	} else {
		object->description = NULL;
		object->description = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo1_get_name(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo1 *object = (struct spoolss_PrinterInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_name;
	if (object->name == NULL) {
		py_name = Py_None;
		Py_INCREF(py_name);
	} else {
		py_name = PyString_FromStringOrNULL(object->name);
	}
	return py_name;
}

static int py_spoolss_PrinterInfo1_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo1 *object = (struct spoolss_PrinterInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->name = NULL;
	} else {
		object->name = NULL;
		object->name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo1_get_comment(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo1 *object = (struct spoolss_PrinterInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		py_comment = PyString_FromStringOrNULL(object->comment);
	}
	return py_comment;
}

static int py_spoolss_PrinterInfo1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo1 *object = (struct spoolss_PrinterInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		object->comment = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_PrinterInfo1_getsetters[] = {
	{ discard_const_p(char, "flags"), py_spoolss_PrinterInfo1_get_flags, py_spoolss_PrinterInfo1_set_flags },
	{ discard_const_p(char, "description"), py_spoolss_PrinterInfo1_get_description, py_spoolss_PrinterInfo1_set_description },
	{ discard_const_p(char, "name"), py_spoolss_PrinterInfo1_get_name, py_spoolss_PrinterInfo1_set_name },
	{ discard_const_p(char, "comment"), py_spoolss_PrinterInfo1_get_comment, py_spoolss_PrinterInfo1_set_comment },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterInfo1 *object = (struct spoolss_PrinterInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterInfo1, "spoolss_PrinterInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrinterInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterInfo1",
	.tp_getset = py_spoolss_PrinterInfo1_getsetters,
	.tp_methods = py_spoolss_PrinterInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterInfo1_new,
};


static PyObject *py_spoolss_PrinterInfo2_get_servername(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyString_FromStringOrNULL(object->servername);
	}
	return py_servername;
}

static int py_spoolss_PrinterInfo2_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->servername = NULL;
	} else {
		object->servername = NULL;
		object->servername = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_printername(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_printername;
	if (object->printername == NULL) {
		py_printername = Py_None;
		Py_INCREF(py_printername);
	} else {
		py_printername = PyString_FromStringOrNULL(object->printername);
	}
	return py_printername;
}

static int py_spoolss_PrinterInfo2_set_printername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printername = NULL;
	} else {
		object->printername = NULL;
		object->printername = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_sharename(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_sharename;
	if (object->sharename == NULL) {
		py_sharename = Py_None;
		Py_INCREF(py_sharename);
	} else {
		py_sharename = PyString_FromStringOrNULL(object->sharename);
	}
	return py_sharename;
}

static int py_spoolss_PrinterInfo2_set_sharename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->sharename = NULL;
	} else {
		object->sharename = NULL;
		object->sharename = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_portname(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_portname;
	if (object->portname == NULL) {
		py_portname = Py_None;
		Py_INCREF(py_portname);
	} else {
		py_portname = PyString_FromStringOrNULL(object->portname);
	}
	return py_portname;
}

static int py_spoolss_PrinterInfo2_set_portname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->portname = NULL;
	} else {
		object->portname = NULL;
		object->portname = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_drivername(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_drivername;
	if (object->drivername == NULL) {
		py_drivername = Py_None;
		Py_INCREF(py_drivername);
	} else {
		py_drivername = PyString_FromStringOrNULL(object->drivername);
	}
	return py_drivername;
}

static int py_spoolss_PrinterInfo2_set_drivername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->drivername = NULL;
	} else {
		object->drivername = NULL;
		object->drivername = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_comment(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		py_comment = PyString_FromStringOrNULL(object->comment);
	}
	return py_comment;
}

static int py_spoolss_PrinterInfo2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		object->comment = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_location(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_location;
	if (object->location == NULL) {
		py_location = Py_None;
		Py_INCREF(py_location);
	} else {
		py_location = PyString_FromStringOrNULL(object->location);
	}
	return py_location;
}

static int py_spoolss_PrinterInfo2_set_location(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->location = NULL;
	} else {
		object->location = NULL;
		object->location = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_devmode(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_devmode;
	if (object->devmode == NULL) {
		py_devmode = Py_None;
		Py_INCREF(py_devmode);
	} else {
		py_devmode = pytalloc_reference_ex(&spoolss_DeviceMode_Type, object->devmode, object->devmode);
	}
	return py_devmode;
}

static int py_spoolss_PrinterInfo2_set_devmode(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->devmode);
	if (value == Py_None) {
		object->devmode = NULL;
	} else {
		object->devmode = NULL;
		PY_CHECK_TYPE(&spoolss_DeviceMode_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->devmode = (struct spoolss_DeviceMode *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_sepfile(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_sepfile;
	if (object->sepfile == NULL) {
		py_sepfile = Py_None;
		Py_INCREF(py_sepfile);
	} else {
		py_sepfile = PyString_FromStringOrNULL(object->sepfile);
	}
	return py_sepfile;
}

static int py_spoolss_PrinterInfo2_set_sepfile(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->sepfile = NULL;
	} else {
		object->sepfile = NULL;
		object->sepfile = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_printprocessor(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_printprocessor;
	if (object->printprocessor == NULL) {
		py_printprocessor = Py_None;
		Py_INCREF(py_printprocessor);
	} else {
		py_printprocessor = PyString_FromStringOrNULL(object->printprocessor);
	}
	return py_printprocessor;
}

static int py_spoolss_PrinterInfo2_set_printprocessor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printprocessor = NULL;
	} else {
		object->printprocessor = NULL;
		object->printprocessor = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_datatype(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_datatype;
	if (object->datatype == NULL) {
		py_datatype = Py_None;
		Py_INCREF(py_datatype);
	} else {
		py_datatype = PyString_FromStringOrNULL(object->datatype);
	}
	return py_datatype;
}

static int py_spoolss_PrinterInfo2_set_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->datatype = NULL;
	} else {
		object->datatype = NULL;
		object->datatype = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_parameters(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_parameters;
	if (object->parameters == NULL) {
		py_parameters = Py_None;
		Py_INCREF(py_parameters);
	} else {
		py_parameters = PyString_FromStringOrNULL(object->parameters);
	}
	return py_parameters;
}

static int py_spoolss_PrinterInfo2_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->parameters = NULL;
	} else {
		object->parameters = NULL;
		object->parameters = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_secdesc(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_secdesc;
	if (object->secdesc == NULL) {
		py_secdesc = Py_None;
		Py_INCREF(py_secdesc);
	} else {
		py_secdesc = pytalloc_reference_ex(security_descriptor_Type, object->secdesc, object->secdesc);
	}
	return py_secdesc;
}

static int py_spoolss_PrinterInfo2_set_secdesc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->secdesc);
	if (value == Py_None) {
		object->secdesc = NULL;
	} else {
		object->secdesc = NULL;
		PY_CHECK_TYPE(security_descriptor_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->secdesc = (struct security_descriptor *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo2_get_attributes(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

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

static PyObject *py_spoolss_PrinterInfo2_get_priority(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

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

static PyObject *py_spoolss_PrinterInfo2_get_defaultpriority(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_defaultpriority;
	py_defaultpriority = PyInt_FromLong(object->defaultpriority);
	return py_defaultpriority;
}

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

static PyObject *py_spoolss_PrinterInfo2_get_starttime(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_starttime;
	py_starttime = PyInt_FromLong(object->starttime);
	return py_starttime;
}

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

static PyObject *py_spoolss_PrinterInfo2_get_untiltime(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_untiltime;
	py_untiltime = PyInt_FromLong(object->untiltime);
	return py_untiltime;
}

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

static PyObject *py_spoolss_PrinterInfo2_get_status(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_PrinterInfo2_get_cjobs(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_cjobs;
	py_cjobs = PyInt_FromLong(object->cjobs);
	return py_cjobs;
}

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

static PyObject *py_spoolss_PrinterInfo2_get_averageppm(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_averageppm;
	py_averageppm = PyInt_FromLong(object->averageppm);
	return py_averageppm;
}

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

static PyGetSetDef py_spoolss_PrinterInfo2_getsetters[] = {
	{ discard_const_p(char, "servername"), py_spoolss_PrinterInfo2_get_servername, py_spoolss_PrinterInfo2_set_servername },
	{ discard_const_p(char, "printername"), py_spoolss_PrinterInfo2_get_printername, py_spoolss_PrinterInfo2_set_printername },
	{ discard_const_p(char, "sharename"), py_spoolss_PrinterInfo2_get_sharename, py_spoolss_PrinterInfo2_set_sharename },
	{ discard_const_p(char, "portname"), py_spoolss_PrinterInfo2_get_portname, py_spoolss_PrinterInfo2_set_portname },
	{ discard_const_p(char, "drivername"), py_spoolss_PrinterInfo2_get_drivername, py_spoolss_PrinterInfo2_set_drivername },
	{ discard_const_p(char, "comment"), py_spoolss_PrinterInfo2_get_comment, py_spoolss_PrinterInfo2_set_comment },
	{ discard_const_p(char, "location"), py_spoolss_PrinterInfo2_get_location, py_spoolss_PrinterInfo2_set_location },
	{ discard_const_p(char, "devmode"), py_spoolss_PrinterInfo2_get_devmode, py_spoolss_PrinterInfo2_set_devmode },
	{ discard_const_p(char, "sepfile"), py_spoolss_PrinterInfo2_get_sepfile, py_spoolss_PrinterInfo2_set_sepfile },
	{ discard_const_p(char, "printprocessor"), py_spoolss_PrinterInfo2_get_printprocessor, py_spoolss_PrinterInfo2_set_printprocessor },
	{ discard_const_p(char, "datatype"), py_spoolss_PrinterInfo2_get_datatype, py_spoolss_PrinterInfo2_set_datatype },
	{ discard_const_p(char, "parameters"), py_spoolss_PrinterInfo2_get_parameters, py_spoolss_PrinterInfo2_set_parameters },
	{ discard_const_p(char, "secdesc"), py_spoolss_PrinterInfo2_get_secdesc, py_spoolss_PrinterInfo2_set_secdesc },
	{ discard_const_p(char, "attributes"), py_spoolss_PrinterInfo2_get_attributes, py_spoolss_PrinterInfo2_set_attributes },
	{ discard_const_p(char, "priority"), py_spoolss_PrinterInfo2_get_priority, py_spoolss_PrinterInfo2_set_priority },
	{ discard_const_p(char, "defaultpriority"), py_spoolss_PrinterInfo2_get_defaultpriority, py_spoolss_PrinterInfo2_set_defaultpriority },
	{ discard_const_p(char, "starttime"), py_spoolss_PrinterInfo2_get_starttime, py_spoolss_PrinterInfo2_set_starttime },
	{ discard_const_p(char, "untiltime"), py_spoolss_PrinterInfo2_get_untiltime, py_spoolss_PrinterInfo2_set_untiltime },
	{ discard_const_p(char, "status"), py_spoolss_PrinterInfo2_get_status, py_spoolss_PrinterInfo2_set_status },
	{ discard_const_p(char, "cjobs"), py_spoolss_PrinterInfo2_get_cjobs, py_spoolss_PrinterInfo2_set_cjobs },
	{ discard_const_p(char, "averageppm"), py_spoolss_PrinterInfo2_get_averageppm, py_spoolss_PrinterInfo2_set_averageppm },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterInfo2_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterInfo2 *object = (struct spoolss_PrinterInfo2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterInfo2, "spoolss_PrinterInfo2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrinterInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterInfo2",
	.tp_getset = py_spoolss_PrinterInfo2_getsetters,
	.tp_methods = py_spoolss_PrinterInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterInfo2_new,
};


static PyObject *py_spoolss_PrinterInfo3_get_secdesc(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo3 *object = (struct spoolss_PrinterInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_secdesc;
	if (object->secdesc == NULL) {
		py_secdesc = Py_None;
		Py_INCREF(py_secdesc);
	} else {
		py_secdesc = pytalloc_reference_ex(security_descriptor_Type, object->secdesc, object->secdesc);
	}
	return py_secdesc;
}

static int py_spoolss_PrinterInfo3_set_secdesc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo3 *object = (struct spoolss_PrinterInfo3 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->secdesc);
	if (value == Py_None) {
		object->secdesc = NULL;
	} else {
		object->secdesc = NULL;
		PY_CHECK_TYPE(security_descriptor_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->secdesc = (struct security_descriptor *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_spoolss_PrinterInfo3_getsetters[] = {
	{ discard_const_p(char, "secdesc"), py_spoolss_PrinterInfo3_get_secdesc, py_spoolss_PrinterInfo3_set_secdesc },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterInfo3_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterInfo3 *object = (struct spoolss_PrinterInfo3 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterInfo3, "spoolss_PrinterInfo3", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrinterInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterInfo3",
	.tp_getset = py_spoolss_PrinterInfo3_getsetters,
	.tp_methods = py_spoolss_PrinterInfo3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterInfo3_new,
};


static PyObject *py_spoolss_PrinterInfo4_get_printername(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo4 *object = (struct spoolss_PrinterInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_printername;
	if (object->printername == NULL) {
		py_printername = Py_None;
		Py_INCREF(py_printername);
	} else {
		py_printername = PyString_FromStringOrNULL(object->printername);
	}
	return py_printername;
}

static int py_spoolss_PrinterInfo4_set_printername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo4 *object = (struct spoolss_PrinterInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printername = NULL;
	} else {
		object->printername = NULL;
		object->printername = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo4_get_servername(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo4 *object = (struct spoolss_PrinterInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		py_servername = PyString_FromStringOrNULL(object->servername);
	}
	return py_servername;
}

static int py_spoolss_PrinterInfo4_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo4 *object = (struct spoolss_PrinterInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->servername = NULL;
	} else {
		object->servername = NULL;
		object->servername = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo4_get_attributes(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo4 *object = (struct spoolss_PrinterInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

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

static PyGetSetDef py_spoolss_PrinterInfo4_getsetters[] = {
	{ discard_const_p(char, "printername"), py_spoolss_PrinterInfo4_get_printername, py_spoolss_PrinterInfo4_set_printername },
	{ discard_const_p(char, "servername"), py_spoolss_PrinterInfo4_get_servername, py_spoolss_PrinterInfo4_set_servername },
	{ discard_const_p(char, "attributes"), py_spoolss_PrinterInfo4_get_attributes, py_spoolss_PrinterInfo4_set_attributes },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterInfo4_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterInfo4 *object = (struct spoolss_PrinterInfo4 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterInfo4, "spoolss_PrinterInfo4", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrinterInfo4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterInfo4",
	.tp_getset = py_spoolss_PrinterInfo4_getsetters,
	.tp_methods = py_spoolss_PrinterInfo4_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterInfo4_new,
};


static PyObject *py_spoolss_PrinterInfo5_get_printername(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo5 *object = (struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_printername;
	if (object->printername == NULL) {
		py_printername = Py_None;
		Py_INCREF(py_printername);
	} else {
		py_printername = PyString_FromStringOrNULL(object->printername);
	}
	return py_printername;
}

static int py_spoolss_PrinterInfo5_set_printername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo5 *object = (struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printername = NULL;
	} else {
		object->printername = NULL;
		object->printername = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo5_get_portname(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo5 *object = (struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_portname;
	if (object->portname == NULL) {
		py_portname = Py_None;
		Py_INCREF(py_portname);
	} else {
		py_portname = PyString_FromStringOrNULL(object->portname);
	}
	return py_portname;
}

static int py_spoolss_PrinterInfo5_set_portname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo5 *object = (struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->portname = NULL;
	} else {
		object->portname = NULL;
		object->portname = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo5_get_attributes(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo5 *object = (struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

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

static PyObject *py_spoolss_PrinterInfo5_get_device_not_selected_timeout(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo5 *object = (struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_device_not_selected_timeout;
	py_device_not_selected_timeout = PyInt_FromLong(object->device_not_selected_timeout);
	return py_device_not_selected_timeout;
}

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

static PyObject *py_spoolss_PrinterInfo5_get_transmission_retry_timeout(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo5 *object = (struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_transmission_retry_timeout;
	py_transmission_retry_timeout = PyInt_FromLong(object->transmission_retry_timeout);
	return py_transmission_retry_timeout;
}

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

static PyGetSetDef py_spoolss_PrinterInfo5_getsetters[] = {
	{ discard_const_p(char, "printername"), py_spoolss_PrinterInfo5_get_printername, py_spoolss_PrinterInfo5_set_printername },
	{ discard_const_p(char, "portname"), py_spoolss_PrinterInfo5_get_portname, py_spoolss_PrinterInfo5_set_portname },
	{ discard_const_p(char, "attributes"), py_spoolss_PrinterInfo5_get_attributes, py_spoolss_PrinterInfo5_set_attributes },
	{ discard_const_p(char, "device_not_selected_timeout"), py_spoolss_PrinterInfo5_get_device_not_selected_timeout, py_spoolss_PrinterInfo5_set_device_not_selected_timeout },
	{ discard_const_p(char, "transmission_retry_timeout"), py_spoolss_PrinterInfo5_get_transmission_retry_timeout, py_spoolss_PrinterInfo5_set_transmission_retry_timeout },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterInfo5_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterInfo5 *object = (struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterInfo5, "spoolss_PrinterInfo5", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrinterInfo5_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterInfo5",
	.tp_getset = py_spoolss_PrinterInfo5_getsetters,
	.tp_methods = py_spoolss_PrinterInfo5_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterInfo5_new,
};


static PyObject *py_spoolss_PrinterInfo6_get_status(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo6 *object = (struct spoolss_PrinterInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyGetSetDef py_spoolss_PrinterInfo6_getsetters[] = {
	{ discard_const_p(char, "status"), py_spoolss_PrinterInfo6_get_status, py_spoolss_PrinterInfo6_set_status },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterInfo6_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterInfo6 *object = (struct spoolss_PrinterInfo6 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterInfo6, "spoolss_PrinterInfo6", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrinterInfo6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterInfo6",
	.tp_getset = py_spoolss_PrinterInfo6_getsetters,
	.tp_methods = py_spoolss_PrinterInfo6_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterInfo6_new,
};


static PyObject *py_spoolss_PrinterInfo7_get_guid(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo7 *object = (struct spoolss_PrinterInfo7 *)pytalloc_get_ptr(obj);
	PyObject *py_guid;
	if (object->guid == NULL) {
		py_guid = Py_None;
		Py_INCREF(py_guid);
	} else {
		py_guid = PyString_FromStringOrNULL(object->guid);
	}
	return py_guid;
}

static int py_spoolss_PrinterInfo7_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo7 *object = (struct spoolss_PrinterInfo7 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->guid = NULL;
	} else {
		object->guid = NULL;
		object->guid = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterInfo7_get_action(PyObject *obj, void *closure)
{
	struct spoolss_PrinterInfo7 *object = (struct spoolss_PrinterInfo7 *)pytalloc_get_ptr(obj);
	PyObject *py_action;
	py_action = PyInt_FromLong(object->action);
	return py_action;
}

static int py_spoolss_PrinterInfo7_set_action(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterInfo7 *object = (struct spoolss_PrinterInfo7 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->action = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->action = 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_spoolss_PrinterInfo7_getsetters[] = {
	{ discard_const_p(char, "guid"), py_spoolss_PrinterInfo7_get_guid, py_spoolss_PrinterInfo7_set_guid },
	{ discard_const_p(char, "action"), py_spoolss_PrinterInfo7_get_action, py_spoolss_PrinterInfo7_set_action },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterInfo7_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterInfo7 *object = (struct spoolss_PrinterInfo7 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterInfo7, "spoolss_PrinterInfo7", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrinterInfo7_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterInfo7",
	.tp_getset = py_spoolss_PrinterInfo7_getsetters,
	.tp_methods = py_spoolss_PrinterInfo7_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterInfo7_new,
};


static PyObject *py_spoolss_DeviceModeInfo_get_devmode(PyObject *obj, void *closure)
{
	struct spoolss_DeviceModeInfo *object = (struct spoolss_DeviceModeInfo *)pytalloc_get_ptr(obj);
	PyObject *py_devmode;
	if (object->devmode == NULL) {
		py_devmode = Py_None;
		Py_INCREF(py_devmode);
	} else {
		py_devmode = pytalloc_reference_ex(&spoolss_DeviceMode_Type, object->devmode, object->devmode);
	}
	return py_devmode;
}

static int py_spoolss_DeviceModeInfo_set_devmode(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DeviceModeInfo *object = (struct spoolss_DeviceModeInfo *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->devmode);
	if (value == Py_None) {
		object->devmode = NULL;
	} else {
		object->devmode = NULL;
		PY_CHECK_TYPE(&spoolss_DeviceMode_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->devmode = (struct spoolss_DeviceMode *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_spoolss_DeviceModeInfo_getsetters[] = {
	{ discard_const_p(char, "devmode"), py_spoolss_DeviceModeInfo_get_devmode, py_spoolss_DeviceModeInfo_set_devmode },
	{ NULL }
};

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


static PyTypeObject spoolss_DeviceModeInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DeviceModeInfo",
	.tp_getset = py_spoolss_DeviceModeInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DeviceModeInfo_new,
};

PyObject *py_import_spoolss_PrinterInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_PrinterInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 0:
			ret = pytalloc_reference_ex(&spoolss_PrinterInfo0_Type, mem_ctx, &in->info0);
			return ret;

		case 1:
			ret = pytalloc_reference_ex(&spoolss_PrinterInfo1_Type, mem_ctx, &in->info1);
			return ret;

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

		case 3:
			ret = pytalloc_reference_ex(&spoolss_PrinterInfo3_Type, mem_ctx, &in->info3);
			return ret;

		case 4:
			ret = pytalloc_reference_ex(&spoolss_PrinterInfo4_Type, mem_ctx, &in->info4);
			return ret;

		case 5:
			ret = pytalloc_reference_ex(&spoolss_PrinterInfo5_Type, mem_ctx, &in->info5);
			return ret;

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

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

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

		case 9:
			ret = pytalloc_reference_ex(&spoolss_DeviceModeInfo_Type, mem_ctx, &in->info9);
			return ret;

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

union spoolss_PrinterInfo *py_export_spoolss_PrinterInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_PrinterInfo *ret = talloc_zero(mem_ctx, union spoolss_PrinterInfo);
	switch (level) {
		case 0:
			PY_CHECK_TYPE(&spoolss_PrinterInfo0_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info0 = *(struct spoolss_PrinterInfo0 *)pytalloc_get_ptr(in);
			break;

		case 1:
			PY_CHECK_TYPE(&spoolss_PrinterInfo1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info1 = *(struct spoolss_PrinterInfo1 *)pytalloc_get_ptr(in);
			break;

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

		case 3:
			PY_CHECK_TYPE(&spoolss_PrinterInfo3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info3 = *(struct spoolss_PrinterInfo3 *)pytalloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&spoolss_PrinterInfo4_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info4 = *(struct spoolss_PrinterInfo4 *)pytalloc_get_ptr(in);
			break;

		case 5:
			PY_CHECK_TYPE(&spoolss_PrinterInfo5_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info5 = *(struct spoolss_PrinterInfo5 *)pytalloc_get_ptr(in);
			break;

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

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

		case 8:
			PY_CHECK_TYPE(&spoolss_DeviceModeInfo_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->info8 = *(struct spoolss_DeviceModeInfo *)pytalloc_get_ptr(in);
			break;

		case 9:
			PY_CHECK_TYPE(&spoolss_DeviceModeInfo_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->info9 = *(struct spoolss_DeviceModeInfo *)pytalloc_get_ptr(in);
			break;

		default:
			break;

	}

	return ret;
}


static PyObject *py_spoolss_DevmodeContainer_get__ndr_size(PyObject *obj, void *closure)
{
	struct spoolss_DevmodeContainer *object = (struct spoolss_DevmodeContainer *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size;
	py__ndr_size = PyInt_FromLong(object->_ndr_size);
	return py__ndr_size;
}

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

static PyObject *py_spoolss_DevmodeContainer_get_devmode(PyObject *obj, void *closure)
{
	struct spoolss_DevmodeContainer *object = (struct spoolss_DevmodeContainer *)pytalloc_get_ptr(obj);
	PyObject *py_devmode;
	if (object->devmode == NULL) {
		py_devmode = Py_None;
		Py_INCREF(py_devmode);
	} else {
		py_devmode = pytalloc_reference_ex(&spoolss_DeviceMode_Type, object->devmode, object->devmode);
	}
	return py_devmode;
}

static int py_spoolss_DevmodeContainer_set_devmode(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DevmodeContainer *object = (struct spoolss_DevmodeContainer *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->devmode);
	if (value == Py_None) {
		object->devmode = NULL;
	} else {
		object->devmode = NULL;
		PY_CHECK_TYPE(&spoolss_DeviceMode_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->devmode = (struct spoolss_DeviceMode *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_spoolss_DevmodeContainer_getsetters[] = {
	{ discard_const_p(char, "_ndr_size"), py_spoolss_DevmodeContainer_get__ndr_size, py_spoolss_DevmodeContainer_set__ndr_size },
	{ discard_const_p(char, "devmode"), py_spoolss_DevmodeContainer_get_devmode, py_spoolss_DevmodeContainer_set_devmode },
	{ NULL }
};

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


static PyTypeObject spoolss_DevmodeContainer_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DevmodeContainer",
	.tp_getset = py_spoolss_DevmodeContainer_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DevmodeContainer_new,
};


static PyObject *py_spoolss_JobInfo1_get_job_id(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(object->job_id);
	return py_job_id;
}

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

static PyObject *py_spoolss_JobInfo1_get_printer_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_printer_name;
	if (object->printer_name == NULL) {
		py_printer_name = Py_None;
		Py_INCREF(py_printer_name);
	} else {
		py_printer_name = PyString_FromStringOrNULL(object->printer_name);
	}
	return py_printer_name;
}

static int py_spoolss_JobInfo1_set_printer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printer_name = NULL;
	} else {
		object->printer_name = NULL;
		object->printer_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo1_get_server_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		py_server_name = PyString_FromStringOrNULL(object->server_name);
	}
	return py_server_name;
}

static int py_spoolss_JobInfo1_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_name = NULL;
	} else {
		object->server_name = NULL;
		object->server_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo1_get_user_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_user_name;
	if (object->user_name == NULL) {
		py_user_name = Py_None;
		Py_INCREF(py_user_name);
	} else {
		py_user_name = PyString_FromStringOrNULL(object->user_name);
	}
	return py_user_name;
}

static int py_spoolss_JobInfo1_set_user_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->user_name = NULL;
	} else {
		object->user_name = NULL;
		object->user_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo1_get_document_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_document_name;
	if (object->document_name == NULL) {
		py_document_name = Py_None;
		Py_INCREF(py_document_name);
	} else {
		py_document_name = PyString_FromStringOrNULL(object->document_name);
	}
	return py_document_name;
}

static int py_spoolss_JobInfo1_set_document_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->document_name = NULL;
	} else {
		object->document_name = NULL;
		object->document_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo1_get_data_type(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_data_type;
	if (object->data_type == NULL) {
		py_data_type = Py_None;
		Py_INCREF(py_data_type);
	} else {
		py_data_type = PyString_FromStringOrNULL(object->data_type);
	}
	return py_data_type;
}

static int py_spoolss_JobInfo1_set_data_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_type = NULL;
	} else {
		object->data_type = NULL;
		object->data_type = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo1_get_text_status(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_text_status;
	if (object->text_status == NULL) {
		py_text_status = Py_None;
		Py_INCREF(py_text_status);
	} else {
		py_text_status = PyString_FromStringOrNULL(object->text_status);
	}
	return py_text_status;
}

static int py_spoolss_JobInfo1_set_text_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->text_status = NULL;
	} else {
		object->text_status = NULL;
		object->text_status = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo1_get_status(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_JobInfo1_get_priority(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

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

static PyObject *py_spoolss_JobInfo1_get_position(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_position;
	py_position = PyInt_FromLong(object->position);
	return py_position;
}

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

static PyObject *py_spoolss_JobInfo1_get_total_pages(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_total_pages;
	py_total_pages = PyInt_FromLong(object->total_pages);
	return py_total_pages;
}

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

static PyObject *py_spoolss_JobInfo1_get_pages_printed(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_pages_printed;
	py_pages_printed = PyInt_FromLong(object->pages_printed);
	return py_pages_printed;
}

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

static PyObject *py_spoolss_JobInfo1_get_submitted(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_submitted;
	py_submitted = pytalloc_reference_ex(&spoolss_Time_Type, pytalloc_get_mem_ctx(obj), &object->submitted);
	return py_submitted;
}

static int py_spoolss_JobInfo1_set_submitted(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->submitted = *(struct spoolss_Time *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_spoolss_JobInfo1_getsetters[] = {
	{ discard_const_p(char, "job_id"), py_spoolss_JobInfo1_get_job_id, py_spoolss_JobInfo1_set_job_id },
	{ discard_const_p(char, "printer_name"), py_spoolss_JobInfo1_get_printer_name, py_spoolss_JobInfo1_set_printer_name },
	{ discard_const_p(char, "server_name"), py_spoolss_JobInfo1_get_server_name, py_spoolss_JobInfo1_set_server_name },
	{ discard_const_p(char, "user_name"), py_spoolss_JobInfo1_get_user_name, py_spoolss_JobInfo1_set_user_name },
	{ discard_const_p(char, "document_name"), py_spoolss_JobInfo1_get_document_name, py_spoolss_JobInfo1_set_document_name },
	{ discard_const_p(char, "data_type"), py_spoolss_JobInfo1_get_data_type, py_spoolss_JobInfo1_set_data_type },
	{ discard_const_p(char, "text_status"), py_spoolss_JobInfo1_get_text_status, py_spoolss_JobInfo1_set_text_status },
	{ discard_const_p(char, "status"), py_spoolss_JobInfo1_get_status, py_spoolss_JobInfo1_set_status },
	{ discard_const_p(char, "priority"), py_spoolss_JobInfo1_get_priority, py_spoolss_JobInfo1_set_priority },
	{ discard_const_p(char, "position"), py_spoolss_JobInfo1_get_position, py_spoolss_JobInfo1_set_position },
	{ discard_const_p(char, "total_pages"), py_spoolss_JobInfo1_get_total_pages, py_spoolss_JobInfo1_set_total_pages },
	{ discard_const_p(char, "pages_printed"), py_spoolss_JobInfo1_get_pages_printed, py_spoolss_JobInfo1_set_pages_printed },
	{ discard_const_p(char, "submitted"), py_spoolss_JobInfo1_get_submitted, py_spoolss_JobInfo1_set_submitted },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_JobInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_JobInfo1 *object = (struct spoolss_JobInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_JobInfo1, "spoolss_JobInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_JobInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.JobInfo1",
	.tp_getset = py_spoolss_JobInfo1_getsetters,
	.tp_methods = py_spoolss_JobInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_JobInfo1_new,
};


static PyObject *py_spoolss_JobInfo2_get_job_id(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(object->job_id);
	return py_job_id;
}

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

static PyObject *py_spoolss_JobInfo2_get_printer_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_printer_name;
	if (object->printer_name == NULL) {
		py_printer_name = Py_None;
		Py_INCREF(py_printer_name);
	} else {
		py_printer_name = PyString_FromStringOrNULL(object->printer_name);
	}
	return py_printer_name;
}

static int py_spoolss_JobInfo2_set_printer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printer_name = NULL;
	} else {
		object->printer_name = NULL;
		object->printer_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_server_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		py_server_name = PyString_FromStringOrNULL(object->server_name);
	}
	return py_server_name;
}

static int py_spoolss_JobInfo2_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_name = NULL;
	} else {
		object->server_name = NULL;
		object->server_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_user_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_user_name;
	if (object->user_name == NULL) {
		py_user_name = Py_None;
		Py_INCREF(py_user_name);
	} else {
		py_user_name = PyString_FromStringOrNULL(object->user_name);
	}
	return py_user_name;
}

static int py_spoolss_JobInfo2_set_user_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->user_name = NULL;
	} else {
		object->user_name = NULL;
		object->user_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_document_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_document_name;
	if (object->document_name == NULL) {
		py_document_name = Py_None;
		Py_INCREF(py_document_name);
	} else {
		py_document_name = PyString_FromStringOrNULL(object->document_name);
	}
	return py_document_name;
}

static int py_spoolss_JobInfo2_set_document_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->document_name = NULL;
	} else {
		object->document_name = NULL;
		object->document_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_notify_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_notify_name;
	if (object->notify_name == NULL) {
		py_notify_name = Py_None;
		Py_INCREF(py_notify_name);
	} else {
		py_notify_name = PyString_FromStringOrNULL(object->notify_name);
	}
	return py_notify_name;
}

static int py_spoolss_JobInfo2_set_notify_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->notify_name = NULL;
	} else {
		object->notify_name = NULL;
		object->notify_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_data_type(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_data_type;
	if (object->data_type == NULL) {
		py_data_type = Py_None;
		Py_INCREF(py_data_type);
	} else {
		py_data_type = PyString_FromStringOrNULL(object->data_type);
	}
	return py_data_type;
}

static int py_spoolss_JobInfo2_set_data_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_type = NULL;
	} else {
		object->data_type = NULL;
		object->data_type = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_print_processor(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_print_processor;
	if (object->print_processor == NULL) {
		py_print_processor = Py_None;
		Py_INCREF(py_print_processor);
	} else {
		py_print_processor = PyString_FromStringOrNULL(object->print_processor);
	}
	return py_print_processor;
}

static int py_spoolss_JobInfo2_set_print_processor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->print_processor = NULL;
	} else {
		object->print_processor = NULL;
		object->print_processor = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_parameters(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_parameters;
	if (object->parameters == NULL) {
		py_parameters = Py_None;
		Py_INCREF(py_parameters);
	} else {
		py_parameters = PyString_FromStringOrNULL(object->parameters);
	}
	return py_parameters;
}

static int py_spoolss_JobInfo2_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->parameters = NULL;
	} else {
		object->parameters = NULL;
		object->parameters = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_JobInfo2_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_devmode(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_devmode;
	if (object->devmode == NULL) {
		py_devmode = Py_None;
		Py_INCREF(py_devmode);
	} else {
		py_devmode = pytalloc_reference_ex(&spoolss_DeviceMode_Type, object->devmode, object->devmode);
	}
	return py_devmode;
}

static int py_spoolss_JobInfo2_set_devmode(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->devmode);
	if (value == Py_None) {
		object->devmode = NULL;
	} else {
		object->devmode = NULL;
		PY_CHECK_TYPE(&spoolss_DeviceMode_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->devmode = (struct spoolss_DeviceMode *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_text_status(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_text_status;
	if (object->text_status == NULL) {
		py_text_status = Py_None;
		Py_INCREF(py_text_status);
	} else {
		py_text_status = PyString_FromStringOrNULL(object->text_status);
	}
	return py_text_status;
}

static int py_spoolss_JobInfo2_set_text_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->text_status = NULL;
	} else {
		object->text_status = NULL;
		object->text_status = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_secdesc(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_secdesc;
	if (object->secdesc == NULL) {
		py_secdesc = Py_None;
		Py_INCREF(py_secdesc);
	} else {
		py_secdesc = pytalloc_reference_ex(security_descriptor_Type, object->secdesc, object->secdesc);
	}
	return py_secdesc;
}

static int py_spoolss_JobInfo2_set_secdesc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->secdesc);
	if (value == Py_None) {
		object->secdesc = NULL;
	} else {
		object->secdesc = NULL;
		PY_CHECK_TYPE(security_descriptor_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->secdesc = (struct security_descriptor *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_status(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_JobInfo2_get_priority(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

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

static PyObject *py_spoolss_JobInfo2_get_position(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_position;
	py_position = PyInt_FromLong(object->position);
	return py_position;
}

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

static PyObject *py_spoolss_JobInfo2_get_start_time(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_start_time;
	py_start_time = PyInt_FromLong(object->start_time);
	return py_start_time;
}

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

static PyObject *py_spoolss_JobInfo2_get_until_time(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_until_time;
	py_until_time = PyInt_FromLong(object->until_time);
	return py_until_time;
}

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

static PyObject *py_spoolss_JobInfo2_get_total_pages(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_total_pages;
	py_total_pages = PyInt_FromLong(object->total_pages);
	return py_total_pages;
}

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

static PyObject *py_spoolss_JobInfo2_get_size(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

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

static PyObject *py_spoolss_JobInfo2_get_submitted(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_submitted;
	py_submitted = pytalloc_reference_ex(&spoolss_Time_Type, pytalloc_get_mem_ctx(obj), &object->submitted);
	return py_submitted;
}

static int py_spoolss_JobInfo2_set_submitted(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->submitted = *(struct spoolss_Time *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_JobInfo2_get_time(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_time;
	py_time = PyInt_FromLong(object->time);
	return py_time;
}

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

static PyObject *py_spoolss_JobInfo2_get_pages_printed(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_pages_printed;
	py_pages_printed = PyInt_FromLong(object->pages_printed);
	return py_pages_printed;
}

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

static PyGetSetDef py_spoolss_JobInfo2_getsetters[] = {
	{ discard_const_p(char, "job_id"), py_spoolss_JobInfo2_get_job_id, py_spoolss_JobInfo2_set_job_id },
	{ discard_const_p(char, "printer_name"), py_spoolss_JobInfo2_get_printer_name, py_spoolss_JobInfo2_set_printer_name },
	{ discard_const_p(char, "server_name"), py_spoolss_JobInfo2_get_server_name, py_spoolss_JobInfo2_set_server_name },
	{ discard_const_p(char, "user_name"), py_spoolss_JobInfo2_get_user_name, py_spoolss_JobInfo2_set_user_name },
	{ discard_const_p(char, "document_name"), py_spoolss_JobInfo2_get_document_name, py_spoolss_JobInfo2_set_document_name },
	{ discard_const_p(char, "notify_name"), py_spoolss_JobInfo2_get_notify_name, py_spoolss_JobInfo2_set_notify_name },
	{ discard_const_p(char, "data_type"), py_spoolss_JobInfo2_get_data_type, py_spoolss_JobInfo2_set_data_type },
	{ discard_const_p(char, "print_processor"), py_spoolss_JobInfo2_get_print_processor, py_spoolss_JobInfo2_set_print_processor },
	{ discard_const_p(char, "parameters"), py_spoolss_JobInfo2_get_parameters, py_spoolss_JobInfo2_set_parameters },
	{ discard_const_p(char, "driver_name"), py_spoolss_JobInfo2_get_driver_name, py_spoolss_JobInfo2_set_driver_name },
	{ discard_const_p(char, "devmode"), py_spoolss_JobInfo2_get_devmode, py_spoolss_JobInfo2_set_devmode },
	{ discard_const_p(char, "text_status"), py_spoolss_JobInfo2_get_text_status, py_spoolss_JobInfo2_set_text_status },
	{ discard_const_p(char, "secdesc"), py_spoolss_JobInfo2_get_secdesc, py_spoolss_JobInfo2_set_secdesc },
	{ discard_const_p(char, "status"), py_spoolss_JobInfo2_get_status, py_spoolss_JobInfo2_set_status },
	{ discard_const_p(char, "priority"), py_spoolss_JobInfo2_get_priority, py_spoolss_JobInfo2_set_priority },
	{ discard_const_p(char, "position"), py_spoolss_JobInfo2_get_position, py_spoolss_JobInfo2_set_position },
	{ discard_const_p(char, "start_time"), py_spoolss_JobInfo2_get_start_time, py_spoolss_JobInfo2_set_start_time },
	{ discard_const_p(char, "until_time"), py_spoolss_JobInfo2_get_until_time, py_spoolss_JobInfo2_set_until_time },
	{ discard_const_p(char, "total_pages"), py_spoolss_JobInfo2_get_total_pages, py_spoolss_JobInfo2_set_total_pages },
	{ discard_const_p(char, "size"), py_spoolss_JobInfo2_get_size, py_spoolss_JobInfo2_set_size },
	{ discard_const_p(char, "submitted"), py_spoolss_JobInfo2_get_submitted, py_spoolss_JobInfo2_set_submitted },
	{ discard_const_p(char, "time"), py_spoolss_JobInfo2_get_time, py_spoolss_JobInfo2_set_time },
	{ discard_const_p(char, "pages_printed"), py_spoolss_JobInfo2_get_pages_printed, py_spoolss_JobInfo2_set_pages_printed },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_JobInfo2_ndr_print(PyObject *py_obj)
{
	struct spoolss_JobInfo2 *object = (struct spoolss_JobInfo2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_JobInfo2, "spoolss_JobInfo2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_JobInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.JobInfo2",
	.tp_getset = py_spoolss_JobInfo2_getsetters,
	.tp_methods = py_spoolss_JobInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_JobInfo2_new,
};


static PyObject *py_spoolss_JobInfo3_get_job_id(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo3 *object = (struct spoolss_JobInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(object->job_id);
	return py_job_id;
}

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

static PyObject *py_spoolss_JobInfo3_get_next_job_id(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo3 *object = (struct spoolss_JobInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_next_job_id;
	py_next_job_id = PyInt_FromLong(object->next_job_id);
	return py_next_job_id;
}

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

static PyObject *py_spoolss_JobInfo3_get_reserved(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo3 *object = (struct spoolss_JobInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

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

static PyGetSetDef py_spoolss_JobInfo3_getsetters[] = {
	{ discard_const_p(char, "job_id"), py_spoolss_JobInfo3_get_job_id, py_spoolss_JobInfo3_set_job_id },
	{ discard_const_p(char, "next_job_id"), py_spoolss_JobInfo3_get_next_job_id, py_spoolss_JobInfo3_set_next_job_id },
	{ discard_const_p(char, "reserved"), py_spoolss_JobInfo3_get_reserved, py_spoolss_JobInfo3_set_reserved },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_JobInfo3_ndr_print(PyObject *py_obj)
{
	struct spoolss_JobInfo3 *object = (struct spoolss_JobInfo3 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_JobInfo3, "spoolss_JobInfo3", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_JobInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.JobInfo3",
	.tp_getset = py_spoolss_JobInfo3_getsetters,
	.tp_methods = py_spoolss_JobInfo3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_JobInfo3_new,
};


static PyObject *py_spoolss_JobInfo4_get_job_id(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(object->job_id);
	return py_job_id;
}

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

static PyObject *py_spoolss_JobInfo4_get_printer_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_printer_name;
	if (object->printer_name == NULL) {
		py_printer_name = Py_None;
		Py_INCREF(py_printer_name);
	} else {
		py_printer_name = PyString_FromStringOrNULL(object->printer_name);
	}
	return py_printer_name;
}

static int py_spoolss_JobInfo4_set_printer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printer_name = NULL;
	} else {
		object->printer_name = NULL;
		object->printer_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_server_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		py_server_name = PyString_FromStringOrNULL(object->server_name);
	}
	return py_server_name;
}

static int py_spoolss_JobInfo4_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_name = NULL;
	} else {
		object->server_name = NULL;
		object->server_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_user_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_user_name;
	if (object->user_name == NULL) {
		py_user_name = Py_None;
		Py_INCREF(py_user_name);
	} else {
		py_user_name = PyString_FromStringOrNULL(object->user_name);
	}
	return py_user_name;
}

static int py_spoolss_JobInfo4_set_user_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->user_name = NULL;
	} else {
		object->user_name = NULL;
		object->user_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_document_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_document_name;
	if (object->document_name == NULL) {
		py_document_name = Py_None;
		Py_INCREF(py_document_name);
	} else {
		py_document_name = PyString_FromStringOrNULL(object->document_name);
	}
	return py_document_name;
}

static int py_spoolss_JobInfo4_set_document_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->document_name = NULL;
	} else {
		object->document_name = NULL;
		object->document_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_notify_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_notify_name;
	if (object->notify_name == NULL) {
		py_notify_name = Py_None;
		Py_INCREF(py_notify_name);
	} else {
		py_notify_name = PyString_FromStringOrNULL(object->notify_name);
	}
	return py_notify_name;
}

static int py_spoolss_JobInfo4_set_notify_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->notify_name = NULL;
	} else {
		object->notify_name = NULL;
		object->notify_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_data_type(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_data_type;
	if (object->data_type == NULL) {
		py_data_type = Py_None;
		Py_INCREF(py_data_type);
	} else {
		py_data_type = PyString_FromStringOrNULL(object->data_type);
	}
	return py_data_type;
}

static int py_spoolss_JobInfo4_set_data_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_type = NULL;
	} else {
		object->data_type = NULL;
		object->data_type = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_print_processor(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_print_processor;
	if (object->print_processor == NULL) {
		py_print_processor = Py_None;
		Py_INCREF(py_print_processor);
	} else {
		py_print_processor = PyString_FromStringOrNULL(object->print_processor);
	}
	return py_print_processor;
}

static int py_spoolss_JobInfo4_set_print_processor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->print_processor = NULL;
	} else {
		object->print_processor = NULL;
		object->print_processor = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_parameters(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_parameters;
	if (object->parameters == NULL) {
		py_parameters = Py_None;
		Py_INCREF(py_parameters);
	} else {
		py_parameters = PyString_FromStringOrNULL(object->parameters);
	}
	return py_parameters;
}

static int py_spoolss_JobInfo4_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->parameters = NULL;
	} else {
		object->parameters = NULL;
		object->parameters = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_JobInfo4_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_devmode(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_devmode;
	if (object->devmode == NULL) {
		py_devmode = Py_None;
		Py_INCREF(py_devmode);
	} else {
		py_devmode = pytalloc_reference_ex(&spoolss_DeviceMode_Type, object->devmode, object->devmode);
	}
	return py_devmode;
}

static int py_spoolss_JobInfo4_set_devmode(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->devmode);
	if (value == Py_None) {
		object->devmode = NULL;
	} else {
		object->devmode = NULL;
		PY_CHECK_TYPE(&spoolss_DeviceMode_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->devmode = (struct spoolss_DeviceMode *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_text_status(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_text_status;
	if (object->text_status == NULL) {
		py_text_status = Py_None;
		Py_INCREF(py_text_status);
	} else {
		py_text_status = PyString_FromStringOrNULL(object->text_status);
	}
	return py_text_status;
}

static int py_spoolss_JobInfo4_set_text_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->text_status = NULL;
	} else {
		object->text_status = NULL;
		object->text_status = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_secdesc(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_secdesc;
	if (object->secdesc == NULL) {
		py_secdesc = Py_None;
		Py_INCREF(py_secdesc);
	} else {
		py_secdesc = pytalloc_reference_ex(security_descriptor_Type, object->secdesc, object->secdesc);
	}
	return py_secdesc;
}

static int py_spoolss_JobInfo4_set_secdesc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->secdesc);
	if (value == Py_None) {
		object->secdesc = NULL;
	} else {
		object->secdesc = NULL;
		PY_CHECK_TYPE(security_descriptor_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->secdesc = (struct security_descriptor *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_status(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_JobInfo4_get_priority(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

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

static PyObject *py_spoolss_JobInfo4_get_position(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_position;
	py_position = PyInt_FromLong(object->position);
	return py_position;
}

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

static PyObject *py_spoolss_JobInfo4_get_start_time(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_start_time;
	py_start_time = PyInt_FromLong(object->start_time);
	return py_start_time;
}

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

static PyObject *py_spoolss_JobInfo4_get_until_time(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_until_time;
	py_until_time = PyInt_FromLong(object->until_time);
	return py_until_time;
}

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

static PyObject *py_spoolss_JobInfo4_get_total_pages(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_total_pages;
	py_total_pages = PyInt_FromLong(object->total_pages);
	return py_total_pages;
}

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

static PyObject *py_spoolss_JobInfo4_get_size(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

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

static PyObject *py_spoolss_JobInfo4_get_submitted(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_submitted;
	py_submitted = pytalloc_reference_ex(&spoolss_Time_Type, pytalloc_get_mem_ctx(obj), &object->submitted);
	return py_submitted;
}

static int py_spoolss_JobInfo4_set_submitted(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->submitted = *(struct spoolss_Time *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_JobInfo4_get_time(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_time;
	py_time = PyInt_FromLong(object->time);
	return py_time;
}

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

static PyObject *py_spoolss_JobInfo4_get_pages_printed(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_pages_printed;
	py_pages_printed = PyInt_FromLong(object->pages_printed);
	return py_pages_printed;
}

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

static PyObject *py_spoolss_JobInfo4_get_size_high(PyObject *obj, void *closure)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_size_high;
	py_size_high = PyInt_FromLong(object->size_high);
	return py_size_high;
}

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

static PyGetSetDef py_spoolss_JobInfo4_getsetters[] = {
	{ discard_const_p(char, "job_id"), py_spoolss_JobInfo4_get_job_id, py_spoolss_JobInfo4_set_job_id },
	{ discard_const_p(char, "printer_name"), py_spoolss_JobInfo4_get_printer_name, py_spoolss_JobInfo4_set_printer_name },
	{ discard_const_p(char, "server_name"), py_spoolss_JobInfo4_get_server_name, py_spoolss_JobInfo4_set_server_name },
	{ discard_const_p(char, "user_name"), py_spoolss_JobInfo4_get_user_name, py_spoolss_JobInfo4_set_user_name },
	{ discard_const_p(char, "document_name"), py_spoolss_JobInfo4_get_document_name, py_spoolss_JobInfo4_set_document_name },
	{ discard_const_p(char, "notify_name"), py_spoolss_JobInfo4_get_notify_name, py_spoolss_JobInfo4_set_notify_name },
	{ discard_const_p(char, "data_type"), py_spoolss_JobInfo4_get_data_type, py_spoolss_JobInfo4_set_data_type },
	{ discard_const_p(char, "print_processor"), py_spoolss_JobInfo4_get_print_processor, py_spoolss_JobInfo4_set_print_processor },
	{ discard_const_p(char, "parameters"), py_spoolss_JobInfo4_get_parameters, py_spoolss_JobInfo4_set_parameters },
	{ discard_const_p(char, "driver_name"), py_spoolss_JobInfo4_get_driver_name, py_spoolss_JobInfo4_set_driver_name },
	{ discard_const_p(char, "devmode"), py_spoolss_JobInfo4_get_devmode, py_spoolss_JobInfo4_set_devmode },
	{ discard_const_p(char, "text_status"), py_spoolss_JobInfo4_get_text_status, py_spoolss_JobInfo4_set_text_status },
	{ discard_const_p(char, "secdesc"), py_spoolss_JobInfo4_get_secdesc, py_spoolss_JobInfo4_set_secdesc },
	{ discard_const_p(char, "status"), py_spoolss_JobInfo4_get_status, py_spoolss_JobInfo4_set_status },
	{ discard_const_p(char, "priority"), py_spoolss_JobInfo4_get_priority, py_spoolss_JobInfo4_set_priority },
	{ discard_const_p(char, "position"), py_spoolss_JobInfo4_get_position, py_spoolss_JobInfo4_set_position },
	{ discard_const_p(char, "start_time"), py_spoolss_JobInfo4_get_start_time, py_spoolss_JobInfo4_set_start_time },
	{ discard_const_p(char, "until_time"), py_spoolss_JobInfo4_get_until_time, py_spoolss_JobInfo4_set_until_time },
	{ discard_const_p(char, "total_pages"), py_spoolss_JobInfo4_get_total_pages, py_spoolss_JobInfo4_set_total_pages },
	{ discard_const_p(char, "size"), py_spoolss_JobInfo4_get_size, py_spoolss_JobInfo4_set_size },
	{ discard_const_p(char, "submitted"), py_spoolss_JobInfo4_get_submitted, py_spoolss_JobInfo4_set_submitted },
	{ discard_const_p(char, "time"), py_spoolss_JobInfo4_get_time, py_spoolss_JobInfo4_set_time },
	{ discard_const_p(char, "pages_printed"), py_spoolss_JobInfo4_get_pages_printed, py_spoolss_JobInfo4_set_pages_printed },
	{ discard_const_p(char, "size_high"), py_spoolss_JobInfo4_get_size_high, py_spoolss_JobInfo4_set_size_high },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_JobInfo4_ndr_print(PyObject *py_obj)
{
	struct spoolss_JobInfo4 *object = (struct spoolss_JobInfo4 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_JobInfo4, "spoolss_JobInfo4", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_JobInfo4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.JobInfo4",
	.tp_getset = py_spoolss_JobInfo4_getsetters,
	.tp_methods = py_spoolss_JobInfo4_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_JobInfo4_new,
};

PyObject *py_import_spoolss_JobInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_JobInfo *in)
{
	PyObject *ret;

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

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

		case 3:
			ret = pytalloc_reference_ex(&spoolss_JobInfo3_Type, mem_ctx, &in->info3);
			return ret;

		case 4:
			ret = pytalloc_reference_ex(&spoolss_JobInfo4_Type, mem_ctx, &in->info4);
			return ret;

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

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

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

		case 3:
			PY_CHECK_TYPE(&spoolss_JobInfo3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info3 = *(struct spoolss_JobInfo3 *)pytalloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&spoolss_JobInfo4_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info4 = *(struct spoolss_JobInfo4 *)pytalloc_get_ptr(in);
			break;

		default:
			break;

	}

	return ret;
}


static PyObject *py_spoolss_SetJobInfo1_get_job_id(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(object->job_id);
	return py_job_id;
}

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

static PyObject *py_spoolss_SetJobInfo1_get_printer_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_printer_name;
	if (object->printer_name == NULL) {
		py_printer_name = Py_None;
		Py_INCREF(py_printer_name);
	} else {
		if (object->printer_name == NULL) {
			py_printer_name = Py_None;
			Py_INCREF(py_printer_name);
		} else {
			py_printer_name = PyUnicode_Decode(object->printer_name, strlen(object->printer_name), "utf-8", "ignore");
		}
	}
	return py_printer_name;
}

static int py_spoolss_SetJobInfo1_set_printer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printer_name = NULL;
	} else {
		object->printer_name = NULL;
		if (PyUnicode_Check(value)) {
			object->printer_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->printer_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_spoolss_SetJobInfo1_get_server_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_spoolss_SetJobInfo1_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_name = NULL;
	} else {
		object->server_name = NULL;
		if (PyUnicode_Check(value)) {
			object->server_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->server_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_spoolss_SetJobInfo1_get_user_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_user_name;
	if (object->user_name == NULL) {
		py_user_name = Py_None;
		Py_INCREF(py_user_name);
	} else {
		if (object->user_name == NULL) {
			py_user_name = Py_None;
			Py_INCREF(py_user_name);
		} else {
			py_user_name = PyUnicode_Decode(object->user_name, strlen(object->user_name), "utf-8", "ignore");
		}
	}
	return py_user_name;
}

static int py_spoolss_SetJobInfo1_set_user_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->user_name = NULL;
	} else {
		object->user_name = NULL;
		if (PyUnicode_Check(value)) {
			object->user_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->user_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_spoolss_SetJobInfo1_get_document_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_document_name;
	if (object->document_name == NULL) {
		py_document_name = Py_None;
		Py_INCREF(py_document_name);
	} else {
		if (object->document_name == NULL) {
			py_document_name = Py_None;
			Py_INCREF(py_document_name);
		} else {
			py_document_name = PyUnicode_Decode(object->document_name, strlen(object->document_name), "utf-8", "ignore");
		}
	}
	return py_document_name;
}

static int py_spoolss_SetJobInfo1_set_document_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->document_name = NULL;
	} else {
		object->document_name = NULL;
		if (PyUnicode_Check(value)) {
			object->document_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->document_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_spoolss_SetJobInfo1_get_data_type(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_data_type;
	if (object->data_type == NULL) {
		py_data_type = Py_None;
		Py_INCREF(py_data_type);
	} else {
		if (object->data_type == NULL) {
			py_data_type = Py_None;
			Py_INCREF(py_data_type);
		} else {
			py_data_type = PyUnicode_Decode(object->data_type, strlen(object->data_type), "utf-8", "ignore");
		}
	}
	return py_data_type;
}

static int py_spoolss_SetJobInfo1_set_data_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_type = NULL;
	} else {
		object->data_type = NULL;
		if (PyUnicode_Check(value)) {
			object->data_type = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_type = 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_spoolss_SetJobInfo1_get_text_status(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_text_status;
	if (object->text_status == NULL) {
		py_text_status = Py_None;
		Py_INCREF(py_text_status);
	} else {
		if (object->text_status == NULL) {
			py_text_status = Py_None;
			Py_INCREF(py_text_status);
		} else {
			py_text_status = PyUnicode_Decode(object->text_status, strlen(object->text_status), "utf-8", "ignore");
		}
	}
	return py_text_status;
}

static int py_spoolss_SetJobInfo1_set_text_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->text_status = NULL;
	} else {
		object->text_status = NULL;
		if (PyUnicode_Check(value)) {
			object->text_status = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->text_status = 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_spoolss_SetJobInfo1_get_status(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_SetJobInfo1_get_priority(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

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

static PyObject *py_spoolss_SetJobInfo1_get_position(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_position;
	py_position = PyInt_FromLong(object->position);
	return py_position;
}

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

static PyObject *py_spoolss_SetJobInfo1_get_total_pages(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_total_pages;
	py_total_pages = PyInt_FromLong(object->total_pages);
	return py_total_pages;
}

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

static PyObject *py_spoolss_SetJobInfo1_get_pages_printed(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_pages_printed;
	py_pages_printed = PyInt_FromLong(object->pages_printed);
	return py_pages_printed;
}

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

static PyObject *py_spoolss_SetJobInfo1_get_submitted(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_submitted;
	py_submitted = pytalloc_reference_ex(&spoolss_Time_Type, pytalloc_get_mem_ctx(obj), &object->submitted);
	return py_submitted;
}

static int py_spoolss_SetJobInfo1_set_submitted(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo1 *object = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->submitted = *(struct spoolss_Time *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_spoolss_SetJobInfo1_getsetters[] = {
	{ discard_const_p(char, "job_id"), py_spoolss_SetJobInfo1_get_job_id, py_spoolss_SetJobInfo1_set_job_id },
	{ discard_const_p(char, "printer_name"), py_spoolss_SetJobInfo1_get_printer_name, py_spoolss_SetJobInfo1_set_printer_name },
	{ discard_const_p(char, "server_name"), py_spoolss_SetJobInfo1_get_server_name, py_spoolss_SetJobInfo1_set_server_name },
	{ discard_const_p(char, "user_name"), py_spoolss_SetJobInfo1_get_user_name, py_spoolss_SetJobInfo1_set_user_name },
	{ discard_const_p(char, "document_name"), py_spoolss_SetJobInfo1_get_document_name, py_spoolss_SetJobInfo1_set_document_name },
	{ discard_const_p(char, "data_type"), py_spoolss_SetJobInfo1_get_data_type, py_spoolss_SetJobInfo1_set_data_type },
	{ discard_const_p(char, "text_status"), py_spoolss_SetJobInfo1_get_text_status, py_spoolss_SetJobInfo1_set_text_status },
	{ discard_const_p(char, "status"), py_spoolss_SetJobInfo1_get_status, py_spoolss_SetJobInfo1_set_status },
	{ discard_const_p(char, "priority"), py_spoolss_SetJobInfo1_get_priority, py_spoolss_SetJobInfo1_set_priority },
	{ discard_const_p(char, "position"), py_spoolss_SetJobInfo1_get_position, py_spoolss_SetJobInfo1_set_position },
	{ discard_const_p(char, "total_pages"), py_spoolss_SetJobInfo1_get_total_pages, py_spoolss_SetJobInfo1_set_total_pages },
	{ discard_const_p(char, "pages_printed"), py_spoolss_SetJobInfo1_get_pages_printed, py_spoolss_SetJobInfo1_set_pages_printed },
	{ discard_const_p(char, "submitted"), py_spoolss_SetJobInfo1_get_submitted, py_spoolss_SetJobInfo1_set_submitted },
	{ NULL }
};

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


static PyTypeObject spoolss_SetJobInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetJobInfo1",
	.tp_getset = py_spoolss_SetJobInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetJobInfo1_new,
};


static PyObject *py_spoolss_SetJobInfo2_get_job_id(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(object->job_id);
	return py_job_id;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_printer_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_printer_name;
	if (object->printer_name == NULL) {
		py_printer_name = Py_None;
		Py_INCREF(py_printer_name);
	} else {
		if (object->printer_name == NULL) {
			py_printer_name = Py_None;
			Py_INCREF(py_printer_name);
		} else {
			py_printer_name = PyUnicode_Decode(object->printer_name, strlen(object->printer_name), "utf-8", "ignore");
		}
	}
	return py_printer_name;
}

static int py_spoolss_SetJobInfo2_set_printer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printer_name = NULL;
	} else {
		object->printer_name = NULL;
		if (PyUnicode_Check(value)) {
			object->printer_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->printer_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_spoolss_SetJobInfo2_get_server_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_spoolss_SetJobInfo2_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_name = NULL;
	} else {
		object->server_name = NULL;
		if (PyUnicode_Check(value)) {
			object->server_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->server_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_spoolss_SetJobInfo2_get_user_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_user_name;
	if (object->user_name == NULL) {
		py_user_name = Py_None;
		Py_INCREF(py_user_name);
	} else {
		if (object->user_name == NULL) {
			py_user_name = Py_None;
			Py_INCREF(py_user_name);
		} else {
			py_user_name = PyUnicode_Decode(object->user_name, strlen(object->user_name), "utf-8", "ignore");
		}
	}
	return py_user_name;
}

static int py_spoolss_SetJobInfo2_set_user_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->user_name = NULL;
	} else {
		object->user_name = NULL;
		if (PyUnicode_Check(value)) {
			object->user_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->user_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_spoolss_SetJobInfo2_get_document_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_document_name;
	if (object->document_name == NULL) {
		py_document_name = Py_None;
		Py_INCREF(py_document_name);
	} else {
		if (object->document_name == NULL) {
			py_document_name = Py_None;
			Py_INCREF(py_document_name);
		} else {
			py_document_name = PyUnicode_Decode(object->document_name, strlen(object->document_name), "utf-8", "ignore");
		}
	}
	return py_document_name;
}

static int py_spoolss_SetJobInfo2_set_document_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->document_name = NULL;
	} else {
		object->document_name = NULL;
		if (PyUnicode_Check(value)) {
			object->document_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->document_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_spoolss_SetJobInfo2_get_notify_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_notify_name;
	if (object->notify_name == NULL) {
		py_notify_name = Py_None;
		Py_INCREF(py_notify_name);
	} else {
		if (object->notify_name == NULL) {
			py_notify_name = Py_None;
			Py_INCREF(py_notify_name);
		} else {
			py_notify_name = PyUnicode_Decode(object->notify_name, strlen(object->notify_name), "utf-8", "ignore");
		}
	}
	return py_notify_name;
}

static int py_spoolss_SetJobInfo2_set_notify_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->notify_name = NULL;
	} else {
		object->notify_name = NULL;
		if (PyUnicode_Check(value)) {
			object->notify_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->notify_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_spoolss_SetJobInfo2_get_data_type(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_data_type;
	if (object->data_type == NULL) {
		py_data_type = Py_None;
		Py_INCREF(py_data_type);
	} else {
		if (object->data_type == NULL) {
			py_data_type = Py_None;
			Py_INCREF(py_data_type);
		} else {
			py_data_type = PyUnicode_Decode(object->data_type, strlen(object->data_type), "utf-8", "ignore");
		}
	}
	return py_data_type;
}

static int py_spoolss_SetJobInfo2_set_data_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_type = NULL;
	} else {
		object->data_type = NULL;
		if (PyUnicode_Check(value)) {
			object->data_type = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_type = 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_spoolss_SetJobInfo2_get_print_processor(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_print_processor;
	if (object->print_processor == NULL) {
		py_print_processor = Py_None;
		Py_INCREF(py_print_processor);
	} else {
		if (object->print_processor == NULL) {
			py_print_processor = Py_None;
			Py_INCREF(py_print_processor);
		} else {
			py_print_processor = PyUnicode_Decode(object->print_processor, strlen(object->print_processor), "utf-8", "ignore");
		}
	}
	return py_print_processor;
}

static int py_spoolss_SetJobInfo2_set_print_processor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->print_processor = NULL;
	} else {
		object->print_processor = NULL;
		if (PyUnicode_Check(value)) {
			object->print_processor = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->print_processor = 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_spoolss_SetJobInfo2_get_parameters(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_parameters;
	if (object->parameters == NULL) {
		py_parameters = Py_None;
		Py_INCREF(py_parameters);
	} else {
		if (object->parameters == NULL) {
			py_parameters = Py_None;
			Py_INCREF(py_parameters);
		} else {
			py_parameters = PyUnicode_Decode(object->parameters, strlen(object->parameters), "utf-8", "ignore");
		}
	}
	return py_parameters;
}

static int py_spoolss_SetJobInfo2_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->parameters = NULL;
	} else {
		object->parameters = NULL;
		if (PyUnicode_Check(value)) {
			object->parameters = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->parameters = 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_spoolss_SetJobInfo2_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_SetJobInfo2_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_SetJobInfo2_get__devmode_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py__devmode_ptr;
	py__devmode_ptr = PyInt_FromLong(object->_devmode_ptr);
	return py__devmode_ptr;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_text_status(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_text_status;
	if (object->text_status == NULL) {
		py_text_status = Py_None;
		Py_INCREF(py_text_status);
	} else {
		if (object->text_status == NULL) {
			py_text_status = Py_None;
			Py_INCREF(py_text_status);
		} else {
			py_text_status = PyUnicode_Decode(object->text_status, strlen(object->text_status), "utf-8", "ignore");
		}
	}
	return py_text_status;
}

static int py_spoolss_SetJobInfo2_set_text_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->text_status = NULL;
	} else {
		object->text_status = NULL;
		if (PyUnicode_Check(value)) {
			object->text_status = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->text_status = 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_spoolss_SetJobInfo2_get__secdesc_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py__secdesc_ptr;
	py__secdesc_ptr = PyInt_FromLong(object->_secdesc_ptr);
	return py__secdesc_ptr;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_status(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_priority(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_position(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_position;
	py_position = PyInt_FromLong(object->position);
	return py_position;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_start_time(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_start_time;
	py_start_time = PyInt_FromLong(object->start_time);
	return py_start_time;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_until_time(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_until_time;
	py_until_time = PyInt_FromLong(object->until_time);
	return py_until_time;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_total_pages(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_total_pages;
	py_total_pages = PyInt_FromLong(object->total_pages);
	return py_total_pages;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_size(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_submitted(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_submitted;
	py_submitted = pytalloc_reference_ex(&spoolss_Time_Type, pytalloc_get_mem_ctx(obj), &object->submitted);
	return py_submitted;
}

static int py_spoolss_SetJobInfo2_set_submitted(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->submitted = *(struct spoolss_Time *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_SetJobInfo2_get_time(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_time;
	py_time = PyInt_FromLong(object->time);
	return py_time;
}

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

static PyObject *py_spoolss_SetJobInfo2_get_pages_printed(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo2 *object = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_pages_printed;
	py_pages_printed = PyInt_FromLong(object->pages_printed);
	return py_pages_printed;
}

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

static PyGetSetDef py_spoolss_SetJobInfo2_getsetters[] = {
	{ discard_const_p(char, "job_id"), py_spoolss_SetJobInfo2_get_job_id, py_spoolss_SetJobInfo2_set_job_id },
	{ discard_const_p(char, "printer_name"), py_spoolss_SetJobInfo2_get_printer_name, py_spoolss_SetJobInfo2_set_printer_name },
	{ discard_const_p(char, "server_name"), py_spoolss_SetJobInfo2_get_server_name, py_spoolss_SetJobInfo2_set_server_name },
	{ discard_const_p(char, "user_name"), py_spoolss_SetJobInfo2_get_user_name, py_spoolss_SetJobInfo2_set_user_name },
	{ discard_const_p(char, "document_name"), py_spoolss_SetJobInfo2_get_document_name, py_spoolss_SetJobInfo2_set_document_name },
	{ discard_const_p(char, "notify_name"), py_spoolss_SetJobInfo2_get_notify_name, py_spoolss_SetJobInfo2_set_notify_name },
	{ discard_const_p(char, "data_type"), py_spoolss_SetJobInfo2_get_data_type, py_spoolss_SetJobInfo2_set_data_type },
	{ discard_const_p(char, "print_processor"), py_spoolss_SetJobInfo2_get_print_processor, py_spoolss_SetJobInfo2_set_print_processor },
	{ discard_const_p(char, "parameters"), py_spoolss_SetJobInfo2_get_parameters, py_spoolss_SetJobInfo2_set_parameters },
	{ discard_const_p(char, "driver_name"), py_spoolss_SetJobInfo2_get_driver_name, py_spoolss_SetJobInfo2_set_driver_name },
	{ discard_const_p(char, "_devmode_ptr"), py_spoolss_SetJobInfo2_get__devmode_ptr, py_spoolss_SetJobInfo2_set__devmode_ptr },
	{ discard_const_p(char, "text_status"), py_spoolss_SetJobInfo2_get_text_status, py_spoolss_SetJobInfo2_set_text_status },
	{ discard_const_p(char, "_secdesc_ptr"), py_spoolss_SetJobInfo2_get__secdesc_ptr, py_spoolss_SetJobInfo2_set__secdesc_ptr },
	{ discard_const_p(char, "status"), py_spoolss_SetJobInfo2_get_status, py_spoolss_SetJobInfo2_set_status },
	{ discard_const_p(char, "priority"), py_spoolss_SetJobInfo2_get_priority, py_spoolss_SetJobInfo2_set_priority },
	{ discard_const_p(char, "position"), py_spoolss_SetJobInfo2_get_position, py_spoolss_SetJobInfo2_set_position },
	{ discard_const_p(char, "start_time"), py_spoolss_SetJobInfo2_get_start_time, py_spoolss_SetJobInfo2_set_start_time },
	{ discard_const_p(char, "until_time"), py_spoolss_SetJobInfo2_get_until_time, py_spoolss_SetJobInfo2_set_until_time },
	{ discard_const_p(char, "total_pages"), py_spoolss_SetJobInfo2_get_total_pages, py_spoolss_SetJobInfo2_set_total_pages },
	{ discard_const_p(char, "size"), py_spoolss_SetJobInfo2_get_size, py_spoolss_SetJobInfo2_set_size },
	{ discard_const_p(char, "submitted"), py_spoolss_SetJobInfo2_get_submitted, py_spoolss_SetJobInfo2_set_submitted },
	{ discard_const_p(char, "time"), py_spoolss_SetJobInfo2_get_time, py_spoolss_SetJobInfo2_set_time },
	{ discard_const_p(char, "pages_printed"), py_spoolss_SetJobInfo2_get_pages_printed, py_spoolss_SetJobInfo2_set_pages_printed },
	{ NULL }
};

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


static PyTypeObject spoolss_SetJobInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetJobInfo2",
	.tp_getset = py_spoolss_SetJobInfo2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetJobInfo2_new,
};


static PyObject *py_spoolss_SetJobInfo4_get_job_id(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(object->job_id);
	return py_job_id;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_printer_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_printer_name;
	if (object->printer_name == NULL) {
		py_printer_name = Py_None;
		Py_INCREF(py_printer_name);
	} else {
		if (object->printer_name == NULL) {
			py_printer_name = Py_None;
			Py_INCREF(py_printer_name);
		} else {
			py_printer_name = PyUnicode_Decode(object->printer_name, strlen(object->printer_name), "utf-8", "ignore");
		}
	}
	return py_printer_name;
}

static int py_spoolss_SetJobInfo4_set_printer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printer_name = NULL;
	} else {
		object->printer_name = NULL;
		if (PyUnicode_Check(value)) {
			object->printer_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->printer_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_spoolss_SetJobInfo4_get_server_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_spoolss_SetJobInfo4_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->server_name = NULL;
	} else {
		object->server_name = NULL;
		if (PyUnicode_Check(value)) {
			object->server_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->server_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_spoolss_SetJobInfo4_get_user_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_user_name;
	if (object->user_name == NULL) {
		py_user_name = Py_None;
		Py_INCREF(py_user_name);
	} else {
		if (object->user_name == NULL) {
			py_user_name = Py_None;
			Py_INCREF(py_user_name);
		} else {
			py_user_name = PyUnicode_Decode(object->user_name, strlen(object->user_name), "utf-8", "ignore");
		}
	}
	return py_user_name;
}

static int py_spoolss_SetJobInfo4_set_user_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->user_name = NULL;
	} else {
		object->user_name = NULL;
		if (PyUnicode_Check(value)) {
			object->user_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->user_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_spoolss_SetJobInfo4_get_document_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_document_name;
	if (object->document_name == NULL) {
		py_document_name = Py_None;
		Py_INCREF(py_document_name);
	} else {
		if (object->document_name == NULL) {
			py_document_name = Py_None;
			Py_INCREF(py_document_name);
		} else {
			py_document_name = PyUnicode_Decode(object->document_name, strlen(object->document_name), "utf-8", "ignore");
		}
	}
	return py_document_name;
}

static int py_spoolss_SetJobInfo4_set_document_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->document_name = NULL;
	} else {
		object->document_name = NULL;
		if (PyUnicode_Check(value)) {
			object->document_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->document_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_spoolss_SetJobInfo4_get_notify_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_notify_name;
	if (object->notify_name == NULL) {
		py_notify_name = Py_None;
		Py_INCREF(py_notify_name);
	} else {
		if (object->notify_name == NULL) {
			py_notify_name = Py_None;
			Py_INCREF(py_notify_name);
		} else {
			py_notify_name = PyUnicode_Decode(object->notify_name, strlen(object->notify_name), "utf-8", "ignore");
		}
	}
	return py_notify_name;
}

static int py_spoolss_SetJobInfo4_set_notify_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->notify_name = NULL;
	} else {
		object->notify_name = NULL;
		if (PyUnicode_Check(value)) {
			object->notify_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->notify_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_spoolss_SetJobInfo4_get_data_type(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_data_type;
	if (object->data_type == NULL) {
		py_data_type = Py_None;
		Py_INCREF(py_data_type);
	} else {
		if (object->data_type == NULL) {
			py_data_type = Py_None;
			Py_INCREF(py_data_type);
		} else {
			py_data_type = PyUnicode_Decode(object->data_type, strlen(object->data_type), "utf-8", "ignore");
		}
	}
	return py_data_type;
}

static int py_spoolss_SetJobInfo4_set_data_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_type = NULL;
	} else {
		object->data_type = NULL;
		if (PyUnicode_Check(value)) {
			object->data_type = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_type = 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_spoolss_SetJobInfo4_get_print_processor(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_print_processor;
	if (object->print_processor == NULL) {
		py_print_processor = Py_None;
		Py_INCREF(py_print_processor);
	} else {
		if (object->print_processor == NULL) {
			py_print_processor = Py_None;
			Py_INCREF(py_print_processor);
		} else {
			py_print_processor = PyUnicode_Decode(object->print_processor, strlen(object->print_processor), "utf-8", "ignore");
		}
	}
	return py_print_processor;
}

static int py_spoolss_SetJobInfo4_set_print_processor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->print_processor = NULL;
	} else {
		object->print_processor = NULL;
		if (PyUnicode_Check(value)) {
			object->print_processor = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->print_processor = 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_spoolss_SetJobInfo4_get_parameters(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_parameters;
	if (object->parameters == NULL) {
		py_parameters = Py_None;
		Py_INCREF(py_parameters);
	} else {
		if (object->parameters == NULL) {
			py_parameters = Py_None;
			Py_INCREF(py_parameters);
		} else {
			py_parameters = PyUnicode_Decode(object->parameters, strlen(object->parameters), "utf-8", "ignore");
		}
	}
	return py_parameters;
}

static int py_spoolss_SetJobInfo4_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->parameters = NULL;
	} else {
		object->parameters = NULL;
		if (PyUnicode_Check(value)) {
			object->parameters = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->parameters = 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_spoolss_SetJobInfo4_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_SetJobInfo4_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_SetJobInfo4_get__devmode_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py__devmode_ptr;
	py__devmode_ptr = PyInt_FromLong(object->_devmode_ptr);
	return py__devmode_ptr;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_text_status(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_text_status;
	if (object->text_status == NULL) {
		py_text_status = Py_None;
		Py_INCREF(py_text_status);
	} else {
		if (object->text_status == NULL) {
			py_text_status = Py_None;
			Py_INCREF(py_text_status);
		} else {
			py_text_status = PyUnicode_Decode(object->text_status, strlen(object->text_status), "utf-8", "ignore");
		}
	}
	return py_text_status;
}

static int py_spoolss_SetJobInfo4_set_text_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->text_status = NULL;
	} else {
		object->text_status = NULL;
		if (PyUnicode_Check(value)) {
			object->text_status = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->text_status = 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_spoolss_SetJobInfo4_get__secdesc_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py__secdesc_ptr;
	py__secdesc_ptr = PyInt_FromLong(object->_secdesc_ptr);
	return py__secdesc_ptr;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_status(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_priority(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_position(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_position;
	py_position = PyInt_FromLong(object->position);
	return py_position;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_start_time(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_start_time;
	py_start_time = PyInt_FromLong(object->start_time);
	return py_start_time;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_until_time(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_until_time;
	py_until_time = PyInt_FromLong(object->until_time);
	return py_until_time;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_total_pages(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_total_pages;
	py_total_pages = PyInt_FromLong(object->total_pages);
	return py_total_pages;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_size(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_submitted(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_submitted;
	py_submitted = pytalloc_reference_ex(&spoolss_Time_Type, pytalloc_get_mem_ctx(obj), &object->submitted);
	return py_submitted;
}

static int py_spoolss_SetJobInfo4_set_submitted(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->submitted = *(struct spoolss_Time *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_SetJobInfo4_get_time(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_time;
	py_time = PyInt_FromLong(object->time);
	return py_time;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_pages_printed(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_pages_printed;
	py_pages_printed = PyInt_FromLong(object->pages_printed);
	return py_pages_printed;
}

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

static PyObject *py_spoolss_SetJobInfo4_get_size_high(PyObject *obj, void *closure)
{
	struct spoolss_SetJobInfo4 *object = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_size_high;
	py_size_high = PyInt_FromLong(object->size_high);
	return py_size_high;
}

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

static PyGetSetDef py_spoolss_SetJobInfo4_getsetters[] = {
	{ discard_const_p(char, "job_id"), py_spoolss_SetJobInfo4_get_job_id, py_spoolss_SetJobInfo4_set_job_id },
	{ discard_const_p(char, "printer_name"), py_spoolss_SetJobInfo4_get_printer_name, py_spoolss_SetJobInfo4_set_printer_name },
	{ discard_const_p(char, "server_name"), py_spoolss_SetJobInfo4_get_server_name, py_spoolss_SetJobInfo4_set_server_name },
	{ discard_const_p(char, "user_name"), py_spoolss_SetJobInfo4_get_user_name, py_spoolss_SetJobInfo4_set_user_name },
	{ discard_const_p(char, "document_name"), py_spoolss_SetJobInfo4_get_document_name, py_spoolss_SetJobInfo4_set_document_name },
	{ discard_const_p(char, "notify_name"), py_spoolss_SetJobInfo4_get_notify_name, py_spoolss_SetJobInfo4_set_notify_name },
	{ discard_const_p(char, "data_type"), py_spoolss_SetJobInfo4_get_data_type, py_spoolss_SetJobInfo4_set_data_type },
	{ discard_const_p(char, "print_processor"), py_spoolss_SetJobInfo4_get_print_processor, py_spoolss_SetJobInfo4_set_print_processor },
	{ discard_const_p(char, "parameters"), py_spoolss_SetJobInfo4_get_parameters, py_spoolss_SetJobInfo4_set_parameters },
	{ discard_const_p(char, "driver_name"), py_spoolss_SetJobInfo4_get_driver_name, py_spoolss_SetJobInfo4_set_driver_name },
	{ discard_const_p(char, "_devmode_ptr"), py_spoolss_SetJobInfo4_get__devmode_ptr, py_spoolss_SetJobInfo4_set__devmode_ptr },
	{ discard_const_p(char, "text_status"), py_spoolss_SetJobInfo4_get_text_status, py_spoolss_SetJobInfo4_set_text_status },
	{ discard_const_p(char, "_secdesc_ptr"), py_spoolss_SetJobInfo4_get__secdesc_ptr, py_spoolss_SetJobInfo4_set__secdesc_ptr },
	{ discard_const_p(char, "status"), py_spoolss_SetJobInfo4_get_status, py_spoolss_SetJobInfo4_set_status },
	{ discard_const_p(char, "priority"), py_spoolss_SetJobInfo4_get_priority, py_spoolss_SetJobInfo4_set_priority },
	{ discard_const_p(char, "position"), py_spoolss_SetJobInfo4_get_position, py_spoolss_SetJobInfo4_set_position },
	{ discard_const_p(char, "start_time"), py_spoolss_SetJobInfo4_get_start_time, py_spoolss_SetJobInfo4_set_start_time },
	{ discard_const_p(char, "until_time"), py_spoolss_SetJobInfo4_get_until_time, py_spoolss_SetJobInfo4_set_until_time },
	{ discard_const_p(char, "total_pages"), py_spoolss_SetJobInfo4_get_total_pages, py_spoolss_SetJobInfo4_set_total_pages },
	{ discard_const_p(char, "size"), py_spoolss_SetJobInfo4_get_size, py_spoolss_SetJobInfo4_set_size },
	{ discard_const_p(char, "submitted"), py_spoolss_SetJobInfo4_get_submitted, py_spoolss_SetJobInfo4_set_submitted },
	{ discard_const_p(char, "time"), py_spoolss_SetJobInfo4_get_time, py_spoolss_SetJobInfo4_set_time },
	{ discard_const_p(char, "pages_printed"), py_spoolss_SetJobInfo4_get_pages_printed, py_spoolss_SetJobInfo4_set_pages_printed },
	{ discard_const_p(char, "size_high"), py_spoolss_SetJobInfo4_get_size_high, py_spoolss_SetJobInfo4_set_size_high },
	{ NULL }
};

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


static PyTypeObject spoolss_SetJobInfo4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetJobInfo4",
	.tp_getset = py_spoolss_SetJobInfo4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetJobInfo4_new,
};

PyObject *py_import_spoolss_SetJobInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_SetJobInfo *in)
{
	PyObject *ret;

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

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

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

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

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

union spoolss_SetJobInfo *py_export_spoolss_SetJobInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_SetJobInfo *ret = talloc_zero(mem_ctx, union spoolss_SetJobInfo);
	switch (level) {
		case 1:
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&spoolss_SetJobInfo1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info1 = (struct spoolss_SetJobInfo1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == Py_None) {
				ret->info2 = NULL;
			} else {
				ret->info2 = NULL;
				PY_CHECK_TYPE(&spoolss_SetJobInfo2_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info2 = (struct spoolss_SetJobInfo2 *)pytalloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == Py_None) {
				ret->info3 = NULL;
			} else {
				ret->info3 = NULL;
				PY_CHECK_TYPE(&spoolss_JobInfo3_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info3 = (struct spoolss_JobInfo3 *)pytalloc_get_ptr(in);
			}
			break;

		case 4:
			if (in == Py_None) {
				ret->info4 = NULL;
			} else {
				ret->info4 = NULL;
				PY_CHECK_TYPE(&spoolss_SetJobInfo4_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info4 = (struct spoolss_SetJobInfo4 *)pytalloc_get_ptr(in);
			}
			break;

		default:
			break;

	}

	return ret;
}


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

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

static PyObject *py_spoolss_JobInfoContainer_get_info(PyObject *obj, void *closure)
{
	struct spoolss_JobInfoContainer *object = (struct spoolss_JobInfoContainer *)pytalloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_import_spoolss_SetJobInfo(pytalloc_get_mem_ctx(obj), object->level, &object->info);
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_spoolss_JobInfoContainer_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_JobInfoContainer *object = (struct spoolss_JobInfoContainer *)pytalloc_get_ptr(py_obj);
	{
		union spoolss_SetJobInfo *info_switch_0;
		info_switch_0 = py_export_spoolss_SetJobInfo(pytalloc_get_mem_ctx(py_obj), object->level, value);
		if (info_switch_0 == NULL) {
			return -1;
		}
		object->info = *info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_spoolss_JobInfoContainer_getsetters[] = {
	{ discard_const_p(char, "level"), py_spoolss_JobInfoContainer_get_level, py_spoolss_JobInfoContainer_set_level },
	{ discard_const_p(char, "info"), py_spoolss_JobInfoContainer_get_info, py_spoolss_JobInfoContainer_set_info },
	{ NULL }
};

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


static PyTypeObject spoolss_JobInfoContainer_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.JobInfoContainer",
	.tp_getset = py_spoolss_JobInfoContainer_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_JobInfoContainer_new,
};


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

static int py_spoolss_SetPrinterInfo0_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->servername = NULL;
	} else {
		object->servername = NULL;
		if (PyUnicode_Check(value)) {
			object->servername = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->servername = 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_spoolss_SetPrinterInfo0_get_printername(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_printername;
	if (object->printername == NULL) {
		py_printername = Py_None;
		Py_INCREF(py_printername);
	} else {
		if (object->printername == NULL) {
			py_printername = Py_None;
			Py_INCREF(py_printername);
		} else {
			py_printername = PyUnicode_Decode(object->printername, strlen(object->printername), "utf-8", "ignore");
		}
	}
	return py_printername;
}

static int py_spoolss_SetPrinterInfo0_set_printername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printername = NULL;
	} else {
		object->printername = NULL;
		if (PyUnicode_Check(value)) {
			object->printername = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->printername = 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_spoolss_SetPrinterInfo0_get_cjobs(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_cjobs;
	py_cjobs = PyInt_FromLong(object->cjobs);
	return py_cjobs;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_total_jobs(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_total_jobs;
	py_total_jobs = PyInt_FromLong(object->total_jobs);
	return py_total_jobs;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_total_bytes(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_total_bytes;
	py_total_bytes = PyInt_FromLong(object->total_bytes);
	return py_total_bytes;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_time(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_time;
	py_time = pytalloc_reference_ex(&spoolss_Time_Type, pytalloc_get_mem_ctx(obj), &object->time);
	return py_time;
}

static int py_spoolss_SetPrinterInfo0_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_Time_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->time = *(struct spoolss_Time *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_SetPrinterInfo0_get_global_counter(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_global_counter;
	py_global_counter = PyInt_FromLong(object->global_counter);
	return py_global_counter;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_total_pages(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_total_pages;
	py_total_pages = PyInt_FromLong(object->total_pages);
	return py_total_pages;
}

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

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

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

static PyObject *py_spoolss_SetPrinterInfo0_get_free_build(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_free_build;
	py_free_build = PyInt_FromLong(object->free_build);
	return py_free_build;
}

static int py_spoolss_SetPrinterInfo0_set_free_build(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->free_build = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->free_build = 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_spoolss_SetPrinterInfo0_get_spooling(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_spooling;
	py_spooling = PyInt_FromLong(object->spooling);
	return py_spooling;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_max_spooling(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_max_spooling;
	py_max_spooling = PyInt_FromLong(object->max_spooling);
	return py_max_spooling;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_session_counter(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_session_counter;
	py_session_counter = PyInt_FromLong(object->session_counter);
	return py_session_counter;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_num_error_out_of_paper(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_num_error_out_of_paper;
	py_num_error_out_of_paper = PyInt_FromLong(object->num_error_out_of_paper);
	return py_num_error_out_of_paper;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_num_error_not_ready(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_num_error_not_ready;
	py_num_error_not_ready = PyInt_FromLong(object->num_error_not_ready);
	return py_num_error_not_ready;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_job_error(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_job_error;
	py_job_error = PyInt_FromLong(object->job_error);
	return py_job_error;
}

static int py_spoolss_SetPrinterInfo0_set_job_error(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->job_error = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->job_error = 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_spoolss_SetPrinterInfo0_get_number_of_processors(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_number_of_processors;
	py_number_of_processors = PyInt_FromLong(object->number_of_processors);
	return py_number_of_processors;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_processor_type(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_processor_type;
	py_processor_type = PyInt_FromLong(object->processor_type);
	return py_processor_type;
}

static int py_spoolss_SetPrinterInfo0_set_processor_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->processor_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->processor_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_spoolss_SetPrinterInfo0_get_high_part_total_bytes(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_high_part_total_bytes;
	py_high_part_total_bytes = PyInt_FromLong(object->high_part_total_bytes);
	return py_high_part_total_bytes;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_change_id(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_change_id;
	py_change_id = PyInt_FromLong(object->change_id);
	return py_change_id;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_last_error(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_last_error;
	py_last_error = PyErr_FromWERROR(object->last_error);
	return py_last_error;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_status(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_enumerate_network_printers(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_enumerate_network_printers;
	py_enumerate_network_printers = PyInt_FromLong(object->enumerate_network_printers);
	return py_enumerate_network_printers;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_c_setprinter(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_c_setprinter;
	py_c_setprinter = PyInt_FromLong(object->c_setprinter);
	return py_c_setprinter;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_processor_architecture(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_processor_architecture;
	py_processor_architecture = PyInt_FromLong(object->processor_architecture);
	return py_processor_architecture;
}

static int py_spoolss_SetPrinterInfo0_set_processor_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->processor_architecture = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->processor_architecture = 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_spoolss_SetPrinterInfo0_get_processor_level(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_processor_level;
	py_processor_level = PyInt_FromLong(object->processor_level);
	return py_processor_level;
}

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

static PyObject *py_spoolss_SetPrinterInfo0_get_ref_ic(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_ref_ic;
	py_ref_ic = PyInt_FromLong(object->ref_ic);
	return py_ref_ic;
}

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

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

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

static PyObject *py_spoolss_SetPrinterInfo0_get_reserved3(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo0 *object = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(obj);
	PyObject *py_reserved3;
	py_reserved3 = PyInt_FromLong(object->reserved3);
	return py_reserved3;
}

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

static PyGetSetDef py_spoolss_SetPrinterInfo0_getsetters[] = {
	{ discard_const_p(char, "servername"), py_spoolss_SetPrinterInfo0_get_servername, py_spoolss_SetPrinterInfo0_set_servername },
	{ discard_const_p(char, "printername"), py_spoolss_SetPrinterInfo0_get_printername, py_spoolss_SetPrinterInfo0_set_printername },
	{ discard_const_p(char, "cjobs"), py_spoolss_SetPrinterInfo0_get_cjobs, py_spoolss_SetPrinterInfo0_set_cjobs },
	{ discard_const_p(char, "total_jobs"), py_spoolss_SetPrinterInfo0_get_total_jobs, py_spoolss_SetPrinterInfo0_set_total_jobs },
	{ discard_const_p(char, "total_bytes"), py_spoolss_SetPrinterInfo0_get_total_bytes, py_spoolss_SetPrinterInfo0_set_total_bytes },
	{ discard_const_p(char, "time"), py_spoolss_SetPrinterInfo0_get_time, py_spoolss_SetPrinterInfo0_set_time },
	{ discard_const_p(char, "global_counter"), py_spoolss_SetPrinterInfo0_get_global_counter, py_spoolss_SetPrinterInfo0_set_global_counter },
	{ discard_const_p(char, "total_pages"), py_spoolss_SetPrinterInfo0_get_total_pages, py_spoolss_SetPrinterInfo0_set_total_pages },
	{ discard_const_p(char, "version"), py_spoolss_SetPrinterInfo0_get_version, py_spoolss_SetPrinterInfo0_set_version },
	{ discard_const_p(char, "free_build"), py_spoolss_SetPrinterInfo0_get_free_build, py_spoolss_SetPrinterInfo0_set_free_build },
	{ discard_const_p(char, "spooling"), py_spoolss_SetPrinterInfo0_get_spooling, py_spoolss_SetPrinterInfo0_set_spooling },
	{ discard_const_p(char, "max_spooling"), py_spoolss_SetPrinterInfo0_get_max_spooling, py_spoolss_SetPrinterInfo0_set_max_spooling },
	{ discard_const_p(char, "session_counter"), py_spoolss_SetPrinterInfo0_get_session_counter, py_spoolss_SetPrinterInfo0_set_session_counter },
	{ discard_const_p(char, "num_error_out_of_paper"), py_spoolss_SetPrinterInfo0_get_num_error_out_of_paper, py_spoolss_SetPrinterInfo0_set_num_error_out_of_paper },
	{ discard_const_p(char, "num_error_not_ready"), py_spoolss_SetPrinterInfo0_get_num_error_not_ready, py_spoolss_SetPrinterInfo0_set_num_error_not_ready },
	{ discard_const_p(char, "job_error"), py_spoolss_SetPrinterInfo0_get_job_error, py_spoolss_SetPrinterInfo0_set_job_error },
	{ discard_const_p(char, "number_of_processors"), py_spoolss_SetPrinterInfo0_get_number_of_processors, py_spoolss_SetPrinterInfo0_set_number_of_processors },
	{ discard_const_p(char, "processor_type"), py_spoolss_SetPrinterInfo0_get_processor_type, py_spoolss_SetPrinterInfo0_set_processor_type },
	{ discard_const_p(char, "high_part_total_bytes"), py_spoolss_SetPrinterInfo0_get_high_part_total_bytes, py_spoolss_SetPrinterInfo0_set_high_part_total_bytes },
	{ discard_const_p(char, "change_id"), py_spoolss_SetPrinterInfo0_get_change_id, py_spoolss_SetPrinterInfo0_set_change_id },
	{ discard_const_p(char, "last_error"), py_spoolss_SetPrinterInfo0_get_last_error, py_spoolss_SetPrinterInfo0_set_last_error },
	{ discard_const_p(char, "status"), py_spoolss_SetPrinterInfo0_get_status, py_spoolss_SetPrinterInfo0_set_status },
	{ discard_const_p(char, "enumerate_network_printers"), py_spoolss_SetPrinterInfo0_get_enumerate_network_printers, py_spoolss_SetPrinterInfo0_set_enumerate_network_printers },
	{ discard_const_p(char, "c_setprinter"), py_spoolss_SetPrinterInfo0_get_c_setprinter, py_spoolss_SetPrinterInfo0_set_c_setprinter },
	{ discard_const_p(char, "processor_architecture"), py_spoolss_SetPrinterInfo0_get_processor_architecture, py_spoolss_SetPrinterInfo0_set_processor_architecture },
	{ discard_const_p(char, "processor_level"), py_spoolss_SetPrinterInfo0_get_processor_level, py_spoolss_SetPrinterInfo0_set_processor_level },
	{ discard_const_p(char, "ref_ic"), py_spoolss_SetPrinterInfo0_get_ref_ic, py_spoolss_SetPrinterInfo0_set_ref_ic },
	{ discard_const_p(char, "reserved2"), py_spoolss_SetPrinterInfo0_get_reserved2, py_spoolss_SetPrinterInfo0_set_reserved2 },
	{ discard_const_p(char, "reserved3"), py_spoolss_SetPrinterInfo0_get_reserved3, py_spoolss_SetPrinterInfo0_set_reserved3 },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo0_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo0",
	.tp_getset = py_spoolss_SetPrinterInfo0_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo0_new,
};


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

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

static PyObject *py_spoolss_SetPrinterInfo1_get_description(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo1 *object = (struct spoolss_SetPrinterInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_description;
	if (object->description == NULL) {
		py_description = Py_None;
		Py_INCREF(py_description);
	} else {
		if (object->description == NULL) {
			py_description = Py_None;
			Py_INCREF(py_description);
		} else {
			py_description = PyUnicode_Decode(object->description, strlen(object->description), "utf-8", "ignore");
		}
	}
	return py_description;
}

static int py_spoolss_SetPrinterInfo1_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo1 *object = (struct spoolss_SetPrinterInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->description = NULL;
	} else {
		object->description = NULL;
		if (PyUnicode_Check(value)) {
			object->description = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->description = 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_spoolss_SetPrinterInfo1_get_name(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo1 *object = (struct spoolss_SetPrinterInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_name;
	if (object->name == NULL) {
		py_name = Py_None;
		Py_INCREF(py_name);
	} else {
		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_spoolss_SetPrinterInfo1_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo1 *object = (struct spoolss_SetPrinterInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->name = NULL;
	} else {
		object->name = NULL;
		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_spoolss_SetPrinterInfo1_get_comment(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo1 *object = (struct spoolss_SetPrinterInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_spoolss_SetPrinterInfo1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo1 *object = (struct spoolss_SetPrinterInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		if (PyUnicode_Check(value)) {
			object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->comment = 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_spoolss_SetPrinterInfo1_getsetters[] = {
	{ discard_const_p(char, "flags"), py_spoolss_SetPrinterInfo1_get_flags, py_spoolss_SetPrinterInfo1_set_flags },
	{ discard_const_p(char, "description"), py_spoolss_SetPrinterInfo1_get_description, py_spoolss_SetPrinterInfo1_set_description },
	{ discard_const_p(char, "name"), py_spoolss_SetPrinterInfo1_get_name, py_spoolss_SetPrinterInfo1_set_name },
	{ discard_const_p(char, "comment"), py_spoolss_SetPrinterInfo1_get_comment, py_spoolss_SetPrinterInfo1_set_comment },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo1",
	.tp_getset = py_spoolss_SetPrinterInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo1_new,
};


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

static int py_spoolss_SetPrinterInfo2_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->servername = NULL;
	} else {
		object->servername = NULL;
		if (PyUnicode_Check(value)) {
			object->servername = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->servername = 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_spoolss_SetPrinterInfo2_get_printername(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_printername;
	if (object->printername == NULL) {
		py_printername = Py_None;
		Py_INCREF(py_printername);
	} else {
		if (object->printername == NULL) {
			py_printername = Py_None;
			Py_INCREF(py_printername);
		} else {
			py_printername = PyUnicode_Decode(object->printername, strlen(object->printername), "utf-8", "ignore");
		}
	}
	return py_printername;
}

static int py_spoolss_SetPrinterInfo2_set_printername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printername = NULL;
	} else {
		object->printername = NULL;
		if (PyUnicode_Check(value)) {
			object->printername = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->printername = 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_spoolss_SetPrinterInfo2_get_sharename(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_sharename;
	if (object->sharename == NULL) {
		py_sharename = Py_None;
		Py_INCREF(py_sharename);
	} else {
		if (object->sharename == NULL) {
			py_sharename = Py_None;
			Py_INCREF(py_sharename);
		} else {
			py_sharename = PyUnicode_Decode(object->sharename, strlen(object->sharename), "utf-8", "ignore");
		}
	}
	return py_sharename;
}

static int py_spoolss_SetPrinterInfo2_set_sharename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->sharename = NULL;
	} else {
		object->sharename = NULL;
		if (PyUnicode_Check(value)) {
			object->sharename = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->sharename = 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_spoolss_SetPrinterInfo2_get_portname(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_portname;
	if (object->portname == NULL) {
		py_portname = Py_None;
		Py_INCREF(py_portname);
	} else {
		if (object->portname == NULL) {
			py_portname = Py_None;
			Py_INCREF(py_portname);
		} else {
			py_portname = PyUnicode_Decode(object->portname, strlen(object->portname), "utf-8", "ignore");
		}
	}
	return py_portname;
}

static int py_spoolss_SetPrinterInfo2_set_portname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->portname = NULL;
	} else {
		object->portname = NULL;
		if (PyUnicode_Check(value)) {
			object->portname = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->portname = 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_spoolss_SetPrinterInfo2_get_drivername(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_drivername;
	if (object->drivername == NULL) {
		py_drivername = Py_None;
		Py_INCREF(py_drivername);
	} else {
		if (object->drivername == NULL) {
			py_drivername = Py_None;
			Py_INCREF(py_drivername);
		} else {
			py_drivername = PyUnicode_Decode(object->drivername, strlen(object->drivername), "utf-8", "ignore");
		}
	}
	return py_drivername;
}

static int py_spoolss_SetPrinterInfo2_set_drivername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->drivername = NULL;
	} else {
		object->drivername = NULL;
		if (PyUnicode_Check(value)) {
			object->drivername = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->drivername = 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_spoolss_SetPrinterInfo2_get_comment(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_comment;
	if (object->comment == NULL) {
		py_comment = Py_None;
		Py_INCREF(py_comment);
	} else {
		if (object->comment == NULL) {
			py_comment = Py_None;
			Py_INCREF(py_comment);
		} else {
			py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
		}
	}
	return py_comment;
}

static int py_spoolss_SetPrinterInfo2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->comment = NULL;
	} else {
		object->comment = NULL;
		if (PyUnicode_Check(value)) {
			object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->comment = 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_spoolss_SetPrinterInfo2_get_location(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_location;
	if (object->location == NULL) {
		py_location = Py_None;
		Py_INCREF(py_location);
	} else {
		if (object->location == NULL) {
			py_location = Py_None;
			Py_INCREF(py_location);
		} else {
			py_location = PyUnicode_Decode(object->location, strlen(object->location), "utf-8", "ignore");
		}
	}
	return py_location;
}

static int py_spoolss_SetPrinterInfo2_set_location(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->location = NULL;
	} else {
		object->location = NULL;
		if (PyUnicode_Check(value)) {
			object->location = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->location = 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_spoolss_SetPrinterInfo2_get_devmode_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_devmode_ptr;
	py_devmode_ptr = PyInt_FromLong(object->devmode_ptr);
	return py_devmode_ptr;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_sepfile(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_sepfile;
	if (object->sepfile == NULL) {
		py_sepfile = Py_None;
		Py_INCREF(py_sepfile);
	} else {
		if (object->sepfile == NULL) {
			py_sepfile = Py_None;
			Py_INCREF(py_sepfile);
		} else {
			py_sepfile = PyUnicode_Decode(object->sepfile, strlen(object->sepfile), "utf-8", "ignore");
		}
	}
	return py_sepfile;
}

static int py_spoolss_SetPrinterInfo2_set_sepfile(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->sepfile = NULL;
	} else {
		object->sepfile = NULL;
		if (PyUnicode_Check(value)) {
			object->sepfile = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->sepfile = 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_spoolss_SetPrinterInfo2_get_printprocessor(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_printprocessor;
	if (object->printprocessor == NULL) {
		py_printprocessor = Py_None;
		Py_INCREF(py_printprocessor);
	} else {
		if (object->printprocessor == NULL) {
			py_printprocessor = Py_None;
			Py_INCREF(py_printprocessor);
		} else {
			py_printprocessor = PyUnicode_Decode(object->printprocessor, strlen(object->printprocessor), "utf-8", "ignore");
		}
	}
	return py_printprocessor;
}

static int py_spoolss_SetPrinterInfo2_set_printprocessor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printprocessor = NULL;
	} else {
		object->printprocessor = NULL;
		if (PyUnicode_Check(value)) {
			object->printprocessor = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->printprocessor = 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_spoolss_SetPrinterInfo2_get_datatype(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_datatype;
	if (object->datatype == NULL) {
		py_datatype = Py_None;
		Py_INCREF(py_datatype);
	} else {
		if (object->datatype == NULL) {
			py_datatype = Py_None;
			Py_INCREF(py_datatype);
		} else {
			py_datatype = PyUnicode_Decode(object->datatype, strlen(object->datatype), "utf-8", "ignore");
		}
	}
	return py_datatype;
}

static int py_spoolss_SetPrinterInfo2_set_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->datatype = NULL;
	} else {
		object->datatype = NULL;
		if (PyUnicode_Check(value)) {
			object->datatype = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->datatype = 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_spoolss_SetPrinterInfo2_get_parameters(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_parameters;
	if (object->parameters == NULL) {
		py_parameters = Py_None;
		Py_INCREF(py_parameters);
	} else {
		if (object->parameters == NULL) {
			py_parameters = Py_None;
			Py_INCREF(py_parameters);
		} else {
			py_parameters = PyUnicode_Decode(object->parameters, strlen(object->parameters), "utf-8", "ignore");
		}
	}
	return py_parameters;
}

static int py_spoolss_SetPrinterInfo2_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->parameters = NULL;
	} else {
		object->parameters = NULL;
		if (PyUnicode_Check(value)) {
			object->parameters = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->parameters = 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_spoolss_SetPrinterInfo2_get_secdesc_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_secdesc_ptr;
	py_secdesc_ptr = PyInt_FromLong(object->secdesc_ptr);
	return py_secdesc_ptr;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_attributes(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_priority(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyInt_FromLong(object->priority);
	return py_priority;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_defaultpriority(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_defaultpriority;
	py_defaultpriority = PyInt_FromLong(object->defaultpriority);
	return py_defaultpriority;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_starttime(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_starttime;
	py_starttime = PyInt_FromLong(object->starttime);
	return py_starttime;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_untiltime(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_untiltime;
	py_untiltime = PyInt_FromLong(object->untiltime);
	return py_untiltime;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_status(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_cjobs(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_cjobs;
	py_cjobs = PyInt_FromLong(object->cjobs);
	return py_cjobs;
}

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

static PyObject *py_spoolss_SetPrinterInfo2_get_averageppm(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo2 *object = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_averageppm;
	py_averageppm = PyInt_FromLong(object->averageppm);
	return py_averageppm;
}

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

static PyGetSetDef py_spoolss_SetPrinterInfo2_getsetters[] = {
	{ discard_const_p(char, "servername"), py_spoolss_SetPrinterInfo2_get_servername, py_spoolss_SetPrinterInfo2_set_servername },
	{ discard_const_p(char, "printername"), py_spoolss_SetPrinterInfo2_get_printername, py_spoolss_SetPrinterInfo2_set_printername },
	{ discard_const_p(char, "sharename"), py_spoolss_SetPrinterInfo2_get_sharename, py_spoolss_SetPrinterInfo2_set_sharename },
	{ discard_const_p(char, "portname"), py_spoolss_SetPrinterInfo2_get_portname, py_spoolss_SetPrinterInfo2_set_portname },
	{ discard_const_p(char, "drivername"), py_spoolss_SetPrinterInfo2_get_drivername, py_spoolss_SetPrinterInfo2_set_drivername },
	{ discard_const_p(char, "comment"), py_spoolss_SetPrinterInfo2_get_comment, py_spoolss_SetPrinterInfo2_set_comment },
	{ discard_const_p(char, "location"), py_spoolss_SetPrinterInfo2_get_location, py_spoolss_SetPrinterInfo2_set_location },
	{ discard_const_p(char, "devmode_ptr"), py_spoolss_SetPrinterInfo2_get_devmode_ptr, py_spoolss_SetPrinterInfo2_set_devmode_ptr },
	{ discard_const_p(char, "sepfile"), py_spoolss_SetPrinterInfo2_get_sepfile, py_spoolss_SetPrinterInfo2_set_sepfile },
	{ discard_const_p(char, "printprocessor"), py_spoolss_SetPrinterInfo2_get_printprocessor, py_spoolss_SetPrinterInfo2_set_printprocessor },
	{ discard_const_p(char, "datatype"), py_spoolss_SetPrinterInfo2_get_datatype, py_spoolss_SetPrinterInfo2_set_datatype },
	{ discard_const_p(char, "parameters"), py_spoolss_SetPrinterInfo2_get_parameters, py_spoolss_SetPrinterInfo2_set_parameters },
	{ discard_const_p(char, "secdesc_ptr"), py_spoolss_SetPrinterInfo2_get_secdesc_ptr, py_spoolss_SetPrinterInfo2_set_secdesc_ptr },
	{ discard_const_p(char, "attributes"), py_spoolss_SetPrinterInfo2_get_attributes, py_spoolss_SetPrinterInfo2_set_attributes },
	{ discard_const_p(char, "priority"), py_spoolss_SetPrinterInfo2_get_priority, py_spoolss_SetPrinterInfo2_set_priority },
	{ discard_const_p(char, "defaultpriority"), py_spoolss_SetPrinterInfo2_get_defaultpriority, py_spoolss_SetPrinterInfo2_set_defaultpriority },
	{ discard_const_p(char, "starttime"), py_spoolss_SetPrinterInfo2_get_starttime, py_spoolss_SetPrinterInfo2_set_starttime },
	{ discard_const_p(char, "untiltime"), py_spoolss_SetPrinterInfo2_get_untiltime, py_spoolss_SetPrinterInfo2_set_untiltime },
	{ discard_const_p(char, "status"), py_spoolss_SetPrinterInfo2_get_status, py_spoolss_SetPrinterInfo2_set_status },
	{ discard_const_p(char, "cjobs"), py_spoolss_SetPrinterInfo2_get_cjobs, py_spoolss_SetPrinterInfo2_set_cjobs },
	{ discard_const_p(char, "averageppm"), py_spoolss_SetPrinterInfo2_get_averageppm, py_spoolss_SetPrinterInfo2_set_averageppm },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo2",
	.tp_getset = py_spoolss_SetPrinterInfo2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo2_new,
};


static PyObject *py_spoolss_SetPrinterInfo3_get_sec_desc_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo3 *object = (struct spoolss_SetPrinterInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_sec_desc_ptr;
	py_sec_desc_ptr = PyInt_FromLong(object->sec_desc_ptr);
	return py_sec_desc_ptr;
}

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

static PyGetSetDef py_spoolss_SetPrinterInfo3_getsetters[] = {
	{ discard_const_p(char, "sec_desc_ptr"), py_spoolss_SetPrinterInfo3_get_sec_desc_ptr, py_spoolss_SetPrinterInfo3_set_sec_desc_ptr },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo3",
	.tp_getset = py_spoolss_SetPrinterInfo3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo3_new,
};


static PyObject *py_spoolss_SetPrinterInfo4_get_printername(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo4 *object = (struct spoolss_SetPrinterInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_printername;
	if (object->printername == NULL) {
		py_printername = Py_None;
		Py_INCREF(py_printername);
	} else {
		if (object->printername == NULL) {
			py_printername = Py_None;
			Py_INCREF(py_printername);
		} else {
			py_printername = PyUnicode_Decode(object->printername, strlen(object->printername), "utf-8", "ignore");
		}
	}
	return py_printername;
}

static int py_spoolss_SetPrinterInfo4_set_printername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo4 *object = (struct spoolss_SetPrinterInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printername = NULL;
	} else {
		object->printername = NULL;
		if (PyUnicode_Check(value)) {
			object->printername = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->printername = 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_spoolss_SetPrinterInfo4_get_servername(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo4 *object = (struct spoolss_SetPrinterInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_servername;
	if (object->servername == NULL) {
		py_servername = Py_None;
		Py_INCREF(py_servername);
	} else {
		if (object->servername == NULL) {
			py_servername = Py_None;
			Py_INCREF(py_servername);
		} else {
			py_servername = PyUnicode_Decode(object->servername, strlen(object->servername), "utf-8", "ignore");
		}
	}
	return py_servername;
}

static int py_spoolss_SetPrinterInfo4_set_servername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo4 *object = (struct spoolss_SetPrinterInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->servername = NULL;
	} else {
		object->servername = NULL;
		if (PyUnicode_Check(value)) {
			object->servername = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->servername = 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_spoolss_SetPrinterInfo4_get_attributes(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo4 *object = (struct spoolss_SetPrinterInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

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

static PyGetSetDef py_spoolss_SetPrinterInfo4_getsetters[] = {
	{ discard_const_p(char, "printername"), py_spoolss_SetPrinterInfo4_get_printername, py_spoolss_SetPrinterInfo4_set_printername },
	{ discard_const_p(char, "servername"), py_spoolss_SetPrinterInfo4_get_servername, py_spoolss_SetPrinterInfo4_set_servername },
	{ discard_const_p(char, "attributes"), py_spoolss_SetPrinterInfo4_get_attributes, py_spoolss_SetPrinterInfo4_set_attributes },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo4",
	.tp_getset = py_spoolss_SetPrinterInfo4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo4_new,
};


static PyObject *py_spoolss_SetPrinterInfo5_get_printername(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo5 *object = (struct spoolss_SetPrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_printername;
	if (object->printername == NULL) {
		py_printername = Py_None;
		Py_INCREF(py_printername);
	} else {
		if (object->printername == NULL) {
			py_printername = Py_None;
			Py_INCREF(py_printername);
		} else {
			py_printername = PyUnicode_Decode(object->printername, strlen(object->printername), "utf-8", "ignore");
		}
	}
	return py_printername;
}

static int py_spoolss_SetPrinterInfo5_set_printername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo5 *object = (struct spoolss_SetPrinterInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->printername = NULL;
	} else {
		object->printername = NULL;
		if (PyUnicode_Check(value)) {
			object->printername = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->printername = 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_spoolss_SetPrinterInfo5_get_portname(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo5 *object = (struct spoolss_SetPrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_portname;
	if (object->portname == NULL) {
		py_portname = Py_None;
		Py_INCREF(py_portname);
	} else {
		if (object->portname == NULL) {
			py_portname = Py_None;
			Py_INCREF(py_portname);
		} else {
			py_portname = PyUnicode_Decode(object->portname, strlen(object->portname), "utf-8", "ignore");
		}
	}
	return py_portname;
}

static int py_spoolss_SetPrinterInfo5_set_portname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo5 *object = (struct spoolss_SetPrinterInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->portname = NULL;
	} else {
		object->portname = NULL;
		if (PyUnicode_Check(value)) {
			object->portname = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->portname = 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_spoolss_SetPrinterInfo5_get_attributes(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo5 *object = (struct spoolss_SetPrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyInt_FromLong(object->attributes);
	return py_attributes;
}

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

static PyObject *py_spoolss_SetPrinterInfo5_get_device_not_selected_timeout(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo5 *object = (struct spoolss_SetPrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_device_not_selected_timeout;
	py_device_not_selected_timeout = PyInt_FromLong(object->device_not_selected_timeout);
	return py_device_not_selected_timeout;
}

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

static PyObject *py_spoolss_SetPrinterInfo5_get_transmission_retry_timeout(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo5 *object = (struct spoolss_SetPrinterInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_transmission_retry_timeout;
	py_transmission_retry_timeout = PyInt_FromLong(object->transmission_retry_timeout);
	return py_transmission_retry_timeout;
}

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

static PyGetSetDef py_spoolss_SetPrinterInfo5_getsetters[] = {
	{ discard_const_p(char, "printername"), py_spoolss_SetPrinterInfo5_get_printername, py_spoolss_SetPrinterInfo5_set_printername },
	{ discard_const_p(char, "portname"), py_spoolss_SetPrinterInfo5_get_portname, py_spoolss_SetPrinterInfo5_set_portname },
	{ discard_const_p(char, "attributes"), py_spoolss_SetPrinterInfo5_get_attributes, py_spoolss_SetPrinterInfo5_set_attributes },
	{ discard_const_p(char, "device_not_selected_timeout"), py_spoolss_SetPrinterInfo5_get_device_not_selected_timeout, py_spoolss_SetPrinterInfo5_set_device_not_selected_timeout },
	{ discard_const_p(char, "transmission_retry_timeout"), py_spoolss_SetPrinterInfo5_get_transmission_retry_timeout, py_spoolss_SetPrinterInfo5_set_transmission_retry_timeout },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo5_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo5",
	.tp_getset = py_spoolss_SetPrinterInfo5_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo5_new,
};


static PyObject *py_spoolss_SetPrinterInfo6_get_status(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo6 *object = (struct spoolss_SetPrinterInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyGetSetDef py_spoolss_SetPrinterInfo6_getsetters[] = {
	{ discard_const_p(char, "status"), py_spoolss_SetPrinterInfo6_get_status, py_spoolss_SetPrinterInfo6_set_status },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo6",
	.tp_getset = py_spoolss_SetPrinterInfo6_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo6_new,
};


static PyObject *py_spoolss_SetPrinterInfo7_get_guid(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo7 *object = (struct spoolss_SetPrinterInfo7 *)pytalloc_get_ptr(obj);
	PyObject *py_guid;
	if (object->guid == NULL) {
		py_guid = Py_None;
		Py_INCREF(py_guid);
	} else {
		if (object->guid == NULL) {
			py_guid = Py_None;
			Py_INCREF(py_guid);
		} else {
			py_guid = PyUnicode_Decode(object->guid, strlen(object->guid), "utf-8", "ignore");
		}
	}
	return py_guid;
}

static int py_spoolss_SetPrinterInfo7_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo7 *object = (struct spoolss_SetPrinterInfo7 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->guid = NULL;
	} else {
		object->guid = NULL;
		if (PyUnicode_Check(value)) {
			object->guid = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->guid = 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_spoolss_SetPrinterInfo7_get_action(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo7 *object = (struct spoolss_SetPrinterInfo7 *)pytalloc_get_ptr(obj);
	PyObject *py_action;
	py_action = PyInt_FromLong(object->action);
	return py_action;
}

static int py_spoolss_SetPrinterInfo7_set_action(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfo7 *object = (struct spoolss_SetPrinterInfo7 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->action = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->action = 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_spoolss_SetPrinterInfo7_getsetters[] = {
	{ discard_const_p(char, "guid"), py_spoolss_SetPrinterInfo7_get_guid, py_spoolss_SetPrinterInfo7_set_guid },
	{ discard_const_p(char, "action"), py_spoolss_SetPrinterInfo7_get_action, py_spoolss_SetPrinterInfo7_set_action },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo7_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo7",
	.tp_getset = py_spoolss_SetPrinterInfo7_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo7_new,
};


static PyObject *py_spoolss_SetPrinterInfo8_get_devmode_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo8 *object = (struct spoolss_SetPrinterInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_devmode_ptr;
	py_devmode_ptr = PyInt_FromLong(object->devmode_ptr);
	return py_devmode_ptr;
}

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

static PyGetSetDef py_spoolss_SetPrinterInfo8_getsetters[] = {
	{ discard_const_p(char, "devmode_ptr"), py_spoolss_SetPrinterInfo8_get_devmode_ptr, py_spoolss_SetPrinterInfo8_set_devmode_ptr },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo8_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo8",
	.tp_getset = py_spoolss_SetPrinterInfo8_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo8_new,
};


static PyObject *py_spoolss_SetPrinterInfo9_get_devmode_ptr(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfo9 *object = (struct spoolss_SetPrinterInfo9 *)pytalloc_get_ptr(obj);
	PyObject *py_devmode_ptr;
	py_devmode_ptr = PyInt_FromLong(object->devmode_ptr);
	return py_devmode_ptr;
}

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

static PyGetSetDef py_spoolss_SetPrinterInfo9_getsetters[] = {
	{ discard_const_p(char, "devmode_ptr"), py_spoolss_SetPrinterInfo9_get_devmode_ptr, py_spoolss_SetPrinterInfo9_set_devmode_ptr },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfo9_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfo9",
	.tp_getset = py_spoolss_SetPrinterInfo9_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfo9_new,
};

PyObject *py_import_spoolss_SetPrinterInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_SetPrinterInfo *in)
{
	PyObject *ret;

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

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

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

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

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

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

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

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

		case 8:
			if (in->info8 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_SetPrinterInfo8_Type, in->info8, in->info8);
			}
			return ret;

		case 9:
			if (in->info9 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_SetPrinterInfo9_Type, in->info9, in->info9);
			}
			return ret;

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

union spoolss_SetPrinterInfo *py_export_spoolss_SetPrinterInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_SetPrinterInfo *ret = talloc_zero(mem_ctx, union spoolss_SetPrinterInfo);
	switch (level) {
		case 0:
			if (in == Py_None) {
				ret->info0 = NULL;
			} else {
				ret->info0 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo0_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info0 = (struct spoolss_SetPrinterInfo0 *)pytalloc_get_ptr(in);
			}
			break;

		case 1:
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info1 = (struct spoolss_SetPrinterInfo1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == Py_None) {
				ret->info2 = NULL;
			} else {
				ret->info2 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo2_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info2 = (struct spoolss_SetPrinterInfo2 *)pytalloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == Py_None) {
				ret->info3 = NULL;
			} else {
				ret->info3 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo3_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info3 = (struct spoolss_SetPrinterInfo3 *)pytalloc_get_ptr(in);
			}
			break;

		case 4:
			if (in == Py_None) {
				ret->info4 = NULL;
			} else {
				ret->info4 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo4_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info4 = (struct spoolss_SetPrinterInfo4 *)pytalloc_get_ptr(in);
			}
			break;

		case 5:
			if (in == Py_None) {
				ret->info5 = NULL;
			} else {
				ret->info5 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo5_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info5 = (struct spoolss_SetPrinterInfo5 *)pytalloc_get_ptr(in);
			}
			break;

		case 6:
			if (in == Py_None) {
				ret->info6 = NULL;
			} else {
				ret->info6 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo6_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info6 = (struct spoolss_SetPrinterInfo6 *)pytalloc_get_ptr(in);
			}
			break;

		case 7:
			if (in == Py_None) {
				ret->info7 = NULL;
			} else {
				ret->info7 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo7_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info7 = (struct spoolss_SetPrinterInfo7 *)pytalloc_get_ptr(in);
			}
			break;

		case 8:
			if (in == Py_None) {
				ret->info8 = NULL;
			} else {
				ret->info8 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo8_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->info8 = (struct spoolss_SetPrinterInfo8 *)pytalloc_get_ptr(in);
			}
			break;

		case 9:
			if (in == Py_None) {
				ret->info9 = NULL;
			} else {
				ret->info9 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPrinterInfo9_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->info9 = (struct spoolss_SetPrinterInfo9 *)pytalloc_get_ptr(in);
			}
			break;

		default:
			break;

	}

	return ret;
}


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

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

static PyObject *py_spoolss_SetPrinterInfoCtr_get_info(PyObject *obj, void *closure)
{
	struct spoolss_SetPrinterInfoCtr *object = (struct spoolss_SetPrinterInfoCtr *)pytalloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_import_spoolss_SetPrinterInfo(pytalloc_get_mem_ctx(obj), object->level, &object->info);
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_spoolss_SetPrinterInfoCtr_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPrinterInfoCtr *object = (struct spoolss_SetPrinterInfoCtr *)pytalloc_get_ptr(py_obj);
	{
		union spoolss_SetPrinterInfo *info_switch_0;
		info_switch_0 = py_export_spoolss_SetPrinterInfo(pytalloc_get_mem_ctx(py_obj), object->level, value);
		if (info_switch_0 == NULL) {
			return -1;
		}
		object->info = *info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_spoolss_SetPrinterInfoCtr_getsetters[] = {
	{ discard_const_p(char, "level"), py_spoolss_SetPrinterInfoCtr_get_level, py_spoolss_SetPrinterInfoCtr_set_level },
	{ discard_const_p(char, "info"), py_spoolss_SetPrinterInfoCtr_get_info, py_spoolss_SetPrinterInfoCtr_set_info },
	{ NULL }
};

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


static PyTypeObject spoolss_SetPrinterInfoCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPrinterInfoCtr",
	.tp_getset = py_spoolss_SetPrinterInfoCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPrinterInfoCtr_new,
};


static PyObject *py_spoolss_StringArray_get__ndr_size(PyObject *obj, void *closure)
{
	struct spoolss_StringArray *object = (struct spoolss_StringArray *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size;
	py__ndr_size = PyInt_FromLong(object->_ndr_size);
	return py__ndr_size;
}

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

static PyObject *py_spoolss_StringArray_get_string(PyObject *obj, void *closure)
{
	struct spoolss_StringArray *object = (struct spoolss_StringArray *)pytalloc_get_ptr(obj);
	PyObject *py_string;
	py_string = pytalloc_CObject_FromTallocPtr(object->string);
	return py_string;
}

static int py_spoolss_StringArray_set_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_StringArray *object = (struct spoolss_StringArray *)pytalloc_get_ptr(py_obj);
	object->string = PyCObject_AsVoidPtr(value);
	return 0;
}

static PyGetSetDef py_spoolss_StringArray_getsetters[] = {
	{ discard_const_p(char, "_ndr_size"), py_spoolss_StringArray_get__ndr_size, py_spoolss_StringArray_set__ndr_size },
	{ discard_const_p(char, "string"), py_spoolss_StringArray_get_string, py_spoolss_StringArray_set_string },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_StringArray_ndr_print(PyObject *py_obj)
{
	struct spoolss_StringArray *object = (struct spoolss_StringArray *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_StringArray, "spoolss_StringArray", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_StringArray_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.StringArray",
	.tp_getset = py_spoolss_StringArray_getsetters,
	.tp_methods = py_spoolss_StringArray_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_StringArray_new,
};


static PyObject *py_spoolss_AddDriverInfo1_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo1 *object = (struct spoolss_AddDriverInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_AddDriverInfo1_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo1 *object = (struct spoolss_AddDriverInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_AddDriverInfo1_getsetters[] = {
	{ discard_const_p(char, "driver_name"), py_spoolss_AddDriverInfo1_get_driver_name, py_spoolss_AddDriverInfo1_set_driver_name },
	{ NULL }
};

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


static PyTypeObject spoolss_AddDriverInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddDriverInfo1",
	.tp_getset = py_spoolss_AddDriverInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddDriverInfo1_new,
};


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

static int py_spoolss_AddDriverInfo2_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_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_spoolss_AddDriverInfo2_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_AddDriverInfo2_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_AddDriverInfo2_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		if (object->architecture == NULL) {
			py_architecture = Py_None;
			Py_INCREF(py_architecture);
		} else {
			py_architecture = PyUnicode_Decode(object->architecture, strlen(object->architecture), "utf-8", "ignore");
		}
	}
	return py_architecture;
}

static int py_spoolss_AddDriverInfo2_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		if (PyUnicode_Check(value)) {
			object->architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->architecture = 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_spoolss_AddDriverInfo2_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		if (object->driver_path == NULL) {
			py_driver_path = Py_None;
			Py_INCREF(py_driver_path);
		} else {
			py_driver_path = PyUnicode_Decode(object->driver_path, strlen(object->driver_path), "utf-8", "ignore");
		}
	}
	return py_driver_path;
}

static int py_spoolss_AddDriverInfo2_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_path = 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_spoolss_AddDriverInfo2_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		if (object->data_file == NULL) {
			py_data_file = Py_None;
			Py_INCREF(py_data_file);
		} else {
			py_data_file = PyUnicode_Decode(object->data_file, strlen(object->data_file), "utf-8", "ignore");
		}
	}
	return py_data_file;
}

static int py_spoolss_AddDriverInfo2_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		if (PyUnicode_Check(value)) {
			object->data_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_file = 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_spoolss_AddDriverInfo2_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		if (object->config_file == NULL) {
			py_config_file = Py_None;
			Py_INCREF(py_config_file);
		} else {
			py_config_file = PyUnicode_Decode(object->config_file, strlen(object->config_file), "utf-8", "ignore");
		}
	}
	return py_config_file;
}

static int py_spoolss_AddDriverInfo2_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo2 *object = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		if (PyUnicode_Check(value)) {
			object->config_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->config_file = 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_spoolss_AddDriverInfo2_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_AddDriverInfo2_get_version, py_spoolss_AddDriverInfo2_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_AddDriverInfo2_get_driver_name, py_spoolss_AddDriverInfo2_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_AddDriverInfo2_get_architecture, py_spoolss_AddDriverInfo2_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_AddDriverInfo2_get_driver_path, py_spoolss_AddDriverInfo2_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_AddDriverInfo2_get_data_file, py_spoolss_AddDriverInfo2_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_AddDriverInfo2_get_config_file, py_spoolss_AddDriverInfo2_set_config_file },
	{ NULL }
};

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


static PyTypeObject spoolss_AddDriverInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddDriverInfo2",
	.tp_getset = py_spoolss_AddDriverInfo2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddDriverInfo2_new,
};


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

static int py_spoolss_AddDriverInfo3_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_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_spoolss_AddDriverInfo3_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_AddDriverInfo3_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_AddDriverInfo3_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		if (object->architecture == NULL) {
			py_architecture = Py_None;
			Py_INCREF(py_architecture);
		} else {
			py_architecture = PyUnicode_Decode(object->architecture, strlen(object->architecture), "utf-8", "ignore");
		}
	}
	return py_architecture;
}

static int py_spoolss_AddDriverInfo3_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		if (PyUnicode_Check(value)) {
			object->architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->architecture = 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_spoolss_AddDriverInfo3_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		if (object->driver_path == NULL) {
			py_driver_path = Py_None;
			Py_INCREF(py_driver_path);
		} else {
			py_driver_path = PyUnicode_Decode(object->driver_path, strlen(object->driver_path), "utf-8", "ignore");
		}
	}
	return py_driver_path;
}

static int py_spoolss_AddDriverInfo3_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_path = 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_spoolss_AddDriverInfo3_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		if (object->data_file == NULL) {
			py_data_file = Py_None;
			Py_INCREF(py_data_file);
		} else {
			py_data_file = PyUnicode_Decode(object->data_file, strlen(object->data_file), "utf-8", "ignore");
		}
	}
	return py_data_file;
}

static int py_spoolss_AddDriverInfo3_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		if (PyUnicode_Check(value)) {
			object->data_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_file = 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_spoolss_AddDriverInfo3_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		if (object->config_file == NULL) {
			py_config_file = Py_None;
			Py_INCREF(py_config_file);
		} else {
			py_config_file = PyUnicode_Decode(object->config_file, strlen(object->config_file), "utf-8", "ignore");
		}
	}
	return py_config_file;
}

static int py_spoolss_AddDriverInfo3_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		if (PyUnicode_Check(value)) {
			object->config_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->config_file = 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_spoolss_AddDriverInfo3_get_help_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_help_file;
	if (object->help_file == NULL) {
		py_help_file = Py_None;
		Py_INCREF(py_help_file);
	} else {
		if (object->help_file == NULL) {
			py_help_file = Py_None;
			Py_INCREF(py_help_file);
		} else {
			py_help_file = PyUnicode_Decode(object->help_file, strlen(object->help_file), "utf-8", "ignore");
		}
	}
	return py_help_file;
}

static int py_spoolss_AddDriverInfo3_set_help_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->help_file = NULL;
	} else {
		object->help_file = NULL;
		if (PyUnicode_Check(value)) {
			object->help_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->help_file = 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_spoolss_AddDriverInfo3_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		if (object->monitor_name == NULL) {
			py_monitor_name = Py_None;
			Py_INCREF(py_monitor_name);
		} else {
			py_monitor_name = PyUnicode_Decode(object->monitor_name, strlen(object->monitor_name), "utf-8", "ignore");
		}
	}
	return py_monitor_name;
}

static int py_spoolss_AddDriverInfo3_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		if (PyUnicode_Check(value)) {
			object->monitor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->monitor_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_spoolss_AddDriverInfo3_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		if (object->default_datatype == NULL) {
			py_default_datatype = Py_None;
			Py_INCREF(py_default_datatype);
		} else {
			py_default_datatype = PyUnicode_Decode(object->default_datatype, strlen(object->default_datatype), "utf-8", "ignore");
		}
	}
	return py_default_datatype;
}

static int py_spoolss_AddDriverInfo3_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		if (PyUnicode_Check(value)) {
			object->default_datatype = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->default_datatype = 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_spoolss_AddDriverInfo3_get__ndr_size_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_dependent_files;
	py__ndr_size_dependent_files = PyInt_FromLong(object->_ndr_size_dependent_files);
	return py__ndr_size_dependent_files;
}

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

static PyObject *py_spoolss_AddDriverInfo3_get_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_dependent_files;
	if (object->dependent_files == NULL) {
		py_dependent_files = Py_None;
		Py_INCREF(py_dependent_files);
	} else {
		py_dependent_files = pytalloc_reference_ex(&spoolss_StringArray_Type, object->dependent_files, object->dependent_files);
	}
	return py_dependent_files;
}

static int py_spoolss_AddDriverInfo3_set_dependent_files(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo3 *object = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->dependent_files);
	if (value == Py_None) {
		object->dependent_files = NULL;
	} else {
		object->dependent_files = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->dependent_files = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_spoolss_AddDriverInfo3_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_AddDriverInfo3_get_version, py_spoolss_AddDriverInfo3_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_AddDriverInfo3_get_driver_name, py_spoolss_AddDriverInfo3_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_AddDriverInfo3_get_architecture, py_spoolss_AddDriverInfo3_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_AddDriverInfo3_get_driver_path, py_spoolss_AddDriverInfo3_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_AddDriverInfo3_get_data_file, py_spoolss_AddDriverInfo3_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_AddDriverInfo3_get_config_file, py_spoolss_AddDriverInfo3_set_config_file },
	{ discard_const_p(char, "help_file"), py_spoolss_AddDriverInfo3_get_help_file, py_spoolss_AddDriverInfo3_set_help_file },
	{ discard_const_p(char, "monitor_name"), py_spoolss_AddDriverInfo3_get_monitor_name, py_spoolss_AddDriverInfo3_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_AddDriverInfo3_get_default_datatype, py_spoolss_AddDriverInfo3_set_default_datatype },
	{ discard_const_p(char, "_ndr_size_dependent_files"), py_spoolss_AddDriverInfo3_get__ndr_size_dependent_files, py_spoolss_AddDriverInfo3_set__ndr_size_dependent_files },
	{ discard_const_p(char, "dependent_files"), py_spoolss_AddDriverInfo3_get_dependent_files, py_spoolss_AddDriverInfo3_set_dependent_files },
	{ NULL }
};

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


static PyTypeObject spoolss_AddDriverInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddDriverInfo3",
	.tp_getset = py_spoolss_AddDriverInfo3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddDriverInfo3_new,
};


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

static int py_spoolss_AddDriverInfo4_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_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_spoolss_AddDriverInfo4_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_AddDriverInfo4_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_AddDriverInfo4_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		if (object->architecture == NULL) {
			py_architecture = Py_None;
			Py_INCREF(py_architecture);
		} else {
			py_architecture = PyUnicode_Decode(object->architecture, strlen(object->architecture), "utf-8", "ignore");
		}
	}
	return py_architecture;
}

static int py_spoolss_AddDriverInfo4_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		if (PyUnicode_Check(value)) {
			object->architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->architecture = 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_spoolss_AddDriverInfo4_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		if (object->driver_path == NULL) {
			py_driver_path = Py_None;
			Py_INCREF(py_driver_path);
		} else {
			py_driver_path = PyUnicode_Decode(object->driver_path, strlen(object->driver_path), "utf-8", "ignore");
		}
	}
	return py_driver_path;
}

static int py_spoolss_AddDriverInfo4_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_path = 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_spoolss_AddDriverInfo4_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		if (object->data_file == NULL) {
			py_data_file = Py_None;
			Py_INCREF(py_data_file);
		} else {
			py_data_file = PyUnicode_Decode(object->data_file, strlen(object->data_file), "utf-8", "ignore");
		}
	}
	return py_data_file;
}

static int py_spoolss_AddDriverInfo4_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		if (PyUnicode_Check(value)) {
			object->data_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_file = 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_spoolss_AddDriverInfo4_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		if (object->config_file == NULL) {
			py_config_file = Py_None;
			Py_INCREF(py_config_file);
		} else {
			py_config_file = PyUnicode_Decode(object->config_file, strlen(object->config_file), "utf-8", "ignore");
		}
	}
	return py_config_file;
}

static int py_spoolss_AddDriverInfo4_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		if (PyUnicode_Check(value)) {
			object->config_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->config_file = 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_spoolss_AddDriverInfo4_get_help_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_help_file;
	if (object->help_file == NULL) {
		py_help_file = Py_None;
		Py_INCREF(py_help_file);
	} else {
		if (object->help_file == NULL) {
			py_help_file = Py_None;
			Py_INCREF(py_help_file);
		} else {
			py_help_file = PyUnicode_Decode(object->help_file, strlen(object->help_file), "utf-8", "ignore");
		}
	}
	return py_help_file;
}

static int py_spoolss_AddDriverInfo4_set_help_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->help_file = NULL;
	} else {
		object->help_file = NULL;
		if (PyUnicode_Check(value)) {
			object->help_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->help_file = 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_spoolss_AddDriverInfo4_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		if (object->monitor_name == NULL) {
			py_monitor_name = Py_None;
			Py_INCREF(py_monitor_name);
		} else {
			py_monitor_name = PyUnicode_Decode(object->monitor_name, strlen(object->monitor_name), "utf-8", "ignore");
		}
	}
	return py_monitor_name;
}

static int py_spoolss_AddDriverInfo4_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		if (PyUnicode_Check(value)) {
			object->monitor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->monitor_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_spoolss_AddDriverInfo4_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		if (object->default_datatype == NULL) {
			py_default_datatype = Py_None;
			Py_INCREF(py_default_datatype);
		} else {
			py_default_datatype = PyUnicode_Decode(object->default_datatype, strlen(object->default_datatype), "utf-8", "ignore");
		}
	}
	return py_default_datatype;
}

static int py_spoolss_AddDriverInfo4_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		if (PyUnicode_Check(value)) {
			object->default_datatype = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->default_datatype = 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_spoolss_AddDriverInfo4_get__ndr_size_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_dependent_files;
	py__ndr_size_dependent_files = PyInt_FromLong(object->_ndr_size_dependent_files);
	return py__ndr_size_dependent_files;
}

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

static PyObject *py_spoolss_AddDriverInfo4_get_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_dependent_files;
	if (object->dependent_files == NULL) {
		py_dependent_files = Py_None;
		Py_INCREF(py_dependent_files);
	} else {
		py_dependent_files = pytalloc_reference_ex(&spoolss_StringArray_Type, object->dependent_files, object->dependent_files);
	}
	return py_dependent_files;
}

static int py_spoolss_AddDriverInfo4_set_dependent_files(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->dependent_files);
	if (value == Py_None) {
		object->dependent_files = NULL;
	} else {
		object->dependent_files = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->dependent_files = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_AddDriverInfo4_get__ndr_size_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_previous_names;
	py__ndr_size_previous_names = PyInt_FromLong(object->_ndr_size_previous_names);
	return py__ndr_size_previous_names;
}

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

static PyObject *py_spoolss_AddDriverInfo4_get_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_previous_names;
	if (object->previous_names == NULL) {
		py_previous_names = Py_None;
		Py_INCREF(py_previous_names);
	} else {
		py_previous_names = pytalloc_reference_ex(&spoolss_StringArray_Type, object->previous_names, object->previous_names);
	}
	return py_previous_names;
}

static int py_spoolss_AddDriverInfo4_set_previous_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo4 *object = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->previous_names);
	if (value == Py_None) {
		object->previous_names = NULL;
	} else {
		object->previous_names = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->previous_names = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_spoolss_AddDriverInfo4_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_AddDriverInfo4_get_version, py_spoolss_AddDriverInfo4_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_AddDriverInfo4_get_driver_name, py_spoolss_AddDriverInfo4_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_AddDriverInfo4_get_architecture, py_spoolss_AddDriverInfo4_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_AddDriverInfo4_get_driver_path, py_spoolss_AddDriverInfo4_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_AddDriverInfo4_get_data_file, py_spoolss_AddDriverInfo4_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_AddDriverInfo4_get_config_file, py_spoolss_AddDriverInfo4_set_config_file },
	{ discard_const_p(char, "help_file"), py_spoolss_AddDriverInfo4_get_help_file, py_spoolss_AddDriverInfo4_set_help_file },
	{ discard_const_p(char, "monitor_name"), py_spoolss_AddDriverInfo4_get_monitor_name, py_spoolss_AddDriverInfo4_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_AddDriverInfo4_get_default_datatype, py_spoolss_AddDriverInfo4_set_default_datatype },
	{ discard_const_p(char, "_ndr_size_dependent_files"), py_spoolss_AddDriverInfo4_get__ndr_size_dependent_files, py_spoolss_AddDriverInfo4_set__ndr_size_dependent_files },
	{ discard_const_p(char, "dependent_files"), py_spoolss_AddDriverInfo4_get_dependent_files, py_spoolss_AddDriverInfo4_set_dependent_files },
	{ discard_const_p(char, "_ndr_size_previous_names"), py_spoolss_AddDriverInfo4_get__ndr_size_previous_names, py_spoolss_AddDriverInfo4_set__ndr_size_previous_names },
	{ discard_const_p(char, "previous_names"), py_spoolss_AddDriverInfo4_get_previous_names, py_spoolss_AddDriverInfo4_set_previous_names },
	{ NULL }
};

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


static PyTypeObject spoolss_AddDriverInfo4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddDriverInfo4",
	.tp_getset = py_spoolss_AddDriverInfo4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddDriverInfo4_new,
};


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

static int py_spoolss_AddDriverInfo5_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_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_spoolss_AddDriverInfo5_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_AddDriverInfo5_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_AddDriverInfo5_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		if (object->architecture == NULL) {
			py_architecture = Py_None;
			Py_INCREF(py_architecture);
		} else {
			py_architecture = PyUnicode_Decode(object->architecture, strlen(object->architecture), "utf-8", "ignore");
		}
	}
	return py_architecture;
}

static int py_spoolss_AddDriverInfo5_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		if (PyUnicode_Check(value)) {
			object->architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->architecture = 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_spoolss_AddDriverInfo5_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		if (object->driver_path == NULL) {
			py_driver_path = Py_None;
			Py_INCREF(py_driver_path);
		} else {
			py_driver_path = PyUnicode_Decode(object->driver_path, strlen(object->driver_path), "utf-8", "ignore");
		}
	}
	return py_driver_path;
}

static int py_spoolss_AddDriverInfo5_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_path = 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_spoolss_AddDriverInfo5_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		if (object->data_file == NULL) {
			py_data_file = Py_None;
			Py_INCREF(py_data_file);
		} else {
			py_data_file = PyUnicode_Decode(object->data_file, strlen(object->data_file), "utf-8", "ignore");
		}
	}
	return py_data_file;
}

static int py_spoolss_AddDriverInfo5_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		if (PyUnicode_Check(value)) {
			object->data_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_file = 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_spoolss_AddDriverInfo5_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		if (object->config_file == NULL) {
			py_config_file = Py_None;
			Py_INCREF(py_config_file);
		} else {
			py_config_file = PyUnicode_Decode(object->config_file, strlen(object->config_file), "utf-8", "ignore");
		}
	}
	return py_config_file;
}

static int py_spoolss_AddDriverInfo5_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		if (PyUnicode_Check(value)) {
			object->config_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->config_file = 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_spoolss_AddDriverInfo5_get_driver_attributes(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_attributes;
	py_driver_attributes = PyInt_FromLong(object->driver_attributes);
	return py_driver_attributes;
}

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

static PyObject *py_spoolss_AddDriverInfo5_get_config_version(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_config_version;
	py_config_version = PyInt_FromLong(object->config_version);
	return py_config_version;
}

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

static PyObject *py_spoolss_AddDriverInfo5_get_driver_version(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo5 *object = (struct spoolss_AddDriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_version;
	py_driver_version = PyInt_FromLong(object->driver_version);
	return py_driver_version;
}

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

static PyGetSetDef py_spoolss_AddDriverInfo5_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_AddDriverInfo5_get_version, py_spoolss_AddDriverInfo5_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_AddDriverInfo5_get_driver_name, py_spoolss_AddDriverInfo5_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_AddDriverInfo5_get_architecture, py_spoolss_AddDriverInfo5_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_AddDriverInfo5_get_driver_path, py_spoolss_AddDriverInfo5_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_AddDriverInfo5_get_data_file, py_spoolss_AddDriverInfo5_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_AddDriverInfo5_get_config_file, py_spoolss_AddDriverInfo5_set_config_file },
	{ discard_const_p(char, "driver_attributes"), py_spoolss_AddDriverInfo5_get_driver_attributes, py_spoolss_AddDriverInfo5_set_driver_attributes },
	{ discard_const_p(char, "config_version"), py_spoolss_AddDriverInfo5_get_config_version, py_spoolss_AddDriverInfo5_set_config_version },
	{ discard_const_p(char, "driver_version"), py_spoolss_AddDriverInfo5_get_driver_version, py_spoolss_AddDriverInfo5_set_driver_version },
	{ NULL }
};

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


static PyTypeObject spoolss_AddDriverInfo5_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddDriverInfo5",
	.tp_getset = py_spoolss_AddDriverInfo5_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddDriverInfo5_new,
};


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

static int py_spoolss_AddDriverInfo6_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_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_spoolss_AddDriverInfo6_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_AddDriverInfo6_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_AddDriverInfo6_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		if (object->architecture == NULL) {
			py_architecture = Py_None;
			Py_INCREF(py_architecture);
		} else {
			py_architecture = PyUnicode_Decode(object->architecture, strlen(object->architecture), "utf-8", "ignore");
		}
	}
	return py_architecture;
}

static int py_spoolss_AddDriverInfo6_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		if (PyUnicode_Check(value)) {
			object->architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->architecture = 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_spoolss_AddDriverInfo6_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		if (object->driver_path == NULL) {
			py_driver_path = Py_None;
			Py_INCREF(py_driver_path);
		} else {
			py_driver_path = PyUnicode_Decode(object->driver_path, strlen(object->driver_path), "utf-8", "ignore");
		}
	}
	return py_driver_path;
}

static int py_spoolss_AddDriverInfo6_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_path = 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_spoolss_AddDriverInfo6_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		if (object->data_file == NULL) {
			py_data_file = Py_None;
			Py_INCREF(py_data_file);
		} else {
			py_data_file = PyUnicode_Decode(object->data_file, strlen(object->data_file), "utf-8", "ignore");
		}
	}
	return py_data_file;
}

static int py_spoolss_AddDriverInfo6_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		if (PyUnicode_Check(value)) {
			object->data_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_file = 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_spoolss_AddDriverInfo6_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		if (object->config_file == NULL) {
			py_config_file = Py_None;
			Py_INCREF(py_config_file);
		} else {
			py_config_file = PyUnicode_Decode(object->config_file, strlen(object->config_file), "utf-8", "ignore");
		}
	}
	return py_config_file;
}

static int py_spoolss_AddDriverInfo6_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		if (PyUnicode_Check(value)) {
			object->config_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->config_file = 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_spoolss_AddDriverInfo6_get_help_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_help_file;
	if (object->help_file == NULL) {
		py_help_file = Py_None;
		Py_INCREF(py_help_file);
	} else {
		if (object->help_file == NULL) {
			py_help_file = Py_None;
			Py_INCREF(py_help_file);
		} else {
			py_help_file = PyUnicode_Decode(object->help_file, strlen(object->help_file), "utf-8", "ignore");
		}
	}
	return py_help_file;
}

static int py_spoolss_AddDriverInfo6_set_help_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->help_file = NULL;
	} else {
		object->help_file = NULL;
		if (PyUnicode_Check(value)) {
			object->help_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->help_file = 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_spoolss_AddDriverInfo6_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		if (object->monitor_name == NULL) {
			py_monitor_name = Py_None;
			Py_INCREF(py_monitor_name);
		} else {
			py_monitor_name = PyUnicode_Decode(object->monitor_name, strlen(object->monitor_name), "utf-8", "ignore");
		}
	}
	return py_monitor_name;
}

static int py_spoolss_AddDriverInfo6_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		if (PyUnicode_Check(value)) {
			object->monitor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->monitor_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_spoolss_AddDriverInfo6_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		if (object->default_datatype == NULL) {
			py_default_datatype = Py_None;
			Py_INCREF(py_default_datatype);
		} else {
			py_default_datatype = PyUnicode_Decode(object->default_datatype, strlen(object->default_datatype), "utf-8", "ignore");
		}
	}
	return py_default_datatype;
}

static int py_spoolss_AddDriverInfo6_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		if (PyUnicode_Check(value)) {
			object->default_datatype = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->default_datatype = 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_spoolss_AddDriverInfo6_get__ndr_size_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_dependent_files;
	py__ndr_size_dependent_files = PyInt_FromLong(object->_ndr_size_dependent_files);
	return py__ndr_size_dependent_files;
}

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

static PyObject *py_spoolss_AddDriverInfo6_get_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_dependent_files;
	if (object->dependent_files == NULL) {
		py_dependent_files = Py_None;
		Py_INCREF(py_dependent_files);
	} else {
		py_dependent_files = pytalloc_reference_ex(&spoolss_StringArray_Type, object->dependent_files, object->dependent_files);
	}
	return py_dependent_files;
}

static int py_spoolss_AddDriverInfo6_set_dependent_files(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->dependent_files);
	if (value == Py_None) {
		object->dependent_files = NULL;
	} else {
		object->dependent_files = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->dependent_files = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_AddDriverInfo6_get__ndr_size_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_previous_names;
	py__ndr_size_previous_names = PyInt_FromLong(object->_ndr_size_previous_names);
	return py__ndr_size_previous_names;
}

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

static PyObject *py_spoolss_AddDriverInfo6_get_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_previous_names;
	if (object->previous_names == NULL) {
		py_previous_names = Py_None;
		Py_INCREF(py_previous_names);
	} else {
		py_previous_names = pytalloc_reference_ex(&spoolss_StringArray_Type, object->previous_names, object->previous_names);
	}
	return py_previous_names;
}

static int py_spoolss_AddDriverInfo6_set_previous_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->previous_names);
	if (value == Py_None) {
		object->previous_names = NULL;
	} else {
		object->previous_names = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->previous_names = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_AddDriverInfo6_get_driver_date(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_date;
	py_driver_date = PyLong_FromLongLong(object->driver_date);
	return py_driver_date;
}

static int py_spoolss_AddDriverInfo6_set_driver_date(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_date = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_date = 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_spoolss_AddDriverInfo6_get_driver_version(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_version;
	py_driver_version = PyLong_FromLongLong(object->driver_version);
	return py_driver_version;
}

static int py_spoolss_AddDriverInfo6_set_driver_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_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_spoolss_AddDriverInfo6_get_manufacturer_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_name;
	if (object->manufacturer_name == NULL) {
		py_manufacturer_name = Py_None;
		Py_INCREF(py_manufacturer_name);
	} else {
		if (object->manufacturer_name == NULL) {
			py_manufacturer_name = Py_None;
			Py_INCREF(py_manufacturer_name);
		} else {
			py_manufacturer_name = PyUnicode_Decode(object->manufacturer_name, strlen(object->manufacturer_name), "utf-8", "ignore");
		}
	}
	return py_manufacturer_name;
}

static int py_spoolss_AddDriverInfo6_set_manufacturer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_name = NULL;
	} else {
		object->manufacturer_name = NULL;
		if (PyUnicode_Check(value)) {
			object->manufacturer_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->manufacturer_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_spoolss_AddDriverInfo6_get_manufacturer_url(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_url;
	if (object->manufacturer_url == NULL) {
		py_manufacturer_url = Py_None;
		Py_INCREF(py_manufacturer_url);
	} else {
		if (object->manufacturer_url == NULL) {
			py_manufacturer_url = Py_None;
			Py_INCREF(py_manufacturer_url);
		} else {
			py_manufacturer_url = PyUnicode_Decode(object->manufacturer_url, strlen(object->manufacturer_url), "utf-8", "ignore");
		}
	}
	return py_manufacturer_url;
}

static int py_spoolss_AddDriverInfo6_set_manufacturer_url(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_url = NULL;
	} else {
		object->manufacturer_url = NULL;
		if (PyUnicode_Check(value)) {
			object->manufacturer_url = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->manufacturer_url = 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_spoolss_AddDriverInfo6_get_hardware_id(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_hardware_id;
	if (object->hardware_id == NULL) {
		py_hardware_id = Py_None;
		Py_INCREF(py_hardware_id);
	} else {
		if (object->hardware_id == NULL) {
			py_hardware_id = Py_None;
			Py_INCREF(py_hardware_id);
		} else {
			py_hardware_id = PyUnicode_Decode(object->hardware_id, strlen(object->hardware_id), "utf-8", "ignore");
		}
	}
	return py_hardware_id;
}

static int py_spoolss_AddDriverInfo6_set_hardware_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->hardware_id = NULL;
	} else {
		object->hardware_id = NULL;
		if (PyUnicode_Check(value)) {
			object->hardware_id = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->hardware_id = 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_spoolss_AddDriverInfo6_get_provider(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_provider;
	if (object->provider == NULL) {
		py_provider = Py_None;
		Py_INCREF(py_provider);
	} else {
		if (object->provider == NULL) {
			py_provider = Py_None;
			Py_INCREF(py_provider);
		} else {
			py_provider = PyUnicode_Decode(object->provider, strlen(object->provider), "utf-8", "ignore");
		}
	}
	return py_provider;
}

static int py_spoolss_AddDriverInfo6_set_provider(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo6 *object = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->provider = NULL;
	} else {
		object->provider = NULL;
		if (PyUnicode_Check(value)) {
			object->provider = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->provider = 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_spoolss_AddDriverInfo6_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_AddDriverInfo6_get_version, py_spoolss_AddDriverInfo6_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_AddDriverInfo6_get_driver_name, py_spoolss_AddDriverInfo6_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_AddDriverInfo6_get_architecture, py_spoolss_AddDriverInfo6_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_AddDriverInfo6_get_driver_path, py_spoolss_AddDriverInfo6_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_AddDriverInfo6_get_data_file, py_spoolss_AddDriverInfo6_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_AddDriverInfo6_get_config_file, py_spoolss_AddDriverInfo6_set_config_file },
	{ discard_const_p(char, "help_file"), py_spoolss_AddDriverInfo6_get_help_file, py_spoolss_AddDriverInfo6_set_help_file },
	{ discard_const_p(char, "monitor_name"), py_spoolss_AddDriverInfo6_get_monitor_name, py_spoolss_AddDriverInfo6_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_AddDriverInfo6_get_default_datatype, py_spoolss_AddDriverInfo6_set_default_datatype },
	{ discard_const_p(char, "_ndr_size_dependent_files"), py_spoolss_AddDriverInfo6_get__ndr_size_dependent_files, py_spoolss_AddDriverInfo6_set__ndr_size_dependent_files },
	{ discard_const_p(char, "dependent_files"), py_spoolss_AddDriverInfo6_get_dependent_files, py_spoolss_AddDriverInfo6_set_dependent_files },
	{ discard_const_p(char, "_ndr_size_previous_names"), py_spoolss_AddDriverInfo6_get__ndr_size_previous_names, py_spoolss_AddDriverInfo6_set__ndr_size_previous_names },
	{ discard_const_p(char, "previous_names"), py_spoolss_AddDriverInfo6_get_previous_names, py_spoolss_AddDriverInfo6_set_previous_names },
	{ discard_const_p(char, "driver_date"), py_spoolss_AddDriverInfo6_get_driver_date, py_spoolss_AddDriverInfo6_set_driver_date },
	{ discard_const_p(char, "driver_version"), py_spoolss_AddDriverInfo6_get_driver_version, py_spoolss_AddDriverInfo6_set_driver_version },
	{ discard_const_p(char, "manufacturer_name"), py_spoolss_AddDriverInfo6_get_manufacturer_name, py_spoolss_AddDriverInfo6_set_manufacturer_name },
	{ discard_const_p(char, "manufacturer_url"), py_spoolss_AddDriverInfo6_get_manufacturer_url, py_spoolss_AddDriverInfo6_set_manufacturer_url },
	{ discard_const_p(char, "hardware_id"), py_spoolss_AddDriverInfo6_get_hardware_id, py_spoolss_AddDriverInfo6_set_hardware_id },
	{ discard_const_p(char, "provider"), py_spoolss_AddDriverInfo6_get_provider, py_spoolss_AddDriverInfo6_set_provider },
	{ NULL }
};

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


static PyTypeObject spoolss_AddDriverInfo6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddDriverInfo6",
	.tp_getset = py_spoolss_AddDriverInfo6_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddDriverInfo6_new,
};


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

static int py_spoolss_AddDriverInfo8_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_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_spoolss_AddDriverInfo8_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		if (object->driver_name == NULL) {
			py_driver_name = Py_None;
			Py_INCREF(py_driver_name);
		} else {
			py_driver_name = PyUnicode_Decode(object->driver_name, strlen(object->driver_name), "utf-8", "ignore");
		}
	}
	return py_driver_name;
}

static int py_spoolss_AddDriverInfo8_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_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_spoolss_AddDriverInfo8_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		if (object->architecture == NULL) {
			py_architecture = Py_None;
			Py_INCREF(py_architecture);
		} else {
			py_architecture = PyUnicode_Decode(object->architecture, strlen(object->architecture), "utf-8", "ignore");
		}
	}
	return py_architecture;
}

static int py_spoolss_AddDriverInfo8_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		if (PyUnicode_Check(value)) {
			object->architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->architecture = 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_spoolss_AddDriverInfo8_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		if (object->driver_path == NULL) {
			py_driver_path = Py_None;
			Py_INCREF(py_driver_path);
		} else {
			py_driver_path = PyUnicode_Decode(object->driver_path, strlen(object->driver_path), "utf-8", "ignore");
		}
	}
	return py_driver_path;
}

static int py_spoolss_AddDriverInfo8_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		if (PyUnicode_Check(value)) {
			object->driver_path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->driver_path = 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_spoolss_AddDriverInfo8_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		if (object->data_file == NULL) {
			py_data_file = Py_None;
			Py_INCREF(py_data_file);
		} else {
			py_data_file = PyUnicode_Decode(object->data_file, strlen(object->data_file), "utf-8", "ignore");
		}
	}
	return py_data_file;
}

static int py_spoolss_AddDriverInfo8_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		if (PyUnicode_Check(value)) {
			object->data_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->data_file = 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_spoolss_AddDriverInfo8_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		if (object->config_file == NULL) {
			py_config_file = Py_None;
			Py_INCREF(py_config_file);
		} else {
			py_config_file = PyUnicode_Decode(object->config_file, strlen(object->config_file), "utf-8", "ignore");
		}
	}
	return py_config_file;
}

static int py_spoolss_AddDriverInfo8_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		if (PyUnicode_Check(value)) {
			object->config_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->config_file = 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_spoolss_AddDriverInfo8_get_help_file(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_help_file;
	if (object->help_file == NULL) {
		py_help_file = Py_None;
		Py_INCREF(py_help_file);
	} else {
		if (object->help_file == NULL) {
			py_help_file = Py_None;
			Py_INCREF(py_help_file);
		} else {
			py_help_file = PyUnicode_Decode(object->help_file, strlen(object->help_file), "utf-8", "ignore");
		}
	}
	return py_help_file;
}

static int py_spoolss_AddDriverInfo8_set_help_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->help_file = NULL;
	} else {
		object->help_file = NULL;
		if (PyUnicode_Check(value)) {
			object->help_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->help_file = 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_spoolss_AddDriverInfo8_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		if (object->monitor_name == NULL) {
			py_monitor_name = Py_None;
			Py_INCREF(py_monitor_name);
		} else {
			py_monitor_name = PyUnicode_Decode(object->monitor_name, strlen(object->monitor_name), "utf-8", "ignore");
		}
	}
	return py_monitor_name;
}

static int py_spoolss_AddDriverInfo8_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		if (PyUnicode_Check(value)) {
			object->monitor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->monitor_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_spoolss_AddDriverInfo8_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		if (object->default_datatype == NULL) {
			py_default_datatype = Py_None;
			Py_INCREF(py_default_datatype);
		} else {
			py_default_datatype = PyUnicode_Decode(object->default_datatype, strlen(object->default_datatype), "utf-8", "ignore");
		}
	}
	return py_default_datatype;
}

static int py_spoolss_AddDriverInfo8_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		if (PyUnicode_Check(value)) {
			object->default_datatype = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->default_datatype = 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_spoolss_AddDriverInfo8_get__ndr_size_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_dependent_files;
	py__ndr_size_dependent_files = PyInt_FromLong(object->_ndr_size_dependent_files);
	return py__ndr_size_dependent_files;
}

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

static PyObject *py_spoolss_AddDriverInfo8_get_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_dependent_files;
	if (object->dependent_files == NULL) {
		py_dependent_files = Py_None;
		Py_INCREF(py_dependent_files);
	} else {
		py_dependent_files = pytalloc_reference_ex(&spoolss_StringArray_Type, object->dependent_files, object->dependent_files);
	}
	return py_dependent_files;
}

static int py_spoolss_AddDriverInfo8_set_dependent_files(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->dependent_files);
	if (value == Py_None) {
		object->dependent_files = NULL;
	} else {
		object->dependent_files = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->dependent_files = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_AddDriverInfo8_get__ndr_size_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_previous_names;
	py__ndr_size_previous_names = PyInt_FromLong(object->_ndr_size_previous_names);
	return py__ndr_size_previous_names;
}

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

static PyObject *py_spoolss_AddDriverInfo8_get_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_previous_names;
	if (object->previous_names == NULL) {
		py_previous_names = Py_None;
		Py_INCREF(py_previous_names);
	} else {
		py_previous_names = pytalloc_reference_ex(&spoolss_StringArray_Type, object->previous_names, object->previous_names);
	}
	return py_previous_names;
}

static int py_spoolss_AddDriverInfo8_set_previous_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->previous_names);
	if (value == Py_None) {
		object->previous_names = NULL;
	} else {
		object->previous_names = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->previous_names = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_AddDriverInfo8_get_driver_date(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_date;
	py_driver_date = PyLong_FromLongLong(object->driver_date);
	return py_driver_date;
}

static int py_spoolss_AddDriverInfo8_set_driver_date(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_date = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_date = 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_spoolss_AddDriverInfo8_get_driver_version(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_version;
	py_driver_version = PyLong_FromLongLong(object->driver_version);
	return py_driver_version;
}

static int py_spoolss_AddDriverInfo8_set_driver_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_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_spoolss_AddDriverInfo8_get_manufacturer_name(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_name;
	if (object->manufacturer_name == NULL) {
		py_manufacturer_name = Py_None;
		Py_INCREF(py_manufacturer_name);
	} else {
		if (object->manufacturer_name == NULL) {
			py_manufacturer_name = Py_None;
			Py_INCREF(py_manufacturer_name);
		} else {
			py_manufacturer_name = PyUnicode_Decode(object->manufacturer_name, strlen(object->manufacturer_name), "utf-8", "ignore");
		}
	}
	return py_manufacturer_name;
}

static int py_spoolss_AddDriverInfo8_set_manufacturer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_name = NULL;
	} else {
		object->manufacturer_name = NULL;
		if (PyUnicode_Check(value)) {
			object->manufacturer_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->manufacturer_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_spoolss_AddDriverInfo8_get_manufacturer_url(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_url;
	if (object->manufacturer_url == NULL) {
		py_manufacturer_url = Py_None;
		Py_INCREF(py_manufacturer_url);
	} else {
		if (object->manufacturer_url == NULL) {
			py_manufacturer_url = Py_None;
			Py_INCREF(py_manufacturer_url);
		} else {
			py_manufacturer_url = PyUnicode_Decode(object->manufacturer_url, strlen(object->manufacturer_url), "utf-8", "ignore");
		}
	}
	return py_manufacturer_url;
}

static int py_spoolss_AddDriverInfo8_set_manufacturer_url(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_url = NULL;
	} else {
		object->manufacturer_url = NULL;
		if (PyUnicode_Check(value)) {
			object->manufacturer_url = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->manufacturer_url = 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_spoolss_AddDriverInfo8_get_hardware_id(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_hardware_id;
	if (object->hardware_id == NULL) {
		py_hardware_id = Py_None;
		Py_INCREF(py_hardware_id);
	} else {
		if (object->hardware_id == NULL) {
			py_hardware_id = Py_None;
			Py_INCREF(py_hardware_id);
		} else {
			py_hardware_id = PyUnicode_Decode(object->hardware_id, strlen(object->hardware_id), "utf-8", "ignore");
		}
	}
	return py_hardware_id;
}

static int py_spoolss_AddDriverInfo8_set_hardware_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->hardware_id = NULL;
	} else {
		object->hardware_id = NULL;
		if (PyUnicode_Check(value)) {
			object->hardware_id = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->hardware_id = 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_spoolss_AddDriverInfo8_get_provider(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_provider;
	if (object->provider == NULL) {
		py_provider = Py_None;
		Py_INCREF(py_provider);
	} else {
		if (object->provider == NULL) {
			py_provider = Py_None;
			Py_INCREF(py_provider);
		} else {
			py_provider = PyUnicode_Decode(object->provider, strlen(object->provider), "utf-8", "ignore");
		}
	}
	return py_provider;
}

static int py_spoolss_AddDriverInfo8_set_provider(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->provider = NULL;
	} else {
		object->provider = NULL;
		if (PyUnicode_Check(value)) {
			object->provider = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->provider = 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_spoolss_AddDriverInfo8_get_print_processor(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_print_processor;
	if (object->print_processor == NULL) {
		py_print_processor = Py_None;
		Py_INCREF(py_print_processor);
	} else {
		if (object->print_processor == NULL) {
			py_print_processor = Py_None;
			Py_INCREF(py_print_processor);
		} else {
			py_print_processor = PyUnicode_Decode(object->print_processor, strlen(object->print_processor), "utf-8", "ignore");
		}
	}
	return py_print_processor;
}

static int py_spoolss_AddDriverInfo8_set_print_processor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->print_processor = NULL;
	} else {
		object->print_processor = NULL;
		if (PyUnicode_Check(value)) {
			object->print_processor = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->print_processor = 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_spoolss_AddDriverInfo8_get_vendor_setup(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_vendor_setup;
	if (object->vendor_setup == NULL) {
		py_vendor_setup = Py_None;
		Py_INCREF(py_vendor_setup);
	} else {
		if (object->vendor_setup == NULL) {
			py_vendor_setup = Py_None;
			Py_INCREF(py_vendor_setup);
		} else {
			py_vendor_setup = PyUnicode_Decode(object->vendor_setup, strlen(object->vendor_setup), "utf-8", "ignore");
		}
	}
	return py_vendor_setup;
}

static int py_spoolss_AddDriverInfo8_set_vendor_setup(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->vendor_setup = NULL;
	} else {
		object->vendor_setup = NULL;
		if (PyUnicode_Check(value)) {
			object->vendor_setup = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->vendor_setup = 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_spoolss_AddDriverInfo8_get__ndr_size_color_profiles(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_color_profiles;
	py__ndr_size_color_profiles = PyInt_FromLong(object->_ndr_size_color_profiles);
	return py__ndr_size_color_profiles;
}

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

static PyObject *py_spoolss_AddDriverInfo8_get_color_profiles(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_color_profiles;
	if (object->color_profiles == NULL) {
		py_color_profiles = Py_None;
		Py_INCREF(py_color_profiles);
	} else {
		py_color_profiles = pytalloc_reference_ex(&spoolss_StringArray_Type, object->color_profiles, object->color_profiles);
	}
	return py_color_profiles;
}

static int py_spoolss_AddDriverInfo8_set_color_profiles(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->color_profiles);
	if (value == Py_None) {
		object->color_profiles = NULL;
	} else {
		object->color_profiles = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->color_profiles = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_AddDriverInfo8_get_inf_path(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_inf_path;
	if (object->inf_path == NULL) {
		py_inf_path = Py_None;
		Py_INCREF(py_inf_path);
	} else {
		if (object->inf_path == NULL) {
			py_inf_path = Py_None;
			Py_INCREF(py_inf_path);
		} else {
			py_inf_path = PyUnicode_Decode(object->inf_path, strlen(object->inf_path), "utf-8", "ignore");
		}
	}
	return py_inf_path;
}

static int py_spoolss_AddDriverInfo8_set_inf_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->inf_path = NULL;
	} else {
		object->inf_path = NULL;
		if (PyUnicode_Check(value)) {
			object->inf_path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->inf_path = 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_spoolss_AddDriverInfo8_get_printer_driver_attributes(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_printer_driver_attributes;
	py_printer_driver_attributes = PyInt_FromLong(object->printer_driver_attributes);
	return py_printer_driver_attributes;
}

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

static PyObject *py_spoolss_AddDriverInfo8_get__ndr_size_core_driver_dependencies(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size_core_driver_dependencies;
	py__ndr_size_core_driver_dependencies = PyInt_FromLong(object->_ndr_size_core_driver_dependencies);
	return py__ndr_size_core_driver_dependencies;
}

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

static PyObject *py_spoolss_AddDriverInfo8_get_core_driver_dependencies(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_core_driver_dependencies;
	if (object->core_driver_dependencies == NULL) {
		py_core_driver_dependencies = Py_None;
		Py_INCREF(py_core_driver_dependencies);
	} else {
		py_core_driver_dependencies = pytalloc_reference_ex(&spoolss_StringArray_Type, object->core_driver_dependencies, object->core_driver_dependencies);
	}
	return py_core_driver_dependencies;
}

static int py_spoolss_AddDriverInfo8_set_core_driver_dependencies(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->core_driver_dependencies);
	if (value == Py_None) {
		object->core_driver_dependencies = NULL;
	} else {
		object->core_driver_dependencies = NULL;
		PY_CHECK_TYPE(&spoolss_StringArray_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->core_driver_dependencies = (struct spoolss_StringArray *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_spoolss_AddDriverInfo8_get_min_inbox_driver_ver_date(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_min_inbox_driver_ver_date;
	py_min_inbox_driver_ver_date = PyLong_FromLongLong(object->min_inbox_driver_ver_date);
	return py_min_inbox_driver_ver_date;
}

static int py_spoolss_AddDriverInfo8_set_min_inbox_driver_ver_date(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->min_inbox_driver_ver_date = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->min_inbox_driver_ver_date = 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_spoolss_AddDriverInfo8_get_min_inbox_driver_ver_version(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_min_inbox_driver_ver_version;
	py_min_inbox_driver_ver_version = PyLong_FromLongLong(object->min_inbox_driver_ver_version);
	return py_min_inbox_driver_ver_version;
}

static int py_spoolss_AddDriverInfo8_set_min_inbox_driver_ver_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfo8 *object = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->min_inbox_driver_ver_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->min_inbox_driver_ver_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 PyGetSetDef py_spoolss_AddDriverInfo8_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_AddDriverInfo8_get_version, py_spoolss_AddDriverInfo8_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_AddDriverInfo8_get_driver_name, py_spoolss_AddDriverInfo8_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_AddDriverInfo8_get_architecture, py_spoolss_AddDriverInfo8_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_AddDriverInfo8_get_driver_path, py_spoolss_AddDriverInfo8_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_AddDriverInfo8_get_data_file, py_spoolss_AddDriverInfo8_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_AddDriverInfo8_get_config_file, py_spoolss_AddDriverInfo8_set_config_file },
	{ discard_const_p(char, "help_file"), py_spoolss_AddDriverInfo8_get_help_file, py_spoolss_AddDriverInfo8_set_help_file },
	{ discard_const_p(char, "monitor_name"), py_spoolss_AddDriverInfo8_get_monitor_name, py_spoolss_AddDriverInfo8_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_AddDriverInfo8_get_default_datatype, py_spoolss_AddDriverInfo8_set_default_datatype },
	{ discard_const_p(char, "_ndr_size_dependent_files"), py_spoolss_AddDriverInfo8_get__ndr_size_dependent_files, py_spoolss_AddDriverInfo8_set__ndr_size_dependent_files },
	{ discard_const_p(char, "dependent_files"), py_spoolss_AddDriverInfo8_get_dependent_files, py_spoolss_AddDriverInfo8_set_dependent_files },
	{ discard_const_p(char, "_ndr_size_previous_names"), py_spoolss_AddDriverInfo8_get__ndr_size_previous_names, py_spoolss_AddDriverInfo8_set__ndr_size_previous_names },
	{ discard_const_p(char, "previous_names"), py_spoolss_AddDriverInfo8_get_previous_names, py_spoolss_AddDriverInfo8_set_previous_names },
	{ discard_const_p(char, "driver_date"), py_spoolss_AddDriverInfo8_get_driver_date, py_spoolss_AddDriverInfo8_set_driver_date },
	{ discard_const_p(char, "driver_version"), py_spoolss_AddDriverInfo8_get_driver_version, py_spoolss_AddDriverInfo8_set_driver_version },
	{ discard_const_p(char, "manufacturer_name"), py_spoolss_AddDriverInfo8_get_manufacturer_name, py_spoolss_AddDriverInfo8_set_manufacturer_name },
	{ discard_const_p(char, "manufacturer_url"), py_spoolss_AddDriverInfo8_get_manufacturer_url, py_spoolss_AddDriverInfo8_set_manufacturer_url },
	{ discard_const_p(char, "hardware_id"), py_spoolss_AddDriverInfo8_get_hardware_id, py_spoolss_AddDriverInfo8_set_hardware_id },
	{ discard_const_p(char, "provider"), py_spoolss_AddDriverInfo8_get_provider, py_spoolss_AddDriverInfo8_set_provider },
	{ discard_const_p(char, "print_processor"), py_spoolss_AddDriverInfo8_get_print_processor, py_spoolss_AddDriverInfo8_set_print_processor },
	{ discard_const_p(char, "vendor_setup"), py_spoolss_AddDriverInfo8_get_vendor_setup, py_spoolss_AddDriverInfo8_set_vendor_setup },
	{ discard_const_p(char, "_ndr_size_color_profiles"), py_spoolss_AddDriverInfo8_get__ndr_size_color_profiles, py_spoolss_AddDriverInfo8_set__ndr_size_color_profiles },
	{ discard_const_p(char, "color_profiles"), py_spoolss_AddDriverInfo8_get_color_profiles, py_spoolss_AddDriverInfo8_set_color_profiles },
	{ discard_const_p(char, "inf_path"), py_spoolss_AddDriverInfo8_get_inf_path, py_spoolss_AddDriverInfo8_set_inf_path },
	{ discard_const_p(char, "printer_driver_attributes"), py_spoolss_AddDriverInfo8_get_printer_driver_attributes, py_spoolss_AddDriverInfo8_set_printer_driver_attributes },
	{ discard_const_p(char, "_ndr_size_core_driver_dependencies"), py_spoolss_AddDriverInfo8_get__ndr_size_core_driver_dependencies, py_spoolss_AddDriverInfo8_set__ndr_size_core_driver_dependencies },
	{ discard_const_p(char, "core_driver_dependencies"), py_spoolss_AddDriverInfo8_get_core_driver_dependencies, py_spoolss_AddDriverInfo8_set_core_driver_dependencies },
	{ discard_const_p(char, "min_inbox_driver_ver_date"), py_spoolss_AddDriverInfo8_get_min_inbox_driver_ver_date, py_spoolss_AddDriverInfo8_set_min_inbox_driver_ver_date },
	{ discard_const_p(char, "min_inbox_driver_ver_version"), py_spoolss_AddDriverInfo8_get_min_inbox_driver_ver_version, py_spoolss_AddDriverInfo8_set_min_inbox_driver_ver_version },
	{ NULL }
};

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


static PyTypeObject spoolss_AddDriverInfo8_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddDriverInfo8",
	.tp_getset = py_spoolss_AddDriverInfo8_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddDriverInfo8_new,
};

PyObject *py_import_spoolss_AddDriverInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_AddDriverInfo *in)
{
	PyObject *ret;

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

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

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

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

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

		case 8:
			if (in->info8 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_AddDriverInfo8_Type, in->info8, in->info8);
			}
			return ret;

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

union spoolss_AddDriverInfo *py_export_spoolss_AddDriverInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_AddDriverInfo *ret = talloc_zero(mem_ctx, union spoolss_AddDriverInfo);
	switch (level) {
		case 1:
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&spoolss_AddDriverInfo1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info1 = (struct spoolss_AddDriverInfo1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == Py_None) {
				ret->info2 = NULL;
			} else {
				ret->info2 = NULL;
				PY_CHECK_TYPE(&spoolss_AddDriverInfo2_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info2 = (struct spoolss_AddDriverInfo2 *)pytalloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == Py_None) {
				ret->info3 = NULL;
			} else {
				ret->info3 = NULL;
				PY_CHECK_TYPE(&spoolss_AddDriverInfo3_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info3 = (struct spoolss_AddDriverInfo3 *)pytalloc_get_ptr(in);
			}
			break;

		case 4:
			if (in == Py_None) {
				ret->info4 = NULL;
			} else {
				ret->info4 = NULL;
				PY_CHECK_TYPE(&spoolss_AddDriverInfo4_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info4 = (struct spoolss_AddDriverInfo4 *)pytalloc_get_ptr(in);
			}
			break;

		case 6:
			if (in == Py_None) {
				ret->info6 = NULL;
			} else {
				ret->info6 = NULL;
				PY_CHECK_TYPE(&spoolss_AddDriverInfo6_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info6 = (struct spoolss_AddDriverInfo6 *)pytalloc_get_ptr(in);
			}
			break;

		case 8:
			if (in == Py_None) {
				ret->info8 = NULL;
			} else {
				ret->info8 = NULL;
				PY_CHECK_TYPE(&spoolss_AddDriverInfo8_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->info8 = (struct spoolss_AddDriverInfo8 *)pytalloc_get_ptr(in);
			}
			break;

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

	return ret;
}


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

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

static PyObject *py_spoolss_AddDriverInfoCtr_get_info(PyObject *obj, void *closure)
{
	struct spoolss_AddDriverInfoCtr *object = (struct spoolss_AddDriverInfoCtr *)pytalloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_import_spoolss_AddDriverInfo(pytalloc_get_mem_ctx(obj), object->level, &object->info);
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_spoolss_AddDriverInfoCtr_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddDriverInfoCtr *object = (struct spoolss_AddDriverInfoCtr *)pytalloc_get_ptr(py_obj);
	{
		union spoolss_AddDriverInfo *info_switch_0;
		info_switch_0 = py_export_spoolss_AddDriverInfo(pytalloc_get_mem_ctx(py_obj), object->level, value);
		if (info_switch_0 == NULL) {
			return -1;
		}
		object->info = *info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_spoolss_AddDriverInfoCtr_getsetters[] = {
	{ discard_const_p(char, "level"), py_spoolss_AddDriverInfoCtr_get_level, py_spoolss_AddDriverInfoCtr_set_level },
	{ discard_const_p(char, "info"), py_spoolss_AddDriverInfoCtr_get_info, py_spoolss_AddDriverInfoCtr_set_info },
	{ NULL }
};

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


static PyTypeObject spoolss_AddDriverInfoCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddDriverInfoCtr",
	.tp_getset = py_spoolss_AddDriverInfoCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddDriverInfoCtr_new,
};


static PyObject *py_spoolss_DriverInfo1_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo1 *object = (struct spoolss_DriverInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo1_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo1 *object = (struct spoolss_DriverInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_DriverInfo1_getsetters[] = {
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo1_get_driver_name, py_spoolss_DriverInfo1_set_driver_name },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo1 *object = (struct spoolss_DriverInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo1, "spoolss_DriverInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo1",
	.tp_getset = py_spoolss_DriverInfo1_getsetters,
	.tp_methods = py_spoolss_DriverInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo1_new,
};


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

static int py_spoolss_DriverInfo2_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_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_spoolss_DriverInfo2_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo2_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo2_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		py_architecture = PyString_FromStringOrNULL(object->architecture);
	}
	return py_architecture;
}

static int py_spoolss_DriverInfo2_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		object->architecture = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo2_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		py_driver_path = PyString_FromStringOrNULL(object->driver_path);
	}
	return py_driver_path;
}

static int py_spoolss_DriverInfo2_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		object->driver_path = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo2_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		py_data_file = PyString_FromStringOrNULL(object->data_file);
	}
	return py_data_file;
}

static int py_spoolss_DriverInfo2_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		object->data_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo2_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		py_config_file = PyString_FromStringOrNULL(object->config_file);
	}
	return py_config_file;
}

static int py_spoolss_DriverInfo2_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		object->config_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_DriverInfo2_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_DriverInfo2_get_version, py_spoolss_DriverInfo2_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo2_get_driver_name, py_spoolss_DriverInfo2_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_DriverInfo2_get_architecture, py_spoolss_DriverInfo2_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_DriverInfo2_get_driver_path, py_spoolss_DriverInfo2_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_DriverInfo2_get_data_file, py_spoolss_DriverInfo2_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_DriverInfo2_get_config_file, py_spoolss_DriverInfo2_set_config_file },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo2_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo2 *object = (struct spoolss_DriverInfo2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo2, "spoolss_DriverInfo2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo2",
	.tp_getset = py_spoolss_DriverInfo2_getsetters,
	.tp_methods = py_spoolss_DriverInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo2_new,
};


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

static int py_spoolss_DriverInfo3_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_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_spoolss_DriverInfo3_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo3_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo3_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		py_architecture = PyString_FromStringOrNULL(object->architecture);
	}
	return py_architecture;
}

static int py_spoolss_DriverInfo3_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		object->architecture = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo3_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		py_driver_path = PyString_FromStringOrNULL(object->driver_path);
	}
	return py_driver_path;
}

static int py_spoolss_DriverInfo3_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		object->driver_path = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo3_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		py_data_file = PyString_FromStringOrNULL(object->data_file);
	}
	return py_data_file;
}

static int py_spoolss_DriverInfo3_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		object->data_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo3_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		py_config_file = PyString_FromStringOrNULL(object->config_file);
	}
	return py_config_file;
}

static int py_spoolss_DriverInfo3_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		object->config_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo3_get_help_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_help_file;
	if (object->help_file == NULL) {
		py_help_file = Py_None;
		Py_INCREF(py_help_file);
	} else {
		py_help_file = PyString_FromStringOrNULL(object->help_file);
	}
	return py_help_file;
}

static int py_spoolss_DriverInfo3_set_help_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->help_file = NULL;
	} else {
		object->help_file = NULL;
		object->help_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo3_get_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_dependent_files;
	if (object->dependent_files == NULL) {
		py_dependent_files = Py_None;
		Py_INCREF(py_dependent_files);
	} else {
		py_dependent_files = pytalloc_CObject_FromTallocPtr(object->dependent_files);
	}
	return py_dependent_files;
}

static int py_spoolss_DriverInfo3_set_dependent_files(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dependent_files = NULL;
	} else {
		object->dependent_files = NULL;
		object->dependent_files = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo3_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		py_monitor_name = PyString_FromStringOrNULL(object->monitor_name);
	}
	return py_monitor_name;
}

static int py_spoolss_DriverInfo3_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		object->monitor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo3_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		py_default_datatype = PyString_FromStringOrNULL(object->default_datatype);
	}
	return py_default_datatype;
}

static int py_spoolss_DriverInfo3_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		object->default_datatype = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_DriverInfo3_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_DriverInfo3_get_version, py_spoolss_DriverInfo3_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo3_get_driver_name, py_spoolss_DriverInfo3_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_DriverInfo3_get_architecture, py_spoolss_DriverInfo3_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_DriverInfo3_get_driver_path, py_spoolss_DriverInfo3_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_DriverInfo3_get_data_file, py_spoolss_DriverInfo3_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_DriverInfo3_get_config_file, py_spoolss_DriverInfo3_set_config_file },
	{ discard_const_p(char, "help_file"), py_spoolss_DriverInfo3_get_help_file, py_spoolss_DriverInfo3_set_help_file },
	{ discard_const_p(char, "dependent_files"), py_spoolss_DriverInfo3_get_dependent_files, py_spoolss_DriverInfo3_set_dependent_files },
	{ discard_const_p(char, "monitor_name"), py_spoolss_DriverInfo3_get_monitor_name, py_spoolss_DriverInfo3_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_DriverInfo3_get_default_datatype, py_spoolss_DriverInfo3_set_default_datatype },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo3_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo3 *object = (struct spoolss_DriverInfo3 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo3, "spoolss_DriverInfo3", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo3",
	.tp_getset = py_spoolss_DriverInfo3_getsetters,
	.tp_methods = py_spoolss_DriverInfo3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo3_new,
};


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

static int py_spoolss_DriverInfo4_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_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_spoolss_DriverInfo4_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo4_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		py_architecture = PyString_FromStringOrNULL(object->architecture);
	}
	return py_architecture;
}

static int py_spoolss_DriverInfo4_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		object->architecture = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		py_driver_path = PyString_FromStringOrNULL(object->driver_path);
	}
	return py_driver_path;
}

static int py_spoolss_DriverInfo4_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		object->driver_path = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		py_data_file = PyString_FromStringOrNULL(object->data_file);
	}
	return py_data_file;
}

static int py_spoolss_DriverInfo4_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		object->data_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		py_config_file = PyString_FromStringOrNULL(object->config_file);
	}
	return py_config_file;
}

static int py_spoolss_DriverInfo4_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		object->config_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_help_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_help_file;
	if (object->help_file == NULL) {
		py_help_file = Py_None;
		Py_INCREF(py_help_file);
	} else {
		py_help_file = PyString_FromStringOrNULL(object->help_file);
	}
	return py_help_file;
}

static int py_spoolss_DriverInfo4_set_help_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->help_file = NULL;
	} else {
		object->help_file = NULL;
		object->help_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_dependent_files;
	if (object->dependent_files == NULL) {
		py_dependent_files = Py_None;
		Py_INCREF(py_dependent_files);
	} else {
		py_dependent_files = pytalloc_CObject_FromTallocPtr(object->dependent_files);
	}
	return py_dependent_files;
}

static int py_spoolss_DriverInfo4_set_dependent_files(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dependent_files = NULL;
	} else {
		object->dependent_files = NULL;
		object->dependent_files = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		py_monitor_name = PyString_FromStringOrNULL(object->monitor_name);
	}
	return py_monitor_name;
}

static int py_spoolss_DriverInfo4_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		object->monitor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		py_default_datatype = PyString_FromStringOrNULL(object->default_datatype);
	}
	return py_default_datatype;
}

static int py_spoolss_DriverInfo4_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		object->default_datatype = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo4_get_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(obj);
	PyObject *py_previous_names;
	if (object->previous_names == NULL) {
		py_previous_names = Py_None;
		Py_INCREF(py_previous_names);
	} else {
		py_previous_names = pytalloc_CObject_FromTallocPtr(object->previous_names);
	}
	return py_previous_names;
}

static int py_spoolss_DriverInfo4_set_previous_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->previous_names = NULL;
	} else {
		object->previous_names = NULL;
		object->previous_names = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyGetSetDef py_spoolss_DriverInfo4_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_DriverInfo4_get_version, py_spoolss_DriverInfo4_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo4_get_driver_name, py_spoolss_DriverInfo4_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_DriverInfo4_get_architecture, py_spoolss_DriverInfo4_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_DriverInfo4_get_driver_path, py_spoolss_DriverInfo4_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_DriverInfo4_get_data_file, py_spoolss_DriverInfo4_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_DriverInfo4_get_config_file, py_spoolss_DriverInfo4_set_config_file },
	{ discard_const_p(char, "help_file"), py_spoolss_DriverInfo4_get_help_file, py_spoolss_DriverInfo4_set_help_file },
	{ discard_const_p(char, "dependent_files"), py_spoolss_DriverInfo4_get_dependent_files, py_spoolss_DriverInfo4_set_dependent_files },
	{ discard_const_p(char, "monitor_name"), py_spoolss_DriverInfo4_get_monitor_name, py_spoolss_DriverInfo4_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_DriverInfo4_get_default_datatype, py_spoolss_DriverInfo4_set_default_datatype },
	{ discard_const_p(char, "previous_names"), py_spoolss_DriverInfo4_get_previous_names, py_spoolss_DriverInfo4_set_previous_names },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo4_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo4 *object = (struct spoolss_DriverInfo4 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo4, "spoolss_DriverInfo4", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo4_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo4",
	.tp_getset = py_spoolss_DriverInfo4_getsetters,
	.tp_methods = py_spoolss_DriverInfo4_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo4_new,
};


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

static int py_spoolss_DriverInfo5_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_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_spoolss_DriverInfo5_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo5_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo5_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		py_architecture = PyString_FromStringOrNULL(object->architecture);
	}
	return py_architecture;
}

static int py_spoolss_DriverInfo5_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		object->architecture = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo5_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		py_driver_path = PyString_FromStringOrNULL(object->driver_path);
	}
	return py_driver_path;
}

static int py_spoolss_DriverInfo5_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		object->driver_path = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo5_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		py_data_file = PyString_FromStringOrNULL(object->data_file);
	}
	return py_data_file;
}

static int py_spoolss_DriverInfo5_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		object->data_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo5_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		py_config_file = PyString_FromStringOrNULL(object->config_file);
	}
	return py_config_file;
}

static int py_spoolss_DriverInfo5_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		object->config_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo5_get_driver_attributes(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_attributes;
	py_driver_attributes = PyInt_FromLong(object->driver_attributes);
	return py_driver_attributes;
}

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

static PyObject *py_spoolss_DriverInfo5_get_config_version(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_config_version;
	py_config_version = PyInt_FromLong(object->config_version);
	return py_config_version;
}

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

static PyObject *py_spoolss_DriverInfo5_get_driver_version(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_version;
	py_driver_version = PyInt_FromLong(object->driver_version);
	return py_driver_version;
}

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

static PyGetSetDef py_spoolss_DriverInfo5_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_DriverInfo5_get_version, py_spoolss_DriverInfo5_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo5_get_driver_name, py_spoolss_DriverInfo5_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_DriverInfo5_get_architecture, py_spoolss_DriverInfo5_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_DriverInfo5_get_driver_path, py_spoolss_DriverInfo5_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_DriverInfo5_get_data_file, py_spoolss_DriverInfo5_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_DriverInfo5_get_config_file, py_spoolss_DriverInfo5_set_config_file },
	{ discard_const_p(char, "driver_attributes"), py_spoolss_DriverInfo5_get_driver_attributes, py_spoolss_DriverInfo5_set_driver_attributes },
	{ discard_const_p(char, "config_version"), py_spoolss_DriverInfo5_get_config_version, py_spoolss_DriverInfo5_set_config_version },
	{ discard_const_p(char, "driver_version"), py_spoolss_DriverInfo5_get_driver_version, py_spoolss_DriverInfo5_set_driver_version },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo5_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo5 *object = (struct spoolss_DriverInfo5 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo5, "spoolss_DriverInfo5", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo5_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo5",
	.tp_getset = py_spoolss_DriverInfo5_getsetters,
	.tp_methods = py_spoolss_DriverInfo5_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo5_new,
};


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

static int py_spoolss_DriverInfo6_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_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_spoolss_DriverInfo6_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo6_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		py_architecture = PyString_FromStringOrNULL(object->architecture);
	}
	return py_architecture;
}

static int py_spoolss_DriverInfo6_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		object->architecture = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		py_driver_path = PyString_FromStringOrNULL(object->driver_path);
	}
	return py_driver_path;
}

static int py_spoolss_DriverInfo6_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		object->driver_path = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		py_data_file = PyString_FromStringOrNULL(object->data_file);
	}
	return py_data_file;
}

static int py_spoolss_DriverInfo6_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		object->data_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		py_config_file = PyString_FromStringOrNULL(object->config_file);
	}
	return py_config_file;
}

static int py_spoolss_DriverInfo6_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		object->config_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_help_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_help_file;
	if (object->help_file == NULL) {
		py_help_file = Py_None;
		Py_INCREF(py_help_file);
	} else {
		py_help_file = PyString_FromStringOrNULL(object->help_file);
	}
	return py_help_file;
}

static int py_spoolss_DriverInfo6_set_help_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->help_file = NULL;
	} else {
		object->help_file = NULL;
		object->help_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_dependent_files;
	if (object->dependent_files == NULL) {
		py_dependent_files = Py_None;
		Py_INCREF(py_dependent_files);
	} else {
		py_dependent_files = pytalloc_CObject_FromTallocPtr(object->dependent_files);
	}
	return py_dependent_files;
}

static int py_spoolss_DriverInfo6_set_dependent_files(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dependent_files = NULL;
	} else {
		object->dependent_files = NULL;
		object->dependent_files = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		py_monitor_name = PyString_FromStringOrNULL(object->monitor_name);
	}
	return py_monitor_name;
}

static int py_spoolss_DriverInfo6_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		object->monitor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		py_default_datatype = PyString_FromStringOrNULL(object->default_datatype);
	}
	return py_default_datatype;
}

static int py_spoolss_DriverInfo6_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		object->default_datatype = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_previous_names;
	if (object->previous_names == NULL) {
		py_previous_names = Py_None;
		Py_INCREF(py_previous_names);
	} else {
		py_previous_names = pytalloc_CObject_FromTallocPtr(object->previous_names);
	}
	return py_previous_names;
}

static int py_spoolss_DriverInfo6_set_previous_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->previous_names = NULL;
	} else {
		object->previous_names = NULL;
		object->previous_names = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_driver_date(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_date;
	py_driver_date = PyLong_FromLongLong(object->driver_date);
	return py_driver_date;
}

static int py_spoolss_DriverInfo6_set_driver_date(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_date = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_date = 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_spoolss_DriverInfo6_get_driver_version(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_version;
	py_driver_version = PyLong_FromLongLong(object->driver_version);
	return py_driver_version;
}

static int py_spoolss_DriverInfo6_set_driver_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_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_spoolss_DriverInfo6_get_manufacturer_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_name;
	if (object->manufacturer_name == NULL) {
		py_manufacturer_name = Py_None;
		Py_INCREF(py_manufacturer_name);
	} else {
		py_manufacturer_name = PyString_FromStringOrNULL(object->manufacturer_name);
	}
	return py_manufacturer_name;
}

static int py_spoolss_DriverInfo6_set_manufacturer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_name = NULL;
	} else {
		object->manufacturer_name = NULL;
		object->manufacturer_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_manufacturer_url(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_url;
	if (object->manufacturer_url == NULL) {
		py_manufacturer_url = Py_None;
		Py_INCREF(py_manufacturer_url);
	} else {
		py_manufacturer_url = PyString_FromStringOrNULL(object->manufacturer_url);
	}
	return py_manufacturer_url;
}

static int py_spoolss_DriverInfo6_set_manufacturer_url(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_url = NULL;
	} else {
		object->manufacturer_url = NULL;
		object->manufacturer_url = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_hardware_id(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_hardware_id;
	if (object->hardware_id == NULL) {
		py_hardware_id = Py_None;
		Py_INCREF(py_hardware_id);
	} else {
		py_hardware_id = PyString_FromStringOrNULL(object->hardware_id);
	}
	return py_hardware_id;
}

static int py_spoolss_DriverInfo6_set_hardware_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->hardware_id = NULL;
	} else {
		object->hardware_id = NULL;
		object->hardware_id = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo6_get_provider(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(obj);
	PyObject *py_provider;
	if (object->provider == NULL) {
		py_provider = Py_None;
		Py_INCREF(py_provider);
	} else {
		py_provider = PyString_FromStringOrNULL(object->provider);
	}
	return py_provider;
}

static int py_spoolss_DriverInfo6_set_provider(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->provider = NULL;
	} else {
		object->provider = NULL;
		object->provider = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_DriverInfo6_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_DriverInfo6_get_version, py_spoolss_DriverInfo6_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo6_get_driver_name, py_spoolss_DriverInfo6_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_DriverInfo6_get_architecture, py_spoolss_DriverInfo6_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_DriverInfo6_get_driver_path, py_spoolss_DriverInfo6_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_DriverInfo6_get_data_file, py_spoolss_DriverInfo6_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_DriverInfo6_get_config_file, py_spoolss_DriverInfo6_set_config_file },
	{ discard_const_p(char, "help_file"), py_spoolss_DriverInfo6_get_help_file, py_spoolss_DriverInfo6_set_help_file },
	{ discard_const_p(char, "dependent_files"), py_spoolss_DriverInfo6_get_dependent_files, py_spoolss_DriverInfo6_set_dependent_files },
	{ discard_const_p(char, "monitor_name"), py_spoolss_DriverInfo6_get_monitor_name, py_spoolss_DriverInfo6_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_DriverInfo6_get_default_datatype, py_spoolss_DriverInfo6_set_default_datatype },
	{ discard_const_p(char, "previous_names"), py_spoolss_DriverInfo6_get_previous_names, py_spoolss_DriverInfo6_set_previous_names },
	{ discard_const_p(char, "driver_date"), py_spoolss_DriverInfo6_get_driver_date, py_spoolss_DriverInfo6_set_driver_date },
	{ discard_const_p(char, "driver_version"), py_spoolss_DriverInfo6_get_driver_version, py_spoolss_DriverInfo6_set_driver_version },
	{ discard_const_p(char, "manufacturer_name"), py_spoolss_DriverInfo6_get_manufacturer_name, py_spoolss_DriverInfo6_set_manufacturer_name },
	{ discard_const_p(char, "manufacturer_url"), py_spoolss_DriverInfo6_get_manufacturer_url, py_spoolss_DriverInfo6_set_manufacturer_url },
	{ discard_const_p(char, "hardware_id"), py_spoolss_DriverInfo6_get_hardware_id, py_spoolss_DriverInfo6_set_hardware_id },
	{ discard_const_p(char, "provider"), py_spoolss_DriverInfo6_get_provider, py_spoolss_DriverInfo6_set_provider },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo6_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo6 *object = (struct spoolss_DriverInfo6 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo6, "spoolss_DriverInfo6", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo6_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo6",
	.tp_getset = py_spoolss_DriverInfo6_getsetters,
	.tp_methods = py_spoolss_DriverInfo6_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo6_new,
};


static PyObject *py_spoolss_DriverInfo7_get_size(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

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

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

static int py_spoolss_DriverInfo7_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_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_spoolss_DriverInfo7_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo7_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo7_get_inf_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_get_ptr(obj);
	PyObject *py_inf_name;
	if (object->inf_name == NULL) {
		py_inf_name = Py_None;
		Py_INCREF(py_inf_name);
	} else {
		py_inf_name = PyString_FromStringOrNULL(object->inf_name);
	}
	return py_inf_name;
}

static int py_spoolss_DriverInfo7_set_inf_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->inf_name = NULL;
	} else {
		object->inf_name = NULL;
		object->inf_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo7_get_install_source_root(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_get_ptr(obj);
	PyObject *py_install_source_root;
	if (object->install_source_root == NULL) {
		py_install_source_root = Py_None;
		Py_INCREF(py_install_source_root);
	} else {
		py_install_source_root = PyString_FromStringOrNULL(object->install_source_root);
	}
	return py_install_source_root;
}

static int py_spoolss_DriverInfo7_set_install_source_root(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->install_source_root = NULL;
	} else {
		object->install_source_root = NULL;
		object->install_source_root = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_DriverInfo7_getsetters[] = {
	{ discard_const_p(char, "size"), py_spoolss_DriverInfo7_get_size, py_spoolss_DriverInfo7_set_size },
	{ discard_const_p(char, "version"), py_spoolss_DriverInfo7_get_version, py_spoolss_DriverInfo7_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo7_get_driver_name, py_spoolss_DriverInfo7_set_driver_name },
	{ discard_const_p(char, "inf_name"), py_spoolss_DriverInfo7_get_inf_name, py_spoolss_DriverInfo7_set_inf_name },
	{ discard_const_p(char, "install_source_root"), py_spoolss_DriverInfo7_get_install_source_root, py_spoolss_DriverInfo7_set_install_source_root },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo7_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo7 *object = (struct spoolss_DriverInfo7 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo7, "spoolss_DriverInfo7", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo7_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo7",
	.tp_getset = py_spoolss_DriverInfo7_getsetters,
	.tp_methods = py_spoolss_DriverInfo7_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo7_new,
};


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

static int py_spoolss_DriverInfo8_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_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_spoolss_DriverInfo8_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo8_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		py_architecture = PyString_FromStringOrNULL(object->architecture);
	}
	return py_architecture;
}

static int py_spoolss_DriverInfo8_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		object->architecture = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_driver_path(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_path;
	if (object->driver_path == NULL) {
		py_driver_path = Py_None;
		Py_INCREF(py_driver_path);
	} else {
		py_driver_path = PyString_FromStringOrNULL(object->driver_path);
	}
	return py_driver_path;
}

static int py_spoolss_DriverInfo8_set_driver_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_path = NULL;
	} else {
		object->driver_path = NULL;
		object->driver_path = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_data_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_data_file;
	if (object->data_file == NULL) {
		py_data_file = Py_None;
		Py_INCREF(py_data_file);
	} else {
		py_data_file = PyString_FromStringOrNULL(object->data_file);
	}
	return py_data_file;
}

static int py_spoolss_DriverInfo8_set_data_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->data_file = NULL;
	} else {
		object->data_file = NULL;
		object->data_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_config_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_config_file;
	if (object->config_file == NULL) {
		py_config_file = Py_None;
		Py_INCREF(py_config_file);
	} else {
		py_config_file = PyString_FromStringOrNULL(object->config_file);
	}
	return py_config_file;
}

static int py_spoolss_DriverInfo8_set_config_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->config_file = NULL;
	} else {
		object->config_file = NULL;
		object->config_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_help_file(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_help_file;
	if (object->help_file == NULL) {
		py_help_file = Py_None;
		Py_INCREF(py_help_file);
	} else {
		py_help_file = PyString_FromStringOrNULL(object->help_file);
	}
	return py_help_file;
}

static int py_spoolss_DriverInfo8_set_help_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->help_file = NULL;
	} else {
		object->help_file = NULL;
		object->help_file = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_dependent_files(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_dependent_files;
	if (object->dependent_files == NULL) {
		py_dependent_files = Py_None;
		Py_INCREF(py_dependent_files);
	} else {
		py_dependent_files = pytalloc_CObject_FromTallocPtr(object->dependent_files);
	}
	return py_dependent_files;
}

static int py_spoolss_DriverInfo8_set_dependent_files(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dependent_files = NULL;
	} else {
		object->dependent_files = NULL;
		object->dependent_files = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		py_monitor_name = PyString_FromStringOrNULL(object->monitor_name);
	}
	return py_monitor_name;
}

static int py_spoolss_DriverInfo8_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		object->monitor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		py_default_datatype = PyString_FromStringOrNULL(object->default_datatype);
	}
	return py_default_datatype;
}

static int py_spoolss_DriverInfo8_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		object->default_datatype = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_previous_names;
	if (object->previous_names == NULL) {
		py_previous_names = Py_None;
		Py_INCREF(py_previous_names);
	} else {
		py_previous_names = pytalloc_CObject_FromTallocPtr(object->previous_names);
	}
	return py_previous_names;
}

static int py_spoolss_DriverInfo8_set_previous_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->previous_names = NULL;
	} else {
		object->previous_names = NULL;
		object->previous_names = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_driver_date(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_date;
	py_driver_date = PyLong_FromLongLong(object->driver_date);
	return py_driver_date;
}

static int py_spoolss_DriverInfo8_set_driver_date(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_date = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_date = 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_spoolss_DriverInfo8_get_driver_version(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_version;
	py_driver_version = PyLong_FromLongLong(object->driver_version);
	return py_driver_version;
}

static int py_spoolss_DriverInfo8_set_driver_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_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_spoolss_DriverInfo8_get_manufacturer_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_name;
	if (object->manufacturer_name == NULL) {
		py_manufacturer_name = Py_None;
		Py_INCREF(py_manufacturer_name);
	} else {
		py_manufacturer_name = PyString_FromStringOrNULL(object->manufacturer_name);
	}
	return py_manufacturer_name;
}

static int py_spoolss_DriverInfo8_set_manufacturer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_name = NULL;
	} else {
		object->manufacturer_name = NULL;
		object->manufacturer_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_manufacturer_url(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_url;
	if (object->manufacturer_url == NULL) {
		py_manufacturer_url = Py_None;
		Py_INCREF(py_manufacturer_url);
	} else {
		py_manufacturer_url = PyString_FromStringOrNULL(object->manufacturer_url);
	}
	return py_manufacturer_url;
}

static int py_spoolss_DriverInfo8_set_manufacturer_url(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_url = NULL;
	} else {
		object->manufacturer_url = NULL;
		object->manufacturer_url = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_hardware_id(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_hardware_id;
	if (object->hardware_id == NULL) {
		py_hardware_id = Py_None;
		Py_INCREF(py_hardware_id);
	} else {
		py_hardware_id = PyString_FromStringOrNULL(object->hardware_id);
	}
	return py_hardware_id;
}

static int py_spoolss_DriverInfo8_set_hardware_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->hardware_id = NULL;
	} else {
		object->hardware_id = NULL;
		object->hardware_id = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_provider(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_provider;
	if (object->provider == NULL) {
		py_provider = Py_None;
		Py_INCREF(py_provider);
	} else {
		py_provider = PyString_FromStringOrNULL(object->provider);
	}
	return py_provider;
}

static int py_spoolss_DriverInfo8_set_provider(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->provider = NULL;
	} else {
		object->provider = NULL;
		object->provider = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_print_processor(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_print_processor;
	if (object->print_processor == NULL) {
		py_print_processor = Py_None;
		Py_INCREF(py_print_processor);
	} else {
		py_print_processor = PyString_FromStringOrNULL(object->print_processor);
	}
	return py_print_processor;
}

static int py_spoolss_DriverInfo8_set_print_processor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->print_processor = NULL;
	} else {
		object->print_processor = NULL;
		object->print_processor = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_vendor_setup(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_vendor_setup;
	if (object->vendor_setup == NULL) {
		py_vendor_setup = Py_None;
		Py_INCREF(py_vendor_setup);
	} else {
		py_vendor_setup = PyString_FromStringOrNULL(object->vendor_setup);
	}
	return py_vendor_setup;
}

static int py_spoolss_DriverInfo8_set_vendor_setup(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->vendor_setup = NULL;
	} else {
		object->vendor_setup = NULL;
		object->vendor_setup = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_color_profiles(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_color_profiles;
	if (object->color_profiles == NULL) {
		py_color_profiles = Py_None;
		Py_INCREF(py_color_profiles);
	} else {
		py_color_profiles = pytalloc_CObject_FromTallocPtr(object->color_profiles);
	}
	return py_color_profiles;
}

static int py_spoolss_DriverInfo8_set_color_profiles(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->color_profiles = NULL;
	} else {
		object->color_profiles = NULL;
		object->color_profiles = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_inf_path(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_inf_path;
	if (object->inf_path == NULL) {
		py_inf_path = Py_None;
		Py_INCREF(py_inf_path);
	} else {
		py_inf_path = PyString_FromStringOrNULL(object->inf_path);
	}
	return py_inf_path;
}

static int py_spoolss_DriverInfo8_set_inf_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->inf_path = NULL;
	} else {
		object->inf_path = NULL;
		object->inf_path = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_printer_driver_attributes(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_printer_driver_attributes;
	py_printer_driver_attributes = PyInt_FromLong(object->printer_driver_attributes);
	return py_printer_driver_attributes;
}

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

static PyObject *py_spoolss_DriverInfo8_get_core_driver_dependencies(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_core_driver_dependencies;
	if (object->core_driver_dependencies == NULL) {
		py_core_driver_dependencies = Py_None;
		Py_INCREF(py_core_driver_dependencies);
	} else {
		py_core_driver_dependencies = pytalloc_CObject_FromTallocPtr(object->core_driver_dependencies);
	}
	return py_core_driver_dependencies;
}

static int py_spoolss_DriverInfo8_set_core_driver_dependencies(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->core_driver_dependencies = NULL;
	} else {
		object->core_driver_dependencies = NULL;
		object->core_driver_dependencies = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo8_get_min_inbox_driver_ver_date(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_min_inbox_driver_ver_date;
	py_min_inbox_driver_ver_date = PyLong_FromLongLong(object->min_inbox_driver_ver_date);
	return py_min_inbox_driver_ver_date;
}

static int py_spoolss_DriverInfo8_set_min_inbox_driver_ver_date(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->min_inbox_driver_ver_date = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->min_inbox_driver_ver_date = 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_spoolss_DriverInfo8_get_min_inbox_driver_ver_version(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(obj);
	PyObject *py_min_inbox_driver_ver_version;
	py_min_inbox_driver_ver_version = PyLong_FromLongLong(object->min_inbox_driver_ver_version);
	return py_min_inbox_driver_ver_version;
}

static int py_spoolss_DriverInfo8_set_min_inbox_driver_ver_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->min_inbox_driver_ver_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->min_inbox_driver_ver_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 PyGetSetDef py_spoolss_DriverInfo8_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_DriverInfo8_get_version, py_spoolss_DriverInfo8_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo8_get_driver_name, py_spoolss_DriverInfo8_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_DriverInfo8_get_architecture, py_spoolss_DriverInfo8_set_architecture },
	{ discard_const_p(char, "driver_path"), py_spoolss_DriverInfo8_get_driver_path, py_spoolss_DriverInfo8_set_driver_path },
	{ discard_const_p(char, "data_file"), py_spoolss_DriverInfo8_get_data_file, py_spoolss_DriverInfo8_set_data_file },
	{ discard_const_p(char, "config_file"), py_spoolss_DriverInfo8_get_config_file, py_spoolss_DriverInfo8_set_config_file },
	{ discard_const_p(char, "help_file"), py_spoolss_DriverInfo8_get_help_file, py_spoolss_DriverInfo8_set_help_file },
	{ discard_const_p(char, "dependent_files"), py_spoolss_DriverInfo8_get_dependent_files, py_spoolss_DriverInfo8_set_dependent_files },
	{ discard_const_p(char, "monitor_name"), py_spoolss_DriverInfo8_get_monitor_name, py_spoolss_DriverInfo8_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_DriverInfo8_get_default_datatype, py_spoolss_DriverInfo8_set_default_datatype },
	{ discard_const_p(char, "previous_names"), py_spoolss_DriverInfo8_get_previous_names, py_spoolss_DriverInfo8_set_previous_names },
	{ discard_const_p(char, "driver_date"), py_spoolss_DriverInfo8_get_driver_date, py_spoolss_DriverInfo8_set_driver_date },
	{ discard_const_p(char, "driver_version"), py_spoolss_DriverInfo8_get_driver_version, py_spoolss_DriverInfo8_set_driver_version },
	{ discard_const_p(char, "manufacturer_name"), py_spoolss_DriverInfo8_get_manufacturer_name, py_spoolss_DriverInfo8_set_manufacturer_name },
	{ discard_const_p(char, "manufacturer_url"), py_spoolss_DriverInfo8_get_manufacturer_url, py_spoolss_DriverInfo8_set_manufacturer_url },
	{ discard_const_p(char, "hardware_id"), py_spoolss_DriverInfo8_get_hardware_id, py_spoolss_DriverInfo8_set_hardware_id },
	{ discard_const_p(char, "provider"), py_spoolss_DriverInfo8_get_provider, py_spoolss_DriverInfo8_set_provider },
	{ discard_const_p(char, "print_processor"), py_spoolss_DriverInfo8_get_print_processor, py_spoolss_DriverInfo8_set_print_processor },
	{ discard_const_p(char, "vendor_setup"), py_spoolss_DriverInfo8_get_vendor_setup, py_spoolss_DriverInfo8_set_vendor_setup },
	{ discard_const_p(char, "color_profiles"), py_spoolss_DriverInfo8_get_color_profiles, py_spoolss_DriverInfo8_set_color_profiles },
	{ discard_const_p(char, "inf_path"), py_spoolss_DriverInfo8_get_inf_path, py_spoolss_DriverInfo8_set_inf_path },
	{ discard_const_p(char, "printer_driver_attributes"), py_spoolss_DriverInfo8_get_printer_driver_attributes, py_spoolss_DriverInfo8_set_printer_driver_attributes },
	{ discard_const_p(char, "core_driver_dependencies"), py_spoolss_DriverInfo8_get_core_driver_dependencies, py_spoolss_DriverInfo8_set_core_driver_dependencies },
	{ discard_const_p(char, "min_inbox_driver_ver_date"), py_spoolss_DriverInfo8_get_min_inbox_driver_ver_date, py_spoolss_DriverInfo8_set_min_inbox_driver_ver_date },
	{ discard_const_p(char, "min_inbox_driver_ver_version"), py_spoolss_DriverInfo8_get_min_inbox_driver_ver_version, py_spoolss_DriverInfo8_set_min_inbox_driver_ver_version },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo8_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo8 *object = (struct spoolss_DriverInfo8 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo8, "spoolss_DriverInfo8", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo8_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo8",
	.tp_getset = py_spoolss_DriverInfo8_getsetters,
	.tp_methods = py_spoolss_DriverInfo8_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo8_new,
};


static PyObject *py_spoolss_DriverFileInfo_get_file_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverFileInfo *object = (struct spoolss_DriverFileInfo *)pytalloc_get_ptr(obj);
	PyObject *py_file_name;
	if (object->file_name == NULL) {
		py_file_name = Py_None;
		Py_INCREF(py_file_name);
	} else {
		py_file_name = PyString_FromStringOrNULL(object->file_name);
	}
	return py_file_name;
}

static int py_spoolss_DriverFileInfo_set_file_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverFileInfo *object = (struct spoolss_DriverFileInfo *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->file_name = NULL;
	} else {
		object->file_name = NULL;
		object->file_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverFileInfo_get_file_type(PyObject *obj, void *closure)
{
	struct spoolss_DriverFileInfo *object = (struct spoolss_DriverFileInfo *)pytalloc_get_ptr(obj);
	PyObject *py_file_type;
	py_file_type = PyInt_FromLong(object->file_type);
	return py_file_type;
}

static int py_spoolss_DriverFileInfo_set_file_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverFileInfo *object = (struct spoolss_DriverFileInfo *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->file_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->file_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_spoolss_DriverFileInfo_get_file_version(PyObject *obj, void *closure)
{
	struct spoolss_DriverFileInfo *object = (struct spoolss_DriverFileInfo *)pytalloc_get_ptr(obj);
	PyObject *py_file_version;
	py_file_version = PyInt_FromLong(object->file_version);
	return py_file_version;
}

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

static PyGetSetDef py_spoolss_DriverFileInfo_getsetters[] = {
	{ discard_const_p(char, "file_name"), py_spoolss_DriverFileInfo_get_file_name, py_spoolss_DriverFileInfo_set_file_name },
	{ discard_const_p(char, "file_type"), py_spoolss_DriverFileInfo_get_file_type, py_spoolss_DriverFileInfo_set_file_type },
	{ discard_const_p(char, "file_version"), py_spoolss_DriverFileInfo_get_file_version, py_spoolss_DriverFileInfo_set_file_version },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverFileInfo_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverFileInfo *object = (struct spoolss_DriverFileInfo *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverFileInfo, "spoolss_DriverFileInfo", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverFileInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverFileInfo",
	.tp_getset = py_spoolss_DriverFileInfo_getsetters,
	.tp_methods = py_spoolss_DriverFileInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverFileInfo_new,
};


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

static int py_spoolss_DriverInfo101_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_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_spoolss_DriverInfo101_get_driver_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_name;
	if (object->driver_name == NULL) {
		py_driver_name = Py_None;
		Py_INCREF(py_driver_name);
	} else {
		py_driver_name = PyString_FromStringOrNULL(object->driver_name);
	}
	return py_driver_name;
}

static int py_spoolss_DriverInfo101_set_driver_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->driver_name = NULL;
	} else {
		object->driver_name = NULL;
		object->driver_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_architecture(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_architecture;
	if (object->architecture == NULL) {
		py_architecture = Py_None;
		Py_INCREF(py_architecture);
	} else {
		py_architecture = PyString_FromStringOrNULL(object->architecture);
	}
	return py_architecture;
}

static int py_spoolss_DriverInfo101_set_architecture(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->architecture = NULL;
	} else {
		object->architecture = NULL;
		object->architecture = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_file_info(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_file_info;
	if (object->file_info == NULL) {
		py_file_info = Py_None;
		Py_INCREF(py_file_info);
	} else {
		py_file_info = PyList_New(object->file_count);
		if (py_file_info == NULL) {
			return NULL;
		}
		{
			int file_info_cntr_1;
			for (file_info_cntr_1 = 0; file_info_cntr_1 < object->file_count; file_info_cntr_1++) {
				PyObject *py_file_info_1;
				py_file_info_1 = pytalloc_reference_ex(&spoolss_DriverFileInfo_Type, object->file_info, &object->file_info[file_info_cntr_1]);
				PyList_SetItem(py_file_info, file_info_cntr_1, py_file_info_1);
			}
		}
	}
	return py_file_info;
}

static int py_spoolss_DriverInfo101_set_file_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->file_info);
	if (value == Py_None) {
		object->file_info = NULL;
	} else {
		object->file_info = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int file_info_cntr_1;
			object->file_info = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->file_info, PyList_GET_SIZE(value));
			if (!object->file_info) { return -1;; }
			talloc_set_name_const(object->file_info, "ARRAY: object->file_info");
			for (file_info_cntr_1 = 0; file_info_cntr_1 < PyList_GET_SIZE(value); file_info_cntr_1++) {
				PY_CHECK_TYPE(&spoolss_DriverFileInfo_Type, PyList_GET_ITEM(value, file_info_cntr_1), return -1;);
				if (talloc_reference(object->file_info, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, file_info_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->file_info[file_info_cntr_1] = *(struct spoolss_DriverFileInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, file_info_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_file_count(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_file_count;
	py_file_count = PyInt_FromLong(object->file_count);
	return py_file_count;
}

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

static PyObject *py_spoolss_DriverInfo101_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		py_monitor_name = PyString_FromStringOrNULL(object->monitor_name);
	}
	return py_monitor_name;
}

static int py_spoolss_DriverInfo101_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		object->monitor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_default_datatype(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_default_datatype;
	if (object->default_datatype == NULL) {
		py_default_datatype = Py_None;
		Py_INCREF(py_default_datatype);
	} else {
		py_default_datatype = PyString_FromStringOrNULL(object->default_datatype);
	}
	return py_default_datatype;
}

static int py_spoolss_DriverInfo101_set_default_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->default_datatype = NULL;
	} else {
		object->default_datatype = NULL;
		object->default_datatype = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_previous_names(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_previous_names;
	if (object->previous_names == NULL) {
		py_previous_names = Py_None;
		Py_INCREF(py_previous_names);
	} else {
		py_previous_names = pytalloc_CObject_FromTallocPtr(object->previous_names);
	}
	return py_previous_names;
}

static int py_spoolss_DriverInfo101_set_previous_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->previous_names = NULL;
	} else {
		object->previous_names = NULL;
		object->previous_names = PyCObject_AsVoidPtr(value);
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_driver_date(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_date;
	py_driver_date = PyLong_FromLongLong(object->driver_date);
	return py_driver_date;
}

static int py_spoolss_DriverInfo101_set_driver_date(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_date = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_date = 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_spoolss_DriverInfo101_get_driver_version(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_driver_version;
	py_driver_version = PyLong_FromLongLong(object->driver_version);
	return py_driver_version;
}

static int py_spoolss_DriverInfo101_set_driver_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_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_spoolss_DriverInfo101_get_manufacturer_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_name;
	if (object->manufacturer_name == NULL) {
		py_manufacturer_name = Py_None;
		Py_INCREF(py_manufacturer_name);
	} else {
		py_manufacturer_name = PyString_FromStringOrNULL(object->manufacturer_name);
	}
	return py_manufacturer_name;
}

static int py_spoolss_DriverInfo101_set_manufacturer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_name = NULL;
	} else {
		object->manufacturer_name = NULL;
		object->manufacturer_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_manufacturer_url(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_manufacturer_url;
	if (object->manufacturer_url == NULL) {
		py_manufacturer_url = Py_None;
		Py_INCREF(py_manufacturer_url);
	} else {
		py_manufacturer_url = PyString_FromStringOrNULL(object->manufacturer_url);
	}
	return py_manufacturer_url;
}

static int py_spoolss_DriverInfo101_set_manufacturer_url(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->manufacturer_url = NULL;
	} else {
		object->manufacturer_url = NULL;
		object->manufacturer_url = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_hardware_id(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_hardware_id;
	if (object->hardware_id == NULL) {
		py_hardware_id = Py_None;
		Py_INCREF(py_hardware_id);
	} else {
		py_hardware_id = PyString_FromStringOrNULL(object->hardware_id);
	}
	return py_hardware_id;
}

static int py_spoolss_DriverInfo101_set_hardware_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->hardware_id = NULL;
	} else {
		object->hardware_id = NULL;
		object->hardware_id = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_DriverInfo101_get_provider(PyObject *obj, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(obj);
	PyObject *py_provider;
	if (object->provider == NULL) {
		py_provider = Py_None;
		Py_INCREF(py_provider);
	} else {
		py_provider = PyString_FromStringOrNULL(object->provider);
	}
	return py_provider;
}

static int py_spoolss_DriverInfo101_set_provider(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->provider = NULL;
	} else {
		object->provider = NULL;
		object->provider = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_DriverInfo101_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_DriverInfo101_get_version, py_spoolss_DriverInfo101_set_version },
	{ discard_const_p(char, "driver_name"), py_spoolss_DriverInfo101_get_driver_name, py_spoolss_DriverInfo101_set_driver_name },
	{ discard_const_p(char, "architecture"), py_spoolss_DriverInfo101_get_architecture, py_spoolss_DriverInfo101_set_architecture },
	{ discard_const_p(char, "file_info"), py_spoolss_DriverInfo101_get_file_info, py_spoolss_DriverInfo101_set_file_info },
	{ discard_const_p(char, "file_count"), py_spoolss_DriverInfo101_get_file_count, py_spoolss_DriverInfo101_set_file_count },
	{ discard_const_p(char, "monitor_name"), py_spoolss_DriverInfo101_get_monitor_name, py_spoolss_DriverInfo101_set_monitor_name },
	{ discard_const_p(char, "default_datatype"), py_spoolss_DriverInfo101_get_default_datatype, py_spoolss_DriverInfo101_set_default_datatype },
	{ discard_const_p(char, "previous_names"), py_spoolss_DriverInfo101_get_previous_names, py_spoolss_DriverInfo101_set_previous_names },
	{ discard_const_p(char, "driver_date"), py_spoolss_DriverInfo101_get_driver_date, py_spoolss_DriverInfo101_set_driver_date },
	{ discard_const_p(char, "driver_version"), py_spoolss_DriverInfo101_get_driver_version, py_spoolss_DriverInfo101_set_driver_version },
	{ discard_const_p(char, "manufacturer_name"), py_spoolss_DriverInfo101_get_manufacturer_name, py_spoolss_DriverInfo101_set_manufacturer_name },
	{ discard_const_p(char, "manufacturer_url"), py_spoolss_DriverInfo101_get_manufacturer_url, py_spoolss_DriverInfo101_set_manufacturer_url },
	{ discard_const_p(char, "hardware_id"), py_spoolss_DriverInfo101_get_hardware_id, py_spoolss_DriverInfo101_set_hardware_id },
	{ discard_const_p(char, "provider"), py_spoolss_DriverInfo101_get_provider, py_spoolss_DriverInfo101_set_provider },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverInfo101_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverInfo101 *object = (struct spoolss_DriverInfo101 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverInfo101, "spoolss_DriverInfo101", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverInfo101_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverInfo101",
	.tp_getset = py_spoolss_DriverInfo101_getsetters,
	.tp_methods = py_spoolss_DriverInfo101_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverInfo101_new,
};

PyObject *py_import_spoolss_DriverInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_DriverInfo *in)
{
	PyObject *ret;

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

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

		case 3:
			ret = pytalloc_reference_ex(&spoolss_DriverInfo3_Type, mem_ctx, &in->info3);
			return ret;

		case 4:
			ret = pytalloc_reference_ex(&spoolss_DriverInfo4_Type, mem_ctx, &in->info4);
			return ret;

		case 5:
			ret = pytalloc_reference_ex(&spoolss_DriverInfo5_Type, mem_ctx, &in->info5);
			return ret;

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

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

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

		case 101:
			ret = pytalloc_reference_ex(&spoolss_DriverInfo101_Type, mem_ctx, &in->info101);
			return ret;

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

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

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

		case 3:
			PY_CHECK_TYPE(&spoolss_DriverInfo3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info3 = *(struct spoolss_DriverInfo3 *)pytalloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&spoolss_DriverInfo4_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info4 = *(struct spoolss_DriverInfo4 *)pytalloc_get_ptr(in);
			break;

		case 5:
			PY_CHECK_TYPE(&spoolss_DriverInfo5_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info5 = *(struct spoolss_DriverInfo5 *)pytalloc_get_ptr(in);
			break;

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

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

		case 8:
			PY_CHECK_TYPE(&spoolss_DriverInfo8_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->info8 = *(struct spoolss_DriverInfo8 *)pytalloc_get_ptr(in);
			break;

		case 101:
			PY_CHECK_TYPE(&spoolss_DriverInfo101_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info101 = *(struct spoolss_DriverInfo101 *)pytalloc_get_ptr(in);
			break;

		default:
			break;

	}

	return ret;
}


static PyObject *py_spoolss_DriverDirectoryInfo1_get_directory_name(PyObject *obj, void *closure)
{
	struct spoolss_DriverDirectoryInfo1 *object = (struct spoolss_DriverDirectoryInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_directory_name;
	py_directory_name = PyString_FromStringOrNULL(object->directory_name);
	return py_directory_name;
}

static int py_spoolss_DriverDirectoryInfo1_set_directory_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DriverDirectoryInfo1 *object = (struct spoolss_DriverDirectoryInfo1 *)pytalloc_get_ptr(py_obj);
	object->directory_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyGetSetDef py_spoolss_DriverDirectoryInfo1_getsetters[] = {
	{ discard_const_p(char, "directory_name"), py_spoolss_DriverDirectoryInfo1_get_directory_name, py_spoolss_DriverDirectoryInfo1_set_directory_name },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_DriverDirectoryInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_DriverDirectoryInfo1 *object = (struct spoolss_DriverDirectoryInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_DriverDirectoryInfo1, "spoolss_DriverDirectoryInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_DriverDirectoryInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DriverDirectoryInfo1",
	.tp_getset = py_spoolss_DriverDirectoryInfo1_getsetters,
	.tp_methods = py_spoolss_DriverDirectoryInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DriverDirectoryInfo1_new,
};

PyObject *py_import_spoolss_DriverDirectoryInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_DriverDirectoryInfo *in)
{
	PyObject *ret;

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

		default:
			ret = pytalloc_reference_ex(&spoolss_DriverDirectoryInfo1_Type, mem_ctx, &in->info1);
			return ret;

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

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

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

	}

	return ret;
}


static PyObject *py_spoolss_PrintProcessorInfo1_get_print_processor_name(PyObject *obj, void *closure)
{
	struct spoolss_PrintProcessorInfo1 *object = (struct spoolss_PrintProcessorInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_print_processor_name;
	if (object->print_processor_name == NULL) {
		py_print_processor_name = Py_None;
		Py_INCREF(py_print_processor_name);
	} else {
		py_print_processor_name = PyString_FromStringOrNULL(object->print_processor_name);
	}
	return py_print_processor_name;
}

static int py_spoolss_PrintProcessorInfo1_set_print_processor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrintProcessorInfo1 *object = (struct spoolss_PrintProcessorInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->print_processor_name = NULL;
	} else {
		object->print_processor_name = NULL;
		object->print_processor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_PrintProcessorInfo1_getsetters[] = {
	{ discard_const_p(char, "print_processor_name"), py_spoolss_PrintProcessorInfo1_get_print_processor_name, py_spoolss_PrintProcessorInfo1_set_print_processor_name },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrintProcessorInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrintProcessorInfo1 *object = (struct spoolss_PrintProcessorInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrintProcessorInfo1, "spoolss_PrintProcessorInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrintProcessorInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrintProcessorInfo1",
	.tp_getset = py_spoolss_PrintProcessorInfo1_getsetters,
	.tp_methods = py_spoolss_PrintProcessorInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrintProcessorInfo1_new,
};

PyObject *py_import_spoolss_PrintProcessorInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_PrintProcessorInfo *in)
{
	PyObject *ret;

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

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

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

		default:
			break;

	}

	return ret;
}


static PyObject *py_spoolss_PrintProcessorDirectoryInfo1_get_directory_name(PyObject *obj, void *closure)
{
	struct spoolss_PrintProcessorDirectoryInfo1 *object = (struct spoolss_PrintProcessorDirectoryInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_directory_name;
	py_directory_name = PyString_FromStringOrNULL(object->directory_name);
	return py_directory_name;
}

static int py_spoolss_PrintProcessorDirectoryInfo1_set_directory_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrintProcessorDirectoryInfo1 *object = (struct spoolss_PrintProcessorDirectoryInfo1 *)pytalloc_get_ptr(py_obj);
	object->directory_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyGetSetDef py_spoolss_PrintProcessorDirectoryInfo1_getsetters[] = {
	{ discard_const_p(char, "directory_name"), py_spoolss_PrintProcessorDirectoryInfo1_get_directory_name, py_spoolss_PrintProcessorDirectoryInfo1_set_directory_name },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrintProcessorDirectoryInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrintProcessorDirectoryInfo1 *object = (struct spoolss_PrintProcessorDirectoryInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrintProcessorDirectoryInfo1, "spoolss_PrintProcessorDirectoryInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PrintProcessorDirectoryInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrintProcessorDirectoryInfo1",
	.tp_getset = py_spoolss_PrintProcessorDirectoryInfo1_getsetters,
	.tp_methods = py_spoolss_PrintProcessorDirectoryInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrintProcessorDirectoryInfo1_new,
};

PyObject *py_import_spoolss_PrintProcessorDirectoryInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_PrintProcessorDirectoryInfo *in)
{
	PyObject *ret;

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

		default:
			ret = pytalloc_reference_ex(&spoolss_PrintProcessorDirectoryInfo1_Type, mem_ctx, &in->info1);
			return ret;

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

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

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

	}

	return ret;
}


static PyObject *py_spoolss_DocumentInfo1_get_document_name(PyObject *obj, void *closure)
{
	struct spoolss_DocumentInfo1 *object = (struct spoolss_DocumentInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_document_name;
	if (object->document_name == NULL) {
		py_document_name = Py_None;
		Py_INCREF(py_document_name);
	} else {
		if (object->document_name == NULL) {
			py_document_name = Py_None;
			Py_INCREF(py_document_name);
		} else {
			py_document_name = PyUnicode_Decode(object->document_name, strlen(object->document_name), "utf-8", "ignore");
		}
	}
	return py_document_name;
}

static int py_spoolss_DocumentInfo1_set_document_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DocumentInfo1 *object = (struct spoolss_DocumentInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->document_name = NULL;
	} else {
		object->document_name = NULL;
		if (PyUnicode_Check(value)) {
			object->document_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->document_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_spoolss_DocumentInfo1_get_output_file(PyObject *obj, void *closure)
{
	struct spoolss_DocumentInfo1 *object = (struct spoolss_DocumentInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_output_file;
	if (object->output_file == NULL) {
		py_output_file = Py_None;
		Py_INCREF(py_output_file);
	} else {
		if (object->output_file == NULL) {
			py_output_file = Py_None;
			Py_INCREF(py_output_file);
		} else {
			py_output_file = PyUnicode_Decode(object->output_file, strlen(object->output_file), "utf-8", "ignore");
		}
	}
	return py_output_file;
}

static int py_spoolss_DocumentInfo1_set_output_file(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DocumentInfo1 *object = (struct spoolss_DocumentInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->output_file = NULL;
	} else {
		object->output_file = NULL;
		if (PyUnicode_Check(value)) {
			object->output_file = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->output_file = 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_spoolss_DocumentInfo1_get_datatype(PyObject *obj, void *closure)
{
	struct spoolss_DocumentInfo1 *object = (struct spoolss_DocumentInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_datatype;
	if (object->datatype == NULL) {
		py_datatype = Py_None;
		Py_INCREF(py_datatype);
	} else {
		if (object->datatype == NULL) {
			py_datatype = Py_None;
			Py_INCREF(py_datatype);
		} else {
			py_datatype = PyUnicode_Decode(object->datatype, strlen(object->datatype), "utf-8", "ignore");
		}
	}
	return py_datatype;
}

static int py_spoolss_DocumentInfo1_set_datatype(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_DocumentInfo1 *object = (struct spoolss_DocumentInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->datatype = NULL;
	} else {
		object->datatype = NULL;
		if (PyUnicode_Check(value)) {
			object->datatype = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->datatype = 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_spoolss_DocumentInfo1_getsetters[] = {
	{ discard_const_p(char, "document_name"), py_spoolss_DocumentInfo1_get_document_name, py_spoolss_DocumentInfo1_set_document_name },
	{ discard_const_p(char, "output_file"), py_spoolss_DocumentInfo1_get_output_file, py_spoolss_DocumentInfo1_set_output_file },
	{ discard_const_p(char, "datatype"), py_spoolss_DocumentInfo1_get_datatype, py_spoolss_DocumentInfo1_set_datatype },
	{ NULL }
};

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


static PyTypeObject spoolss_DocumentInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.DocumentInfo1",
	.tp_getset = py_spoolss_DocumentInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_DocumentInfo1_new,
};

PyObject *py_import_spoolss_DocumentInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_DocumentInfo *in)
{
	PyObject *ret;

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

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

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

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

union spoolss_DocumentInfo *py_export_spoolss_DocumentInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_DocumentInfo *ret = talloc_zero(mem_ctx, union spoolss_DocumentInfo);
	switch (level) {
		case 1:
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&spoolss_DocumentInfo1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info1 = (struct spoolss_DocumentInfo1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			break;

		case 3:
			break;

		default:
			break;

	}

	return ret;
}


static PyObject *py_spoolss_OSVersion_get__ndr_size(PyObject *obj, void *closure)
{
	struct spoolss_OSVersion *object = (struct spoolss_OSVersion *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size;
	py__ndr_size = PyInt_FromLong(object->_ndr_size);
	return py__ndr_size;
}

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

static PyObject *py_spoolss_OSVersion_get_major(PyObject *obj, void *closure)
{
	struct spoolss_OSVersion *object = (struct spoolss_OSVersion *)pytalloc_get_ptr(obj);
	PyObject *py_major;
	py_major = PyInt_FromLong(object->major);
	return py_major;
}

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

static PyObject *py_spoolss_OSVersion_get_minor(PyObject *obj, void *closure)
{
	struct spoolss_OSVersion *object = (struct spoolss_OSVersion *)pytalloc_get_ptr(obj);
	PyObject *py_minor;
	py_minor = PyInt_FromLong(object->minor);
	return py_minor;
}

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

static PyObject *py_spoolss_OSVersion_get_build(PyObject *obj, void *closure)
{
	struct spoolss_OSVersion *object = (struct spoolss_OSVersion *)pytalloc_get_ptr(obj);
	PyObject *py_build;
	py_build = PyInt_FromLong(object->build);
	return py_build;
}

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

static PyObject *py_spoolss_OSVersion_get_platform_id(PyObject *obj, void *closure)
{
	struct spoolss_OSVersion *object = (struct spoolss_OSVersion *)pytalloc_get_ptr(obj);
	PyObject *py_platform_id;
	py_platform_id = PyInt_FromLong(object->platform_id);
	return py_platform_id;
}

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

static PyObject *py_spoolss_OSVersion_get_extra_string(PyObject *obj, void *closure)
{
	struct spoolss_OSVersion *object = (struct spoolss_OSVersion *)pytalloc_get_ptr(obj);
	PyObject *py_extra_string;
	py_extra_string = PyString_FromStringOrNULL(object->extra_string);
	return py_extra_string;
}

static int py_spoolss_OSVersion_set_extra_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_OSVersion *object = (struct spoolss_OSVersion *)pytalloc_get_ptr(py_obj);
	object->extra_string = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyGetSetDef py_spoolss_OSVersion_getsetters[] = {
	{ discard_const_p(char, "_ndr_size"), py_spoolss_OSVersion_get__ndr_size, py_spoolss_OSVersion_set__ndr_size },
	{ discard_const_p(char, "major"), py_spoolss_OSVersion_get_major, py_spoolss_OSVersion_set_major },
	{ discard_const_p(char, "minor"), py_spoolss_OSVersion_get_minor, py_spoolss_OSVersion_set_minor },
	{ discard_const_p(char, "build"), py_spoolss_OSVersion_get_build, py_spoolss_OSVersion_set_build },
	{ discard_const_p(char, "platform_id"), py_spoolss_OSVersion_get_platform_id, py_spoolss_OSVersion_set_platform_id },
	{ discard_const_p(char, "extra_string"), py_spoolss_OSVersion_get_extra_string, py_spoolss_OSVersion_set_extra_string },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_OSVersion_ndr_print(PyObject *py_obj)
{
	struct spoolss_OSVersion *object = (struct spoolss_OSVersion *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_OSVersion, "spoolss_OSVersion", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_OSVersion_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.OSVersion",
	.tp_getset = py_spoolss_OSVersion_getsetters,
	.tp_methods = py_spoolss_OSVersion_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_OSVersion_new,
};


static PyObject *py_spoolss_OSVersionEx_get__ndr_size(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py__ndr_size;
	py__ndr_size = PyInt_FromLong(object->_ndr_size);
	return py__ndr_size;
}

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

static PyObject *py_spoolss_OSVersionEx_get_major(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_major;
	py_major = PyInt_FromLong(object->major);
	return py_major;
}

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

static PyObject *py_spoolss_OSVersionEx_get_minor(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_minor;
	py_minor = PyInt_FromLong(object->minor);
	return py_minor;
}

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

static PyObject *py_spoolss_OSVersionEx_get_build(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_build;
	py_build = PyInt_FromLong(object->build);
	return py_build;
}

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

static PyObject *py_spoolss_OSVersionEx_get_platform_id(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_platform_id;
	py_platform_id = PyInt_FromLong(object->platform_id);
	return py_platform_id;
}

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

static PyObject *py_spoolss_OSVersionEx_get_extra_string(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_extra_string;
	py_extra_string = PyString_FromStringOrNULL(object->extra_string);
	return py_extra_string;
}

static int py_spoolss_OSVersionEx_set_extra_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(py_obj);
	object->extra_string = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyObject *py_spoolss_OSVersionEx_get_service_pack_major(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_service_pack_major;
	py_service_pack_major = PyInt_FromLong(object->service_pack_major);
	return py_service_pack_major;
}

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

static PyObject *py_spoolss_OSVersionEx_get_service_pack_minor(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_service_pack_minor;
	py_service_pack_minor = PyInt_FromLong(object->service_pack_minor);
	return py_service_pack_minor;
}

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

static PyObject *py_spoolss_OSVersionEx_get_suite_mask(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_suite_mask;
	py_suite_mask = PyInt_FromLong(object->suite_mask);
	return py_suite_mask;
}

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

static PyObject *py_spoolss_OSVersionEx_get_product_type(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_product_type;
	py_product_type = PyInt_FromLong(object->product_type);
	return py_product_type;
}

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

static PyObject *py_spoolss_OSVersionEx_get_reserved(PyObject *obj, void *closure)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

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

static PyGetSetDef py_spoolss_OSVersionEx_getsetters[] = {
	{ discard_const_p(char, "_ndr_size"), py_spoolss_OSVersionEx_get__ndr_size, py_spoolss_OSVersionEx_set__ndr_size },
	{ discard_const_p(char, "major"), py_spoolss_OSVersionEx_get_major, py_spoolss_OSVersionEx_set_major },
	{ discard_const_p(char, "minor"), py_spoolss_OSVersionEx_get_minor, py_spoolss_OSVersionEx_set_minor },
	{ discard_const_p(char, "build"), py_spoolss_OSVersionEx_get_build, py_spoolss_OSVersionEx_set_build },
	{ discard_const_p(char, "platform_id"), py_spoolss_OSVersionEx_get_platform_id, py_spoolss_OSVersionEx_set_platform_id },
	{ discard_const_p(char, "extra_string"), py_spoolss_OSVersionEx_get_extra_string, py_spoolss_OSVersionEx_set_extra_string },
	{ discard_const_p(char, "service_pack_major"), py_spoolss_OSVersionEx_get_service_pack_major, py_spoolss_OSVersionEx_set_service_pack_major },
	{ discard_const_p(char, "service_pack_minor"), py_spoolss_OSVersionEx_get_service_pack_minor, py_spoolss_OSVersionEx_set_service_pack_minor },
	{ discard_const_p(char, "suite_mask"), py_spoolss_OSVersionEx_get_suite_mask, py_spoolss_OSVersionEx_set_suite_mask },
	{ discard_const_p(char, "product_type"), py_spoolss_OSVersionEx_get_product_type, py_spoolss_OSVersionEx_set_product_type },
	{ discard_const_p(char, "reserved"), py_spoolss_OSVersionEx_get_reserved, py_spoolss_OSVersionEx_set_reserved },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_OSVersionEx_ndr_print(PyObject *py_obj)
{
	struct spoolss_OSVersionEx *object = (struct spoolss_OSVersionEx *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_OSVersionEx, "spoolss_OSVersionEx", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_OSVersionEx_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.OSVersionEx",
	.tp_getset = py_spoolss_OSVersionEx_getsetters,
	.tp_methods = py_spoolss_OSVersionEx_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_OSVersionEx_new,
};

PyObject *py_import_spoolss_PrinterData(TALLOC_CTX *mem_ctx, int level, union spoolss_PrinterData *in)
{
	PyObject *ret;

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

		case REG_SZ:
			ret = PyString_FromStringOrNULL(in->string);
			return ret;

		case REG_BINARY:
			ret = PyString_FromStringAndSize((char *)(in->binary).data, (in->binary).length);
			return ret;

		case REG_DWORD:
			ret = PyInt_FromLong(in->value);
			return ret;

		case REG_MULTI_SZ:
			ret = pytalloc_CObject_FromTallocPtr(in->string_array);
			return ret;

		default:
			ret = PyString_FromStringAndSize((char *)(in->data).data, (in->data).length);
			return ret;

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

union spoolss_PrinterData *py_export_spoolss_PrinterData(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_PrinterData *ret = talloc_zero(mem_ctx, union spoolss_PrinterData);
	switch (level) {
		case REG_NONE:
			break;

		case REG_SZ:
			ret->string = talloc_strdup(mem_ctx, PyString_AS_STRING(in));
			break;

		case REG_BINARY:
			ret->binary = data_blob_talloc(mem_ctx, PyString_AS_STRING(in), PyString_GET_SIZE(in));
			break;

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

		case REG_MULTI_SZ:
			ret->string_array = PyCObject_AsVoidPtr(in);
			break;

		default:
			ret->data = data_blob_talloc(mem_ctx, PyString_AS_STRING(in), PyString_GET_SIZE(in));
			break;

	}

	return ret;
}


static PyObject *py_spoolss_FormSize_get_width(PyObject *obj, void *closure)
{
	struct spoolss_FormSize *object = (struct spoolss_FormSize *)pytalloc_get_ptr(obj);
	PyObject *py_width;
	py_width = PyInt_FromLong(object->width);
	return py_width;
}

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

static PyObject *py_spoolss_FormSize_get_height(PyObject *obj, void *closure)
{
	struct spoolss_FormSize *object = (struct spoolss_FormSize *)pytalloc_get_ptr(obj);
	PyObject *py_height;
	py_height = PyInt_FromLong(object->height);
	return py_height;
}

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

static PyGetSetDef py_spoolss_FormSize_getsetters[] = {
	{ discard_const_p(char, "width"), py_spoolss_FormSize_get_width, py_spoolss_FormSize_set_width },
	{ discard_const_p(char, "height"), py_spoolss_FormSize_get_height, py_spoolss_FormSize_set_height },
	{ NULL }
};

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


static PyTypeObject spoolss_FormSize_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.FormSize",
	.tp_getset = py_spoolss_FormSize_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_FormSize_new,
};


static PyObject *py_spoolss_FormArea_get_left(PyObject *obj, void *closure)
{
	struct spoolss_FormArea *object = (struct spoolss_FormArea *)pytalloc_get_ptr(obj);
	PyObject *py_left;
	py_left = PyInt_FromLong(object->left);
	return py_left;
}

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

static PyObject *py_spoolss_FormArea_get_top(PyObject *obj, void *closure)
{
	struct spoolss_FormArea *object = (struct spoolss_FormArea *)pytalloc_get_ptr(obj);
	PyObject *py_top;
	py_top = PyInt_FromLong(object->top);
	return py_top;
}

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

static PyObject *py_spoolss_FormArea_get_right(PyObject *obj, void *closure)
{
	struct spoolss_FormArea *object = (struct spoolss_FormArea *)pytalloc_get_ptr(obj);
	PyObject *py_right;
	py_right = PyInt_FromLong(object->right);
	return py_right;
}

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

static PyObject *py_spoolss_FormArea_get_bottom(PyObject *obj, void *closure)
{
	struct spoolss_FormArea *object = (struct spoolss_FormArea *)pytalloc_get_ptr(obj);
	PyObject *py_bottom;
	py_bottom = PyInt_FromLong(object->bottom);
	return py_bottom;
}

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

static PyGetSetDef py_spoolss_FormArea_getsetters[] = {
	{ discard_const_p(char, "left"), py_spoolss_FormArea_get_left, py_spoolss_FormArea_set_left },
	{ discard_const_p(char, "top"), py_spoolss_FormArea_get_top, py_spoolss_FormArea_set_top },
	{ discard_const_p(char, "right"), py_spoolss_FormArea_get_right, py_spoolss_FormArea_set_right },
	{ discard_const_p(char, "bottom"), py_spoolss_FormArea_get_bottom, py_spoolss_FormArea_set_bottom },
	{ NULL }
};

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


static PyTypeObject spoolss_FormArea_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.FormArea",
	.tp_getset = py_spoolss_FormArea_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_FormArea_new,
};


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

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

static PyObject *py_spoolss_FormInfo1_get_form_name(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo1 *object = (struct spoolss_FormInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_form_name;
	if (object->form_name == NULL) {
		py_form_name = Py_None;
		Py_INCREF(py_form_name);
	} else {
		py_form_name = PyString_FromStringOrNULL(object->form_name);
	}
	return py_form_name;
}

static int py_spoolss_FormInfo1_set_form_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo1 *object = (struct spoolss_FormInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->form_name = NULL;
	} else {
		object->form_name = NULL;
		object->form_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_FormInfo1_get_size(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo1 *object = (struct spoolss_FormInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = pytalloc_reference_ex(&spoolss_FormSize_Type, pytalloc_get_mem_ctx(obj), &object->size);
	return py_size;
}

static int py_spoolss_FormInfo1_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo1 *object = (struct spoolss_FormInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_FormSize_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->size = *(struct spoolss_FormSize *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_FormInfo1_get_area(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo1 *object = (struct spoolss_FormInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_area;
	py_area = pytalloc_reference_ex(&spoolss_FormArea_Type, pytalloc_get_mem_ctx(obj), &object->area);
	return py_area;
}

static int py_spoolss_FormInfo1_set_area(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo1 *object = (struct spoolss_FormInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_FormArea_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->area = *(struct spoolss_FormArea *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_spoolss_FormInfo1_getsetters[] = {
	{ discard_const_p(char, "flags"), py_spoolss_FormInfo1_get_flags, py_spoolss_FormInfo1_set_flags },
	{ discard_const_p(char, "form_name"), py_spoolss_FormInfo1_get_form_name, py_spoolss_FormInfo1_set_form_name },
	{ discard_const_p(char, "size"), py_spoolss_FormInfo1_get_size, py_spoolss_FormInfo1_set_size },
	{ discard_const_p(char, "area"), py_spoolss_FormInfo1_get_area, py_spoolss_FormInfo1_set_area },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_FormInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_FormInfo1 *object = (struct spoolss_FormInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_FormInfo1, "spoolss_FormInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_FormInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.FormInfo1",
	.tp_getset = py_spoolss_FormInfo1_getsetters,
	.tp_methods = py_spoolss_FormInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_FormInfo1_new,
};


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

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

static PyObject *py_spoolss_FormInfo2_get_form_name(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_form_name;
	if (object->form_name == NULL) {
		py_form_name = Py_None;
		Py_INCREF(py_form_name);
	} else {
		py_form_name = PyString_FromStringOrNULL(object->form_name);
	}
	return py_form_name;
}

static int py_spoolss_FormInfo2_set_form_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->form_name = NULL;
	} else {
		object->form_name = NULL;
		object->form_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_FormInfo2_get_size(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = pytalloc_reference_ex(&spoolss_FormSize_Type, pytalloc_get_mem_ctx(obj), &object->size);
	return py_size;
}

static int py_spoolss_FormInfo2_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_FormSize_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->size = *(struct spoolss_FormSize *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_FormInfo2_get_area(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_area;
	py_area = pytalloc_reference_ex(&spoolss_FormArea_Type, pytalloc_get_mem_ctx(obj), &object->area);
	return py_area;
}

static int py_spoolss_FormInfo2_set_area(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_FormArea_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->area = *(struct spoolss_FormArea *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_FormInfo2_get_keyword(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_keyword;
	if (object->keyword == NULL) {
		py_keyword = Py_None;
		Py_INCREF(py_keyword);
	} else {
		py_keyword = PyString_FromStringOrNULL(object->keyword);
	}
	return py_keyword;
}

static int py_spoolss_FormInfo2_set_keyword(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->keyword = NULL;
	} else {
		object->keyword = NULL;
		object->keyword = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_FormInfo2_get_string_type(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_string_type;
	py_string_type = PyInt_FromLong(object->string_type);
	return py_string_type;
}

static int py_spoolss_FormInfo2_set_string_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->string_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->string_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_spoolss_FormInfo2_get_mui_dll(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_mui_dll;
	if (object->mui_dll == NULL) {
		py_mui_dll = Py_None;
		Py_INCREF(py_mui_dll);
	} else {
		py_mui_dll = PyString_FromStringOrNULL(object->mui_dll);
	}
	return py_mui_dll;
}

static int py_spoolss_FormInfo2_set_mui_dll(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->mui_dll = NULL;
	} else {
		object->mui_dll = NULL;
		object->mui_dll = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_FormInfo2_get_ressource_id(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_ressource_id;
	py_ressource_id = PyInt_FromLong(object->ressource_id);
	return py_ressource_id;
}

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

static PyObject *py_spoolss_FormInfo2_get_display_name(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_display_name;
	if (object->display_name == NULL) {
		py_display_name = Py_None;
		Py_INCREF(py_display_name);
	} else {
		py_display_name = PyString_FromStringOrNULL(object->display_name);
	}
	return py_display_name;
}

static int py_spoolss_FormInfo2_set_display_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->display_name = NULL;
	} else {
		object->display_name = NULL;
		object->display_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_FormInfo2_get_lang_id(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_lang_id;
	py_lang_id = PyInt_FromLong(object->lang_id);
	return py_lang_id;
}

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

static PyObject *py_spoolss_FormInfo2_get_unused(PyObject *obj, void *closure)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_unused;
	py_unused = PyInt_FromLong(object->unused);
	return py_unused;
}

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

static PyGetSetDef py_spoolss_FormInfo2_getsetters[] = {
	{ discard_const_p(char, "flags"), py_spoolss_FormInfo2_get_flags, py_spoolss_FormInfo2_set_flags },
	{ discard_const_p(char, "form_name"), py_spoolss_FormInfo2_get_form_name, py_spoolss_FormInfo2_set_form_name },
	{ discard_const_p(char, "size"), py_spoolss_FormInfo2_get_size, py_spoolss_FormInfo2_set_size },
	{ discard_const_p(char, "area"), py_spoolss_FormInfo2_get_area, py_spoolss_FormInfo2_set_area },
	{ discard_const_p(char, "keyword"), py_spoolss_FormInfo2_get_keyword, py_spoolss_FormInfo2_set_keyword },
	{ discard_const_p(char, "string_type"), py_spoolss_FormInfo2_get_string_type, py_spoolss_FormInfo2_set_string_type },
	{ discard_const_p(char, "mui_dll"), py_spoolss_FormInfo2_get_mui_dll, py_spoolss_FormInfo2_set_mui_dll },
	{ discard_const_p(char, "ressource_id"), py_spoolss_FormInfo2_get_ressource_id, py_spoolss_FormInfo2_set_ressource_id },
	{ discard_const_p(char, "display_name"), py_spoolss_FormInfo2_get_display_name, py_spoolss_FormInfo2_set_display_name },
	{ discard_const_p(char, "lang_id"), py_spoolss_FormInfo2_get_lang_id, py_spoolss_FormInfo2_set_lang_id },
	{ discard_const_p(char, "unused"), py_spoolss_FormInfo2_get_unused, py_spoolss_FormInfo2_set_unused },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_FormInfo2_ndr_print(PyObject *py_obj)
{
	struct spoolss_FormInfo2 *object = (struct spoolss_FormInfo2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_FormInfo2, "spoolss_FormInfo2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_FormInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.FormInfo2",
	.tp_getset = py_spoolss_FormInfo2_getsetters,
	.tp_methods = py_spoolss_FormInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_FormInfo2_new,
};

PyObject *py_import_spoolss_FormInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_FormInfo *in)
{
	PyObject *ret;

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

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

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

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

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

		default:
			break;

	}

	return ret;
}


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

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

static PyObject *py_spoolss_AddFormInfo1_get_form_name(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo1 *object = (struct spoolss_AddFormInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_form_name;
	if (object->form_name == NULL) {
		py_form_name = Py_None;
		Py_INCREF(py_form_name);
	} else {
		if (object->form_name == NULL) {
			py_form_name = Py_None;
			Py_INCREF(py_form_name);
		} else {
			py_form_name = PyUnicode_Decode(object->form_name, strlen(object->form_name), "utf-8", "ignore");
		}
	}
	return py_form_name;
}

static int py_spoolss_AddFormInfo1_set_form_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo1 *object = (struct spoolss_AddFormInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->form_name = NULL;
	} else {
		object->form_name = NULL;
		if (PyUnicode_Check(value)) {
			object->form_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->form_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_spoolss_AddFormInfo1_get_size(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo1 *object = (struct spoolss_AddFormInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = pytalloc_reference_ex(&spoolss_FormSize_Type, pytalloc_get_mem_ctx(obj), &object->size);
	return py_size;
}

static int py_spoolss_AddFormInfo1_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo1 *object = (struct spoolss_AddFormInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_FormSize_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->size = *(struct spoolss_FormSize *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_AddFormInfo1_get_area(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo1 *object = (struct spoolss_AddFormInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_area;
	py_area = pytalloc_reference_ex(&spoolss_FormArea_Type, pytalloc_get_mem_ctx(obj), &object->area);
	return py_area;
}

static int py_spoolss_AddFormInfo1_set_area(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo1 *object = (struct spoolss_AddFormInfo1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_FormArea_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->area = *(struct spoolss_FormArea *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_spoolss_AddFormInfo1_getsetters[] = {
	{ discard_const_p(char, "flags"), py_spoolss_AddFormInfo1_get_flags, py_spoolss_AddFormInfo1_set_flags },
	{ discard_const_p(char, "form_name"), py_spoolss_AddFormInfo1_get_form_name, py_spoolss_AddFormInfo1_set_form_name },
	{ discard_const_p(char, "size"), py_spoolss_AddFormInfo1_get_size, py_spoolss_AddFormInfo1_set_size },
	{ discard_const_p(char, "area"), py_spoolss_AddFormInfo1_get_area, py_spoolss_AddFormInfo1_set_area },
	{ NULL }
};

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


static PyTypeObject spoolss_AddFormInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddFormInfo1",
	.tp_getset = py_spoolss_AddFormInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddFormInfo1_new,
};


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

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

static PyObject *py_spoolss_AddFormInfo2_get_form_name(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_form_name;
	if (object->form_name == NULL) {
		py_form_name = Py_None;
		Py_INCREF(py_form_name);
	} else {
		if (object->form_name == NULL) {
			py_form_name = Py_None;
			Py_INCREF(py_form_name);
		} else {
			py_form_name = PyUnicode_Decode(object->form_name, strlen(object->form_name), "utf-8", "ignore");
		}
	}
	return py_form_name;
}

static int py_spoolss_AddFormInfo2_set_form_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->form_name = NULL;
	} else {
		object->form_name = NULL;
		if (PyUnicode_Check(value)) {
			object->form_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->form_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_spoolss_AddFormInfo2_get_size(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = pytalloc_reference_ex(&spoolss_FormSize_Type, pytalloc_get_mem_ctx(obj), &object->size);
	return py_size;
}

static int py_spoolss_AddFormInfo2_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_FormSize_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->size = *(struct spoolss_FormSize *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_AddFormInfo2_get_area(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_area;
	py_area = pytalloc_reference_ex(&spoolss_FormArea_Type, pytalloc_get_mem_ctx(obj), &object->area);
	return py_area;
}

static int py_spoolss_AddFormInfo2_set_area(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&spoolss_FormArea_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->area = *(struct spoolss_FormArea *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_AddFormInfo2_get_keyword(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_keyword;
	if (object->keyword == NULL) {
		py_keyword = Py_None;
		Py_INCREF(py_keyword);
	} else {
		if (object->keyword == NULL) {
			py_keyword = Py_None;
			Py_INCREF(py_keyword);
		} else {
			py_keyword = PyUnicode_Decode(object->keyword, strlen(object->keyword), "utf-8", "ignore");
		}
	}
	return py_keyword;
}

static int py_spoolss_AddFormInfo2_set_keyword(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->keyword = NULL;
	} else {
		object->keyword = NULL;
		if (PyUnicode_Check(value)) {
			object->keyword = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->keyword = 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_spoolss_AddFormInfo2_get_string_type(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_string_type;
	py_string_type = PyInt_FromLong(object->string_type);
	return py_string_type;
}

static int py_spoolss_AddFormInfo2_set_string_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->string_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->string_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_spoolss_AddFormInfo2_get_mui_dll(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_mui_dll;
	if (object->mui_dll == NULL) {
		py_mui_dll = Py_None;
		Py_INCREF(py_mui_dll);
	} else {
		if (object->mui_dll == NULL) {
			py_mui_dll = Py_None;
			Py_INCREF(py_mui_dll);
		} else {
			py_mui_dll = PyUnicode_Decode(object->mui_dll, strlen(object->mui_dll), "utf-8", "ignore");
		}
	}
	return py_mui_dll;
}

static int py_spoolss_AddFormInfo2_set_mui_dll(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->mui_dll = NULL;
	} else {
		object->mui_dll = NULL;
		if (PyUnicode_Check(value)) {
			object->mui_dll = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->mui_dll = 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_spoolss_AddFormInfo2_get_ressource_id(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_ressource_id;
	py_ressource_id = PyInt_FromLong(object->ressource_id);
	return py_ressource_id;
}

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

static PyObject *py_spoolss_AddFormInfo2_get_display_name(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_display_name;
	if (object->display_name == NULL) {
		py_display_name = Py_None;
		Py_INCREF(py_display_name);
	} else {
		if (object->display_name == NULL) {
			py_display_name = Py_None;
			Py_INCREF(py_display_name);
		} else {
			py_display_name = PyUnicode_Decode(object->display_name, strlen(object->display_name), "utf-8", "ignore");
		}
	}
	return py_display_name;
}

static int py_spoolss_AddFormInfo2_set_display_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->display_name = NULL;
	} else {
		object->display_name = NULL;
		if (PyUnicode_Check(value)) {
			object->display_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->display_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_spoolss_AddFormInfo2_get_lang_id(PyObject *obj, void *closure)
{
	struct spoolss_AddFormInfo2 *object = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_lang_id;
	py_lang_id = PyInt_FromLong(object->lang_id);
	return py_lang_id;
}

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

static PyGetSetDef py_spoolss_AddFormInfo2_getsetters[] = {
	{ discard_const_p(char, "flags"), py_spoolss_AddFormInfo2_get_flags, py_spoolss_AddFormInfo2_set_flags },
	{ discard_const_p(char, "form_name"), py_spoolss_AddFormInfo2_get_form_name, py_spoolss_AddFormInfo2_set_form_name },
	{ discard_const_p(char, "size"), py_spoolss_AddFormInfo2_get_size, py_spoolss_AddFormInfo2_set_size },
	{ discard_const_p(char, "area"), py_spoolss_AddFormInfo2_get_area, py_spoolss_AddFormInfo2_set_area },
	{ discard_const_p(char, "keyword"), py_spoolss_AddFormInfo2_get_keyword, py_spoolss_AddFormInfo2_set_keyword },
	{ discard_const_p(char, "string_type"), py_spoolss_AddFormInfo2_get_string_type, py_spoolss_AddFormInfo2_set_string_type },
	{ discard_const_p(char, "mui_dll"), py_spoolss_AddFormInfo2_get_mui_dll, py_spoolss_AddFormInfo2_set_mui_dll },
	{ discard_const_p(char, "ressource_id"), py_spoolss_AddFormInfo2_get_ressource_id, py_spoolss_AddFormInfo2_set_ressource_id },
	{ discard_const_p(char, "display_name"), py_spoolss_AddFormInfo2_get_display_name, py_spoolss_AddFormInfo2_set_display_name },
	{ discard_const_p(char, "lang_id"), py_spoolss_AddFormInfo2_get_lang_id, py_spoolss_AddFormInfo2_set_lang_id },
	{ NULL }
};

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


static PyTypeObject spoolss_AddFormInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.AddFormInfo2",
	.tp_getset = py_spoolss_AddFormInfo2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_AddFormInfo2_new,
};

PyObject *py_import_spoolss_AddFormInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_AddFormInfo *in)
{
	PyObject *ret;

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

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

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

union spoolss_AddFormInfo *py_export_spoolss_AddFormInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_AddFormInfo *ret = talloc_zero(mem_ctx, union spoolss_AddFormInfo);
	switch (level) {
		case 1:
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&spoolss_AddFormInfo1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info1 = (struct spoolss_AddFormInfo1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == Py_None) {
				ret->info2 = NULL;
			} else {
				ret->info2 = NULL;
				PY_CHECK_TYPE(&spoolss_AddFormInfo2_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info2 = (struct spoolss_AddFormInfo2 *)pytalloc_get_ptr(in);
			}
			break;

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

	return ret;
}


static PyObject *py_spoolss_PortInfo1_get_port_name(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo1 *object = (struct spoolss_PortInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_port_name;
	if (object->port_name == NULL) {
		py_port_name = Py_None;
		Py_INCREF(py_port_name);
	} else {
		py_port_name = PyString_FromStringOrNULL(object->port_name);
	}
	return py_port_name;
}

static int py_spoolss_PortInfo1_set_port_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortInfo1 *object = (struct spoolss_PortInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->port_name = NULL;
	} else {
		object->port_name = NULL;
		object->port_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_PortInfo1_getsetters[] = {
	{ discard_const_p(char, "port_name"), py_spoolss_PortInfo1_get_port_name, py_spoolss_PortInfo1_set_port_name },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PortInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_PortInfo1 *object = (struct spoolss_PortInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PortInfo1, "spoolss_PortInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PortInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PortInfo1",
	.tp_getset = py_spoolss_PortInfo1_getsetters,
	.tp_methods = py_spoolss_PortInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PortInfo1_new,
};


static PyObject *py_spoolss_PortInfo2_get_port_name(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_port_name;
	if (object->port_name == NULL) {
		py_port_name = Py_None;
		Py_INCREF(py_port_name);
	} else {
		py_port_name = PyString_FromStringOrNULL(object->port_name);
	}
	return py_port_name;
}

static int py_spoolss_PortInfo2_set_port_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->port_name = NULL;
	} else {
		object->port_name = NULL;
		object->port_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PortInfo2_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		py_monitor_name = PyString_FromStringOrNULL(object->monitor_name);
	}
	return py_monitor_name;
}

static int py_spoolss_PortInfo2_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		object->monitor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PortInfo2_get_description(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_description;
	if (object->description == NULL) {
		py_description = Py_None;
		Py_INCREF(py_description);
	} else {
		py_description = PyString_FromStringOrNULL(object->description);
	}
	return py_description;
}

static int py_spoolss_PortInfo2_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->description = NULL;
	} else {
		object->description = NULL;
		object->description = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PortInfo2_get_port_type(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_port_type;
	py_port_type = PyInt_FromLong(object->port_type);
	return py_port_type;
}

static int py_spoolss_PortInfo2_set_port_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->port_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->port_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_spoolss_PortInfo2_get_reserved(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

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

static PyGetSetDef py_spoolss_PortInfo2_getsetters[] = {
	{ discard_const_p(char, "port_name"), py_spoolss_PortInfo2_get_port_name, py_spoolss_PortInfo2_set_port_name },
	{ discard_const_p(char, "monitor_name"), py_spoolss_PortInfo2_get_monitor_name, py_spoolss_PortInfo2_set_monitor_name },
	{ discard_const_p(char, "description"), py_spoolss_PortInfo2_get_description, py_spoolss_PortInfo2_set_description },
	{ discard_const_p(char, "port_type"), py_spoolss_PortInfo2_get_port_type, py_spoolss_PortInfo2_set_port_type },
	{ discard_const_p(char, "reserved"), py_spoolss_PortInfo2_get_reserved, py_spoolss_PortInfo2_set_reserved },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PortInfo2_ndr_print(PyObject *py_obj)
{
	struct spoolss_PortInfo2 *object = (struct spoolss_PortInfo2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PortInfo2, "spoolss_PortInfo2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PortInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PortInfo2",
	.tp_getset = py_spoolss_PortInfo2_getsetters,
	.tp_methods = py_spoolss_PortInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PortInfo2_new,
};


static PyObject *py_spoolss_PortInfo3_get_status(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo3 *object = (struct spoolss_PortInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

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

static PyObject *py_spoolss_PortInfo3_get_status_string(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo3 *object = (struct spoolss_PortInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_status_string;
	if (object->status_string == NULL) {
		py_status_string = Py_None;
		Py_INCREF(py_status_string);
	} else {
		py_status_string = PyString_FromStringOrNULL(object->status_string);
	}
	return py_status_string;
}

static int py_spoolss_PortInfo3_set_status_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortInfo3 *object = (struct spoolss_PortInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->status_string = NULL;
	} else {
		object->status_string = NULL;
		object->status_string = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PortInfo3_get_severity(PyObject *obj, void *closure)
{
	struct spoolss_PortInfo3 *object = (struct spoolss_PortInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_severity;
	py_severity = PyInt_FromLong(object->severity);
	return py_severity;
}

static int py_spoolss_PortInfo3_set_severity(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortInfo3 *object = (struct spoolss_PortInfo3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->severity = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->severity = 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_spoolss_PortInfo3_getsetters[] = {
	{ discard_const_p(char, "status"), py_spoolss_PortInfo3_get_status, py_spoolss_PortInfo3_set_status },
	{ discard_const_p(char, "status_string"), py_spoolss_PortInfo3_get_status_string, py_spoolss_PortInfo3_set_status_string },
	{ discard_const_p(char, "severity"), py_spoolss_PortInfo3_get_severity, py_spoolss_PortInfo3_set_severity },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PortInfo3_ndr_print(PyObject *py_obj)
{
	struct spoolss_PortInfo3 *object = (struct spoolss_PortInfo3 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PortInfo3, "spoolss_PortInfo3", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PortInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PortInfo3",
	.tp_getset = py_spoolss_PortInfo3_getsetters,
	.tp_methods = py_spoolss_PortInfo3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PortInfo3_new,
};


static PyObject *py_spoolss_PortInfoFF_get_port_name(PyObject *obj, void *closure)
{
	struct spoolss_PortInfoFF *object = (struct spoolss_PortInfoFF *)pytalloc_get_ptr(obj);
	PyObject *py_port_name;
	if (object->port_name == NULL) {
		py_port_name = Py_None;
		Py_INCREF(py_port_name);
	} else {
		py_port_name = PyString_FromStringOrNULL(object->port_name);
	}
	return py_port_name;
}

static int py_spoolss_PortInfoFF_set_port_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortInfoFF *object = (struct spoolss_PortInfoFF *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->port_name = NULL;
	} else {
		object->port_name = NULL;
		object->port_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PortInfoFF_get_monitor_data(PyObject *obj, void *closure)
{
	struct spoolss_PortInfoFF *object = (struct spoolss_PortInfoFF *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_data;
	py_monitor_data = PyString_FromStringAndSize((char *)(object->monitor_data).data, (object->monitor_data).length);
	return py_monitor_data;
}

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

static PyGetSetDef py_spoolss_PortInfoFF_getsetters[] = {
	{ discard_const_p(char, "port_name"), py_spoolss_PortInfoFF_get_port_name, py_spoolss_PortInfoFF_set_port_name },
	{ discard_const_p(char, "monitor_data"), py_spoolss_PortInfoFF_get_monitor_data, py_spoolss_PortInfoFF_set_monitor_data },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PortInfoFF_ndr_print(PyObject *py_obj)
{
	struct spoolss_PortInfoFF *object = (struct spoolss_PortInfoFF *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PortInfoFF, "spoolss_PortInfoFF", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_PortInfoFF_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PortInfoFF",
	.tp_getset = py_spoolss_PortInfoFF_getsetters,
	.tp_methods = py_spoolss_PortInfoFF_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PortInfoFF_new,
};

PyObject *py_import_spoolss_PortInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_PortInfo *in)
{
	PyObject *ret;

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

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

		case 3:
			ret = pytalloc_reference_ex(&spoolss_PortInfo3_Type, mem_ctx, &in->info3);
			return ret;

		case 0xff:
			ret = pytalloc_reference_ex(&spoolss_PortInfoFF_Type, mem_ctx, &in->infoFF);
			return ret;

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

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

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

		case 3:
			PY_CHECK_TYPE(&spoolss_PortInfo3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info3 = *(struct spoolss_PortInfo3 *)pytalloc_get_ptr(in);
			break;

		case 0xff:
			PY_CHECK_TYPE(&spoolss_PortInfoFF_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->infoFF = *(struct spoolss_PortInfoFF *)pytalloc_get_ptr(in);
			break;

		default:
			break;

	}

	return ret;
}


static PyObject *py_spoolss_MonitorInfo1_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_MonitorInfo1 *object = (struct spoolss_MonitorInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		py_monitor_name = PyString_FromStringOrNULL(object->monitor_name);
	}
	return py_monitor_name;
}

static int py_spoolss_MonitorInfo1_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_MonitorInfo1 *object = (struct spoolss_MonitorInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		object->monitor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_MonitorInfo1_getsetters[] = {
	{ discard_const_p(char, "monitor_name"), py_spoolss_MonitorInfo1_get_monitor_name, py_spoolss_MonitorInfo1_set_monitor_name },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_MonitorInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_MonitorInfo1 *object = (struct spoolss_MonitorInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_MonitorInfo1, "spoolss_MonitorInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_MonitorInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.MonitorInfo1",
	.tp_getset = py_spoolss_MonitorInfo1_getsetters,
	.tp_methods = py_spoolss_MonitorInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_MonitorInfo1_new,
};


static PyObject *py_spoolss_MonitorInfo2_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_MonitorInfo2 *object = (struct spoolss_MonitorInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		py_monitor_name = PyString_FromStringOrNULL(object->monitor_name);
	}
	return py_monitor_name;
}

static int py_spoolss_MonitorInfo2_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_MonitorInfo2 *object = (struct spoolss_MonitorInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		object->monitor_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_MonitorInfo2_get_environment(PyObject *obj, void *closure)
{
	struct spoolss_MonitorInfo2 *object = (struct spoolss_MonitorInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_environment;
	if (object->environment == NULL) {
		py_environment = Py_None;
		Py_INCREF(py_environment);
	} else {
		py_environment = PyString_FromStringOrNULL(object->environment);
	}
	return py_environment;
}

static int py_spoolss_MonitorInfo2_set_environment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_MonitorInfo2 *object = (struct spoolss_MonitorInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->environment = NULL;
	} else {
		object->environment = NULL;
		object->environment = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_MonitorInfo2_get_dll_name(PyObject *obj, void *closure)
{
	struct spoolss_MonitorInfo2 *object = (struct spoolss_MonitorInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_dll_name;
	if (object->dll_name == NULL) {
		py_dll_name = Py_None;
		Py_INCREF(py_dll_name);
	} else {
		py_dll_name = PyString_FromStringOrNULL(object->dll_name);
	}
	return py_dll_name;
}

static int py_spoolss_MonitorInfo2_set_dll_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_MonitorInfo2 *object = (struct spoolss_MonitorInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->dll_name = NULL;
	} else {
		object->dll_name = NULL;
		object->dll_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_MonitorInfo2_getsetters[] = {
	{ discard_const_p(char, "monitor_name"), py_spoolss_MonitorInfo2_get_monitor_name, py_spoolss_MonitorInfo2_set_monitor_name },
	{ discard_const_p(char, "environment"), py_spoolss_MonitorInfo2_get_environment, py_spoolss_MonitorInfo2_set_environment },
	{ discard_const_p(char, "dll_name"), py_spoolss_MonitorInfo2_get_dll_name, py_spoolss_MonitorInfo2_set_dll_name },
	{ NULL }
};

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

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

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

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

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

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

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

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_MonitorInfo2_ndr_print(PyObject *py_obj)
{
	struct spoolss_MonitorInfo2 *object = (struct spoolss_MonitorInfo2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_MonitorInfo2, "spoolss_MonitorInfo2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

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


static PyTypeObject spoolss_MonitorInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.MonitorInfo2",
	.tp_getset = py_spoolss_MonitorInfo2_getsetters,
	.tp_methods = py_spoolss_MonitorInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_MonitorInfo2_new,
};

PyObject *py_import_spoolss_MonitorInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_MonitorInfo *in)
{
	PyObject *ret;

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

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

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

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

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

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

		default:
			break;

	}

	return ret;
}


static PyObject *py_spoolss_SetPortInfo1_get_port_name(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo1 *object = (struct spoolss_SetPortInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_port_name;
	if (object->port_name == NULL) {
		py_port_name = Py_None;
		Py_INCREF(py_port_name);
	} else {
		if (object->port_name == NULL) {
			py_port_name = Py_None;
			Py_INCREF(py_port_name);
		} else {
			py_port_name = PyUnicode_Decode(object->port_name, strlen(object->port_name), "utf-8", "ignore");
		}
	}
	return py_port_name;
}

static int py_spoolss_SetPortInfo1_set_port_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo1 *object = (struct spoolss_SetPortInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->port_name = NULL;
	} else {
		object->port_name = NULL;
		if (PyUnicode_Check(value)) {
			object->port_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->port_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_spoolss_SetPortInfo1_getsetters[] = {
	{ discard_const_p(char, "port_name"), py_spoolss_SetPortInfo1_get_port_name, py_spoolss_SetPortInfo1_set_port_name },
	{ NULL }
};

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

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

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

static PyObject *py_spoolss_SetPortInfo1_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_SetPortInfo1 *object = (struct spoolss_SetPortInfo1 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_SetPortInfo1);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_SetPortInfo1);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_SetPortInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_SetPortInfo1 *object = (struct spoolss_SetPortInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_SetPortInfo1, "spoolss_SetPortInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_SetPortInfo1_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_SetPortInfo1_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_SetPortInfo1_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_SetPortInfo1_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_SetPortInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPortInfo1",
	.tp_getset = py_spoolss_SetPortInfo1_getsetters,
	.tp_methods = py_spoolss_SetPortInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPortInfo1_new,
};


static PyObject *py_spoolss_SetPortInfo2_get_port_name(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_port_name;
	if (object->port_name == NULL) {
		py_port_name = Py_None;
		Py_INCREF(py_port_name);
	} else {
		if (object->port_name == NULL) {
			py_port_name = Py_None;
			Py_INCREF(py_port_name);
		} else {
			py_port_name = PyUnicode_Decode(object->port_name, strlen(object->port_name), "utf-8", "ignore");
		}
	}
	return py_port_name;
}

static int py_spoolss_SetPortInfo2_set_port_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->port_name = NULL;
	} else {
		object->port_name = NULL;
		if (PyUnicode_Check(value)) {
			object->port_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->port_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_spoolss_SetPortInfo2_get_monitor_name(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_name;
	if (object->monitor_name == NULL) {
		py_monitor_name = Py_None;
		Py_INCREF(py_monitor_name);
	} else {
		if (object->monitor_name == NULL) {
			py_monitor_name = Py_None;
			Py_INCREF(py_monitor_name);
		} else {
			py_monitor_name = PyUnicode_Decode(object->monitor_name, strlen(object->monitor_name), "utf-8", "ignore");
		}
	}
	return py_monitor_name;
}

static int py_spoolss_SetPortInfo2_set_monitor_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->monitor_name = NULL;
	} else {
		object->monitor_name = NULL;
		if (PyUnicode_Check(value)) {
			object->monitor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->monitor_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_spoolss_SetPortInfo2_get_description(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_description;
	if (object->description == NULL) {
		py_description = Py_None;
		Py_INCREF(py_description);
	} else {
		if (object->description == NULL) {
			py_description = Py_None;
			Py_INCREF(py_description);
		} else {
			py_description = PyUnicode_Decode(object->description, strlen(object->description), "utf-8", "ignore");
		}
	}
	return py_description;
}

static int py_spoolss_SetPortInfo2_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->description = NULL;
	} else {
		object->description = NULL;
		if (PyUnicode_Check(value)) {
			object->description = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->description = 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_spoolss_SetPortInfo2_get_port_type(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_port_type;
	py_port_type = PyInt_FromLong(object->port_type);
	return py_port_type;
}

static int py_spoolss_SetPortInfo2_set_port_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->port_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->port_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_spoolss_SetPortInfo2_get_reserved(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_spoolss_SetPortInfo2_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_spoolss_SetPortInfo2_getsetters[] = {
	{ discard_const_p(char, "port_name"), py_spoolss_SetPortInfo2_get_port_name, py_spoolss_SetPortInfo2_set_port_name },
	{ discard_const_p(char, "monitor_name"), py_spoolss_SetPortInfo2_get_monitor_name, py_spoolss_SetPortInfo2_set_monitor_name },
	{ discard_const_p(char, "description"), py_spoolss_SetPortInfo2_get_description, py_spoolss_SetPortInfo2_set_description },
	{ discard_const_p(char, "port_type"), py_spoolss_SetPortInfo2_get_port_type, py_spoolss_SetPortInfo2_set_port_type },
	{ discard_const_p(char, "reserved"), py_spoolss_SetPortInfo2_get_reserved, py_spoolss_SetPortInfo2_set_reserved },
	{ NULL }
};

static PyObject *py_spoolss_SetPortInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_SetPortInfo2, type);
}

static PyObject *py_spoolss_SetPortInfo2_ndr_pack(PyObject *py_obj)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_spoolss_SetPortInfo2);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_spoolss_SetPortInfo2_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_SetPortInfo2);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_SetPortInfo2);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_SetPortInfo2_ndr_print(PyObject *py_obj)
{
	struct spoolss_SetPortInfo2 *object = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_SetPortInfo2, "spoolss_SetPortInfo2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_SetPortInfo2_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_SetPortInfo2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_SetPortInfo2_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_SetPortInfo2_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_SetPortInfo2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPortInfo2",
	.tp_getset = py_spoolss_SetPortInfo2_getsetters,
	.tp_methods = py_spoolss_SetPortInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPortInfo2_new,
};


static PyObject *py_spoolss_SetPortInfo3_get_status(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyInt_FromLong(object->status);
	return py_status;
}

static int py_spoolss_SetPortInfo3_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->status = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->status = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_spoolss_SetPortInfo3_get_status_string(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_status_string;
	if (object->status_string == NULL) {
		py_status_string = Py_None;
		Py_INCREF(py_status_string);
	} else {
		if (object->status_string == NULL) {
			py_status_string = Py_None;
			Py_INCREF(py_status_string);
		} else {
			py_status_string = PyUnicode_Decode(object->status_string, strlen(object->status_string), "utf-8", "ignore");
		}
	}
	return py_status_string;
}

static int py_spoolss_SetPortInfo3_set_status_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->status_string = NULL;
	} else {
		object->status_string = NULL;
		if (PyUnicode_Check(value)) {
			object->status_string = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->status_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 PyObject *py_spoolss_SetPortInfo3_get_severity(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(obj);
	PyObject *py_severity;
	py_severity = PyInt_FromLong(object->severity);
	return py_severity;
}

static int py_spoolss_SetPortInfo3_set_severity(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->severity = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->severity = 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_spoolss_SetPortInfo3_getsetters[] = {
	{ discard_const_p(char, "status"), py_spoolss_SetPortInfo3_get_status, py_spoolss_SetPortInfo3_set_status },
	{ discard_const_p(char, "status_string"), py_spoolss_SetPortInfo3_get_status_string, py_spoolss_SetPortInfo3_set_status_string },
	{ discard_const_p(char, "severity"), py_spoolss_SetPortInfo3_get_severity, py_spoolss_SetPortInfo3_set_severity },
	{ NULL }
};

static PyObject *py_spoolss_SetPortInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_SetPortInfo3, type);
}

static PyObject *py_spoolss_SetPortInfo3_ndr_pack(PyObject *py_obj)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_spoolss_SetPortInfo3);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_spoolss_SetPortInfo3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_SetPortInfo3);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_SetPortInfo3);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_SetPortInfo3_ndr_print(PyObject *py_obj)
{
	struct spoolss_SetPortInfo3 *object = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_SetPortInfo3, "spoolss_SetPortInfo3", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_SetPortInfo3_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_SetPortInfo3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_SetPortInfo3_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_SetPortInfo3_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_SetPortInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPortInfo3",
	.tp_getset = py_spoolss_SetPortInfo3_getsetters,
	.tp_methods = py_spoolss_SetPortInfo3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPortInfo3_new,
};


static PyObject *py_spoolss_SetPortInfoFF_get_port_name(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfoFF *object = (struct spoolss_SetPortInfoFF *)pytalloc_get_ptr(obj);
	PyObject *py_port_name;
	if (object->port_name == NULL) {
		py_port_name = Py_None;
		Py_INCREF(py_port_name);
	} else {
		if (object->port_name == NULL) {
			py_port_name = Py_None;
			Py_INCREF(py_port_name);
		} else {
			py_port_name = PyUnicode_Decode(object->port_name, strlen(object->port_name), "utf-8", "ignore");
		}
	}
	return py_port_name;
}

static int py_spoolss_SetPortInfoFF_set_port_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfoFF *object = (struct spoolss_SetPortInfoFF *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->port_name = NULL;
	} else {
		object->port_name = NULL;
		if (PyUnicode_Check(value)) {
			object->port_name = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->port_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_spoolss_SetPortInfoFF_get_monitor_data(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfoFF *object = (struct spoolss_SetPortInfoFF *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_data;
	py_monitor_data = PyString_FromStringAndSize((char *)(object->monitor_data).data, (object->monitor_data).length);
	return py_monitor_data;
}

static int py_spoolss_SetPortInfoFF_set_monitor_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfoFF *object = (struct spoolss_SetPortInfoFF *)pytalloc_get_ptr(py_obj);
	object->monitor_data = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	return 0;
}

static PyGetSetDef py_spoolss_SetPortInfoFF_getsetters[] = {
	{ discard_const_p(char, "port_name"), py_spoolss_SetPortInfoFF_get_port_name, py_spoolss_SetPortInfoFF_set_port_name },
	{ discard_const_p(char, "monitor_data"), py_spoolss_SetPortInfoFF_get_monitor_data, py_spoolss_SetPortInfoFF_set_monitor_data },
	{ NULL }
};

static PyObject *py_spoolss_SetPortInfoFF_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_SetPortInfoFF, type);
}

static PyObject *py_spoolss_SetPortInfoFF_ndr_pack(PyObject *py_obj)
{
	struct spoolss_SetPortInfoFF *object = (struct spoolss_SetPortInfoFF *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_spoolss_SetPortInfoFF);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_spoolss_SetPortInfoFF_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_SetPortInfoFF *object = (struct spoolss_SetPortInfoFF *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_SetPortInfoFF);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_SetPortInfoFF);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_SetPortInfoFF_ndr_print(PyObject *py_obj)
{
	struct spoolss_SetPortInfoFF *object = (struct spoolss_SetPortInfoFF *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_SetPortInfoFF, "spoolss_SetPortInfoFF", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_SetPortInfoFF_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_SetPortInfoFF_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_SetPortInfoFF_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_SetPortInfoFF_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_SetPortInfoFF_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPortInfoFF",
	.tp_getset = py_spoolss_SetPortInfoFF_getsetters,
	.tp_methods = py_spoolss_SetPortInfoFF_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPortInfoFF_new,
};

PyObject *py_import_spoolss_SetPortInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_SetPortInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			if (in->info1 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_SetPortInfo1_Type, in->info1, in->info1);
			}
			return ret;

		case 2:
			if (in->info2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_SetPortInfo2_Type, in->info2, in->info2);
			}
			return ret;

		case 3:
			if (in->info3 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_SetPortInfo3_Type, in->info3, in->info3);
			}
			return ret;

		case 0xff:
			if (in->infoFF == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_SetPortInfoFF_Type, in->infoFF, in->infoFF);
			}
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union spoolss_SetPortInfo *py_export_spoolss_SetPortInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_SetPortInfo *ret = talloc_zero(mem_ctx, union spoolss_SetPortInfo);
	switch (level) {
		case 1:
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPortInfo1_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info1 = (struct spoolss_SetPortInfo1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == Py_None) {
				ret->info2 = NULL;
			} else {
				ret->info2 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPortInfo2_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info2 = (struct spoolss_SetPortInfo2 *)pytalloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == Py_None) {
				ret->info3 = NULL;
			} else {
				ret->info3 = NULL;
				PY_CHECK_TYPE(&spoolss_SetPortInfo3_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info3 = (struct spoolss_SetPortInfo3 *)pytalloc_get_ptr(in);
			}
			break;

		case 0xff:
			if (in == Py_None) {
				ret->infoFF = NULL;
			} else {
				ret->infoFF = NULL;
				PY_CHECK_TYPE(&spoolss_SetPortInfoFF_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->infoFF = (struct spoolss_SetPortInfoFF *)pytalloc_get_ptr(in);
			}
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_spoolss_SetPortInfoContainer_get_level(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfoContainer *object = (struct spoolss_SetPortInfoContainer *)pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyInt_FromLong(object->level);
	return py_level;
}

static int py_spoolss_SetPortInfoContainer_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfoContainer *object = (struct spoolss_SetPortInfoContainer *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->level = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_SetPortInfoContainer_get_info(PyObject *obj, void *closure)
{
	struct spoolss_SetPortInfoContainer *object = (struct spoolss_SetPortInfoContainer *)pytalloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_import_spoolss_SetPrinterInfo(pytalloc_get_mem_ctx(obj), object->level, &object->info);
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_spoolss_SetPortInfoContainer_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_SetPortInfoContainer *object = (struct spoolss_SetPortInfoContainer *)pytalloc_get_ptr(py_obj);
	{
		union spoolss_SetPrinterInfo *info_switch_0;
		info_switch_0 = py_export_spoolss_SetPrinterInfo(pytalloc_get_mem_ctx(py_obj), object->level, value);
		if (info_switch_0 == NULL) {
			return -1;
		}
		object->info = *info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_spoolss_SetPortInfoContainer_getsetters[] = {
	{ discard_const_p(char, "level"), py_spoolss_SetPortInfoContainer_get_level, py_spoolss_SetPortInfoContainer_set_level },
	{ discard_const_p(char, "info"), py_spoolss_SetPortInfoContainer_get_info, py_spoolss_SetPortInfoContainer_set_info },
	{ NULL }
};

static PyObject *py_spoolss_SetPortInfoContainer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_SetPortInfoContainer, type);
}


static PyTypeObject spoolss_SetPortInfoContainer_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.SetPortInfoContainer",
	.tp_getset = py_spoolss_SetPortInfoContainer_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_SetPortInfoContainer_new,
};


static PyObject *py_spoolss_PrintProcDataTypesInfo1_get_name_array(PyObject *obj, void *closure)
{
	struct spoolss_PrintProcDataTypesInfo1 *object = (struct spoolss_PrintProcDataTypesInfo1 *)pytalloc_get_ptr(obj);
	PyObject *py_name_array;
	if (object->name_array == NULL) {
		py_name_array = Py_None;
		Py_INCREF(py_name_array);
	} else {
		py_name_array = PyString_FromStringOrNULL(object->name_array);
	}
	return py_name_array;
}

static int py_spoolss_PrintProcDataTypesInfo1_set_name_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrintProcDataTypesInfo1 *object = (struct spoolss_PrintProcDataTypesInfo1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->name_array = NULL;
	} else {
		object->name_array = NULL;
		object->name_array = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyGetSetDef py_spoolss_PrintProcDataTypesInfo1_getsetters[] = {
	{ discard_const_p(char, "name_array"), py_spoolss_PrintProcDataTypesInfo1_get_name_array, py_spoolss_PrintProcDataTypesInfo1_set_name_array },
	{ NULL }
};

static PyObject *py_spoolss_PrintProcDataTypesInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_PrintProcDataTypesInfo1, type);
}

static PyObject *py_spoolss_PrintProcDataTypesInfo1_ndr_pack(PyObject *py_obj)
{
	struct spoolss_PrintProcDataTypesInfo1 *object = (struct spoolss_PrintProcDataTypesInfo1 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcDataTypesInfo1);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_spoolss_PrintProcDataTypesInfo1_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_PrintProcDataTypesInfo1 *object = (struct spoolss_PrintProcDataTypesInfo1 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_PrintProcDataTypesInfo1);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_PrintProcDataTypesInfo1);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrintProcDataTypesInfo1_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrintProcDataTypesInfo1 *object = (struct spoolss_PrintProcDataTypesInfo1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrintProcDataTypesInfo1, "spoolss_PrintProcDataTypesInfo1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_PrintProcDataTypesInfo1_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_PrintProcDataTypesInfo1_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_PrintProcDataTypesInfo1_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_PrintProcDataTypesInfo1_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_PrintProcDataTypesInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrintProcDataTypesInfo1",
	.tp_getset = py_spoolss_PrintProcDataTypesInfo1_getsetters,
	.tp_methods = py_spoolss_PrintProcDataTypesInfo1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrintProcDataTypesInfo1_new,
};

PyObject *py_import_spoolss_PrintProcDataTypesInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_PrintProcDataTypesInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = pytalloc_reference_ex(&spoolss_PrintProcDataTypesInfo1_Type, mem_ctx, &in->info1);
			return ret;

		default:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union spoolss_PrintProcDataTypesInfo *py_export_spoolss_PrintProcDataTypesInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_PrintProcDataTypesInfo *ret = talloc_zero(mem_ctx, union spoolss_PrintProcDataTypesInfo);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&spoolss_PrintProcDataTypesInfo1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info1 = *(struct spoolss_PrintProcDataTypesInfo1 *)pytalloc_get_ptr(in);
			break;

		default:
			break;

	}

	return ret;
}


static PyObject *py_spoolss_PortVarContainer_get_monitor_data_size(PyObject *obj, void *closure)
{
	struct spoolss_PortVarContainer *object = (struct spoolss_PortVarContainer *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_data_size;
	py_monitor_data_size = PyInt_FromLong(object->monitor_data_size);
	return py_monitor_data_size;
}

static int py_spoolss_PortVarContainer_set_monitor_data_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortVarContainer *object = (struct spoolss_PortVarContainer *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->monitor_data_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortVarContainer_get_monitor_data(PyObject *obj, void *closure)
{
	struct spoolss_PortVarContainer *object = (struct spoolss_PortVarContainer *)pytalloc_get_ptr(obj);
	PyObject *py_monitor_data;
	if (object->monitor_data == NULL) {
		py_monitor_data = Py_None;
		Py_INCREF(py_monitor_data);
	} else {
		py_monitor_data = PyList_New(object->monitor_data_size);
		if (py_monitor_data == NULL) {
			return NULL;
		}
		{
			int monitor_data_cntr_1;
			for (monitor_data_cntr_1 = 0; monitor_data_cntr_1 < object->monitor_data_size; monitor_data_cntr_1++) {
				PyObject *py_monitor_data_1;
				py_monitor_data_1 = PyInt_FromLong(object->monitor_data[monitor_data_cntr_1]);
				PyList_SetItem(py_monitor_data, monitor_data_cntr_1, py_monitor_data_1);
			}
		}
	}
	return py_monitor_data;
}

static int py_spoolss_PortVarContainer_set_monitor_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortVarContainer *object = (struct spoolss_PortVarContainer *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->monitor_data);
	if (value == Py_None) {
		object->monitor_data = NULL;
	} else {
		object->monitor_data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int monitor_data_cntr_1;
			object->monitor_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->monitor_data, PyList_GET_SIZE(value));
			if (!object->monitor_data) { return -1;; }
			talloc_set_name_const(object->monitor_data, "ARRAY: object->monitor_data");
			for (monitor_data_cntr_1 = 0; monitor_data_cntr_1 < PyList_GET_SIZE(value); monitor_data_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, monitor_data_cntr_1), return -1;);
				object->monitor_data[monitor_data_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, monitor_data_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_spoolss_PortVarContainer_getsetters[] = {
	{ discard_const_p(char, "monitor_data_size"), py_spoolss_PortVarContainer_get_monitor_data_size, py_spoolss_PortVarContainer_set_monitor_data_size },
	{ discard_const_p(char, "monitor_data"), py_spoolss_PortVarContainer_get_monitor_data, py_spoolss_PortVarContainer_set_monitor_data },
	{ NULL }
};

static PyObject *py_spoolss_PortVarContainer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_PortVarContainer, type);
}


static PyTypeObject spoolss_PortVarContainer_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PortVarContainer",
	.tp_getset = py_spoolss_PortVarContainer_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PortVarContainer_new,
};

PyObject *py_import_spoolss_Field(TALLOC_CTX *mem_ctx, int level, union spoolss_Field *in)
{
	PyObject *ret;

	switch (level) {
		case PRINTER_NOTIFY_TYPE:
			ret = PyInt_FromLong(in->field);
			return ret;

		case JOB_NOTIFY_TYPE:
			ret = PyInt_FromLong(in->field);
			return ret;

		default:
			ret = PyInt_FromLong(in->field);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union spoolss_Field *py_export_spoolss_Field(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_Field *ret = talloc_zero(mem_ctx, union spoolss_Field);
	switch (level) {
		case PRINTER_NOTIFY_TYPE:
			PY_CHECK_TYPE(&PyInt_Type, in, talloc_free(ret); return NULL;);
			ret->field = PyInt_AsLong(in);
			break;

		case JOB_NOTIFY_TYPE:
			PY_CHECK_TYPE(&PyInt_Type, in, talloc_free(ret); return NULL;);
			ret->field = PyInt_AsLong(in);
			break;

		default:
			PY_CHECK_TYPE(&PyInt_Type, in, talloc_free(ret); return NULL;);
			ret->field = PyInt_AsLong(in);
			break;

	}

	return ret;
}


static PyObject *py_spoolss_NotifyOptionType_get_type(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(obj);
	PyObject *py_type;
	py_type = PyInt_FromLong(object->type);
	return py_type;
}

static int py_spoolss_NotifyOptionType_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->type = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_spoolss_NotifyOptionType_get_u1(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(obj);
	PyObject *py_u1;
	py_u1 = PyInt_FromLong(object->u1);
	return py_u1;
}

static int py_spoolss_NotifyOptionType_set_u1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u1 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyOptionType_get_u2(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(obj);
	PyObject *py_u2;
	py_u2 = PyInt_FromLong(object->u2);
	return py_u2;
}

static int py_spoolss_NotifyOptionType_set_u2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyOptionType_get_u3(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(obj);
	PyObject *py_u3;
	py_u3 = PyInt_FromLong(object->u3);
	return py_u3;
}

static int py_spoolss_NotifyOptionType_set_u3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->u3 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyOptionType_get_count(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_spoolss_NotifyOptionType_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyOptionType_get_fields(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(obj);
	PyObject *py_fields;
	if (object->fields == NULL) {
		py_fields = Py_None;
		Py_INCREF(py_fields);
	} else {
		py_fields = PyList_New(object->count);
		if (py_fields == NULL) {
			return NULL;
		}
		{
			int fields_cntr_1;
			for (fields_cntr_1 = 0; fields_cntr_1 < object->count; fields_cntr_1++) {
				PyObject *py_fields_1;
				py_fields_1 = py_import_spoolss_Field(object->fields, object->type, &object->fields[fields_cntr_1]);
				if (py_fields_1 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_fields, fields_cntr_1, py_fields_1);
			}
		}
	}
	return py_fields;
}

static int py_spoolss_NotifyOptionType_set_fields(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOptionType *object = (struct spoolss_NotifyOptionType *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->fields);
	if (value == Py_None) {
		object->fields = NULL;
	} else {
		object->fields = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int fields_cntr_1;
			object->fields = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->fields, PyList_GET_SIZE(value));
			if (!object->fields) { return -1;; }
			talloc_set_name_const(object->fields, "ARRAY: object->fields");
			for (fields_cntr_1 = 0; fields_cntr_1 < PyList_GET_SIZE(value); fields_cntr_1++) {
				{
					union spoolss_Field *fields_switch_2;
					fields_switch_2 = py_export_spoolss_Field(object->fields, object->type, PyList_GET_ITEM(value, fields_cntr_1));
					if (fields_switch_2 == NULL) {
						return -1;
					}
					object->fields[fields_cntr_1] = *fields_switch_2;
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_spoolss_NotifyOptionType_getsetters[] = {
	{ discard_const_p(char, "type"), py_spoolss_NotifyOptionType_get_type, py_spoolss_NotifyOptionType_set_type },
	{ discard_const_p(char, "u1"), py_spoolss_NotifyOptionType_get_u1, py_spoolss_NotifyOptionType_set_u1 },
	{ discard_const_p(char, "u2"), py_spoolss_NotifyOptionType_get_u2, py_spoolss_NotifyOptionType_set_u2 },
	{ discard_const_p(char, "u3"), py_spoolss_NotifyOptionType_get_u3, py_spoolss_NotifyOptionType_set_u3 },
	{ discard_const_p(char, "count"), py_spoolss_NotifyOptionType_get_count, py_spoolss_NotifyOptionType_set_count },
	{ discard_const_p(char, "fields"), py_spoolss_NotifyOptionType_get_fields, py_spoolss_NotifyOptionType_set_fields },
	{ NULL }
};

static PyObject *py_spoolss_NotifyOptionType_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_NotifyOptionType, type);
}


static PyTypeObject spoolss_NotifyOptionType_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.NotifyOptionType",
	.tp_getset = py_spoolss_NotifyOptionType_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_NotifyOptionType_new,
};


static PyObject *py_spoolss_NotifyOption_get_version(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOption *object = (struct spoolss_NotifyOption *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_spoolss_NotifyOption_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOption *object = (struct spoolss_NotifyOption *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyOption_get_flags(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOption *object = (struct spoolss_NotifyOption *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_spoolss_NotifyOption_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOption *object = (struct spoolss_NotifyOption *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_spoolss_NotifyOption_get_count(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOption *object = (struct spoolss_NotifyOption *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_spoolss_NotifyOption_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOption *object = (struct spoolss_NotifyOption *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyOption_get_types(PyObject *obj, void *closure)
{
	struct spoolss_NotifyOption *object = (struct spoolss_NotifyOption *)pytalloc_get_ptr(obj);
	PyObject *py_types;
	if (object->types == NULL) {
		py_types = Py_None;
		Py_INCREF(py_types);
	} else {
		py_types = PyList_New(object->count);
		if (py_types == NULL) {
			return NULL;
		}
		{
			int types_cntr_1;
			for (types_cntr_1 = 0; types_cntr_1 < object->count; types_cntr_1++) {
				PyObject *py_types_1;
				py_types_1 = pytalloc_reference_ex(&spoolss_NotifyOptionType_Type, object->types, &object->types[types_cntr_1]);
				PyList_SetItem(py_types, types_cntr_1, py_types_1);
			}
		}
	}
	return py_types;
}

static int py_spoolss_NotifyOption_set_types(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyOption *object = (struct spoolss_NotifyOption *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->types);
	if (value == Py_None) {
		object->types = NULL;
	} else {
		object->types = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int types_cntr_1;
			object->types = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->types, PyList_GET_SIZE(value));
			if (!object->types) { return -1;; }
			talloc_set_name_const(object->types, "ARRAY: object->types");
			for (types_cntr_1 = 0; types_cntr_1 < PyList_GET_SIZE(value); types_cntr_1++) {
				PY_CHECK_TYPE(&spoolss_NotifyOptionType_Type, PyList_GET_ITEM(value, types_cntr_1), return -1;);
				if (talloc_reference(object->types, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, types_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->types[types_cntr_1] = *(struct spoolss_NotifyOptionType *)pytalloc_get_ptr(PyList_GET_ITEM(value, types_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_spoolss_NotifyOption_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_NotifyOption_get_version, py_spoolss_NotifyOption_set_version },
	{ discard_const_p(char, "flags"), py_spoolss_NotifyOption_get_flags, py_spoolss_NotifyOption_set_flags },
	{ discard_const_p(char, "count"), py_spoolss_NotifyOption_get_count, py_spoolss_NotifyOption_set_count },
	{ discard_const_p(char, "types"), py_spoolss_NotifyOption_get_types, py_spoolss_NotifyOption_set_types },
	{ NULL }
};

static PyObject *py_spoolss_NotifyOption_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_NotifyOption, type);
}


static PyTypeObject spoolss_NotifyOption_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.NotifyOption",
	.tp_getset = py_spoolss_NotifyOption_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_NotifyOption_new,
};


static PyObject *py_spoolss_NotifyString_get_size(PyObject *obj, void *closure)
{
	struct spoolss_NotifyString *object = (struct spoolss_NotifyString *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_spoolss_NotifyString_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyString *object = (struct spoolss_NotifyString *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyString_get_string(PyObject *obj, void *closure)
{
	struct spoolss_NotifyString *object = (struct spoolss_NotifyString *)pytalloc_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_spoolss_NotifyString_set_string(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyString *object = (struct spoolss_NotifyString *)pytalloc_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_spoolss_NotifyString_getsetters[] = {
	{ discard_const_p(char, "size"), py_spoolss_NotifyString_get_size, py_spoolss_NotifyString_set_size },
	{ discard_const_p(char, "string"), py_spoolss_NotifyString_get_string, py_spoolss_NotifyString_set_string },
	{ NULL }
};

static PyObject *py_spoolss_NotifyString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_NotifyString, type);
}


static PyTypeObject spoolss_NotifyString_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.NotifyString",
	.tp_getset = py_spoolss_NotifyString_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_NotifyString_new,
};

PyObject *py_import_spoolss_NotifyData(TALLOC_CTX *mem_ctx, int level, union spoolss_NotifyData *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = PyList_New(2);
			if (ret == NULL) {
				return NULL;
			}
			{
				int integer_cntr_0;
				for (integer_cntr_0 = 0; integer_cntr_0 < 2; integer_cntr_0++) {
					PyObject *py_integer_0;
					py_integer_0 = PyInt_FromLong(in->integer[integer_cntr_0]);
					PyList_SetItem(ret, integer_cntr_0, py_integer_0);
				}
			}
			return ret;

		case 2:
			ret = pytalloc_reference_ex(&spoolss_NotifyString_Type, mem_ctx, &in->string);
			return ret;

		case 3:
			ret = pytalloc_reference_ex(&spoolss_DevmodeContainer_Type, mem_ctx, &in->devmode);
			return ret;

		case 4:
			ret = pytalloc_reference_ex(&spoolss_TimeCtr_Type, mem_ctx, &in->time);
			return ret;

		case 5:
			ret = pytalloc_reference_ex(sec_desc_buf_Type, mem_ctx, &in->sd);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union spoolss_NotifyData *py_export_spoolss_NotifyData(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_NotifyData *ret = talloc_zero(mem_ctx, union spoolss_NotifyData);
	switch (level) {
		case 1:
			PY_CHECK_TYPE(&PyList_Type, in, talloc_free(ret); return NULL;);
			{
				int integer_cntr_0;
				for (integer_cntr_0 = 0; integer_cntr_0 < PyList_GET_SIZE(in); integer_cntr_0++) {
					PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(in, integer_cntr_0), talloc_free(ret); return NULL;);
					ret->integer[integer_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(in, integer_cntr_0));
				}
			}
			break;

		case 2:
			PY_CHECK_TYPE(&spoolss_NotifyString_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->string = *(struct spoolss_NotifyString *)pytalloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&spoolss_DevmodeContainer_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->devmode = *(struct spoolss_DevmodeContainer *)pytalloc_get_ptr(in);
			break;

		case 4:
			PY_CHECK_TYPE(&spoolss_TimeCtr_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->time = *(struct spoolss_TimeCtr *)pytalloc_get_ptr(in);
			break;

		case 5:
			PY_CHECK_TYPE(sec_desc_buf_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->sd = *(struct sec_desc_buf *)pytalloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_spoolss_Notify_get_type(PyObject *obj, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(obj);
	PyObject *py_type;
	py_type = PyInt_FromLong(object->type);
	return py_type;
}

static int py_spoolss_Notify_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->type = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_spoolss_Notify_get_field(PyObject *obj, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(obj);
	PyObject *py_field;
	py_field = py_import_spoolss_Field(pytalloc_get_mem_ctx(obj), object->type, &object->field);
	if (py_field == NULL) {
		return NULL;
	}
	return py_field;
}

static int py_spoolss_Notify_set_field(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(py_obj);
	{
		union spoolss_Field *field_switch_0;
		field_switch_0 = py_export_spoolss_Field(pytalloc_get_mem_ctx(py_obj), object->type, value);
		if (field_switch_0 == NULL) {
			return -1;
		}
		object->field = *field_switch_0;
	}
	return 0;
}

static PyObject *py_spoolss_Notify_get_variable_type(PyObject *obj, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(obj);
	PyObject *py_variable_type;
	py_variable_type = PyInt_FromLong(object->variable_type);
	return py_variable_type;
}

static int py_spoolss_Notify_set_variable_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->variable_type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->variable_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_spoolss_Notify_get_job_id(PyObject *obj, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(obj);
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(object->job_id);
	return py_job_id;
}

static int py_spoolss_Notify_set_job_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->job_id = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_Notify_get_data(PyObject *obj, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(obj);
	PyObject *py_data;
	py_data = py_import_spoolss_NotifyData(pytalloc_get_mem_ctx(obj), object->variable_type, &object->data);
	if (py_data == NULL) {
		return NULL;
	}
	return py_data;
}

static int py_spoolss_Notify_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_Notify *object = (struct spoolss_Notify *)pytalloc_get_ptr(py_obj);
	{
		union spoolss_NotifyData *data_switch_0;
		data_switch_0 = py_export_spoolss_NotifyData(pytalloc_get_mem_ctx(py_obj), object->variable_type, value);
		if (data_switch_0 == NULL) {
			return -1;
		}
		object->data = *data_switch_0;
	}
	return 0;
}

static PyGetSetDef py_spoolss_Notify_getsetters[] = {
	{ discard_const_p(char, "type"), py_spoolss_Notify_get_type, py_spoolss_Notify_set_type },
	{ discard_const_p(char, "field"), py_spoolss_Notify_get_field, py_spoolss_Notify_set_field },
	{ discard_const_p(char, "variable_type"), py_spoolss_Notify_get_variable_type, py_spoolss_Notify_set_variable_type },
	{ discard_const_p(char, "job_id"), py_spoolss_Notify_get_job_id, py_spoolss_Notify_set_job_id },
	{ discard_const_p(char, "data"), py_spoolss_Notify_get_data, py_spoolss_Notify_set_data },
	{ NULL }
};

static PyObject *py_spoolss_Notify_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_Notify, type);
}


static PyTypeObject spoolss_Notify_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.Notify",
	.tp_getset = py_spoolss_Notify_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_Notify_new,
};


static PyObject *py_spoolss_NotifyInfo_get_version(PyObject *obj, void *closure)
{
	struct spoolss_NotifyInfo *object = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_spoolss_NotifyInfo_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyInfo *object = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyInfo_get_flags(PyObject *obj, void *closure)
{
	struct spoolss_NotifyInfo *object = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_spoolss_NotifyInfo_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyInfo *object = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->flags = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyInfo_get_count(PyObject *obj, void *closure)
{
	struct spoolss_NotifyInfo *object = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyInt_FromLong(object->count);
	return py_count;
}

static int py_spoolss_NotifyInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyInfo *object = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->count = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_NotifyInfo_get_notifies(PyObject *obj, void *closure)
{
	struct spoolss_NotifyInfo *object = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(obj);
	PyObject *py_notifies;
	py_notifies = PyList_New(object->count);
	if (py_notifies == NULL) {
		return NULL;
	}
	{
		int notifies_cntr_0;
		for (notifies_cntr_0 = 0; notifies_cntr_0 < object->count; notifies_cntr_0++) {
			PyObject *py_notifies_0;
			py_notifies_0 = pytalloc_reference_ex(&spoolss_Notify_Type, object->notifies, &object->notifies[notifies_cntr_0]);
			PyList_SetItem(py_notifies, notifies_cntr_0, py_notifies_0);
		}
	}
	return py_notifies;
}

static int py_spoolss_NotifyInfo_set_notifies(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_NotifyInfo *object = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int notifies_cntr_0;
		object->notifies = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->notifies, PyList_GET_SIZE(value));
		if (!object->notifies) { return -1;; }
		talloc_set_name_const(object->notifies, "ARRAY: object->notifies");
		for (notifies_cntr_0 = 0; notifies_cntr_0 < PyList_GET_SIZE(value); notifies_cntr_0++) {
			PY_CHECK_TYPE(&spoolss_Notify_Type, PyList_GET_ITEM(value, notifies_cntr_0), return -1;);
			if (talloc_reference(object->notifies, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, notifies_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->notifies[notifies_cntr_0] = *(struct spoolss_Notify *)pytalloc_get_ptr(PyList_GET_ITEM(value, notifies_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_spoolss_NotifyInfo_getsetters[] = {
	{ discard_const_p(char, "version"), py_spoolss_NotifyInfo_get_version, py_spoolss_NotifyInfo_set_version },
	{ discard_const_p(char, "flags"), py_spoolss_NotifyInfo_get_flags, py_spoolss_NotifyInfo_set_flags },
	{ discard_const_p(char, "count"), py_spoolss_NotifyInfo_get_count, py_spoolss_NotifyInfo_set_count },
	{ discard_const_p(char, "notifies"), py_spoolss_NotifyInfo_get_notifies, py_spoolss_NotifyInfo_set_notifies },
	{ NULL }
};

static PyObject *py_spoolss_NotifyInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_NotifyInfo, type);
}


static PyTypeObject spoolss_NotifyInfo_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.NotifyInfo",
	.tp_getset = py_spoolss_NotifyInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_NotifyInfo_new,
};

PyObject *py_import_spoolss_ReplyPrinterInfo(TALLOC_CTX *mem_ctx, int level, union spoolss_ReplyPrinterInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 0:
			if (in->info0 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_NotifyInfo_Type, in->info0, in->info0);
			}
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union spoolss_ReplyPrinterInfo *py_export_spoolss_ReplyPrinterInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_ReplyPrinterInfo *ret = talloc_zero(mem_ctx, union spoolss_ReplyPrinterInfo);
	switch (level) {
		case 0:
			if (in == Py_None) {
				ret->info0 = NULL;
			} else {
				ret->info0 = NULL;
				PY_CHECK_TYPE(&spoolss_NotifyInfo_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->info0 = (struct spoolss_NotifyInfo *)pytalloc_get_ptr(in);
			}
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_spoolss_UserLevel1_get_size(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_spoolss_UserLevel1_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_UserLevel1_get_client(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(obj);
	PyObject *py_client;
	if (object->client == NULL) {
		py_client = Py_None;
		Py_INCREF(py_client);
	} else {
		if (object->client == NULL) {
			py_client = Py_None;
			Py_INCREF(py_client);
		} else {
			py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
		}
	}
	return py_client;
}

static int py_spoolss_UserLevel1_set_client(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->client = NULL;
	} else {
		object->client = NULL;
		if (PyUnicode_Check(value)) {
			object->client = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->client = 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_spoolss_UserLevel1_get_user(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(obj);
	PyObject *py_user;
	if (object->user == NULL) {
		py_user = Py_None;
		Py_INCREF(py_user);
	} else {
		if (object->user == NULL) {
			py_user = Py_None;
			Py_INCREF(py_user);
		} else {
			py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
		}
	}
	return py_user;
}

static int py_spoolss_UserLevel1_set_user(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->user = NULL;
	} else {
		object->user = NULL;
		if (PyUnicode_Check(value)) {
			object->user = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->user = 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_spoolss_UserLevel1_get_build(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(obj);
	PyObject *py_build;
	py_build = PyInt_FromLong(object->build);
	return py_build;
}

static int py_spoolss_UserLevel1_set_build(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->build = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_UserLevel1_get_major(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(obj);
	PyObject *py_major;
	py_major = PyInt_FromLong(object->major);
	return py_major;
}

static int py_spoolss_UserLevel1_set_major(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->major = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->major = 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_spoolss_UserLevel1_get_minor(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(obj);
	PyObject *py_minor;
	py_minor = PyInt_FromLong(object->minor);
	return py_minor;
}

static int py_spoolss_UserLevel1_set_minor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->minor = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->minor = 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_spoolss_UserLevel1_get_processor(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(obj);
	PyObject *py_processor;
	py_processor = PyInt_FromLong(object->processor);
	return py_processor;
}

static int py_spoolss_UserLevel1_set_processor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel1 *object = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->processor = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->processor = 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_spoolss_UserLevel1_getsetters[] = {
	{ discard_const_p(char, "size"), py_spoolss_UserLevel1_get_size, py_spoolss_UserLevel1_set_size },
	{ discard_const_p(char, "client"), py_spoolss_UserLevel1_get_client, py_spoolss_UserLevel1_set_client },
	{ discard_const_p(char, "user"), py_spoolss_UserLevel1_get_user, py_spoolss_UserLevel1_set_user },
	{ discard_const_p(char, "build"), py_spoolss_UserLevel1_get_build, py_spoolss_UserLevel1_set_build },
	{ discard_const_p(char, "major"), py_spoolss_UserLevel1_get_major, py_spoolss_UserLevel1_set_major },
	{ discard_const_p(char, "minor"), py_spoolss_UserLevel1_get_minor, py_spoolss_UserLevel1_set_minor },
	{ discard_const_p(char, "processor"), py_spoolss_UserLevel1_get_processor, py_spoolss_UserLevel1_set_processor },
	{ NULL }
};

static PyObject *py_spoolss_UserLevel1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_UserLevel1, type);
}


static PyTypeObject spoolss_UserLevel1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.UserLevel1",
	.tp_getset = py_spoolss_UserLevel1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_UserLevel1_new,
};


static PyObject *py_spoolss_UserLevel2_get_not_used(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel2 *object = (struct spoolss_UserLevel2 *)pytalloc_get_ptr(obj);
	PyObject *py_not_used;
	py_not_used = PyInt_FromLong(object->not_used);
	return py_not_used;
}

static int py_spoolss_UserLevel2_set_not_used(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel2 *object = (struct spoolss_UserLevel2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->not_used = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_spoolss_UserLevel2_getsetters[] = {
	{ discard_const_p(char, "not_used"), py_spoolss_UserLevel2_get_not_used, py_spoolss_UserLevel2_set_not_used },
	{ NULL }
};

static PyObject *py_spoolss_UserLevel2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_UserLevel2, type);
}


static PyTypeObject spoolss_UserLevel2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.UserLevel2",
	.tp_getset = py_spoolss_UserLevel2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_UserLevel2_new,
};


static PyObject *py_spoolss_UserLevel3_get_size(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_spoolss_UserLevel3_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_UserLevel3_get_flags(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_spoolss_UserLevel3_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->flags = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_UserLevel3_get_size2(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_size2;
	py_size2 = PyInt_FromLong(object->size2);
	return py_size2;
}

static int py_spoolss_UserLevel3_set_size2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size2 = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_UserLevel3_get_client(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_client;
	if (object->client == NULL) {
		py_client = Py_None;
		Py_INCREF(py_client);
	} else {
		if (object->client == NULL) {
			py_client = Py_None;
			Py_INCREF(py_client);
		} else {
			py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
		}
	}
	return py_client;
}

static int py_spoolss_UserLevel3_set_client(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->client = NULL;
	} else {
		object->client = NULL;
		if (PyUnicode_Check(value)) {
			object->client = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->client = 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_spoolss_UserLevel3_get_user(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_user;
	if (object->user == NULL) {
		py_user = Py_None;
		Py_INCREF(py_user);
	} else {
		if (object->user == NULL) {
			py_user = Py_None;
			Py_INCREF(py_user);
		} else {
			py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
		}
	}
	return py_user;
}

static int py_spoolss_UserLevel3_set_user(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->user = NULL;
	} else {
		object->user = NULL;
		if (PyUnicode_Check(value)) {
			object->user = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
		} else if (PyString_Check(value)) {
			object->user = 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_spoolss_UserLevel3_get_build(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_build;
	py_build = PyInt_FromLong(object->build);
	return py_build;
}

static int py_spoolss_UserLevel3_set_build(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->build = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_UserLevel3_get_major(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_major;
	py_major = PyInt_FromLong(object->major);
	return py_major;
}

static int py_spoolss_UserLevel3_set_major(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->major = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->major = 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_spoolss_UserLevel3_get_minor(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_minor;
	py_minor = PyInt_FromLong(object->minor);
	return py_minor;
}

static int py_spoolss_UserLevel3_set_minor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->minor = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->minor = 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_spoolss_UserLevel3_get_processor(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_processor;
	py_processor = PyInt_FromLong(object->processor);
	return py_processor;
}

static int py_spoolss_UserLevel3_set_processor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->processor = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->processor = 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_spoolss_UserLevel3_get_reserved(PyObject *obj, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyLong_FromLongLong(object->reserved);
	return py_reserved;
}

static int py_spoolss_UserLevel3_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevel3 *object = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->reserved = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->reserved = 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_spoolss_UserLevel3_getsetters[] = {
	{ discard_const_p(char, "size"), py_spoolss_UserLevel3_get_size, py_spoolss_UserLevel3_set_size },
	{ discard_const_p(char, "flags"), py_spoolss_UserLevel3_get_flags, py_spoolss_UserLevel3_set_flags },
	{ discard_const_p(char, "size2"), py_spoolss_UserLevel3_get_size2, py_spoolss_UserLevel3_set_size2 },
	{ discard_const_p(char, "client"), py_spoolss_UserLevel3_get_client, py_spoolss_UserLevel3_set_client },
	{ discard_const_p(char, "user"), py_spoolss_UserLevel3_get_user, py_spoolss_UserLevel3_set_user },
	{ discard_const_p(char, "build"), py_spoolss_UserLevel3_get_build, py_spoolss_UserLevel3_set_build },
	{ discard_const_p(char, "major"), py_spoolss_UserLevel3_get_major, py_spoolss_UserLevel3_set_major },
	{ discard_const_p(char, "minor"), py_spoolss_UserLevel3_get_minor, py_spoolss_UserLevel3_set_minor },
	{ discard_const_p(char, "processor"), py_spoolss_UserLevel3_get_processor, py_spoolss_UserLevel3_set_processor },
	{ discard_const_p(char, "reserved"), py_spoolss_UserLevel3_get_reserved, py_spoolss_UserLevel3_set_reserved },
	{ NULL }
};

static PyObject *py_spoolss_UserLevel3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_UserLevel3, type);
}


static PyTypeObject spoolss_UserLevel3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.UserLevel3",
	.tp_getset = py_spoolss_UserLevel3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_UserLevel3_new,
};

PyObject *py_import_spoolss_UserLevel(TALLOC_CTX *mem_ctx, int level, union spoolss_UserLevel *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			if (in->level1 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_UserLevel1_Type, in->level1, in->level1);
			}
			return ret;

		case 2:
			if (in->level2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_UserLevel2_Type, in->level2, in->level2);
			}
			return ret;

		case 3:
			if (in->level3 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&spoolss_UserLevel3_Type, in->level3, in->level3);
			}
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union spoolss_UserLevel *py_export_spoolss_UserLevel(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_UserLevel *ret = talloc_zero(mem_ctx, union spoolss_UserLevel);
	switch (level) {
		case 1:
			if (in == Py_None) {
				ret->level1 = NULL;
			} else {
				ret->level1 = NULL;
				PY_CHECK_TYPE(&spoolss_UserLevel1_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->level1 = (struct spoolss_UserLevel1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == Py_None) {
				ret->level2 = NULL;
			} else {
				ret->level2 = NULL;
				PY_CHECK_TYPE(&spoolss_UserLevel2_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->level2 = (struct spoolss_UserLevel2 *)pytalloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == Py_None) {
				ret->level3 = NULL;
			} else {
				ret->level3 = NULL;
				PY_CHECK_TYPE(&spoolss_UserLevel3_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->level3 = (struct spoolss_UserLevel3 *)pytalloc_get_ptr(in);
			}
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_spoolss_UserLevelCtr_get_level(PyObject *obj, void *closure)
{
	struct spoolss_UserLevelCtr *object = (struct spoolss_UserLevelCtr *)pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyInt_FromLong(object->level);
	return py_level;
}

static int py_spoolss_UserLevelCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevelCtr *object = (struct spoolss_UserLevelCtr *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->level = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_UserLevelCtr_get_user_info(PyObject *obj, void *closure)
{
	struct spoolss_UserLevelCtr *object = (struct spoolss_UserLevelCtr *)pytalloc_get_ptr(obj);
	PyObject *py_user_info;
	py_user_info = py_import_spoolss_UserLevel(pytalloc_get_mem_ctx(obj), object->level, &object->user_info);
	if (py_user_info == NULL) {
		return NULL;
	}
	return py_user_info;
}

static int py_spoolss_UserLevelCtr_set_user_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_UserLevelCtr *object = (struct spoolss_UserLevelCtr *)pytalloc_get_ptr(py_obj);
	{
		union spoolss_UserLevel *user_info_switch_0;
		user_info_switch_0 = py_export_spoolss_UserLevel(pytalloc_get_mem_ctx(py_obj), object->level, value);
		if (user_info_switch_0 == NULL) {
			return -1;
		}
		object->user_info = *user_info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_spoolss_UserLevelCtr_getsetters[] = {
	{ discard_const_p(char, "level"), py_spoolss_UserLevelCtr_get_level, py_spoolss_UserLevelCtr_set_level },
	{ discard_const_p(char, "user_info"), py_spoolss_UserLevelCtr_get_user_info, py_spoolss_UserLevelCtr_set_user_info },
	{ NULL }
};

static PyObject *py_spoolss_UserLevelCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_UserLevelCtr, type);
}


static PyTypeObject spoolss_UserLevelCtr_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.UserLevelCtr",
	.tp_getset = py_spoolss_UserLevelCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_UserLevelCtr_new,
};


static PyObject *py_spoolss_PrinterEnumValues_get_value_name(PyObject *obj, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(obj);
	PyObject *py_value_name;
	if (object->value_name == NULL) {
		py_value_name = Py_None;
		Py_INCREF(py_value_name);
	} else {
		py_value_name = PyString_FromStringOrNULL(object->value_name);
	}
	return py_value_name;
}

static int py_spoolss_PrinterEnumValues_set_value_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(py_obj);
	if (value == Py_None) {
		object->value_name = NULL;
	} else {
		object->value_name = NULL;
		object->value_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterEnumValues_get_value_name_len(PyObject *obj, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(obj);
	PyObject *py_value_name_len;
	py_value_name_len = PyInt_FromLong(object->value_name_len);
	return py_value_name_len;
}

static int py_spoolss_PrinterEnumValues_set_value_name_len(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->value_name_len = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PrinterEnumValues_get_type(PyObject *obj, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(obj);
	PyObject *py_type;
	py_type = PyInt_FromLong(object->type);
	return py_type;
}

static int py_spoolss_PrinterEnumValues_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->type = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->type = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_spoolss_PrinterEnumValues_get_data(PyObject *obj, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyString_FromStringAndSize((char *)(*object->data).data, (*object->data).length);
	}
	return py_data;
}

static int py_spoolss_PrinterEnumValues_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->data);
	if (value == Py_None) {
		object->data = NULL;
	} else {
		object->data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data);
		*object->data = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	}
	return 0;
}

static PyObject *py_spoolss_PrinterEnumValues_get_data_length(PyObject *obj, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(obj);
	PyObject *py_data_length;
	py_data_length = PyInt_FromLong(object->data_length);
	return py_data_length;
}

static int py_spoolss_PrinterEnumValues_set_data_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->data_length = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_spoolss_PrinterEnumValues_getsetters[] = {
	{ discard_const_p(char, "value_name"), py_spoolss_PrinterEnumValues_get_value_name, py_spoolss_PrinterEnumValues_set_value_name },
	{ discard_const_p(char, "value_name_len"), py_spoolss_PrinterEnumValues_get_value_name_len, py_spoolss_PrinterEnumValues_set_value_name_len },
	{ discard_const_p(char, "type"), py_spoolss_PrinterEnumValues_get_type, py_spoolss_PrinterEnumValues_set_type },
	{ discard_const_p(char, "data"), py_spoolss_PrinterEnumValues_get_data, py_spoolss_PrinterEnumValues_set_data },
	{ discard_const_p(char, "data_length"), py_spoolss_PrinterEnumValues_get_data_length, py_spoolss_PrinterEnumValues_set_data_length },
	{ NULL }
};

static PyObject *py_spoolss_PrinterEnumValues_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_PrinterEnumValues, type);
}

static PyObject *py_spoolss_PrinterEnumValues_ndr_pack(PyObject *py_obj)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterEnumValues);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_spoolss_PrinterEnumValues_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_PrinterEnumValues);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_PrinterEnumValues);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PrinterEnumValues_ndr_print(PyObject *py_obj)
{
	struct spoolss_PrinterEnumValues *object = (struct spoolss_PrinterEnumValues *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PrinterEnumValues, "spoolss_PrinterEnumValues", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_PrinterEnumValues_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_PrinterEnumValues_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_PrinterEnumValues_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_PrinterEnumValues_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_PrinterEnumValues_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PrinterEnumValues",
	.tp_getset = py_spoolss_PrinterEnumValues_getsetters,
	.tp_methods = py_spoolss_PrinterEnumValues_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PrinterEnumValues_new,
};

PyObject *py_import_spoolss_KeyNames(TALLOC_CTX *mem_ctx, int level, union spoolss_KeyNames *in)
{
	PyObject *ret;

	switch (level) {
		case 0:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

		case 1:
			ret = Py_None;
			Py_INCREF(ret);
			return ret;

		default:
			ret = pytalloc_CObject_FromTallocPtr(in->string_array);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union spoolss_KeyNames *py_export_spoolss_KeyNames(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union spoolss_KeyNames *ret = talloc_zero(mem_ctx, union spoolss_KeyNames);
	switch (level) {
		case 0:
			break;

		case 1:
			break;

		default:
			ret->string_array = PyCObject_AsVoidPtr(in);
			break;

	}

	return ret;
}


static PyObject *py_spoolss_PortData1_get_portname(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_portname;
	if (object->portname == NULL) {
		py_portname = Py_None;
		Py_INCREF(py_portname);
	} else {
		py_portname = PyUnicode_Decode(object->portname, strlen(object->portname), "utf-8", "ignore");
	}
	return py_portname;
}

static int py_spoolss_PortData1_set_portname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->portname = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->portname = 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_spoolss_PortData1_get_version(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_spoolss_PortData1_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData1_get_protocol(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_protocol;
	py_protocol = PyInt_FromLong(object->protocol);
	return py_protocol;
}

static int py_spoolss_PortData1_set_protocol(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->protocol = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->protocol = 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_spoolss_PortData1_get_size(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_spoolss_PortData1_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData1_get_reserved(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_spoolss_PortData1_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData1_get_hostaddress(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_hostaddress;
	if (object->hostaddress == NULL) {
		py_hostaddress = Py_None;
		Py_INCREF(py_hostaddress);
	} else {
		py_hostaddress = PyUnicode_Decode(object->hostaddress, strlen(object->hostaddress), "utf-8", "ignore");
	}
	return py_hostaddress;
}

static int py_spoolss_PortData1_set_hostaddress(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->hostaddress = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->hostaddress = 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_spoolss_PortData1_get_snmpcommunity(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_snmpcommunity;
	if (object->snmpcommunity == NULL) {
		py_snmpcommunity = Py_None;
		Py_INCREF(py_snmpcommunity);
	} else {
		py_snmpcommunity = PyUnicode_Decode(object->snmpcommunity, strlen(object->snmpcommunity), "utf-8", "ignore");
	}
	return py_snmpcommunity;
}

static int py_spoolss_PortData1_set_snmpcommunity(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->snmpcommunity = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->snmpcommunity = 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_spoolss_PortData1_get_dblspool(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_dblspool;
	py_dblspool = PyInt_FromLong(object->dblspool);
	return py_dblspool;
}

static int py_spoolss_PortData1_set_dblspool(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->dblspool = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData1_get_queue(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_queue;
	if (object->queue == NULL) {
		py_queue = Py_None;
		Py_INCREF(py_queue);
	} else {
		py_queue = PyUnicode_Decode(object->queue, strlen(object->queue), "utf-8", "ignore");
	}
	return py_queue;
}

static int py_spoolss_PortData1_set_queue(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->queue = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->queue = 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_spoolss_PortData1_get_ip_address(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_ip_address;
	if (object->ip_address == NULL) {
		py_ip_address = Py_None;
		Py_INCREF(py_ip_address);
	} else {
		py_ip_address = PyUnicode_Decode(object->ip_address, strlen(object->ip_address), "utf-8", "ignore");
	}
	return py_ip_address;
}

static int py_spoolss_PortData1_set_ip_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->ip_address = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->ip_address = PyString_AS_STRING(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_spoolss_PortData1_get_hardware_address(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_hardware_address;
	if (object->hardware_address == NULL) {
		py_hardware_address = Py_None;
		Py_INCREF(py_hardware_address);
	} else {
		py_hardware_address = PyUnicode_Decode(object->hardware_address, strlen(object->hardware_address), "utf-8", "ignore");
	}
	return py_hardware_address;
}

static int py_spoolss_PortData1_set_hardware_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->hardware_address = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->hardware_address = PyString_AS_STRING(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_spoolss_PortData1_get_device_type(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_device_type;
	if (object->device_type == NULL) {
		py_device_type = Py_None;
		Py_INCREF(py_device_type);
	} else {
		py_device_type = PyUnicode_Decode(object->device_type, strlen(object->device_type), "utf-8", "ignore");
	}
	return py_device_type;
}

static int py_spoolss_PortData1_set_device_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->device_type = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->device_type = 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_spoolss_PortData1_get_port_number(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_port_number;
	py_port_number = PyInt_FromLong(object->port_number);
	return py_port_number;
}

static int py_spoolss_PortData1_set_port_number(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->port_number = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData1_get_snmp_enabled(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_snmp_enabled;
	py_snmp_enabled = PyInt_FromLong(object->snmp_enabled);
	return py_snmp_enabled;
}

static int py_spoolss_PortData1_set_snmp_enabled(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->snmp_enabled = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData1_get_snmp_dev_index(PyObject *obj, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(obj);
	PyObject *py_snmp_dev_index;
	py_snmp_dev_index = PyInt_FromLong(object->snmp_dev_index);
	return py_snmp_dev_index;
}

static int py_spoolss_PortData1_set_snmp_dev_index(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->snmp_dev_index = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_spoolss_PortData1_getsetters[] = {
	{ discard_const_p(char, "portname"), py_spoolss_PortData1_get_portname, py_spoolss_PortData1_set_portname },
	{ discard_const_p(char, "version"), py_spoolss_PortData1_get_version, py_spoolss_PortData1_set_version },
	{ discard_const_p(char, "protocol"), py_spoolss_PortData1_get_protocol, py_spoolss_PortData1_set_protocol },
	{ discard_const_p(char, "size"), py_spoolss_PortData1_get_size, py_spoolss_PortData1_set_size },
	{ discard_const_p(char, "reserved"), py_spoolss_PortData1_get_reserved, py_spoolss_PortData1_set_reserved },
	{ discard_const_p(char, "hostaddress"), py_spoolss_PortData1_get_hostaddress, py_spoolss_PortData1_set_hostaddress },
	{ discard_const_p(char, "snmpcommunity"), py_spoolss_PortData1_get_snmpcommunity, py_spoolss_PortData1_set_snmpcommunity },
	{ discard_const_p(char, "dblspool"), py_spoolss_PortData1_get_dblspool, py_spoolss_PortData1_set_dblspool },
	{ discard_const_p(char, "queue"), py_spoolss_PortData1_get_queue, py_spoolss_PortData1_set_queue },
	{ discard_const_p(char, "ip_address"), py_spoolss_PortData1_get_ip_address, py_spoolss_PortData1_set_ip_address },
	{ discard_const_p(char, "hardware_address"), py_spoolss_PortData1_get_hardware_address, py_spoolss_PortData1_set_hardware_address },
	{ discard_const_p(char, "device_type"), py_spoolss_PortData1_get_device_type, py_spoolss_PortData1_set_device_type },
	{ discard_const_p(char, "port_number"), py_spoolss_PortData1_get_port_number, py_spoolss_PortData1_set_port_number },
	{ discard_const_p(char, "snmp_enabled"), py_spoolss_PortData1_get_snmp_enabled, py_spoolss_PortData1_set_snmp_enabled },
	{ discard_const_p(char, "snmp_dev_index"), py_spoolss_PortData1_get_snmp_dev_index, py_spoolss_PortData1_set_snmp_dev_index },
	{ NULL }
};

static PyObject *py_spoolss_PortData1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_PortData1, type);
}

static PyObject *py_spoolss_PortData1_ndr_pack(PyObject *py_obj)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_spoolss_PortData1);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_spoolss_PortData1_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_PortData1);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_PortData1);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PortData1_ndr_print(PyObject *py_obj)
{
	struct spoolss_PortData1 *object = (struct spoolss_PortData1 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PortData1, "spoolss_PortData1", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_PortData1_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_PortData1_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_PortData1_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_PortData1_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_PortData1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PortData1",
	.tp_getset = py_spoolss_PortData1_getsetters,
	.tp_methods = py_spoolss_PortData1_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PortData1_new,
};


static PyObject *py_spoolss_PortData2_get_portname(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_portname;
	if (object->portname == NULL) {
		py_portname = Py_None;
		Py_INCREF(py_portname);
	} else {
		py_portname = PyUnicode_Decode(object->portname, strlen(object->portname), "utf-8", "ignore");
	}
	return py_portname;
}

static int py_spoolss_PortData2_set_portname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->portname = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->portname = 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_spoolss_PortData2_get_version(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_spoolss_PortData2_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData2_get_protocol(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_protocol;
	py_protocol = PyInt_FromLong(object->protocol);
	return py_protocol;
}

static int py_spoolss_PortData2_set_protocol(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->protocol = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->protocol = 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_spoolss_PortData2_get_size(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyInt_FromLong(object->size);
	return py_size;
}

static int py_spoolss_PortData2_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData2_get_reserved(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyInt_FromLong(object->reserved);
	return py_reserved;
}

static int py_spoolss_PortData2_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->reserved = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData2_get_hostaddress(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_hostaddress;
	if (object->hostaddress == NULL) {
		py_hostaddress = Py_None;
		Py_INCREF(py_hostaddress);
	} else {
		py_hostaddress = PyUnicode_Decode(object->hostaddress, strlen(object->hostaddress), "utf-8", "ignore");
	}
	return py_hostaddress;
}

static int py_spoolss_PortData2_set_hostaddress(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->hostaddress = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->hostaddress = 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_spoolss_PortData2_get_snmpcommunity(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_snmpcommunity;
	if (object->snmpcommunity == NULL) {
		py_snmpcommunity = Py_None;
		Py_INCREF(py_snmpcommunity);
	} else {
		py_snmpcommunity = PyUnicode_Decode(object->snmpcommunity, strlen(object->snmpcommunity), "utf-8", "ignore");
	}
	return py_snmpcommunity;
}

static int py_spoolss_PortData2_set_snmpcommunity(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->snmpcommunity = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->snmpcommunity = 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_spoolss_PortData2_get_dblspool(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_dblspool;
	py_dblspool = PyInt_FromLong(object->dblspool);
	return py_dblspool;
}

static int py_spoolss_PortData2_set_dblspool(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->dblspool = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData2_get_queue(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_queue;
	if (object->queue == NULL) {
		py_queue = Py_None;
		Py_INCREF(py_queue);
	} else {
		py_queue = PyUnicode_Decode(object->queue, strlen(object->queue), "utf-8", "ignore");
	}
	return py_queue;
}

static int py_spoolss_PortData2_set_queue(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->queue = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->queue = 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_spoolss_PortData2_get_device_type(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_device_type;
	if (object->device_type == NULL) {
		py_device_type = Py_None;
		Py_INCREF(py_device_type);
	} else {
		py_device_type = PyUnicode_Decode(object->device_type, strlen(object->device_type), "utf-8", "ignore");
	}
	return py_device_type;
}

static int py_spoolss_PortData2_set_device_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->device_type = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->device_type = 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_spoolss_PortData2_get_port_number(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_port_number;
	py_port_number = PyInt_FromLong(object->port_number);
	return py_port_number;
}

static int py_spoolss_PortData2_set_port_number(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->port_number = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData2_get_snmp_enabled(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_snmp_enabled;
	py_snmp_enabled = PyInt_FromLong(object->snmp_enabled);
	return py_snmp_enabled;
}

static int py_spoolss_PortData2_set_snmp_enabled(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->snmp_enabled = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData2_get_snmp_dev_index(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_snmp_dev_index;
	py_snmp_dev_index = PyInt_FromLong(object->snmp_dev_index);
	return py_snmp_dev_index;
}

static int py_spoolss_PortData2_set_snmp_dev_index(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->snmp_dev_index = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_spoolss_PortData2_get_port_monitor_mib_index(PyObject *obj, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(obj);
	PyObject *py_port_monitor_mib_index;
	py_port_monitor_mib_index = PyInt_FromLong(object->port_monitor_mib_index);
	return py_port_monitor_mib_index;
}

static int py_spoolss_PortData2_set_port_monitor_mib_index(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->port_monitor_mib_index = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_spoolss_PortData2_getsetters[] = {
	{ discard_const_p(char, "portname"), py_spoolss_PortData2_get_portname, py_spoolss_PortData2_set_portname },
	{ discard_const_p(char, "version"), py_spoolss_PortData2_get_version, py_spoolss_PortData2_set_version },
	{ discard_const_p(char, "protocol"), py_spoolss_PortData2_get_protocol, py_spoolss_PortData2_set_protocol },
	{ discard_const_p(char, "size"), py_spoolss_PortData2_get_size, py_spoolss_PortData2_set_size },
	{ discard_const_p(char, "reserved"), py_spoolss_PortData2_get_reserved, py_spoolss_PortData2_set_reserved },
	{ discard_const_p(char, "hostaddress"), py_spoolss_PortData2_get_hostaddress, py_spoolss_PortData2_set_hostaddress },
	{ discard_const_p(char, "snmpcommunity"), py_spoolss_PortData2_get_snmpcommunity, py_spoolss_PortData2_set_snmpcommunity },
	{ discard_const_p(char, "dblspool"), py_spoolss_PortData2_get_dblspool, py_spoolss_PortData2_set_dblspool },
	{ discard_const_p(char, "queue"), py_spoolss_PortData2_get_queue, py_spoolss_PortData2_set_queue },
	{ discard_const_p(char, "device_type"), py_spoolss_PortData2_get_device_type, py_spoolss_PortData2_set_device_type },
	{ discard_const_p(char, "port_number"), py_spoolss_PortData2_get_port_number, py_spoolss_PortData2_set_port_number },
	{ discard_const_p(char, "snmp_enabled"), py_spoolss_PortData2_get_snmp_enabled, py_spoolss_PortData2_set_snmp_enabled },
	{ discard_const_p(char, "snmp_dev_index"), py_spoolss_PortData2_get_snmp_dev_index, py_spoolss_PortData2_set_snmp_dev_index },
	{ discard_const_p(char, "port_monitor_mib_index"), py_spoolss_PortData2_get_port_monitor_mib_index, py_spoolss_PortData2_set_port_monitor_mib_index },
	{ NULL }
};

static PyObject *py_spoolss_PortData2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_PortData2, type);
}

static PyObject *py_spoolss_PortData2_ndr_pack(PyObject *py_obj)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_spoolss_PortData2);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_spoolss_PortData2_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_PortData2);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_PortData2);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_PortData2_ndr_print(PyObject *py_obj)
{
	struct spoolss_PortData2 *object = (struct spoolss_PortData2 *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_PortData2, "spoolss_PortData2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_PortData2_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_PortData2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_PortData2_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_PortData2_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_PortData2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.PortData2",
	.tp_getset = py_spoolss_PortData2_getsetters,
	.tp_methods = py_spoolss_PortData2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_PortData2_new,
};


static PyObject *py_spoolss_MonitorUi_get_dll_name(PyObject *obj, void *closure)
{
	struct spoolss_MonitorUi *object = (struct spoolss_MonitorUi *)pytalloc_get_ptr(obj);
	PyObject *py_dll_name;
	py_dll_name = PyString_FromStringOrNULL(object->dll_name);
	return py_dll_name;
}

static int py_spoolss_MonitorUi_set_dll_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_MonitorUi *object = (struct spoolss_MonitorUi *)pytalloc_get_ptr(py_obj);
	object->dll_name = talloc_strdup(pytalloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyGetSetDef py_spoolss_MonitorUi_getsetters[] = {
	{ discard_const_p(char, "dll_name"), py_spoolss_MonitorUi_get_dll_name, py_spoolss_MonitorUi_set_dll_name },
	{ NULL }
};

static PyObject *py_spoolss_MonitorUi_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_MonitorUi, type);
}

static PyObject *py_spoolss_MonitorUi_ndr_pack(PyObject *py_obj)
{
	struct spoolss_MonitorUi *object = (struct spoolss_MonitorUi *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_spoolss_MonitorUi);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_spoolss_MonitorUi_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct spoolss_MonitorUi *object = (struct spoolss_MonitorUi *)pytalloc_get_ptr(py_obj);
	DATA_BLOB blob;
	int blob_length = 0;
	enum ndr_err_code err;
	const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
		allow_remaining = true;
	}

	if (allow_remaining) {
		err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_MonitorUi);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_spoolss_MonitorUi);
	}
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_spoolss_MonitorUi_ndr_print(PyObject *py_obj)
{
	struct spoolss_MonitorUi *object = (struct spoolss_MonitorUi *)pytalloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_spoolss_MonitorUi, "spoolss_MonitorUi", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_spoolss_MonitorUi_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_spoolss_MonitorUi_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_spoolss_MonitorUi_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_spoolss_MonitorUi_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject spoolss_MonitorUi_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.MonitorUi",
	.tp_getset = py_spoolss_MonitorUi_getsetters,
	.tp_methods = py_spoolss_MonitorUi_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_MonitorUi_new,
};


static PyObject *py_spoolss_CorePrinterDriver_get_core_driver_guid(PyObject *obj, void *closure)
{
	struct spoolss_CorePrinterDriver *object = (struct spoolss_CorePrinterDriver *)pytalloc_get_ptr(obj);
	PyObject *py_core_driver_guid;
	py_core_driver_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->core_driver_guid);
	return py_core_driver_guid;
}

static int py_spoolss_CorePrinterDriver_set_core_driver_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_CorePrinterDriver *object = (struct spoolss_CorePrinterDriver *)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->core_driver_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_spoolss_CorePrinterDriver_get_driver_date(PyObject *obj, void *closure)
{
	struct spoolss_CorePrinterDriver *object = (struct spoolss_CorePrinterDriver *)pytalloc_get_ptr(obj);
	PyObject *py_driver_date;
	py_driver_date = PyLong_FromLongLong(object->driver_date);
	return py_driver_date;
}

static int py_spoolss_CorePrinterDriver_set_driver_date(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_CorePrinterDriver *object = (struct spoolss_CorePrinterDriver *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_date = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_date = 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_spoolss_CorePrinterDriver_get_driver_version(PyObject *obj, void *closure)
{
	struct spoolss_CorePrinterDriver *object = (struct spoolss_CorePrinterDriver *)pytalloc_get_ptr(obj);
	PyObject *py_driver_version;
	py_driver_version = PyLong_FromLongLong(object->driver_version);
	return py_driver_version;
}

static int py_spoolss_CorePrinterDriver_set_driver_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_CorePrinterDriver *object = (struct spoolss_CorePrinterDriver *)pytalloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->driver_version = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->driver_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_spoolss_CorePrinterDriver_get_formname(PyObject *obj, void *closure)
{
	struct spoolss_CorePrinterDriver *object = (struct spoolss_CorePrinterDriver *)pytalloc_get_ptr(obj);
	PyObject *py_formname;
	if (object->formname == NULL) {
		py_formname = Py_None;
		Py_INCREF(py_formname);
	} else {
		py_formname = PyUnicode_Decode(object->formname, strlen(object->formname), "utf-8", "ignore");
	}
	return py_formname;
}

static int py_spoolss_CorePrinterDriver_set_formname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct spoolss_CorePrinterDriver *object = (struct spoolss_CorePrinterDriver *)pytalloc_get_ptr(py_obj);
	if (PyUnicode_Check(value)) {
		object->formname = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
	} else if (PyString_Check(value)) {
		object->formname = 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_spoolss_CorePrinterDriver_getsetters[] = {
	{ discard_const_p(char, "core_driver_guid"), py_spoolss_CorePrinterDriver_get_core_driver_guid, py_spoolss_CorePrinterDriver_set_core_driver_guid },
	{ discard_const_p(char, "driver_date"), py_spoolss_CorePrinterDriver_get_driver_date, py_spoolss_CorePrinterDriver_set_driver_date },
	{ discard_const_p(char, "driver_version"), py_spoolss_CorePrinterDriver_get_driver_version, py_spoolss_CorePrinterDriver_set_driver_version },
	{ discard_const_p(char, "formname"), py_spoolss_CorePrinterDriver_get_formname, py_spoolss_CorePrinterDriver_set_formname },
	{ NULL }
};

static PyObject *py_spoolss_CorePrinterDriver_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return pytalloc_new(struct spoolss_CorePrinterDriver, type);
}


static PyTypeObject spoolss_CorePrinterDriver_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.CorePrinterDriver",
	.tp_getset = py_spoolss_CorePrinterDriver_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(pytalloc_Object),
	.tp_new = py_spoolss_CorePrinterDriver_new,
};


static bool pack_py_spoolss_EnumPrinters_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumPrinters *r)
{
	PyObject *py_flags;
	PyObject *py_server;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"flags", "server", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_EnumPrinters", discard_const_p(char *, kwnames), &py_flags, &py_server, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	if (PyLong_Check(py_flags)) {
		r->in.flags = PyLong_AsLongLong(py_flags);
	} else if (PyInt_Check(py_flags)) {
		r->in.flags = PyInt_AsLong(py_flags);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumPrinters_args_out(struct spoolss_EnumPrinters *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = py_import_spoolss_PrinterInfo(*r->out.info, r->in.level, r->out.info[info_cntr_2]);
				if (py_info_2 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_OpenPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_OpenPrinter *r)
{
	PyObject *py_printername;
	PyObject *py_datatype;
	PyObject *py_devmode_ctr;
	PyObject *py_access_mask;
	const char *kwnames[] = {
		"printername", "datatype", "devmode_ctr", "access_mask", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_OpenPrinter", discard_const_p(char *, kwnames), &py_printername, &py_datatype, &py_devmode_ctr, &py_access_mask)) {
		return false;
	}

	if (py_printername == Py_None) {
		r->in.printername = NULL;
	} else {
		r->in.printername = NULL;
		if (PyUnicode_Check(py_printername)) {
			r->in.printername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_printername, "utf-8", "ignore"));
		} else if (PyString_Check(py_printername)) {
			r->in.printername = PyString_AS_STRING(py_printername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_printername)->tp_name);
			return false;
		}
	}
	if (py_datatype == Py_None) {
		r->in.datatype = NULL;
	} else {
		r->in.datatype = NULL;
		if (PyUnicode_Check(py_datatype)) {
			r->in.datatype = PyString_AS_STRING(PyUnicode_AsEncodedString(py_datatype, "utf-8", "ignore"));
		} else if (PyString_Check(py_datatype)) {
			r->in.datatype = PyString_AS_STRING(py_datatype);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_datatype)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&spoolss_DevmodeContainer_Type, py_devmode_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_devmode_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.devmode_ctr = *(struct spoolss_DevmodeContainer *)pytalloc_get_ptr(py_devmode_ctr);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_OpenPrinter_args_out(struct spoolss_OpenPrinter *r)
{
	PyObject *result;
	PyObject *py_handle;
	py_handle = pytalloc_reference_ex(policy_handle_Type, r->out.handle, r->out.handle);
	result = py_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_SetJob_args_in(PyObject *args, PyObject *kwargs, struct spoolss_SetJob *r)
{
	PyObject *py_handle;
	PyObject *py_job_id;
	PyObject *py_ctr;
	PyObject *py_command;
	const char *kwnames[] = {
		"handle", "job_id", "ctr", "command", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_SetJob", discard_const_p(char *, kwnames), &py_handle, &py_job_id, &py_ctr, &py_command)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_job_id, return false;);
	r->in.job_id = PyInt_AsLong(py_job_id);
	if (py_ctr == Py_None) {
		r->in.ctr = NULL;
	} else {
		r->in.ctr = NULL;
		PY_CHECK_TYPE(&spoolss_JobInfoContainer_Type, py_ctr, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_ctr)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.ctr = (struct spoolss_JobInfoContainer *)pytalloc_get_ptr(py_ctr);
	}
	if (PyLong_Check(py_command)) {
		r->in.command = PyLong_AsLongLong(py_command);
	} else if (PyInt_Check(py_command)) {
		r->in.command = PyInt_AsLong(py_command);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_SetJob_args_out(struct spoolss_SetJob *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetJob_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetJob *r)
{
	PyObject *py_handle;
	PyObject *py_job_id;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "job_id", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_GetJob", discard_const_p(char *, kwnames), &py_handle, &py_job_id, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_job_id, return false;);
	r->in.job_id = PyInt_AsLong(py_job_id);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_GetJob_args_out(struct spoolss_GetJob *r)
{
	PyObject *result;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(2);
	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_spoolss_JobInfo(r->out.info, r->in.level, r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	PyTuple_SetItem(result, 0, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumJobs_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumJobs *r)
{
	PyObject *py_handle;
	PyObject *py_firstjob;
	PyObject *py_numjobs;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "firstjob", "numjobs", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:spoolss_EnumJobs", discard_const_p(char *, kwnames), &py_handle, &py_firstjob, &py_numjobs, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_firstjob, return false;);
	r->in.firstjob = PyInt_AsLong(py_firstjob);
	PY_CHECK_TYPE(&PyInt_Type, py_numjobs, return false;);
	r->in.numjobs = PyInt_AsLong(py_numjobs);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumJobs_args_out(struct spoolss_EnumJobs *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = py_import_spoolss_JobInfo(*r->out.info, r->in.level, r->out.info[info_cntr_2]);
				if (py_info_2 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddPrinter *r)
{
	PyObject *py_server;
	PyObject *py_info_ctr;
	PyObject *py_devmode_ctr;
	PyObject *py_secdesc_ctr;
	const char *kwnames[] = {
		"server", "info_ctr", "devmode_ctr", "secdesc_ctr", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_AddPrinter", discard_const_p(char *, kwnames), &py_server, &py_info_ctr, &py_devmode_ctr, &py_secdesc_ctr)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
	PY_CHECK_TYPE(&spoolss_SetPrinterInfoCtr_Type, py_info_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.info_ctr = (struct spoolss_SetPrinterInfoCtr *)pytalloc_get_ptr(py_info_ctr);
	r->in.devmode_ctr = talloc_ptrtype(r, r->in.devmode_ctr);
	PY_CHECK_TYPE(&spoolss_DevmodeContainer_Type, py_devmode_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_devmode_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.devmode_ctr = (struct spoolss_DevmodeContainer *)pytalloc_get_ptr(py_devmode_ctr);
	r->in.secdesc_ctr = talloc_ptrtype(r, r->in.secdesc_ctr);
	PY_CHECK_TYPE(sec_desc_buf_Type, py_secdesc_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_secdesc_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.secdesc_ctr = (struct sec_desc_buf *)pytalloc_get_ptr(py_secdesc_ctr);
	return true;
}

static PyObject *unpack_py_spoolss_AddPrinter_args_out(struct spoolss_AddPrinter *r)
{
	PyObject *result;
	PyObject *py_handle;
	py_handle = pytalloc_reference_ex(policy_handle_Type, r->out.handle, r->out.handle);
	result = py_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePrinter *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_DeletePrinter", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_spoolss_DeletePrinter_args_out(struct spoolss_DeletePrinter *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_SetPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_SetPrinter *r)
{
	PyObject *py_handle;
	PyObject *py_info_ctr;
	PyObject *py_devmode_ctr;
	PyObject *py_secdesc_ctr;
	PyObject *py_command;
	const char *kwnames[] = {
		"handle", "info_ctr", "devmode_ctr", "secdesc_ctr", "command", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_SetPrinter", discard_const_p(char *, kwnames), &py_handle, &py_info_ctr, &py_devmode_ctr, &py_secdesc_ctr, &py_command)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
	PY_CHECK_TYPE(&spoolss_SetPrinterInfoCtr_Type, py_info_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.info_ctr = (struct spoolss_SetPrinterInfoCtr *)pytalloc_get_ptr(py_info_ctr);
	r->in.devmode_ctr = talloc_ptrtype(r, r->in.devmode_ctr);
	PY_CHECK_TYPE(&spoolss_DevmodeContainer_Type, py_devmode_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_devmode_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.devmode_ctr = (struct spoolss_DevmodeContainer *)pytalloc_get_ptr(py_devmode_ctr);
	r->in.secdesc_ctr = talloc_ptrtype(r, r->in.secdesc_ctr);
	PY_CHECK_TYPE(sec_desc_buf_Type, py_secdesc_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_secdesc_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.secdesc_ctr = (struct sec_desc_buf *)pytalloc_get_ptr(py_secdesc_ctr);
	if (PyLong_Check(py_command)) {
		r->in.command = PyLong_AsLongLong(py_command);
	} else if (PyInt_Check(py_command)) {
		r->in.command = PyInt_AsLong(py_command);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_SetPrinter_args_out(struct spoolss_SetPrinter *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetPrinter *r)
{
	PyObject *py_handle;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_GetPrinter", discard_const_p(char *, kwnames), &py_handle, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_GetPrinter_args_out(struct spoolss_GetPrinter *r)
{
	PyObject *result;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(2);
	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_spoolss_PrinterInfo(r->out.info, r->in.level, r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	PyTuple_SetItem(result, 0, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddPrinterDriver_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddPrinterDriver *r)
{
	PyObject *py_servername;
	PyObject *py_info_ctr;
	const char *kwnames[] = {
		"servername", "info_ctr", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:spoolss_AddPrinterDriver", discard_const_p(char *, kwnames), &py_servername, &py_info_ctr)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
	PY_CHECK_TYPE(&spoolss_AddDriverInfoCtr_Type, py_info_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.info_ctr = (struct spoolss_AddDriverInfoCtr *)pytalloc_get_ptr(py_info_ctr);
	return true;
}

static PyObject *unpack_py_spoolss_AddPrinterDriver_args_out(struct spoolss_AddPrinterDriver *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumPrinterDrivers_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumPrinterDrivers *r)
{
	PyObject *py_server;
	PyObject *py_environment;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"server", "environment", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_EnumPrinterDrivers", discard_const_p(char *, kwnames), &py_server, &py_environment, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	if (py_environment == Py_None) {
		r->in.environment = NULL;
	} else {
		r->in.environment = NULL;
		if (PyUnicode_Check(py_environment)) {
			r->in.environment = PyString_AS_STRING(PyUnicode_AsEncodedString(py_environment, "utf-8", "ignore"));
		} else if (PyString_Check(py_environment)) {
			r->in.environment = PyString_AS_STRING(py_environment);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_environment)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumPrinterDrivers_args_out(struct spoolss_EnumPrinterDrivers *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = py_import_spoolss_DriverInfo(*r->out.info, r->in.level, r->out.info[info_cntr_2]);
				if (py_info_2 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetPrinterDriver_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetPrinterDriver *r)
{
	PyObject *py_handle;
	PyObject *py_architecture;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "architecture", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_GetPrinterDriver", discard_const_p(char *, kwnames), &py_handle, &py_architecture, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (py_architecture == Py_None) {
		r->in.architecture = NULL;
	} else {
		r->in.architecture = NULL;
		if (PyUnicode_Check(py_architecture)) {
			r->in.architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(py_architecture, "utf-8", "ignore"));
		} else if (PyString_Check(py_architecture)) {
			r->in.architecture = PyString_AS_STRING(py_architecture);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_architecture)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_GetPrinterDriver_args_out(struct spoolss_GetPrinterDriver *r)
{
	PyObject *result;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(2);
	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_spoolss_DriverInfo(r->out.info, r->in.level, r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	PyTuple_SetItem(result, 0, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetPrinterDriverDirectory_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetPrinterDriverDirectory *r)
{
	PyObject *py_server;
	PyObject *py_environment;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"server", "environment", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_GetPrinterDriverDirectory", discard_const_p(char *, kwnames), &py_server, &py_environment, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	if (py_environment == Py_None) {
		r->in.environment = NULL;
	} else {
		r->in.environment = NULL;
		if (PyUnicode_Check(py_environment)) {
			r->in.environment = PyString_AS_STRING(PyUnicode_AsEncodedString(py_environment, "utf-8", "ignore"));
		} else if (PyString_Check(py_environment)) {
			r->in.environment = PyString_AS_STRING(py_environment);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_environment)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_GetPrinterDriverDirectory_args_out(struct spoolss_GetPrinterDriverDirectory *r)
{
	PyObject *result;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(2);
	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_spoolss_DriverDirectoryInfo(r->out.info, r->in.level, r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	PyTuple_SetItem(result, 0, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePrinterDriver_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePrinterDriver *r)
{
	PyObject *py_server;
	PyObject *py_architecture;
	PyObject *py_driver;
	const char *kwnames[] = {
		"server", "architecture", "driver", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_DeletePrinterDriver", discard_const_p(char *, kwnames), &py_server, &py_architecture, &py_driver)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	if (PyUnicode_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(py_architecture, "utf-8", "ignore"));
	} else if (PyString_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(py_architecture);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_architecture)->tp_name);
		return false;
	}
	if (PyUnicode_Check(py_driver)) {
		r->in.driver = PyString_AS_STRING(PyUnicode_AsEncodedString(py_driver, "utf-8", "ignore"));
	} else if (PyString_Check(py_driver)) {
		r->in.driver = PyString_AS_STRING(py_driver);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_driver)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_DeletePrinterDriver_args_out(struct spoolss_DeletePrinterDriver *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddPrintProcessor_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddPrintProcessor *r)
{
	PyObject *py_server;
	PyObject *py_architecture;
	PyObject *py_path_name;
	PyObject *py_print_processor_name;
	const char *kwnames[] = {
		"server", "architecture", "path_name", "print_processor_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_AddPrintProcessor", discard_const_p(char *, kwnames), &py_server, &py_architecture, &py_path_name, &py_print_processor_name)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	if (PyUnicode_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(py_architecture, "utf-8", "ignore"));
	} else if (PyString_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(py_architecture);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_architecture)->tp_name);
		return false;
	}
	if (PyUnicode_Check(py_path_name)) {
		r->in.path_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_path_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_path_name)) {
		r->in.path_name = PyString_AS_STRING(py_path_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path_name)->tp_name);
		return false;
	}
	if (PyUnicode_Check(py_print_processor_name)) {
		r->in.print_processor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_print_processor_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_print_processor_name)) {
		r->in.print_processor_name = PyString_AS_STRING(py_print_processor_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_print_processor_name)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_AddPrintProcessor_args_out(struct spoolss_AddPrintProcessor *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumPrintProcessors_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumPrintProcessors *r)
{
	PyObject *py_servername;
	PyObject *py_environment;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"servername", "environment", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_EnumPrintProcessors", discard_const_p(char *, kwnames), &py_servername, &py_environment, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	if (py_environment == Py_None) {
		r->in.environment = NULL;
	} else {
		r->in.environment = NULL;
		if (PyUnicode_Check(py_environment)) {
			r->in.environment = PyString_AS_STRING(PyUnicode_AsEncodedString(py_environment, "utf-8", "ignore"));
		} else if (PyString_Check(py_environment)) {
			r->in.environment = PyString_AS_STRING(py_environment);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_environment)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumPrintProcessors_args_out(struct spoolss_EnumPrintProcessors *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = py_import_spoolss_PrintProcessorInfo(*r->out.info, r->in.level, r->out.info[info_cntr_2]);
				if (py_info_2 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetPrintProcessorDirectory_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetPrintProcessorDirectory *r)
{
	PyObject *py_server;
	PyObject *py_environment;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"server", "environment", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_GetPrintProcessorDirectory", discard_const_p(char *, kwnames), &py_server, &py_environment, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	if (py_environment == Py_None) {
		r->in.environment = NULL;
	} else {
		r->in.environment = NULL;
		if (PyUnicode_Check(py_environment)) {
			r->in.environment = PyString_AS_STRING(PyUnicode_AsEncodedString(py_environment, "utf-8", "ignore"));
		} else if (PyString_Check(py_environment)) {
			r->in.environment = PyString_AS_STRING(py_environment);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_environment)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_GetPrintProcessorDirectory_args_out(struct spoolss_GetPrintProcessorDirectory *r)
{
	PyObject *result;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(2);
	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_spoolss_PrintProcessorDirectoryInfo(r->out.info, r->in.level, r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	PyTuple_SetItem(result, 0, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_StartDocPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_StartDocPrinter *r)
{
	PyObject *py_handle;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"handle", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_StartDocPrinter", discard_const_p(char *, kwnames), &py_handle, &py_level, &py_info)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	{
		union spoolss_DocumentInfo *info_switch_0;
		info_switch_0 = py_export_spoolss_DocumentInfo(r, r->in.level, py_info);
		if (info_switch_0 == NULL) {
			return false;
		}
		r->in.info = *info_switch_0;
	}
	return true;
}

static PyObject *unpack_py_spoolss_StartDocPrinter_args_out(struct spoolss_StartDocPrinter *r)
{
	PyObject *result;
	PyObject *py_job_id;
	py_job_id = PyInt_FromLong(*r->out.job_id);
	result = py_job_id;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_StartPagePrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_StartPagePrinter *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_StartPagePrinter", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_spoolss_StartPagePrinter_args_out(struct spoolss_StartPagePrinter *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_WritePrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_WritePrinter *r)
{
	PyObject *py_handle;
	PyObject *py_data;
	PyObject *py__data_size;
	const char *kwnames[] = {
		"handle", "data", "_data_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_WritePrinter", discard_const_p(char *, kwnames), &py_handle, &py_data, &py__data_size)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	r->in.data = data_blob_talloc(r, PyString_AS_STRING(py_data), PyString_GET_SIZE(py_data));
	PY_CHECK_TYPE(&PyInt_Type, py__data_size, return false;);
	r->in._data_size = PyInt_AsLong(py__data_size);
	return true;
}

static PyObject *unpack_py_spoolss_WritePrinter_args_out(struct spoolss_WritePrinter *r)
{
	PyObject *result;
	PyObject *py_num_written;
	py_num_written = PyInt_FromLong(*r->out.num_written);
	result = py_num_written;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EndPagePrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EndPagePrinter *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_EndPagePrinter", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_spoolss_EndPagePrinter_args_out(struct spoolss_EndPagePrinter *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AbortPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AbortPrinter *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_AbortPrinter", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_spoolss_AbortPrinter_args_out(struct spoolss_AbortPrinter *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_ReadPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_ReadPrinter *r)
{
	PyObject *py_handle;
	PyObject *py_data_size;
	const char *kwnames[] = {
		"handle", "data_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:spoolss_ReadPrinter", discard_const_p(char *, kwnames), &py_handle, &py_data_size)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_data_size, return false;);
	r->in.data_size = PyInt_AsLong(py_data_size);
	return true;
}

static PyObject *unpack_py_spoolss_ReadPrinter_args_out(struct spoolss_ReadPrinter *r)
{
	PyObject *result;
	PyObject *py_data;
	PyObject *py__data_size;
	result = PyTuple_New(2);
	py_data = PyList_New(r->in.data_size);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_1;
		for (data_cntr_1 = 0; data_cntr_1 < r->in.data_size; data_cntr_1++) {
			PyObject *py_data_1;
			py_data_1 = PyInt_FromLong(r->out.data[data_cntr_1]);
			PyList_SetItem(py_data, data_cntr_1, py_data_1);
		}
	}
	PyTuple_SetItem(result, 0, py_data);
	py__data_size = PyInt_FromLong(*r->out._data_size);
	PyTuple_SetItem(result, 1, py__data_size);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EndDocPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EndDocPrinter *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_EndDocPrinter", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_spoolss_EndDocPrinter_args_out(struct spoolss_EndDocPrinter *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddJob_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddJob *r)
{
	PyObject *py_handle;
	PyObject *py_level;
	PyObject *py_buffer;
	const char *kwnames[] = {
		"handle", "level", "buffer", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_AddJob", discard_const_p(char *, kwnames), &py_handle, &py_level, &py_buffer)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = NULL;
		PY_CHECK_TYPE(&PyList_Type, py_buffer, return false;);
		{
			int buffer_cntr_1;
			r->in.buffer = talloc_array_ptrtype(r, r->in.buffer, PyList_GET_SIZE(py_buffer));
			if (!r->in.buffer) { return false;; }
			talloc_set_name_const(r->in.buffer, "ARRAY: r->in.buffer");
			for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(py_buffer); buffer_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_buffer, buffer_cntr_1), return false;);
				r->in.buffer[buffer_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(py_buffer, buffer_cntr_1));
			}
		}
	}
	PY_CHECK_TYPE(&PyList_Type, py_buffer, return false;);
	r->in.offered = PyList_GET_SIZE(py_buffer);
	return true;
}

static PyObject *unpack_py_spoolss_AddJob_args_out(struct spoolss_AddJob *r)
{
	PyObject *result;
	PyObject *py_buffer;
	PyObject *py_needed;
	result = PyTuple_New(2);
	if (r->out.buffer == NULL) {
		py_buffer = Py_None;
		Py_INCREF(py_buffer);
	} else {
		py_buffer = PyList_New(r->in.offered);
		if (py_buffer == NULL) {
			return NULL;
		}
		{
			int buffer_cntr_1;
			for (buffer_cntr_1 = 0; buffer_cntr_1 < r->in.offered; buffer_cntr_1++) {
				PyObject *py_buffer_1;
				py_buffer_1 = PyInt_FromLong(r->out.buffer[buffer_cntr_1]);
				PyList_SetItem(py_buffer, buffer_cntr_1, py_buffer_1);
			}
		}
	}
	PyTuple_SetItem(result, 0, py_buffer);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_ScheduleJob_args_in(PyObject *args, PyObject *kwargs, struct spoolss_ScheduleJob *r)
{
	PyObject *py_handle;
	PyObject *py_jobid;
	const char *kwnames[] = {
		"handle", "jobid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:spoolss_ScheduleJob", discard_const_p(char *, kwnames), &py_handle, &py_jobid)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_jobid, return false;);
	r->in.jobid = PyInt_AsLong(py_jobid);
	return true;
}

static PyObject *unpack_py_spoolss_ScheduleJob_args_out(struct spoolss_ScheduleJob *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetPrinterData_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetPrinterData *r)
{
	PyObject *py_handle;
	PyObject *py_value_name;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "value_name", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_GetPrinterData", discard_const_p(char *, kwnames), &py_handle, &py_value_name, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_value_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(py_value_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_value_name)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_GetPrinterData_args_out(struct spoolss_GetPrinterData *r)
{
	PyObject *result;
	PyObject *py_type;
	PyObject *py_data;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_type = PyInt_FromLong(*r->out.type);
	PyTuple_SetItem(result, 0, py_type);
	py_data = PyList_New(r->in.offered);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_1;
		for (data_cntr_1 = 0; data_cntr_1 < r->in.offered; data_cntr_1++) {
			PyObject *py_data_1;
			py_data_1 = PyInt_FromLong(r->out.data[data_cntr_1]);
			PyList_SetItem(py_data, data_cntr_1, py_data_1);
		}
	}
	PyTuple_SetItem(result, 1, py_data);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_SetPrinterData_args_in(PyObject *args, PyObject *kwargs, struct spoolss_SetPrinterData *r)
{
	PyObject *py_handle;
	PyObject *py_value_name;
	PyObject *py_type;
	PyObject *py_data;
	const char *kwnames[] = {
		"handle", "value_name", "type", "data", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_SetPrinterData", discard_const_p(char *, kwnames), &py_handle, &py_value_name, &py_type, &py_data)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_value_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(py_value_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_value_name)->tp_name);
		return false;
	}
	if (PyLong_Check(py_type)) {
		r->in.type = PyLong_AsLongLong(py_type);
	} else if (PyInt_Check(py_type)) {
		r->in.type = PyInt_AsLong(py_type);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.data = talloc_ptrtype(r, r->in.data);
	PY_CHECK_TYPE(&PyList_Type, py_data, return false;);
	{
		int data_cntr_1;
		r->in.data = talloc_array_ptrtype(r, r->in.data, PyList_GET_SIZE(py_data));
		if (!r->in.data) { return false;; }
		talloc_set_name_const(r->in.data, "ARRAY: r->in.data");
		for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(py_data); data_cntr_1++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_data, data_cntr_1), return false;);
			r->in.data[data_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(py_data, data_cntr_1));
		}
	}
	PY_CHECK_TYPE(&PyList_Type, py_data, return false;);
	r->in.offered = PyList_GET_SIZE(py_data);
	return true;
}

static PyObject *unpack_py_spoolss_SetPrinterData_args_out(struct spoolss_SetPrinterData *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_ClosePrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_ClosePrinter *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_ClosePrinter", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_spoolss_ClosePrinter_args_out(struct spoolss_ClosePrinter *r)
{
	PyObject *result;
	PyObject *py_handle;
	py_handle = pytalloc_reference_ex(policy_handle_Type, r->out.handle, r->out.handle);
	result = py_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddForm_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddForm *r)
{
	PyObject *py_handle;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"handle", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_AddForm", discard_const_p(char *, kwnames), &py_handle, &py_level, &py_info)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	{
		union spoolss_AddFormInfo *info_switch_0;
		info_switch_0 = py_export_spoolss_AddFormInfo(r, r->in.level, py_info);
		if (info_switch_0 == NULL) {
			return false;
		}
		r->in.info = *info_switch_0;
	}
	return true;
}

static PyObject *unpack_py_spoolss_AddForm_args_out(struct spoolss_AddForm *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeleteForm_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeleteForm *r)
{
	PyObject *py_handle;
	PyObject *py_form_name;
	const char *kwnames[] = {
		"handle", "form_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:spoolss_DeleteForm", discard_const_p(char *, kwnames), &py_handle, &py_form_name)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_form_name)) {
		r->in.form_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_form_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_form_name)) {
		r->in.form_name = PyString_AS_STRING(py_form_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_form_name)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_DeleteForm_args_out(struct spoolss_DeleteForm *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetForm_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetForm *r)
{
	PyObject *py_handle;
	PyObject *py_form_name;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "form_name", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_GetForm", discard_const_p(char *, kwnames), &py_handle, &py_form_name, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_form_name)) {
		r->in.form_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_form_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_form_name)) {
		r->in.form_name = PyString_AS_STRING(py_form_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_form_name)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_GetForm_args_out(struct spoolss_GetForm *r)
{
	PyObject *result;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(2);
	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_spoolss_FormInfo(r->out.info, r->in.level, r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	PyTuple_SetItem(result, 0, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_SetForm_args_in(PyObject *args, PyObject *kwargs, struct spoolss_SetForm *r)
{
	PyObject *py_handle;
	PyObject *py_form_name;
	PyObject *py_level;
	PyObject *py_info;
	const char *kwnames[] = {
		"handle", "form_name", "level", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_SetForm", discard_const_p(char *, kwnames), &py_handle, &py_form_name, &py_level, &py_info)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_form_name)) {
		r->in.form_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_form_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_form_name)) {
		r->in.form_name = PyString_AS_STRING(py_form_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_form_name)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	{
		union spoolss_AddFormInfo *info_switch_0;
		info_switch_0 = py_export_spoolss_AddFormInfo(r, r->in.level, py_info);
		if (info_switch_0 == NULL) {
			return false;
		}
		r->in.info = *info_switch_0;
	}
	return true;
}

static PyObject *unpack_py_spoolss_SetForm_args_out(struct spoolss_SetForm *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumForms_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumForms *r)
{
	PyObject *py_handle;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_EnumForms", discard_const_p(char *, kwnames), &py_handle, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumForms_args_out(struct spoolss_EnumForms *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = py_import_spoolss_FormInfo(*r->out.info, r->in.level, r->out.info[info_cntr_2]);
				if (py_info_2 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumPorts_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumPorts *r)
{
	PyObject *py_servername;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"servername", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_EnumPorts", discard_const_p(char *, kwnames), &py_servername, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumPorts_args_out(struct spoolss_EnumPorts *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = py_import_spoolss_PortInfo(*r->out.info, r->in.level, r->out.info[info_cntr_2]);
				if (py_info_2 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumMonitors_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumMonitors *r)
{
	PyObject *py_servername;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"servername", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_EnumMonitors", discard_const_p(char *, kwnames), &py_servername, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumMonitors_args_out(struct spoolss_EnumMonitors *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = py_import_spoolss_MonitorInfo(*r->out.info, r->in.level, r->out.info[info_cntr_2]);
				if (py_info_2 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddPort_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddPort *r)
{
	PyObject *py_server_name;
	PyObject *py_unknown;
	PyObject *py_monitor_name;
	const char *kwnames[] = {
		"server_name", "unknown", "monitor_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_AddPort", discard_const_p(char *, kwnames), &py_server_name, &py_unknown, &py_monitor_name)) {
		return false;
	}

	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		if (PyUnicode_Check(py_server_name)) {
			r->in.server_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_server_name)) {
			r->in.server_name = PyString_AS_STRING(py_server_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_unknown, return false;);
	r->in.unknown = PyInt_AsLong(py_unknown);
	if (PyUnicode_Check(py_monitor_name)) {
		r->in.monitor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_monitor_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_monitor_name)) {
		r->in.monitor_name = PyString_AS_STRING(py_monitor_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_monitor_name)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_AddPort_args_out(struct spoolss_AddPort *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePort_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePort *r)
{
	PyObject *py_server_name;
	PyObject *py_ptr;
	PyObject *py_port_name;
	const char *kwnames[] = {
		"server_name", "ptr", "port_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_DeletePort", discard_const_p(char *, kwnames), &py_server_name, &py_ptr, &py_port_name)) {
		return false;
	}

	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		if (PyUnicode_Check(py_server_name)) {
			r->in.server_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_server_name)) {
			r->in.server_name = PyString_AS_STRING(py_server_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_ptr, return false;);
	r->in.ptr = PyInt_AsLong(py_ptr);
	r->in.port_name = talloc_ptrtype(r, r->in.port_name);
	if (PyUnicode_Check(py_port_name)) {
		r->in.port_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_port_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_port_name)) {
		r->in.port_name = PyString_AS_STRING(py_port_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_port_name)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_DeletePort_args_out(struct spoolss_DeletePort *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_CreatePrinterIC_args_in(PyObject *args, PyObject *kwargs, struct spoolss_CreatePrinterIC *r)
{
	PyObject *py_handle;
	PyObject *py_devmode_ctr;
	const char *kwnames[] = {
		"handle", "devmode_ctr", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:spoolss_CreatePrinterIC", discard_const_p(char *, kwnames), &py_handle, &py_devmode_ctr)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	r->in.devmode_ctr = talloc_ptrtype(r, r->in.devmode_ctr);
	PY_CHECK_TYPE(&spoolss_DevmodeContainer_Type, py_devmode_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_devmode_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.devmode_ctr = (struct spoolss_DevmodeContainer *)pytalloc_get_ptr(py_devmode_ctr);
	return true;
}

static PyObject *unpack_py_spoolss_CreatePrinterIC_args_out(struct spoolss_CreatePrinterIC *r)
{
	PyObject *result;
	PyObject *py_gdi_handle;
	py_gdi_handle = pytalloc_reference_ex(policy_handle_Type, r->out.gdi_handle, r->out.gdi_handle);
	result = py_gdi_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePrinterIC_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePrinterIC *r)
{
	PyObject *py_gdi_handle;
	const char *kwnames[] = {
		"gdi_handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_DeletePrinterIC", discard_const_p(char *, kwnames), &py_gdi_handle)) {
		return false;
	}

	r->in.gdi_handle = talloc_ptrtype(r, r->in.gdi_handle);
	PY_CHECK_TYPE(policy_handle_Type, py_gdi_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_gdi_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.gdi_handle = (struct policy_handle *)pytalloc_get_ptr(py_gdi_handle);
	return true;
}

static PyObject *unpack_py_spoolss_DeletePrinterIC_args_out(struct spoolss_DeletePrinterIC *r)
{
	PyObject *result;
	PyObject *py_gdi_handle;
	py_gdi_handle = pytalloc_reference_ex(policy_handle_Type, r->out.gdi_handle, r->out.gdi_handle);
	result = py_gdi_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumPrintProcDataTypes_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumPrintProcDataTypes *r)
{
	PyObject *py_servername;
	PyObject *py_print_processor_name;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	const char *kwnames[] = {
		"servername", "print_processor_name", "level", "buffer", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_EnumPrintProcDataTypes", discard_const_p(char *, kwnames), &py_servername, &py_print_processor_name, &py_level, &py_buffer, &py_offered)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	if (py_print_processor_name == Py_None) {
		r->in.print_processor_name = NULL;
	} else {
		r->in.print_processor_name = NULL;
		if (PyUnicode_Check(py_print_processor_name)) {
			r->in.print_processor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_print_processor_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_print_processor_name)) {
			r->in.print_processor_name = PyString_AS_STRING(py_print_processor_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_print_processor_name)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumPrintProcDataTypes_args_out(struct spoolss_EnumPrintProcDataTypes *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = py_import_spoolss_PrintProcDataTypesInfo(*r->out.info, r->in.level, r->out.info[info_cntr_2]);
				if (py_info_2 == NULL) {
					return NULL;
				}
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_ResetPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_ResetPrinter *r)
{
	PyObject *py_handle;
	PyObject *py_data_type;
	PyObject *py_devmode_ctr;
	const char *kwnames[] = {
		"handle", "data_type", "devmode_ctr", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_ResetPrinter", discard_const_p(char *, kwnames), &py_handle, &py_data_type, &py_devmode_ctr)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (py_data_type == Py_None) {
		r->in.data_type = NULL;
	} else {
		r->in.data_type = NULL;
		if (PyUnicode_Check(py_data_type)) {
			r->in.data_type = PyString_AS_STRING(PyUnicode_AsEncodedString(py_data_type, "utf-8", "ignore"));
		} else if (PyString_Check(py_data_type)) {
			r->in.data_type = PyString_AS_STRING(py_data_type);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_data_type)->tp_name);
			return false;
		}
	}
	r->in.devmode_ctr = talloc_ptrtype(r, r->in.devmode_ctr);
	PY_CHECK_TYPE(&spoolss_DevmodeContainer_Type, py_devmode_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_devmode_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.devmode_ctr = (struct spoolss_DevmodeContainer *)pytalloc_get_ptr(py_devmode_ctr);
	return true;
}

static PyObject *unpack_py_spoolss_ResetPrinter_args_out(struct spoolss_ResetPrinter *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetPrinterDriver2_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetPrinterDriver2 *r)
{
	PyObject *py_handle;
	PyObject *py_architecture;
	PyObject *py_level;
	PyObject *py_buffer;
	PyObject *py_offered;
	PyObject *py_client_major_version;
	PyObject *py_client_minor_version;
	const char *kwnames[] = {
		"handle", "architecture", "level", "buffer", "offered", "client_major_version", "client_minor_version", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:spoolss_GetPrinterDriver2", discard_const_p(char *, kwnames), &py_handle, &py_architecture, &py_level, &py_buffer, &py_offered, &py_client_major_version, &py_client_minor_version)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (py_architecture == Py_None) {
		r->in.architecture = NULL;
	} else {
		r->in.architecture = NULL;
		if (PyUnicode_Check(py_architecture)) {
			r->in.architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(py_architecture, "utf-8", "ignore"));
		} else if (PyString_Check(py_architecture)) {
			r->in.architecture = PyString_AS_STRING(py_architecture);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_architecture)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = talloc_ptrtype(r, r->in.buffer);
		*r->in.buffer = data_blob_talloc(r, PyString_AS_STRING(py_buffer), PyString_GET_SIZE(py_buffer));
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	PY_CHECK_TYPE(&PyInt_Type, py_client_major_version, return false;);
	r->in.client_major_version = PyInt_AsLong(py_client_major_version);
	PY_CHECK_TYPE(&PyInt_Type, py_client_minor_version, return false;);
	r->in.client_minor_version = PyInt_AsLong(py_client_minor_version);
	return true;
}

static PyObject *unpack_py_spoolss_GetPrinterDriver2_args_out(struct spoolss_GetPrinterDriver2 *r)
{
	PyObject *result;
	PyObject *py_info;
	PyObject *py_needed;
	PyObject *py_server_major_version;
	PyObject *py_server_minor_version;
	result = PyTuple_New(4);
	if (r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = py_import_spoolss_DriverInfo(r->out.info, r->in.level, r->out.info);
		if (py_info == NULL) {
			return NULL;
		}
	}
	PyTuple_SetItem(result, 0, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	py_server_major_version = PyInt_FromLong(*r->out.server_major_version);
	PyTuple_SetItem(result, 2, py_server_major_version);
	py_server_minor_version = PyInt_FromLong(*r->out.server_minor_version);
	PyTuple_SetItem(result, 3, py_server_minor_version);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_FindClosePrinterNotify_args_in(PyObject *args, PyObject *kwargs, struct spoolss_FindClosePrinterNotify *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_FindClosePrinterNotify", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_spoolss_FindClosePrinterNotify_args_out(struct spoolss_FindClosePrinterNotify *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_ReplyOpenPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_ReplyOpenPrinter *r)
{
	PyObject *py_server_name;
	PyObject *py_printer_local;
	PyObject *py_type;
	PyObject *py_buffer;
	const char *kwnames[] = {
		"server_name", "printer_local", "type", "buffer", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_ReplyOpenPrinter", discard_const_p(char *, kwnames), &py_server_name, &py_printer_local, &py_type, &py_buffer)) {
		return false;
	}

	if (PyUnicode_Check(py_server_name)) {
		r->in.server_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_server_name)) {
		r->in.server_name = PyString_AS_STRING(py_server_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_printer_local, return false;);
	r->in.printer_local = PyInt_AsLong(py_printer_local);
	if (PyLong_Check(py_type)) {
		r->in.type = PyLong_AsLongLong(py_type);
	} else if (PyInt_Check(py_type)) {
		r->in.type = PyInt_AsLong(py_type);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyList_Type, py_buffer, return false;);
	r->in.bufsize = PyList_GET_SIZE(py_buffer);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = NULL;
		PY_CHECK_TYPE(&PyList_Type, py_buffer, return false;);
		{
			int buffer_cntr_1;
			r->in.buffer = talloc_array_ptrtype(r, r->in.buffer, PyList_GET_SIZE(py_buffer));
			if (!r->in.buffer) { return false;; }
			talloc_set_name_const(r->in.buffer, "ARRAY: r->in.buffer");
			for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(py_buffer); buffer_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_buffer, buffer_cntr_1), return false;);
				r->in.buffer[buffer_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(py_buffer, buffer_cntr_1));
			}
		}
	}
	return true;
}

static PyObject *unpack_py_spoolss_ReplyOpenPrinter_args_out(struct spoolss_ReplyOpenPrinter *r)
{
	PyObject *result;
	PyObject *py_handle;
	py_handle = pytalloc_reference_ex(policy_handle_Type, r->out.handle, r->out.handle);
	result = py_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_RouterReplyPrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_RouterReplyPrinter *r)
{
	PyObject *py_handle;
	PyObject *py_flags;
	PyObject *py_buffer;
	const char *kwnames[] = {
		"handle", "flags", "buffer", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_RouterReplyPrinter", discard_const_p(char *, kwnames), &py_handle, &py_flags, &py_buffer)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyLong_Check(py_flags)) {
		r->in.flags = PyLong_AsLongLong(py_flags);
	} else if (PyInt_Check(py_flags)) {
		r->in.flags = PyInt_AsLong(py_flags);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyList_Type, py_buffer, return false;);
	r->in.bufsize = PyList_GET_SIZE(py_buffer);
	if (py_buffer == Py_None) {
		r->in.buffer = NULL;
	} else {
		r->in.buffer = NULL;
		PY_CHECK_TYPE(&PyList_Type, py_buffer, return false;);
		{
			int buffer_cntr_1;
			r->in.buffer = talloc_array_ptrtype(r, r->in.buffer, PyList_GET_SIZE(py_buffer));
			if (!r->in.buffer) { return false;; }
			talloc_set_name_const(r->in.buffer, "ARRAY: r->in.buffer");
			for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(py_buffer); buffer_cntr_1++) {
				PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_buffer, buffer_cntr_1), return false;);
				r->in.buffer[buffer_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(py_buffer, buffer_cntr_1));
			}
		}
	}
	return true;
}

static PyObject *unpack_py_spoolss_RouterReplyPrinter_args_out(struct spoolss_RouterReplyPrinter *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_ReplyClosePrinter_args_in(PyObject *args, PyObject *kwargs, struct spoolss_ReplyClosePrinter *r)
{
	PyObject *py_handle;
	const char *kwnames[] = {
		"handle", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:spoolss_ReplyClosePrinter", discard_const_p(char *, kwnames), &py_handle)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	return true;
}

static PyObject *unpack_py_spoolss_ReplyClosePrinter_args_out(struct spoolss_ReplyClosePrinter *r)
{
	PyObject *result;
	PyObject *py_handle;
	py_handle = pytalloc_reference_ex(policy_handle_Type, r->out.handle, r->out.handle);
	result = py_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddPortEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddPortEx *r)
{
	PyObject *py_servername;
	PyObject *py_port_ctr;
	PyObject *py_port_var_ctr;
	PyObject *py_monitor_name;
	const char *kwnames[] = {
		"servername", "port_ctr", "port_var_ctr", "monitor_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_AddPortEx", discard_const_p(char *, kwnames), &py_servername, &py_port_ctr, &py_port_var_ctr, &py_monitor_name)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	r->in.port_ctr = talloc_ptrtype(r, r->in.port_ctr);
	PY_CHECK_TYPE(&spoolss_SetPortInfoContainer_Type, py_port_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_port_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.port_ctr = (struct spoolss_SetPortInfoContainer *)pytalloc_get_ptr(py_port_ctr);
	r->in.port_var_ctr = talloc_ptrtype(r, r->in.port_var_ctr);
	PY_CHECK_TYPE(&spoolss_PortVarContainer_Type, py_port_var_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_port_var_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.port_var_ctr = (struct spoolss_PortVarContainer *)pytalloc_get_ptr(py_port_var_ctr);
	if (py_monitor_name == Py_None) {
		r->in.monitor_name = NULL;
	} else {
		r->in.monitor_name = NULL;
		if (PyUnicode_Check(py_monitor_name)) {
			r->in.monitor_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_monitor_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_monitor_name)) {
			r->in.monitor_name = PyString_AS_STRING(py_monitor_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_monitor_name)->tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_spoolss_AddPortEx_args_out(struct spoolss_AddPortEx *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_RemoteFindFirstPrinterChangeNotifyEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
{
	PyObject *py_handle;
	PyObject *py_flags;
	PyObject *py_options;
	PyObject *py_local_machine;
	PyObject *py_printer_local;
	PyObject *py_notify_options;
	const char *kwnames[] = {
		"handle", "flags", "options", "local_machine", "printer_local", "notify_options", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:spoolss_RemoteFindFirstPrinterChangeNotifyEx", discard_const_p(char *, kwnames), &py_handle, &py_flags, &py_options, &py_local_machine, &py_printer_local, &py_notify_options)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyLong_Check(py_flags)) {
		r->in.flags = PyLong_AsLongLong(py_flags);
	} else if (PyInt_Check(py_flags)) {
		r->in.flags = PyInt_AsLong(py_flags);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_options, return false;);
	r->in.options = PyInt_AsLong(py_options);
	if (py_local_machine == Py_None) {
		r->in.local_machine = NULL;
	} else {
		r->in.local_machine = NULL;
		if (PyUnicode_Check(py_local_machine)) {
			r->in.local_machine = PyString_AS_STRING(PyUnicode_AsEncodedString(py_local_machine, "utf-8", "ignore"));
		} else if (PyString_Check(py_local_machine)) {
			r->in.local_machine = PyString_AS_STRING(py_local_machine);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_local_machine)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyInt_Type, py_printer_local, return false;);
	r->in.printer_local = PyInt_AsLong(py_printer_local);
	if (py_notify_options == Py_None) {
		r->in.notify_options = NULL;
	} else {
		r->in.notify_options = NULL;
		PY_CHECK_TYPE(&spoolss_NotifyOption_Type, py_notify_options, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_notify_options)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.notify_options = (struct spoolss_NotifyOption *)pytalloc_get_ptr(py_notify_options);
	}
	return true;
}

static PyObject *unpack_py_spoolss_RemoteFindFirstPrinterChangeNotifyEx_args_out(struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_RouterReplyPrinterEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_RouterReplyPrinterEx *r)
{
	PyObject *py_handle;
	PyObject *py_color;
	PyObject *py_flags;
	PyObject *py_reply_type;
	PyObject *py_info;
	const char *kwnames[] = {
		"handle", "color", "flags", "reply_type", "info", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_RouterReplyPrinterEx", discard_const_p(char *, kwnames), &py_handle, &py_color, &py_flags, &py_reply_type, &py_info)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_color, return false;);
	r->in.color = PyInt_AsLong(py_color);
	if (PyLong_Check(py_flags)) {
		r->in.flags = PyLong_AsLongLong(py_flags);
	} else if (PyInt_Check(py_flags)) {
		r->in.flags = PyInt_AsLong(py_flags);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_reply_type, return false;);
	r->in.reply_type = PyInt_AsLong(py_reply_type);
	{
		union spoolss_ReplyPrinterInfo *info_switch_0;
		info_switch_0 = py_export_spoolss_ReplyPrinterInfo(r, r->in.reply_type, py_info);
		if (info_switch_0 == NULL) {
			return false;
		}
		r->in.info = *info_switch_0;
	}
	return true;
}

static PyObject *unpack_py_spoolss_RouterReplyPrinterEx_args_out(struct spoolss_RouterReplyPrinterEx *r)
{
	PyObject *result;
	PyObject *py_reply_result;
	py_reply_result = PyInt_FromLong(*r->out.reply_result);
	result = py_reply_result;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_RouterRefreshPrinterChangeNotify_args_in(PyObject *args, PyObject *kwargs, struct spoolss_RouterRefreshPrinterChangeNotify *r)
{
	PyObject *py_handle;
	PyObject *py_change_low;
	PyObject *py_options;
	const char *kwnames[] = {
		"handle", "change_low", "options", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_RouterRefreshPrinterChangeNotify", discard_const_p(char *, kwnames), &py_handle, &py_change_low, &py_options)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_change_low, return false;);
	r->in.change_low = PyInt_AsLong(py_change_low);
	if (py_options == Py_None) {
		r->in.options = NULL;
	} else {
		r->in.options = NULL;
		PY_CHECK_TYPE(&spoolss_NotifyOption_Type, py_options, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_options)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.options = (struct spoolss_NotifyOption *)pytalloc_get_ptr(py_options);
	}
	return true;
}

static PyObject *unpack_py_spoolss_RouterRefreshPrinterChangeNotify_args_out(struct spoolss_RouterRefreshPrinterChangeNotify *r)
{
	PyObject *result;
	PyObject *py_info;
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&spoolss_NotifyInfo_Type, *r->out.info, *r->out.info);
	}
	result = py_info;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_OpenPrinterEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_OpenPrinterEx *r)
{
	PyObject *py_printername;
	PyObject *py_datatype;
	PyObject *py_devmode_ctr;
	PyObject *py_access_mask;
	PyObject *py_level;
	PyObject *py_userlevel;
	const char *kwnames[] = {
		"printername", "datatype", "devmode_ctr", "access_mask", "level", "userlevel", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:spoolss_OpenPrinterEx", discard_const_p(char *, kwnames), &py_printername, &py_datatype, &py_devmode_ctr, &py_access_mask, &py_level, &py_userlevel)) {
		return false;
	}

	if (py_printername == Py_None) {
		r->in.printername = NULL;
	} else {
		r->in.printername = NULL;
		if (PyUnicode_Check(py_printername)) {
			r->in.printername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_printername, "utf-8", "ignore"));
		} else if (PyString_Check(py_printername)) {
			r->in.printername = PyString_AS_STRING(py_printername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_printername)->tp_name);
			return false;
		}
	}
	if (py_datatype == Py_None) {
		r->in.datatype = NULL;
	} else {
		r->in.datatype = NULL;
		if (PyUnicode_Check(py_datatype)) {
			r->in.datatype = PyString_AS_STRING(PyUnicode_AsEncodedString(py_datatype, "utf-8", "ignore"));
		} else if (PyString_Check(py_datatype)) {
			r->in.datatype = PyString_AS_STRING(py_datatype);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_datatype)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&spoolss_DevmodeContainer_Type, py_devmode_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_devmode_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.devmode_ctr = *(struct spoolss_DevmodeContainer *)pytalloc_get_ptr(py_devmode_ctr);
	if (PyLong_Check(py_access_mask)) {
		r->in.access_mask = PyLong_AsLongLong(py_access_mask);
	} else if (PyInt_Check(py_access_mask)) {
		r->in.access_mask = PyInt_AsLong(py_access_mask);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
	r->in.level = PyInt_AsLong(py_level);
	{
		union spoolss_UserLevel *userlevel_switch_0;
		userlevel_switch_0 = py_export_spoolss_UserLevel(r, r->in.level, py_userlevel);
		if (userlevel_switch_0 == NULL) {
			return false;
		}
		r->in.userlevel = *userlevel_switch_0;
	}
	return true;
}

static PyObject *unpack_py_spoolss_OpenPrinterEx_args_out(struct spoolss_OpenPrinterEx *r)
{
	PyObject *result;
	PyObject *py_handle;
	py_handle = pytalloc_reference_ex(policy_handle_Type, r->out.handle, r->out.handle);
	result = py_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddPrinterEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddPrinterEx *r)
{
	PyObject *py_server;
	PyObject *py_info_ctr;
	PyObject *py_devmode_ctr;
	PyObject *py_secdesc_ctr;
	PyObject *py_userlevel_ctr;
	const char *kwnames[] = {
		"server", "info_ctr", "devmode_ctr", "secdesc_ctr", "userlevel_ctr", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_AddPrinterEx", discard_const_p(char *, kwnames), &py_server, &py_info_ctr, &py_devmode_ctr, &py_secdesc_ctr, &py_userlevel_ctr)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
	PY_CHECK_TYPE(&spoolss_SetPrinterInfoCtr_Type, py_info_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.info_ctr = (struct spoolss_SetPrinterInfoCtr *)pytalloc_get_ptr(py_info_ctr);
	r->in.devmode_ctr = talloc_ptrtype(r, r->in.devmode_ctr);
	PY_CHECK_TYPE(&spoolss_DevmodeContainer_Type, py_devmode_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_devmode_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.devmode_ctr = (struct spoolss_DevmodeContainer *)pytalloc_get_ptr(py_devmode_ctr);
	r->in.secdesc_ctr = talloc_ptrtype(r, r->in.secdesc_ctr);
	PY_CHECK_TYPE(sec_desc_buf_Type, py_secdesc_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_secdesc_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.secdesc_ctr = (struct sec_desc_buf *)pytalloc_get_ptr(py_secdesc_ctr);
	r->in.userlevel_ctr = talloc_ptrtype(r, r->in.userlevel_ctr);
	PY_CHECK_TYPE(&spoolss_UserLevelCtr_Type, py_userlevel_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_userlevel_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.userlevel_ctr = (struct spoolss_UserLevelCtr *)pytalloc_get_ptr(py_userlevel_ctr);
	return true;
}

static PyObject *unpack_py_spoolss_AddPrinterEx_args_out(struct spoolss_AddPrinterEx *r)
{
	PyObject *result;
	PyObject *py_handle;
	py_handle = pytalloc_reference_ex(policy_handle_Type, r->out.handle, r->out.handle);
	result = py_handle;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_SetPort_args_in(PyObject *args, PyObject *kwargs, struct spoolss_SetPort *r)
{
	PyObject *py_servername;
	PyObject *py_port_name;
	PyObject *py_port_ctr;
	const char *kwnames[] = {
		"servername", "port_name", "port_ctr", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_SetPort", discard_const_p(char *, kwnames), &py_servername, &py_port_name, &py_port_ctr)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	if (py_port_name == Py_None) {
		r->in.port_name = NULL;
	} else {
		r->in.port_name = NULL;
		if (PyUnicode_Check(py_port_name)) {
			r->in.port_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_port_name, "utf-8", "ignore"));
		} else if (PyString_Check(py_port_name)) {
			r->in.port_name = PyString_AS_STRING(py_port_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_port_name)->tp_name);
			return false;
		}
	}
	r->in.port_ctr = talloc_ptrtype(r, r->in.port_ctr);
	PY_CHECK_TYPE(&spoolss_SetPortInfoContainer_Type, py_port_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_port_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.port_ctr = (struct spoolss_SetPortInfoContainer *)pytalloc_get_ptr(py_port_ctr);
	return true;
}

static PyObject *unpack_py_spoolss_SetPort_args_out(struct spoolss_SetPort *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumPrinterData_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumPrinterData *r)
{
	PyObject *py_handle;
	PyObject *py_enum_index;
	PyObject *py_value_offered;
	PyObject *py_data_offered;
	const char *kwnames[] = {
		"handle", "enum_index", "value_offered", "data_offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_EnumPrinterData", discard_const_p(char *, kwnames), &py_handle, &py_enum_index, &py_value_offered, &py_data_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	PY_CHECK_TYPE(&PyInt_Type, py_enum_index, return false;);
	r->in.enum_index = PyInt_AsLong(py_enum_index);
	PY_CHECK_TYPE(&PyInt_Type, py_value_offered, return false;);
	r->in.value_offered = PyInt_AsLong(py_value_offered);
	PY_CHECK_TYPE(&PyInt_Type, py_data_offered, return false;);
	r->in.data_offered = PyInt_AsLong(py_data_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumPrinterData_args_out(struct spoolss_EnumPrinterData *r)
{
	PyObject *result;
	PyObject *py_value_name;
	PyObject *py_value_needed;
	PyObject *py_type;
	PyObject *py_data;
	PyObject *py_data_needed;
	result = PyTuple_New(5);
	if (r->out.value_name == NULL) {
		py_value_name = Py_None;
		Py_INCREF(py_value_name);
	} else {
		py_value_name = PyUnicode_Decode(r->out.value_name, strlen(r->out.value_name), "utf-8", "ignore");
	}
	PyTuple_SetItem(result, 0, py_value_name);
	py_value_needed = PyInt_FromLong(*r->out.value_needed);
	PyTuple_SetItem(result, 1, py_value_needed);
	py_type = PyInt_FromLong(*r->out.type);
	PyTuple_SetItem(result, 2, py_type);
	py_data = PyList_New(r->in.data_offered);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_1;
		for (data_cntr_1 = 0; data_cntr_1 < r->in.data_offered; data_cntr_1++) {
			PyObject *py_data_1;
			py_data_1 = PyInt_FromLong(r->out.data[data_cntr_1]);
			PyList_SetItem(py_data, data_cntr_1, py_data_1);
		}
	}
	PyTuple_SetItem(result, 3, py_data);
	py_data_needed = PyInt_FromLong(*r->out.data_needed);
	PyTuple_SetItem(result, 4, py_data_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePrinterData_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePrinterData *r)
{
	PyObject *py_handle;
	PyObject *py_value_name;
	const char *kwnames[] = {
		"handle", "value_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:spoolss_DeletePrinterData", discard_const_p(char *, kwnames), &py_handle, &py_value_name)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_value_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(py_value_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_value_name)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_DeletePrinterData_args_out(struct spoolss_DeletePrinterData *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_SetPrinterDataEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_SetPrinterDataEx *r)
{
	PyObject *py_handle;
	PyObject *py_key_name;
	PyObject *py_value_name;
	PyObject *py_type;
	PyObject *py_data;
	const char *kwnames[] = {
		"handle", "key_name", "value_name", "type", "data", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_SetPrinterDataEx", discard_const_p(char *, kwnames), &py_handle, &py_key_name, &py_value_name, &py_type, &py_data)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_key_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(py_key_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_key_name)->tp_name);
		return false;
	}
	if (PyUnicode_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_value_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(py_value_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_value_name)->tp_name);
		return false;
	}
	if (PyLong_Check(py_type)) {
		r->in.type = PyLong_AsLongLong(py_type);
	} else if (PyInt_Check(py_type)) {
		r->in.type = PyInt_AsLong(py_type);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	r->in.data = talloc_ptrtype(r, r->in.data);
	PY_CHECK_TYPE(&PyList_Type, py_data, return false;);
	{
		int data_cntr_1;
		r->in.data = talloc_array_ptrtype(r, r->in.data, PyList_GET_SIZE(py_data));
		if (!r->in.data) { return false;; }
		talloc_set_name_const(r->in.data, "ARRAY: r->in.data");
		for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(py_data); data_cntr_1++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_data, data_cntr_1), return false;);
			r->in.data[data_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(py_data, data_cntr_1));
		}
	}
	PY_CHECK_TYPE(&PyList_Type, py_data, return false;);
	r->in.offered = PyList_GET_SIZE(py_data);
	return true;
}

static PyObject *unpack_py_spoolss_SetPrinterDataEx_args_out(struct spoolss_SetPrinterDataEx *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetPrinterDataEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetPrinterDataEx *r)
{
	PyObject *py_handle;
	PyObject *py_key_name;
	PyObject *py_value_name;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "key_name", "value_name", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_GetPrinterDataEx", discard_const_p(char *, kwnames), &py_handle, &py_key_name, &py_value_name, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_key_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(py_key_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_key_name)->tp_name);
		return false;
	}
	if (PyUnicode_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_value_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(py_value_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_value_name)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_GetPrinterDataEx_args_out(struct spoolss_GetPrinterDataEx *r)
{
	PyObject *result;
	PyObject *py_type;
	PyObject *py_data;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_type = PyInt_FromLong(*r->out.type);
	PyTuple_SetItem(result, 0, py_type);
	py_data = PyList_New(r->in.offered);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_1;
		for (data_cntr_1 = 0; data_cntr_1 < r->in.offered; data_cntr_1++) {
			PyObject *py_data_1;
			py_data_1 = PyInt_FromLong(r->out.data[data_cntr_1]);
			PyList_SetItem(py_data, data_cntr_1, py_data_1);
		}
	}
	PyTuple_SetItem(result, 1, py_data);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumPrinterDataEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumPrinterDataEx *r)
{
	PyObject *py_handle;
	PyObject *py_key_name;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "key_name", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_EnumPrinterDataEx", discard_const_p(char *, kwnames), &py_handle, &py_key_name, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_key_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(py_key_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_key_name)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumPrinterDataEx_args_out(struct spoolss_EnumPrinterDataEx *r)
{
	PyObject *result;
	PyObject *py_count;
	PyObject *py_info;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py_count = PyInt_FromLong(*r->out.count);
	PyTuple_SetItem(result, 0, py_count);
	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = PyList_New(*r->out.count);
		if (py_info == NULL) {
			return NULL;
		}
		{
			int info_cntr_2;
			for (info_cntr_2 = 0; info_cntr_2 < *r->out.count; info_cntr_2++) {
				PyObject *py_info_2;
				py_info_2 = pytalloc_reference_ex(&spoolss_PrinterEnumValues_Type, *r->out.info, r->out.info[info_cntr_2]);
				PyList_SetItem(py_info, info_cntr_2, py_info_2);
			}
		}
	}
	PyTuple_SetItem(result, 1, py_info);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_EnumPrinterKey_args_in(PyObject *args, PyObject *kwargs, struct spoolss_EnumPrinterKey *r)
{
	PyObject *py_handle;
	PyObject *py_key_name;
	PyObject *py_offered;
	const char *kwnames[] = {
		"handle", "key_name", "offered", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_EnumPrinterKey", discard_const_p(char *, kwnames), &py_handle, &py_key_name, &py_offered)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_key_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(py_key_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_key_name)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_offered, return false;);
	r->in.offered = PyInt_AsLong(py_offered);
	return true;
}

static PyObject *unpack_py_spoolss_EnumPrinterKey_args_out(struct spoolss_EnumPrinterKey *r)
{
	PyObject *result;
	PyObject *py__ndr_size;
	PyObject *py_key_buffer;
	PyObject *py_needed;
	result = PyTuple_New(3);
	py__ndr_size = PyInt_FromLong(*r->out._ndr_size);
	PyTuple_SetItem(result, 0, py__ndr_size);
	py_key_buffer = py_import_spoolss_KeyNames(r->out.key_buffer, *r->out._ndr_size, r->out.key_buffer);
	if (py_key_buffer == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_key_buffer);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 2, py_needed);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePrinterDataEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePrinterDataEx *r)
{
	PyObject *py_handle;
	PyObject *py_key_name;
	PyObject *py_value_name;
	const char *kwnames[] = {
		"handle", "key_name", "value_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_DeletePrinterDataEx", discard_const_p(char *, kwnames), &py_handle, &py_key_name, &py_value_name)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_key_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(py_key_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_key_name)->tp_name);
		return false;
	}
	if (PyUnicode_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_value_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_value_name)) {
		r->in.value_name = PyString_AS_STRING(py_value_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_value_name)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_DeletePrinterDataEx_args_out(struct spoolss_DeletePrinterDataEx *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePrinterKey_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePrinterKey *r)
{
	PyObject *py_handle;
	PyObject *py_key_name;
	const char *kwnames[] = {
		"handle", "key_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:spoolss_DeletePrinterKey", discard_const_p(char *, kwnames), &py_handle, &py_key_name)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_key_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_key_name)) {
		r->in.key_name = PyString_AS_STRING(py_key_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_key_name)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_DeletePrinterKey_args_out(struct spoolss_DeletePrinterKey *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePrinterDriverEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePrinterDriverEx *r)
{
	PyObject *py_server;
	PyObject *py_architecture;
	PyObject *py_driver;
	PyObject *py_delete_flags;
	PyObject *py_version;
	const char *kwnames[] = {
		"server", "architecture", "driver", "delete_flags", "version", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_DeletePrinterDriverEx", discard_const_p(char *, kwnames), &py_server, &py_architecture, &py_driver, &py_delete_flags, &py_version)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	if (PyUnicode_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(py_architecture, "utf-8", "ignore"));
	} else if (PyString_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(py_architecture);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_architecture)->tp_name);
		return false;
	}
	if (PyUnicode_Check(py_driver)) {
		r->in.driver = PyString_AS_STRING(PyUnicode_AsEncodedString(py_driver, "utf-8", "ignore"));
	} else if (PyString_Check(py_driver)) {
		r->in.driver = PyString_AS_STRING(py_driver);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_driver)->tp_name);
		return false;
	}
	if (PyLong_Check(py_delete_flags)) {
		r->in.delete_flags = PyLong_AsLongLong(py_delete_flags);
	} else if (PyInt_Check(py_delete_flags)) {
		r->in.delete_flags = PyInt_AsLong(py_delete_flags);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_version, return false;);
	r->in.version = PyInt_AsLong(py_version);
	return true;
}

static PyObject *unpack_py_spoolss_DeletePrinterDriverEx_args_out(struct spoolss_DeletePrinterDriverEx *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddPerMachineConnection_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddPerMachineConnection *r)
{
	PyObject *py_server;
	PyObject *py_printername;
	PyObject *py_printserver;
	PyObject *py_provider;
	const char *kwnames[] = {
		"server", "printername", "printserver", "provider", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_AddPerMachineConnection", discard_const_p(char *, kwnames), &py_server, &py_printername, &py_printserver, &py_provider)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	r->in.printername = talloc_ptrtype(r, r->in.printername);
	if (PyUnicode_Check(py_printername)) {
		r->in.printername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_printername, "utf-8", "ignore"));
	} else if (PyString_Check(py_printername)) {
		r->in.printername = PyString_AS_STRING(py_printername);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_printername)->tp_name);
		return false;
	}
	r->in.printserver = talloc_ptrtype(r, r->in.printserver);
	if (PyUnicode_Check(py_printserver)) {
		r->in.printserver = PyString_AS_STRING(PyUnicode_AsEncodedString(py_printserver, "utf-8", "ignore"));
	} else if (PyString_Check(py_printserver)) {
		r->in.printserver = PyString_AS_STRING(py_printserver);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_printserver)->tp_name);
		return false;
	}
	r->in.provider = talloc_ptrtype(r, r->in.provider);
	if (PyUnicode_Check(py_provider)) {
		r->in.provider = PyString_AS_STRING(PyUnicode_AsEncodedString(py_provider, "utf-8", "ignore"));
	} else if (PyString_Check(py_provider)) {
		r->in.provider = PyString_AS_STRING(py_provider);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_provider)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_AddPerMachineConnection_args_out(struct spoolss_AddPerMachineConnection *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_DeletePerMachineConnection_args_in(PyObject *args, PyObject *kwargs, struct spoolss_DeletePerMachineConnection *r)
{
	PyObject *py_server;
	PyObject *py_printername;
	const char *kwnames[] = {
		"server", "printername", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:spoolss_DeletePerMachineConnection", discard_const_p(char *, kwnames), &py_server, &py_printername)) {
		return false;
	}

	if (py_server == Py_None) {
		r->in.server = NULL;
	} else {
		r->in.server = NULL;
		if (PyUnicode_Check(py_server)) {
			r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
		} else if (PyString_Check(py_server)) {
			r->in.server = PyString_AS_STRING(py_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
			return false;
		}
	}
	r->in.printername = talloc_ptrtype(r, r->in.printername);
	if (PyUnicode_Check(py_printername)) {
		r->in.printername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_printername, "utf-8", "ignore"));
	} else if (PyString_Check(py_printername)) {
		r->in.printername = PyString_AS_STRING(py_printername);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_printername)->tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_DeletePerMachineConnection_args_out(struct spoolss_DeletePerMachineConnection *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_XcvData_args_in(PyObject *args, PyObject *kwargs, struct spoolss_XcvData *r)
{
	PyObject *py_handle;
	PyObject *py_function_name;
	PyObject *py_in_data;
	PyObject *py__in_data_length;
	PyObject *py_out_data_size;
	PyObject *py_status_code;
	const char *kwnames[] = {
		"handle", "function_name", "in_data", "_in_data_length", "out_data_size", "status_code", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:spoolss_XcvData", discard_const_p(char *, kwnames), &py_handle, &py_function_name, &py_in_data, &py__in_data_length, &py_out_data_size, &py_status_code)) {
		return false;
	}

	r->in.handle = talloc_ptrtype(r, r->in.handle);
	PY_CHECK_TYPE(policy_handle_Type, py_handle, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_handle)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.handle = (struct policy_handle *)pytalloc_get_ptr(py_handle);
	if (PyUnicode_Check(py_function_name)) {
		r->in.function_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_function_name, "utf-8", "ignore"));
	} else if (PyString_Check(py_function_name)) {
		r->in.function_name = PyString_AS_STRING(py_function_name);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_function_name)->tp_name);
		return false;
	}
	r->in.in_data = data_blob_talloc(r, PyString_AS_STRING(py_in_data), PyString_GET_SIZE(py_in_data));
	PY_CHECK_TYPE(&PyInt_Type, py__in_data_length, return false;);
	r->in._in_data_length = PyInt_AsLong(py__in_data_length);
	PY_CHECK_TYPE(&PyInt_Type, py_out_data_size, return false;);
	r->in.out_data_size = PyInt_AsLong(py_out_data_size);
	r->in.status_code = talloc_ptrtype(r, r->in.status_code);
	PY_CHECK_TYPE(&PyInt_Type, py_status_code, return false;);
	*r->in.status_code = PyInt_AsLong(py_status_code);
	return true;
}

static PyObject *unpack_py_spoolss_XcvData_args_out(struct spoolss_XcvData *r)
{
	PyObject *result;
	PyObject *py_out_data;
	PyObject *py_needed;
	PyObject *py_status_code;
	result = PyTuple_New(3);
	py_out_data = PyList_New(r->in.out_data_size);
	if (py_out_data == NULL) {
		return NULL;
	}
	{
		int out_data_cntr_1;
		for (out_data_cntr_1 = 0; out_data_cntr_1 < r->in.out_data_size; out_data_cntr_1++) {
			PyObject *py_out_data_1;
			py_out_data_1 = PyInt_FromLong(r->out.out_data[out_data_cntr_1]);
			PyList_SetItem(py_out_data, out_data_cntr_1, py_out_data_1);
		}
	}
	PyTuple_SetItem(result, 0, py_out_data);
	py_needed = PyInt_FromLong(*r->out.needed);
	PyTuple_SetItem(result, 1, py_needed);
	py_status_code = PyInt_FromLong(*r->out.status_code);
	PyTuple_SetItem(result, 2, py_status_code);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_AddPrinterDriverEx_args_in(PyObject *args, PyObject *kwargs, struct spoolss_AddPrinterDriverEx *r)
{
	PyObject *py_servername;
	PyObject *py_info_ctr;
	PyObject *py_flags;
	const char *kwnames[] = {
		"servername", "info_ctr", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:spoolss_AddPrinterDriverEx", discard_const_p(char *, kwnames), &py_servername, &py_info_ctr, &py_flags)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
	PY_CHECK_TYPE(&spoolss_AddDriverInfoCtr_Type, py_info_ctr, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.info_ctr = (struct spoolss_AddDriverInfoCtr *)pytalloc_get_ptr(py_info_ctr);
	if (PyLong_Check(py_flags)) {
		r->in.flags = PyLong_AsLongLong(py_flags);
	} else if (PyInt_Check(py_flags)) {
		r->in.flags = PyInt_AsLong(py_flags);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return false;
	}
	return true;
}

static PyObject *unpack_py_spoolss_AddPrinterDriverEx_args_out(struct spoolss_AddPrinterDriverEx *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetCorePrinterDrivers_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetCorePrinterDrivers *r)
{
	PyObject *py_servername;
	PyObject *py_architecture;
	PyObject *py_core_driver_dependencies;
	PyObject *py_core_printer_driver_count;
	const char *kwnames[] = {
		"servername", "architecture", "core_driver_dependencies", "core_printer_driver_count", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:spoolss_GetCorePrinterDrivers", discard_const_p(char *, kwnames), &py_servername, &py_architecture, &py_core_driver_dependencies, &py_core_printer_driver_count)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	r->in.architecture = talloc_ptrtype(r, r->in.architecture);
	if (PyUnicode_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(py_architecture, "utf-8", "ignore"));
	} else if (PyString_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(py_architecture);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_architecture)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyList_Type, py_core_driver_dependencies, return false;);
	r->in.core_driver_size = PyList_GET_SIZE(py_core_driver_dependencies);
	r->in.core_driver_dependencies = talloc_ptrtype(r, r->in.core_driver_dependencies);
	if (PyUnicode_Check(py_core_driver_dependencies)) {
		r->in.core_driver_dependencies = PyString_AS_STRING(PyUnicode_AsEncodedString(py_core_driver_dependencies, "utf-8", "ignore"));
	} else if (PyString_Check(py_core_driver_dependencies)) {
		r->in.core_driver_dependencies = PyString_AS_STRING(py_core_driver_dependencies);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_core_driver_dependencies)->tp_name);
		return false;
	}
	PY_CHECK_TYPE(&PyInt_Type, py_core_printer_driver_count, return false;);
	r->in.core_printer_driver_count = PyInt_AsLong(py_core_printer_driver_count);
	return true;
}

static PyObject *unpack_py_spoolss_GetCorePrinterDrivers_args_out(struct spoolss_GetCorePrinterDrivers *r)
{
	PyObject *result;
	PyObject *py_core_printer_drivers;
	py_core_printer_drivers = PyList_New(r->in.core_printer_driver_count);
	if (py_core_printer_drivers == NULL) {
		return NULL;
	}
	{
		int core_printer_drivers_cntr_1;
		for (core_printer_drivers_cntr_1 = 0; core_printer_drivers_cntr_1 < r->in.core_printer_driver_count; core_printer_drivers_cntr_1++) {
			PyObject *py_core_printer_drivers_1;
			py_core_printer_drivers_1 = pytalloc_reference_ex(&spoolss_CorePrinterDriver_Type, r->out.core_printer_drivers, &r->out.core_printer_drivers[core_printer_drivers_cntr_1]);
			PyList_SetItem(py_core_printer_drivers, core_printer_drivers_cntr_1, py_core_printer_drivers_1);
		}
	}
	result = py_core_printer_drivers;
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

static bool pack_py_spoolss_GetPrinterDriverPackagePath_args_in(PyObject *args, PyObject *kwargs, struct spoolss_GetPrinterDriverPackagePath *r)
{
	PyObject *py_servername;
	PyObject *py_architecture;
	PyObject *py_language;
	PyObject *py_package_id;
	PyObject *py_driver_package_cab;
	const char *kwnames[] = {
		"servername", "architecture", "language", "package_id", "driver_package_cab", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:spoolss_GetPrinterDriverPackagePath", discard_const_p(char *, kwnames), &py_servername, &py_architecture, &py_language, &py_package_id, &py_driver_package_cab)) {
		return false;
	}

	if (py_servername == Py_None) {
		r->in.servername = NULL;
	} else {
		r->in.servername = NULL;
		if (PyUnicode_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
		} else if (PyString_Check(py_servername)) {
			r->in.servername = PyString_AS_STRING(py_servername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
			return false;
		}
	}
	r->in.architecture = talloc_ptrtype(r, r->in.architecture);
	if (PyUnicode_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(PyUnicode_AsEncodedString(py_architecture, "utf-8", "ignore"));
	} else if (PyString_Check(py_architecture)) {
		r->in.architecture = PyString_AS_STRING(py_architecture);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_architecture)->tp_name);
		return false;
	}
	if (py_language == Py_None) {
		r->in.language = NULL;
	} else {
		r->in.language = NULL;
		if (PyUnicode_Check(py_language)) {
			r->in.language = PyString_AS_STRING(PyUnicode_AsEncodedString(py_language, "utf-8", "ignore"));
		} else if (PyString_Check(py_language)) {
			r->in.language = PyString_AS_STRING(py_language);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_language)->tp_name);
			return false;
		}
	}
	r->in.package_id = talloc_ptrtype(r, r->in.package_id);
	if (PyUnicode_Check(py_package_id)) {
		r->in.package_id = PyString_AS_STRING(PyUnicode_AsEncodedString(py_package_id, "utf-8", "ignore"));
	} else if (PyString_Check(py_package_id)) {
		r->in.package_id = PyString_AS_STRING(py_package_id);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_package_id)->tp_name);
		return false;
	}
	if (py_driver_package_cab == Py_None) {
		r->in.driver_package_cab = NULL;
	} else {
		r->in.driver_package_cab = NULL;
		if (PyUnicode_Check(py_driver_package_cab)) {
			r->in.driver_package_cab = PyString_AS_STRING(PyUnicode_AsEncodedString(py_driver_package_cab, "utf-8", "ignore"));
		} else if (PyString_Check(py_driver_package_cab)) {
			r->in.driver_package_cab = PyString_AS_STRING(py_driver_package_cab);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_driver_package_cab)->tp_name);
			return false;
		}
	}
	PY_CHECK_TYPE(&PyList_Type, py_driver_package_cab, return false;);
	r->in.driver_package_cab_size = PyList_GET_SIZE(py_driver_package_cab);
	return true;
}

static PyObject *unpack_py_spoolss_GetPrinterDriverPackagePath_args_out(struct spoolss_GetPrinterDriverPackagePath *r)
{
	PyObject *result;
	PyObject *py_driver_package_cab;
	PyObject *py_required;
	result = PyTuple_New(2);
	if (r->out.driver_package_cab == NULL) {
		py_driver_package_cab = Py_None;
		Py_INCREF(py_driver_package_cab);
	} else {
		if (r->out.driver_package_cab == NULL) {
			py_driver_package_cab = Py_None;
			Py_INCREF(py_driver_package_cab);
		} else {
			py_driver_package_cab = PyUnicode_Decode(r->out.driver_package_cab, strlen(r->out.driver_package_cab), "utf-8", "ignore");
		}
	}
	PyTuple_SetItem(result, 0, py_driver_package_cab);
	py_required = PyInt_FromLong(*r->out.required);
	PyTuple_SetItem(result, 1, py_required);
	if (!W_ERROR_IS_OK(r->out.result)) {
		PyErr_SetWERROR(r->out.result);
		return NULL;
	}

	return result;
}

const struct PyNdrRpcMethodDef py_ndr_spoolss_methods[] = {
	{ "EnumPrinters", "S.EnumPrinters(flags, server, level, buffer, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumPrinters_r, (py_data_pack_fn)pack_py_spoolss_EnumPrinters_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumPrinters_args_out, 0, &ndr_table_spoolss },
	{ "OpenPrinter", "S.OpenPrinter(printername, datatype, devmode_ctr, access_mask) -> handle", (py_dcerpc_call_fn)dcerpc_spoolss_OpenPrinter_r, (py_data_pack_fn)pack_py_spoolss_OpenPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_OpenPrinter_args_out, 1, &ndr_table_spoolss },
	{ "SetJob", "S.SetJob(handle, job_id, ctr, command) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_SetJob_r, (py_data_pack_fn)pack_py_spoolss_SetJob_args_in, (py_data_unpack_fn)unpack_py_spoolss_SetJob_args_out, 2, &ndr_table_spoolss },
	{ "GetJob", "S.GetJob(handle, job_id, level, buffer, offered) -> (info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_GetJob_r, (py_data_pack_fn)pack_py_spoolss_GetJob_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetJob_args_out, 3, &ndr_table_spoolss },
	{ "EnumJobs", "S.EnumJobs(handle, firstjob, numjobs, level, buffer, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumJobs_r, (py_data_pack_fn)pack_py_spoolss_EnumJobs_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumJobs_args_out, 4, &ndr_table_spoolss },
	{ "AddPrinter", "S.AddPrinter(server, info_ctr, devmode_ctr, secdesc_ctr) -> handle", (py_dcerpc_call_fn)dcerpc_spoolss_AddPrinter_r, (py_data_pack_fn)pack_py_spoolss_AddPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddPrinter_args_out, 5, &ndr_table_spoolss },
	{ "DeletePrinter", "S.DeletePrinter(handle) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePrinter_r, (py_data_pack_fn)pack_py_spoolss_DeletePrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePrinter_args_out, 6, &ndr_table_spoolss },
	{ "SetPrinter", "S.SetPrinter(handle, info_ctr, devmode_ctr, secdesc_ctr, command) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_SetPrinter_r, (py_data_pack_fn)pack_py_spoolss_SetPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_SetPrinter_args_out, 7, &ndr_table_spoolss },
	{ "GetPrinter", "S.GetPrinter(handle, level, buffer, offered) -> (info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_GetPrinter_r, (py_data_pack_fn)pack_py_spoolss_GetPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetPrinter_args_out, 8, &ndr_table_spoolss },
	{ "AddPrinterDriver", "S.AddPrinterDriver(servername, info_ctr) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_AddPrinterDriver_r, (py_data_pack_fn)pack_py_spoolss_AddPrinterDriver_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddPrinterDriver_args_out, 9, &ndr_table_spoolss },
	{ "EnumPrinterDrivers", "S.EnumPrinterDrivers(server, environment, level, buffer, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumPrinterDrivers_r, (py_data_pack_fn)pack_py_spoolss_EnumPrinterDrivers_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumPrinterDrivers_args_out, 10, &ndr_table_spoolss },
	{ "GetPrinterDriver", "S.GetPrinterDriver(handle, architecture, level, buffer, offered) -> (info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_GetPrinterDriver_r, (py_data_pack_fn)pack_py_spoolss_GetPrinterDriver_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetPrinterDriver_args_out, 11, &ndr_table_spoolss },
	{ "GetPrinterDriverDirectory", "S.GetPrinterDriverDirectory(server, environment, level, buffer, offered) -> (info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_GetPrinterDriverDirectory_r, (py_data_pack_fn)pack_py_spoolss_GetPrinterDriverDirectory_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetPrinterDriverDirectory_args_out, 12, &ndr_table_spoolss },
	{ "DeletePrinterDriver", "S.DeletePrinterDriver(server, architecture, driver) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePrinterDriver_r, (py_data_pack_fn)pack_py_spoolss_DeletePrinterDriver_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePrinterDriver_args_out, 13, &ndr_table_spoolss },
	{ "AddPrintProcessor", "S.AddPrintProcessor(server, architecture, path_name, print_processor_name) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_AddPrintProcessor_r, (py_data_pack_fn)pack_py_spoolss_AddPrintProcessor_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddPrintProcessor_args_out, 14, &ndr_table_spoolss },
	{ "EnumPrintProcessors", "S.EnumPrintProcessors(servername, environment, level, buffer, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumPrintProcessors_r, (py_data_pack_fn)pack_py_spoolss_EnumPrintProcessors_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumPrintProcessors_args_out, 15, &ndr_table_spoolss },
	{ "GetPrintProcessorDirectory", "S.GetPrintProcessorDirectory(server, environment, level, buffer, offered) -> (info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_GetPrintProcessorDirectory_r, (py_data_pack_fn)pack_py_spoolss_GetPrintProcessorDirectory_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetPrintProcessorDirectory_args_out, 16, &ndr_table_spoolss },
	{ "StartDocPrinter", "S.StartDocPrinter(handle, level, info) -> job_id", (py_dcerpc_call_fn)dcerpc_spoolss_StartDocPrinter_r, (py_data_pack_fn)pack_py_spoolss_StartDocPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_StartDocPrinter_args_out, 17, &ndr_table_spoolss },
	{ "StartPagePrinter", "S.StartPagePrinter(handle) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_StartPagePrinter_r, (py_data_pack_fn)pack_py_spoolss_StartPagePrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_StartPagePrinter_args_out, 18, &ndr_table_spoolss },
	{ "WritePrinter", "S.WritePrinter(handle, data, _data_size) -> num_written", (py_dcerpc_call_fn)dcerpc_spoolss_WritePrinter_r, (py_data_pack_fn)pack_py_spoolss_WritePrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_WritePrinter_args_out, 19, &ndr_table_spoolss },
	{ "EndPagePrinter", "S.EndPagePrinter(handle) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_EndPagePrinter_r, (py_data_pack_fn)pack_py_spoolss_EndPagePrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_EndPagePrinter_args_out, 20, &ndr_table_spoolss },
	{ "AbortPrinter", "S.AbortPrinter(handle) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_AbortPrinter_r, (py_data_pack_fn)pack_py_spoolss_AbortPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_AbortPrinter_args_out, 21, &ndr_table_spoolss },
	{ "ReadPrinter", "S.ReadPrinter(handle, data_size) -> (data, _data_size)", (py_dcerpc_call_fn)dcerpc_spoolss_ReadPrinter_r, (py_data_pack_fn)pack_py_spoolss_ReadPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_ReadPrinter_args_out, 22, &ndr_table_spoolss },
	{ "EndDocPrinter", "S.EndDocPrinter(handle) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_EndDocPrinter_r, (py_data_pack_fn)pack_py_spoolss_EndDocPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_EndDocPrinter_args_out, 23, &ndr_table_spoolss },
	{ "AddJob", "S.AddJob(handle, level, buffer) -> (buffer, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_AddJob_r, (py_data_pack_fn)pack_py_spoolss_AddJob_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddJob_args_out, 24, &ndr_table_spoolss },
	{ "ScheduleJob", "S.ScheduleJob(handle, jobid) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_ScheduleJob_r, (py_data_pack_fn)pack_py_spoolss_ScheduleJob_args_in, (py_data_unpack_fn)unpack_py_spoolss_ScheduleJob_args_out, 25, &ndr_table_spoolss },
	{ "GetPrinterData", "S.GetPrinterData(handle, value_name, offered) -> (type, data, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_GetPrinterData_r, (py_data_pack_fn)pack_py_spoolss_GetPrinterData_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetPrinterData_args_out, 26, &ndr_table_spoolss },
	{ "SetPrinterData", "S.SetPrinterData(handle, value_name, type, data) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_SetPrinterData_r, (py_data_pack_fn)pack_py_spoolss_SetPrinterData_args_in, (py_data_unpack_fn)unpack_py_spoolss_SetPrinterData_args_out, 27, &ndr_table_spoolss },
	{ "ClosePrinter", "S.ClosePrinter(handle) -> handle", (py_dcerpc_call_fn)dcerpc_spoolss_ClosePrinter_r, (py_data_pack_fn)pack_py_spoolss_ClosePrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_ClosePrinter_args_out, 29, &ndr_table_spoolss },
	{ "AddForm", "S.AddForm(handle, level, info) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_AddForm_r, (py_data_pack_fn)pack_py_spoolss_AddForm_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddForm_args_out, 30, &ndr_table_spoolss },
	{ "DeleteForm", "S.DeleteForm(handle, form_name) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeleteForm_r, (py_data_pack_fn)pack_py_spoolss_DeleteForm_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeleteForm_args_out, 31, &ndr_table_spoolss },
	{ "GetForm", "S.GetForm(handle, form_name, level, buffer, offered) -> (info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_GetForm_r, (py_data_pack_fn)pack_py_spoolss_GetForm_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetForm_args_out, 32, &ndr_table_spoolss },
	{ "SetForm", "S.SetForm(handle, form_name, level, info) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_SetForm_r, (py_data_pack_fn)pack_py_spoolss_SetForm_args_in, (py_data_unpack_fn)unpack_py_spoolss_SetForm_args_out, 33, &ndr_table_spoolss },
	{ "EnumForms", "S.EnumForms(handle, level, buffer, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumForms_r, (py_data_pack_fn)pack_py_spoolss_EnumForms_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumForms_args_out, 34, &ndr_table_spoolss },
	{ "EnumPorts", "S.EnumPorts(servername, level, buffer, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumPorts_r, (py_data_pack_fn)pack_py_spoolss_EnumPorts_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumPorts_args_out, 35, &ndr_table_spoolss },
	{ "EnumMonitors", "S.EnumMonitors(servername, level, buffer, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumMonitors_r, (py_data_pack_fn)pack_py_spoolss_EnumMonitors_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumMonitors_args_out, 36, &ndr_table_spoolss },
	{ "AddPort", "S.AddPort(server_name, unknown, monitor_name) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_AddPort_r, (py_data_pack_fn)pack_py_spoolss_AddPort_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddPort_args_out, 37, &ndr_table_spoolss },
	{ "DeletePort", "S.DeletePort(server_name, ptr, port_name) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePort_r, (py_data_pack_fn)pack_py_spoolss_DeletePort_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePort_args_out, 39, &ndr_table_spoolss },
	{ "CreatePrinterIC", "S.CreatePrinterIC(handle, devmode_ctr) -> gdi_handle", (py_dcerpc_call_fn)dcerpc_spoolss_CreatePrinterIC_r, (py_data_pack_fn)pack_py_spoolss_CreatePrinterIC_args_in, (py_data_unpack_fn)unpack_py_spoolss_CreatePrinterIC_args_out, 40, &ndr_table_spoolss },
	{ "DeletePrinterIC", "S.DeletePrinterIC(gdi_handle) -> gdi_handle", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePrinterIC_r, (py_data_pack_fn)pack_py_spoolss_DeletePrinterIC_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePrinterIC_args_out, 42, &ndr_table_spoolss },
	{ "EnumPrintProcDataTypes", "S.EnumPrintProcDataTypes(servername, print_processor_name, level, buffer, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumPrintProcDataTypes_r, (py_data_pack_fn)pack_py_spoolss_EnumPrintProcDataTypes_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumPrintProcDataTypes_args_out, 51, &ndr_table_spoolss },
	{ "ResetPrinter", "S.ResetPrinter(handle, data_type, devmode_ctr) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_ResetPrinter_r, (py_data_pack_fn)pack_py_spoolss_ResetPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_ResetPrinter_args_out, 52, &ndr_table_spoolss },
	{ "GetPrinterDriver2", "S.GetPrinterDriver2(handle, architecture, level, buffer, offered, client_major_version, client_minor_version) -> (info, needed, server_major_version, server_minor_version)", (py_dcerpc_call_fn)dcerpc_spoolss_GetPrinterDriver2_r, (py_data_pack_fn)pack_py_spoolss_GetPrinterDriver2_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetPrinterDriver2_args_out, 53, &ndr_table_spoolss },
	{ "FindClosePrinterNotify", "S.FindClosePrinterNotify(handle) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_FindClosePrinterNotify_r, (py_data_pack_fn)pack_py_spoolss_FindClosePrinterNotify_args_in, (py_data_unpack_fn)unpack_py_spoolss_FindClosePrinterNotify_args_out, 56, &ndr_table_spoolss },
	{ "ReplyOpenPrinter", "S.ReplyOpenPrinter(server_name, printer_local, type, buffer) -> handle", (py_dcerpc_call_fn)dcerpc_spoolss_ReplyOpenPrinter_r, (py_data_pack_fn)pack_py_spoolss_ReplyOpenPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_ReplyOpenPrinter_args_out, 58, &ndr_table_spoolss },
	{ "RouterReplyPrinter", "S.RouterReplyPrinter(handle, flags, buffer) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_RouterReplyPrinter_r, (py_data_pack_fn)pack_py_spoolss_RouterReplyPrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_RouterReplyPrinter_args_out, 59, &ndr_table_spoolss },
	{ "ReplyClosePrinter", "S.ReplyClosePrinter(handle) -> handle", (py_dcerpc_call_fn)dcerpc_spoolss_ReplyClosePrinter_r, (py_data_pack_fn)pack_py_spoolss_ReplyClosePrinter_args_in, (py_data_unpack_fn)unpack_py_spoolss_ReplyClosePrinter_args_out, 60, &ndr_table_spoolss },
	{ "AddPortEx", "S.AddPortEx(servername, port_ctr, port_var_ctr, monitor_name) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_AddPortEx_r, (py_data_pack_fn)pack_py_spoolss_AddPortEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddPortEx_args_out, 61, &ndr_table_spoolss },
	{ "RemoteFindFirstPrinterChangeNotifyEx", "S.RemoteFindFirstPrinterChangeNotifyEx(handle, flags, options, local_machine, printer_local, notify_options) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_RemoteFindFirstPrinterChangeNotifyEx_r, (py_data_pack_fn)pack_py_spoolss_RemoteFindFirstPrinterChangeNotifyEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_RemoteFindFirstPrinterChangeNotifyEx_args_out, 65, &ndr_table_spoolss },
	{ "RouterReplyPrinterEx", "S.RouterReplyPrinterEx(handle, color, flags, reply_type, info) -> reply_result", (py_dcerpc_call_fn)dcerpc_spoolss_RouterReplyPrinterEx_r, (py_data_pack_fn)pack_py_spoolss_RouterReplyPrinterEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_RouterReplyPrinterEx_args_out, 66, &ndr_table_spoolss },
	{ "RouterRefreshPrinterChangeNotify", "S.RouterRefreshPrinterChangeNotify(handle, change_low, options) -> info", (py_dcerpc_call_fn)dcerpc_spoolss_RouterRefreshPrinterChangeNotify_r, (py_data_pack_fn)pack_py_spoolss_RouterRefreshPrinterChangeNotify_args_in, (py_data_unpack_fn)unpack_py_spoolss_RouterRefreshPrinterChangeNotify_args_out, 67, &ndr_table_spoolss },
	{ "OpenPrinterEx", "S.OpenPrinterEx(printername, datatype, devmode_ctr, access_mask, level, userlevel) -> handle", (py_dcerpc_call_fn)dcerpc_spoolss_OpenPrinterEx_r, (py_data_pack_fn)pack_py_spoolss_OpenPrinterEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_OpenPrinterEx_args_out, 69, &ndr_table_spoolss },
	{ "AddPrinterEx", "S.AddPrinterEx(server, info_ctr, devmode_ctr, secdesc_ctr, userlevel_ctr) -> handle", (py_dcerpc_call_fn)dcerpc_spoolss_AddPrinterEx_r, (py_data_pack_fn)pack_py_spoolss_AddPrinterEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddPrinterEx_args_out, 70, &ndr_table_spoolss },
	{ "SetPort", "S.SetPort(servername, port_name, port_ctr) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_SetPort_r, (py_data_pack_fn)pack_py_spoolss_SetPort_args_in, (py_data_unpack_fn)unpack_py_spoolss_SetPort_args_out, 71, &ndr_table_spoolss },
	{ "EnumPrinterData", "S.EnumPrinterData(handle, enum_index, value_offered, data_offered) -> (value_name, value_needed, type, data, data_needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumPrinterData_r, (py_data_pack_fn)pack_py_spoolss_EnumPrinterData_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumPrinterData_args_out, 72, &ndr_table_spoolss },
	{ "DeletePrinterData", "S.DeletePrinterData(handle, value_name) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePrinterData_r, (py_data_pack_fn)pack_py_spoolss_DeletePrinterData_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePrinterData_args_out, 73, &ndr_table_spoolss },
	{ "SetPrinterDataEx", "S.SetPrinterDataEx(handle, key_name, value_name, type, data) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_SetPrinterDataEx_r, (py_data_pack_fn)pack_py_spoolss_SetPrinterDataEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_SetPrinterDataEx_args_out, 77, &ndr_table_spoolss },
	{ "GetPrinterDataEx", "S.GetPrinterDataEx(handle, key_name, value_name, offered) -> (type, data, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_GetPrinterDataEx_r, (py_data_pack_fn)pack_py_spoolss_GetPrinterDataEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetPrinterDataEx_args_out, 78, &ndr_table_spoolss },
	{ "EnumPrinterDataEx", "S.EnumPrinterDataEx(handle, key_name, offered) -> (count, info, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumPrinterDataEx_r, (py_data_pack_fn)pack_py_spoolss_EnumPrinterDataEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumPrinterDataEx_args_out, 79, &ndr_table_spoolss },
	{ "EnumPrinterKey", "S.EnumPrinterKey(handle, key_name, offered) -> (_ndr_size, key_buffer, needed)", (py_dcerpc_call_fn)dcerpc_spoolss_EnumPrinterKey_r, (py_data_pack_fn)pack_py_spoolss_EnumPrinterKey_args_in, (py_data_unpack_fn)unpack_py_spoolss_EnumPrinterKey_args_out, 80, &ndr_table_spoolss },
	{ "DeletePrinterDataEx", "S.DeletePrinterDataEx(handle, key_name, value_name) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePrinterDataEx_r, (py_data_pack_fn)pack_py_spoolss_DeletePrinterDataEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePrinterDataEx_args_out, 81, &ndr_table_spoolss },
	{ "DeletePrinterKey", "S.DeletePrinterKey(handle, key_name) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePrinterKey_r, (py_data_pack_fn)pack_py_spoolss_DeletePrinterKey_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePrinterKey_args_out, 82, &ndr_table_spoolss },
	{ "DeletePrinterDriverEx", "S.DeletePrinterDriverEx(server, architecture, driver, delete_flags, version) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePrinterDriverEx_r, (py_data_pack_fn)pack_py_spoolss_DeletePrinterDriverEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePrinterDriverEx_args_out, 84, &ndr_table_spoolss },
	{ "AddPerMachineConnection", "S.AddPerMachineConnection(server, printername, printserver, provider) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_AddPerMachineConnection_r, (py_data_pack_fn)pack_py_spoolss_AddPerMachineConnection_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddPerMachineConnection_args_out, 85, &ndr_table_spoolss },
	{ "DeletePerMachineConnection", "S.DeletePerMachineConnection(server, printername) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_DeletePerMachineConnection_r, (py_data_pack_fn)pack_py_spoolss_DeletePerMachineConnection_args_in, (py_data_unpack_fn)unpack_py_spoolss_DeletePerMachineConnection_args_out, 86, &ndr_table_spoolss },
	{ "XcvData", "S.XcvData(handle, function_name, in_data, _in_data_length, out_data_size, status_code) -> (out_data, needed, status_code)", (py_dcerpc_call_fn)dcerpc_spoolss_XcvData_r, (py_data_pack_fn)pack_py_spoolss_XcvData_args_in, (py_data_unpack_fn)unpack_py_spoolss_XcvData_args_out, 88, &ndr_table_spoolss },
	{ "AddPrinterDriverEx", "S.AddPrinterDriverEx(servername, info_ctr, flags) -> None", (py_dcerpc_call_fn)dcerpc_spoolss_AddPrinterDriverEx_r, (py_data_pack_fn)pack_py_spoolss_AddPrinterDriverEx_args_in, (py_data_unpack_fn)unpack_py_spoolss_AddPrinterDriverEx_args_out, 89, &ndr_table_spoolss },
	{ "GetCorePrinterDrivers", "S.GetCorePrinterDrivers(servername, architecture, core_driver_dependencies, core_printer_driver_count) -> core_printer_drivers", (py_dcerpc_call_fn)dcerpc_spoolss_GetCorePrinterDrivers_r, (py_data_pack_fn)pack_py_spoolss_GetCorePrinterDrivers_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetCorePrinterDrivers_args_out, 102, &ndr_table_spoolss },
	{ "GetPrinterDriverPackagePath", "S.GetPrinterDriverPackagePath(servername, architecture, language, package_id, driver_package_cab) -> (driver_package_cab, required)", (py_dcerpc_call_fn)dcerpc_spoolss_GetPrinterDriverPackagePath_r, (py_data_pack_fn)pack_py_spoolss_GetPrinterDriverPackagePath_args_in, (py_data_unpack_fn)unpack_py_spoolss_GetPrinterDriverPackagePath_args_out, 104, &ndr_table_spoolss },
	{ NULL }
};

static PyObject *interface_spoolss_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_spoolss);
}

#define PY_DOC_SPOOLSS "Spooler SubSystem"
static PyTypeObject spoolss_InterfaceType = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "spoolss.spoolss",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "spoolss(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_SPOOLSS,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_spoolss_new,
};

static PyMethodDef spoolss_methods[] = {
	{ NULL, NULL, 0, NULL }
};

void initspoolss(void)
{
	PyObject *m;
	PyObject *dep_samba_dcerpc_security;
	PyObject *dep_talloc;
	PyObject *dep_samba_dcerpc_misc;
	PyObject *dep_samba_dcerpc_base;
	PyObject *dep_samba_dcerpc_winreg;

	dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
	if (dep_samba_dcerpc_security == NULL)
		return;

	dep_talloc = PyImport_ImportModule("talloc");
	if (dep_talloc == NULL)
		return;

	dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
	if (dep_samba_dcerpc_misc == NULL)
		return;

	dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
	if (dep_samba_dcerpc_base == NULL)
		return;

	dep_samba_dcerpc_winreg = PyImport_ImportModule("samba.dcerpc.winreg");
	if (dep_samba_dcerpc_winreg == NULL)
		return;

	sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
	if (sec_desc_buf_Type == NULL)
		return;

	policy_handle_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "policy_handle");
	if (policy_handle_Type == NULL)
		return;

	Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
	if (Object_Type == NULL)
		return;

	GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
	if (GUID_Type == NULL)
		return;

	security_descriptor_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "descriptor");
	if (security_descriptor_Type == NULL)
		return;

	ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
	if (ClientConnection_Type == NULL)
		return;

	spoolss_Time_Type.tp_base = Object_Type;

	spoolss_TimeCtr_Type.tp_base = Object_Type;

	spoolss_PrinterInfo0_Type.tp_base = Object_Type;

	spoolss_PSDRVEXTRA351_Type.tp_base = Object_Type;

	spoolss_PSDRVEXTRA400_Type.tp_base = Object_Type;

	spoolss_PSDRVEXTRA500_Type.tp_base = Object_Type;

	spoolss_PSDRVEXTRA_Type.tp_base = Object_Type;

	spoolss_UNIDRVEXTRA3_4_Type.tp_base = Object_Type;

	spoolss_UNIDRVEXTRA500_Type.tp_base = Object_Type;

	spoolss_UNIDRVEXTRA_Type.tp_base = Object_Type;

	spoolss_JTEXP_Type.tp_base = Object_Type;

	spoolss_OEM_DMEXTRA_Type.tp_base = Object_Type;

	spoolss_DeviceMode_Type.tp_base = Object_Type;

	spoolss_PrinterInfo1_Type.tp_base = Object_Type;

	spoolss_PrinterInfo2_Type.tp_base = Object_Type;

	spoolss_PrinterInfo3_Type.tp_base = Object_Type;

	spoolss_PrinterInfo4_Type.tp_base = Object_Type;

	spoolss_PrinterInfo5_Type.tp_base = Object_Type;

	spoolss_PrinterInfo6_Type.tp_base = Object_Type;

	spoolss_PrinterInfo7_Type.tp_base = Object_Type;

	spoolss_DeviceModeInfo_Type.tp_base = Object_Type;

	spoolss_DevmodeContainer_Type.tp_base = Object_Type;

	spoolss_JobInfo1_Type.tp_base = Object_Type;

	spoolss_JobInfo2_Type.tp_base = Object_Type;

	spoolss_JobInfo3_Type.tp_base = Object_Type;

	spoolss_JobInfo4_Type.tp_base = Object_Type;

	spoolss_SetJobInfo1_Type.tp_base = Object_Type;

	spoolss_SetJobInfo2_Type.tp_base = Object_Type;

	spoolss_SetJobInfo4_Type.tp_base = Object_Type;

	spoolss_JobInfoContainer_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo0_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo1_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo2_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo3_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo4_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo5_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo6_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo7_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo8_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfo9_Type.tp_base = Object_Type;

	spoolss_SetPrinterInfoCtr_Type.tp_base = Object_Type;

	spoolss_StringArray_Type.tp_base = Object_Type;

	spoolss_AddDriverInfo1_Type.tp_base = Object_Type;

	spoolss_AddDriverInfo2_Type.tp_base = Object_Type;

	spoolss_AddDriverInfo3_Type.tp_base = Object_Type;

	spoolss_AddDriverInfo4_Type.tp_base = Object_Type;

	spoolss_AddDriverInfo5_Type.tp_base = Object_Type;

	spoolss_AddDriverInfo6_Type.tp_base = Object_Type;

	spoolss_AddDriverInfo8_Type.tp_base = Object_Type;

	spoolss_AddDriverInfoCtr_Type.tp_base = Object_Type;

	spoolss_DriverInfo1_Type.tp_base = Object_Type;

	spoolss_DriverInfo2_Type.tp_base = Object_Type;

	spoolss_DriverInfo3_Type.tp_base = Object_Type;

	spoolss_DriverInfo4_Type.tp_base = Object_Type;

	spoolss_DriverInfo5_Type.tp_base = Object_Type;

	spoolss_DriverInfo6_Type.tp_base = Object_Type;

	spoolss_DriverInfo7_Type.tp_base = Object_Type;

	spoolss_DriverInfo8_Type.tp_base = Object_Type;

	spoolss_DriverFileInfo_Type.tp_base = Object_Type;

	spoolss_DriverInfo101_Type.tp_base = Object_Type;

	spoolss_DriverDirectoryInfo1_Type.tp_base = Object_Type;

	spoolss_PrintProcessorInfo1_Type.tp_base = Object_Type;

	spoolss_PrintProcessorDirectoryInfo1_Type.tp_base = Object_Type;

	spoolss_DocumentInfo1_Type.tp_base = Object_Type;

	spoolss_OSVersion_Type.tp_base = Object_Type;

	spoolss_OSVersionEx_Type.tp_base = Object_Type;

	spoolss_FormSize_Type.tp_base = Object_Type;

	spoolss_FormArea_Type.tp_base = Object_Type;

	spoolss_FormInfo1_Type.tp_base = Object_Type;

	spoolss_FormInfo2_Type.tp_base = Object_Type;

	spoolss_AddFormInfo1_Type.tp_base = Object_Type;

	spoolss_AddFormInfo2_Type.tp_base = Object_Type;

	spoolss_PortInfo1_Type.tp_base = Object_Type;

	spoolss_PortInfo2_Type.tp_base = Object_Type;

	spoolss_PortInfo3_Type.tp_base = Object_Type;

	spoolss_PortInfoFF_Type.tp_base = Object_Type;

	spoolss_MonitorInfo1_Type.tp_base = Object_Type;

	spoolss_MonitorInfo2_Type.tp_base = Object_Type;

	spoolss_SetPortInfo1_Type.tp_base = Object_Type;

	spoolss_SetPortInfo2_Type.tp_base = Object_Type;

	spoolss_SetPortInfo3_Type.tp_base = Object_Type;

	spoolss_SetPortInfoFF_Type.tp_base = Object_Type;

	spoolss_SetPortInfoContainer_Type.tp_base = Object_Type;

	spoolss_PrintProcDataTypesInfo1_Type.tp_base = Object_Type;

	spoolss_PortVarContainer_Type.tp_base = Object_Type;

	spoolss_NotifyOptionType_Type.tp_base = Object_Type;

	spoolss_NotifyOption_Type.tp_base = Object_Type;

	spoolss_NotifyString_Type.tp_base = Object_Type;

	spoolss_Notify_Type.tp_base = Object_Type;

	spoolss_NotifyInfo_Type.tp_base = Object_Type;

	spoolss_UserLevel1_Type.tp_base = Object_Type;

	spoolss_UserLevel2_Type.tp_base = Object_Type;

	spoolss_UserLevel3_Type.tp_base = Object_Type;

	spoolss_UserLevelCtr_Type.tp_base = Object_Type;

	spoolss_PrinterEnumValues_Type.tp_base = Object_Type;

	spoolss_PortData1_Type.tp_base = Object_Type;

	spoolss_PortData2_Type.tp_base = Object_Type;

	spoolss_MonitorUi_Type.tp_base = Object_Type;

	spoolss_CorePrinterDriver_Type.tp_base = Object_Type;

	spoolss_InterfaceType.tp_base = ClientConnection_Type;

	if (PyType_Ready(&spoolss_Time_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_TimeCtr_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterInfo0_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PSDRVEXTRA351_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PSDRVEXTRA400_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PSDRVEXTRA500_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PSDRVEXTRA_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_UNIDRVEXTRA3_4_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_UNIDRVEXTRA500_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_UNIDRVEXTRA_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_JTEXP_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_OEM_DMEXTRA_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DeviceMode_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterInfo3_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterInfo4_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterInfo5_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterInfo6_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterInfo7_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DeviceModeInfo_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DevmodeContainer_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_JobInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_JobInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_JobInfo3_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_JobInfo4_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetJobInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetJobInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetJobInfo4_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_JobInfoContainer_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo0_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo3_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo4_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo5_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo6_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo7_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo8_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfo9_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPrinterInfoCtr_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_StringArray_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddDriverInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddDriverInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddDriverInfo3_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddDriverInfo4_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddDriverInfo5_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddDriverInfo6_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddDriverInfo8_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddDriverInfoCtr_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo3_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo4_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo5_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo6_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo7_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo8_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverFileInfo_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverInfo101_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DriverDirectoryInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrintProcessorInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrintProcessorDirectoryInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_DocumentInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_OSVersion_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_OSVersionEx_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_FormSize_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_FormArea_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_FormInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_FormInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddFormInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_AddFormInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PortInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PortInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PortInfo3_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PortInfoFF_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_MonitorInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_MonitorInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPortInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPortInfo2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPortInfo3_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPortInfoFF_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_SetPortInfoContainer_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrintProcDataTypesInfo1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PortVarContainer_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_NotifyOptionType_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_NotifyOption_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_NotifyString_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_Notify_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_NotifyInfo_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_UserLevel1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_UserLevel2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_UserLevel3_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_UserLevelCtr_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PrinterEnumValues_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PortData1_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_PortData2_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_MonitorUi_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_CorePrinterDriver_Type) < 0)
		return;
	if (PyType_Ready(&spoolss_InterfaceType) < 0)
		return;
	if (!PyInterface_AddNdrRpcMethods(&spoolss_InterfaceType, py_ndr_spoolss_methods))
		return;

#ifdef PY_TIME_PATCH
	PY_TIME_PATCH(&spoolss_Time_Type);
#endif
#ifdef PY_TIMECTR_PATCH
	PY_TIMECTR_PATCH(&spoolss_TimeCtr_Type);
#endif
#ifdef PY_PRINTERINFO0_PATCH
	PY_PRINTERINFO0_PATCH(&spoolss_PrinterInfo0_Type);
#endif
#ifdef PY_PSDRVEXTRA351_PATCH
	PY_PSDRVEXTRA351_PATCH(&spoolss_PSDRVEXTRA351_Type);
#endif
#ifdef PY_PSDRVEXTRA400_PATCH
	PY_PSDRVEXTRA400_PATCH(&spoolss_PSDRVEXTRA400_Type);
#endif
#ifdef PY_PSDRVEXTRA500_PATCH
	PY_PSDRVEXTRA500_PATCH(&spoolss_PSDRVEXTRA500_Type);
#endif
#ifdef PY_PSDRVEXTRA_PATCH
	PY_PSDRVEXTRA_PATCH(&spoolss_PSDRVEXTRA_Type);
#endif
#ifdef PY_UNIDRVEXTRA3_4_PATCH
	PY_UNIDRVEXTRA3_4_PATCH(&spoolss_UNIDRVEXTRA3_4_Type);
#endif
#ifdef PY_UNIDRVEXTRA500_PATCH
	PY_UNIDRVEXTRA500_PATCH(&spoolss_UNIDRVEXTRA500_Type);
#endif
#ifdef PY_UNIDRVEXTRA_PATCH
	PY_UNIDRVEXTRA_PATCH(&spoolss_UNIDRVEXTRA_Type);
#endif
#ifdef PY_JTEXP_PATCH
	PY_JTEXP_PATCH(&spoolss_JTEXP_Type);
#endif
#ifdef PY_OEM_DMEXTRA_PATCH
	PY_OEM_DMEXTRA_PATCH(&spoolss_OEM_DMEXTRA_Type);
#endif
#ifdef PY_DEVICEMODE_PATCH
	PY_DEVICEMODE_PATCH(&spoolss_DeviceMode_Type);
#endif
#ifdef PY_PRINTERINFO1_PATCH
	PY_PRINTERINFO1_PATCH(&spoolss_PrinterInfo1_Type);
#endif
#ifdef PY_PRINTERINFO2_PATCH
	PY_PRINTERINFO2_PATCH(&spoolss_PrinterInfo2_Type);
#endif
#ifdef PY_PRINTERINFO3_PATCH
	PY_PRINTERINFO3_PATCH(&spoolss_PrinterInfo3_Type);
#endif
#ifdef PY_PRINTERINFO4_PATCH
	PY_PRINTERINFO4_PATCH(&spoolss_PrinterInfo4_Type);
#endif
#ifdef PY_PRINTERINFO5_PATCH
	PY_PRINTERINFO5_PATCH(&spoolss_PrinterInfo5_Type);
#endif
#ifdef PY_PRINTERINFO6_PATCH
	PY_PRINTERINFO6_PATCH(&spoolss_PrinterInfo6_Type);
#endif
#ifdef PY_PRINTERINFO7_PATCH
	PY_PRINTERINFO7_PATCH(&spoolss_PrinterInfo7_Type);
#endif
#ifdef PY_DEVICEMODEINFO_PATCH
	PY_DEVICEMODEINFO_PATCH(&spoolss_DeviceModeInfo_Type);
#endif
#ifdef PY_DEVMODECONTAINER_PATCH
	PY_DEVMODECONTAINER_PATCH(&spoolss_DevmodeContainer_Type);
#endif
#ifdef PY_JOBINFO1_PATCH
	PY_JOBINFO1_PATCH(&spoolss_JobInfo1_Type);
#endif
#ifdef PY_JOBINFO2_PATCH
	PY_JOBINFO2_PATCH(&spoolss_JobInfo2_Type);
#endif
#ifdef PY_JOBINFO3_PATCH
	PY_JOBINFO3_PATCH(&spoolss_JobInfo3_Type);
#endif
#ifdef PY_JOBINFO4_PATCH
	PY_JOBINFO4_PATCH(&spoolss_JobInfo4_Type);
#endif
#ifdef PY_SETJOBINFO1_PATCH
	PY_SETJOBINFO1_PATCH(&spoolss_SetJobInfo1_Type);
#endif
#ifdef PY_SETJOBINFO2_PATCH
	PY_SETJOBINFO2_PATCH(&spoolss_SetJobInfo2_Type);
#endif
#ifdef PY_SETJOBINFO4_PATCH
	PY_SETJOBINFO4_PATCH(&spoolss_SetJobInfo4_Type);
#endif
#ifdef PY_JOBINFOCONTAINER_PATCH
	PY_JOBINFOCONTAINER_PATCH(&spoolss_JobInfoContainer_Type);
#endif
#ifdef PY_SETPRINTERINFO0_PATCH
	PY_SETPRINTERINFO0_PATCH(&spoolss_SetPrinterInfo0_Type);
#endif
#ifdef PY_SETPRINTERINFO1_PATCH
	PY_SETPRINTERINFO1_PATCH(&spoolss_SetPrinterInfo1_Type);
#endif
#ifdef PY_SETPRINTERINFO2_PATCH
	PY_SETPRINTERINFO2_PATCH(&spoolss_SetPrinterInfo2_Type);
#endif
#ifdef PY_SETPRINTERINFO3_PATCH
	PY_SETPRINTERINFO3_PATCH(&spoolss_SetPrinterInfo3_Type);
#endif
#ifdef PY_SETPRINTERINFO4_PATCH
	PY_SETPRINTERINFO4_PATCH(&spoolss_SetPrinterInfo4_Type);
#endif
#ifdef PY_SETPRINTERINFO5_PATCH
	PY_SETPRINTERINFO5_PATCH(&spoolss_SetPrinterInfo5_Type);
#endif
#ifdef PY_SETPRINTERINFO6_PATCH
	PY_SETPRINTERINFO6_PATCH(&spoolss_SetPrinterInfo6_Type);
#endif
#ifdef PY_SETPRINTERINFO7_PATCH
	PY_SETPRINTERINFO7_PATCH(&spoolss_SetPrinterInfo7_Type);
#endif
#ifdef PY_SETPRINTERINFO8_PATCH
	PY_SETPRINTERINFO8_PATCH(&spoolss_SetPrinterInfo8_Type);
#endif
#ifdef PY_SETPRINTERINFO9_PATCH
	PY_SETPRINTERINFO9_PATCH(&spoolss_SetPrinterInfo9_Type);
#endif
#ifdef PY_SETPRINTERINFOCTR_PATCH
	PY_SETPRINTERINFOCTR_PATCH(&spoolss_SetPrinterInfoCtr_Type);
#endif
#ifdef PY_STRINGARRAY_PATCH
	PY_STRINGARRAY_PATCH(&spoolss_StringArray_Type);
#endif
#ifdef PY_ADDDRIVERINFO1_PATCH
	PY_ADDDRIVERINFO1_PATCH(&spoolss_AddDriverInfo1_Type);
#endif
#ifdef PY_ADDDRIVERINFO2_PATCH
	PY_ADDDRIVERINFO2_PATCH(&spoolss_AddDriverInfo2_Type);
#endif
#ifdef PY_ADDDRIVERINFO3_PATCH
	PY_ADDDRIVERINFO3_PATCH(&spoolss_AddDriverInfo3_Type);
#endif
#ifdef PY_ADDDRIVERINFO4_PATCH
	PY_ADDDRIVERINFO4_PATCH(&spoolss_AddDriverInfo4_Type);
#endif
#ifdef PY_ADDDRIVERINFO5_PATCH
	PY_ADDDRIVERINFO5_PATCH(&spoolss_AddDriverInfo5_Type);
#endif
#ifdef PY_ADDDRIVERINFO6_PATCH
	PY_ADDDRIVERINFO6_PATCH(&spoolss_AddDriverInfo6_Type);
#endif
#ifdef PY_ADDDRIVERINFO8_PATCH
	PY_ADDDRIVERINFO8_PATCH(&spoolss_AddDriverInfo8_Type);
#endif
#ifdef PY_ADDDRIVERINFOCTR_PATCH
	PY_ADDDRIVERINFOCTR_PATCH(&spoolss_AddDriverInfoCtr_Type);
#endif
#ifdef PY_DRIVERINFO1_PATCH
	PY_DRIVERINFO1_PATCH(&spoolss_DriverInfo1_Type);
#endif
#ifdef PY_DRIVERINFO2_PATCH
	PY_DRIVERINFO2_PATCH(&spoolss_DriverInfo2_Type);
#endif
#ifdef PY_DRIVERINFO3_PATCH
	PY_DRIVERINFO3_PATCH(&spoolss_DriverInfo3_Type);
#endif
#ifdef PY_DRIVERINFO4_PATCH
	PY_DRIVERINFO4_PATCH(&spoolss_DriverInfo4_Type);
#endif
#ifdef PY_DRIVERINFO5_PATCH
	PY_DRIVERINFO5_PATCH(&spoolss_DriverInfo5_Type);
#endif
#ifdef PY_DRIVERINFO6_PATCH
	PY_DRIVERINFO6_PATCH(&spoolss_DriverInfo6_Type);
#endif
#ifdef PY_DRIVERINFO7_PATCH
	PY_DRIVERINFO7_PATCH(&spoolss_DriverInfo7_Type);
#endif
#ifdef PY_DRIVERINFO8_PATCH
	PY_DRIVERINFO8_PATCH(&spoolss_DriverInfo8_Type);
#endif
#ifdef PY_DRIVERFILEINFO_PATCH
	PY_DRIVERFILEINFO_PATCH(&spoolss_DriverFileInfo_Type);
#endif
#ifdef PY_DRIVERINFO101_PATCH
	PY_DRIVERINFO101_PATCH(&spoolss_DriverInfo101_Type);
#endif
#ifdef PY_DRIVERDIRECTORYINFO1_PATCH
	PY_DRIVERDIRECTORYINFO1_PATCH(&spoolss_DriverDirectoryInfo1_Type);
#endif
#ifdef PY_PRINTPROCESSORINFO1_PATCH
	PY_PRINTPROCESSORINFO1_PATCH(&spoolss_PrintProcessorInfo1_Type);
#endif
#ifdef PY_PRINTPROCESSORDIRECTORYINFO1_PATCH
	PY_PRINTPROCESSORDIRECTORYINFO1_PATCH(&spoolss_PrintProcessorDirectoryInfo1_Type);
#endif
#ifdef PY_DOCUMENTINFO1_PATCH
	PY_DOCUMENTINFO1_PATCH(&spoolss_DocumentInfo1_Type);
#endif
#ifdef PY_OSVERSION_PATCH
	PY_OSVERSION_PATCH(&spoolss_OSVersion_Type);
#endif
#ifdef PY_OSVERSIONEX_PATCH
	PY_OSVERSIONEX_PATCH(&spoolss_OSVersionEx_Type);
#endif
#ifdef PY_FORMSIZE_PATCH
	PY_FORMSIZE_PATCH(&spoolss_FormSize_Type);
#endif
#ifdef PY_FORMAREA_PATCH
	PY_FORMAREA_PATCH(&spoolss_FormArea_Type);
#endif
#ifdef PY_FORMINFO1_PATCH
	PY_FORMINFO1_PATCH(&spoolss_FormInfo1_Type);
#endif
#ifdef PY_FORMINFO2_PATCH
	PY_FORMINFO2_PATCH(&spoolss_FormInfo2_Type);
#endif
#ifdef PY_ADDFORMINFO1_PATCH
	PY_ADDFORMINFO1_PATCH(&spoolss_AddFormInfo1_Type);
#endif
#ifdef PY_ADDFORMINFO2_PATCH
	PY_ADDFORMINFO2_PATCH(&spoolss_AddFormInfo2_Type);
#endif
#ifdef PY_PORTINFO1_PATCH
	PY_PORTINFO1_PATCH(&spoolss_PortInfo1_Type);
#endif
#ifdef PY_PORTINFO2_PATCH
	PY_PORTINFO2_PATCH(&spoolss_PortInfo2_Type);
#endif
#ifdef PY_PORTINFO3_PATCH
	PY_PORTINFO3_PATCH(&spoolss_PortInfo3_Type);
#endif
#ifdef PY_PORTINFOFF_PATCH
	PY_PORTINFOFF_PATCH(&spoolss_PortInfoFF_Type);
#endif
#ifdef PY_MONITORINFO1_PATCH
	PY_MONITORINFO1_PATCH(&spoolss_MonitorInfo1_Type);
#endif
#ifdef PY_MONITORINFO2_PATCH
	PY_MONITORINFO2_PATCH(&spoolss_MonitorInfo2_Type);
#endif
#ifdef PY_SETPORTINFO1_PATCH
	PY_SETPORTINFO1_PATCH(&spoolss_SetPortInfo1_Type);
#endif
#ifdef PY_SETPORTINFO2_PATCH
	PY_SETPORTINFO2_PATCH(&spoolss_SetPortInfo2_Type);
#endif
#ifdef PY_SETPORTINFO3_PATCH
	PY_SETPORTINFO3_PATCH(&spoolss_SetPortInfo3_Type);
#endif
#ifdef PY_SETPORTINFOFF_PATCH
	PY_SETPORTINFOFF_PATCH(&spoolss_SetPortInfoFF_Type);
#endif
#ifdef PY_SETPORTINFOCONTAINER_PATCH
	PY_SETPORTINFOCONTAINER_PATCH(&spoolss_SetPortInfoContainer_Type);
#endif
#ifdef PY_PRINTPROCDATATYPESINFO1_PATCH
	PY_PRINTPROCDATATYPESINFO1_PATCH(&spoolss_PrintProcDataTypesInfo1_Type);
#endif
#ifdef PY_PORTVARCONTAINER_PATCH
	PY_PORTVARCONTAINER_PATCH(&spoolss_PortVarContainer_Type);
#endif
#ifdef PY_NOTIFYOPTIONTYPE_PATCH
	PY_NOTIFYOPTIONTYPE_PATCH(&spoolss_NotifyOptionType_Type);
#endif
#ifdef PY_NOTIFYOPTION_PATCH
	PY_NOTIFYOPTION_PATCH(&spoolss_NotifyOption_Type);
#endif
#ifdef PY_NOTIFYSTRING_PATCH
	PY_NOTIFYSTRING_PATCH(&spoolss_NotifyString_Type);
#endif
#ifdef PY_NOTIFY_PATCH
	PY_NOTIFY_PATCH(&spoolss_Notify_Type);
#endif
#ifdef PY_NOTIFYINFO_PATCH
	PY_NOTIFYINFO_PATCH(&spoolss_NotifyInfo_Type);
#endif
#ifdef PY_USERLEVEL1_PATCH
	PY_USERLEVEL1_PATCH(&spoolss_UserLevel1_Type);
#endif
#ifdef PY_USERLEVEL2_PATCH
	PY_USERLEVEL2_PATCH(&spoolss_UserLevel2_Type);
#endif
#ifdef PY_USERLEVEL3_PATCH
	PY_USERLEVEL3_PATCH(&spoolss_UserLevel3_Type);
#endif
#ifdef PY_USERLEVELCTR_PATCH
	PY_USERLEVELCTR_PATCH(&spoolss_UserLevelCtr_Type);
#endif
#ifdef PY_PRINTERENUMVALUES_PATCH
	PY_PRINTERENUMVALUES_PATCH(&spoolss_PrinterEnumValues_Type);
#endif
#ifdef PY_PORTDATA1_PATCH
	PY_PORTDATA1_PATCH(&spoolss_PortData1_Type);
#endif
#ifdef PY_PORTDATA2_PATCH
	PY_PORTDATA2_PATCH(&spoolss_PortData2_Type);
#endif
#ifdef PY_MONITORUI_PATCH
	PY_MONITORUI_PATCH(&spoolss_MonitorUi_Type);
#endif
#ifdef PY_COREPRINTERDRIVER_PATCH
	PY_COREPRINTERDRIVER_PATCH(&spoolss_CorePrinterDriver_Type);
#endif
#ifdef PY_SPOOLSS_PATCH
	PY_SPOOLSS_PATCH(&spoolss_InterfaceType);
#endif

	m = Py_InitModule3("spoolss", spoolss_methods, "spoolss DCE/RPC");
	if (m == NULL)
		return;

	PyModule_AddObject(m, "PRINTER_STATUS_INITIALIZING", PyInt_FromLong(PRINTER_STATUS_INITIALIZING));
	PyModule_AddObject(m, "SPOOLSS_PRINTER_CONTROL_UNPAUSE", PyInt_FromLong(SPOOLSS_PRINTER_CONTROL_UNPAUSE));
	PyModule_AddObject(m, "DMPAPER_JENV_CHOU4", PyInt_FromLong(DMPAPER_JENV_CHOU4));
	PyModule_AddObject(m, "PRINTER_STATUS_NOT_AVAILABLE", PyInt_FromLong(PRINTER_STATUS_NOT_AVAILABLE));
	PyModule_AddObject(m, "SPOOLSS_DM_NUP_DIRECTION_T2B_R2L", PyInt_FromLong(SPOOLSS_DM_NUP_DIRECTION_T2B_R2L));
	PyModule_AddObject(m, "JOB_STATUS_COMPLETE", PyInt_FromLong(JOB_STATUS_COMPLETE));
	PyModule_AddObject(m, "SPOOLSS_MAJOR_VERSION_NT4_95_98_ME", PyInt_FromLong(SPOOLSS_MAJOR_VERSION_NT4_95_98_ME));
	PyModule_AddObject(m, "DMPAPER_ESHEET", PyInt_FromLong(DMPAPER_ESHEET));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST_UPSIDEDOWN", PyInt_FromLong(SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST_UPSIDEDOWN));
	PyModule_AddObject(m, "PRINTER_STATUS_IO_ACTIVE", PyInt_FromLong(PRINTER_STATUS_IO_ACTIVE));
	PyModule_AddObject(m, "PORT_STATUS_TONER_LOW", PyInt_FromLong(PORT_STATUS_TONER_LOW));
	PyModule_AddObject(m, "PORT_STATUS_DOOR_OPEN", PyInt_FromLong(PORT_STATUS_DOOR_OPEN));
	PyModule_AddObject(m, "PRINTER_ENUM_CONTAINER", PyInt_FromLong(PRINTER_ENUM_CONTAINER));
	PyModule_AddObject(m, "DPD_DELETE_ALL_FILES", PyInt_FromLong(DPD_DELETE_ALL_FILES));
	PyModule_AddObject(m, "DMPAPER_PENV_7", PyInt_FromLong(DMPAPER_PENV_7));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_DEVMODE", PyInt_FromLong(PRINTER_NOTIFY_FIELD_DEVMODE));
	PyModule_AddObject(m, "SPOOLSS_DM_NUP_DIRECTION_L2R_T2B", PyInt_FromLong(SPOOLSS_DM_NUP_DIRECTION_L2R_T2B));
	PyModule_AddObject(m, "SERVER_EXECUTE", PyInt_FromLong(SEC_STD_READ_CONTROL|SERVER_ACCESS_ENUMERATE));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_FILE_TYPE_DATA", PyInt_FromLong(SPOOLSS_DRIVER_FILE_TYPE_DATA));
	PyModule_AddObject(m, "DMPAPER_PENV_6_ROTATED", PyInt_FromLong(DMPAPER_PENV_6_ROTATED));
	PyModule_AddObject(m, "SPOOLSS_DM_SIGNATURE_JTEXP", PyInt_FromLong(SPOOLSS_DM_SIGNATURE_JTEXP));
	PyModule_AddObject(m, "SPOOL_REG_PRINTNOTIFY", PyString_FromString("printNotify"));
	PyModule_AddObject(m, "DMPAPER_B5", PyInt_FromLong(DMPAPER_B5));
	PyModule_AddObject(m, "JOB_STATUS_DELETING", PyInt_FromLong(JOB_STATUS_DELETING));
	PyModule_AddObject(m, "SPOOL_REG_PRINTORIENTATIONSSUPPORTED", PyString_FromString("printOrientationsSupported"));
	PyModule_AddObject(m, "SPOOL_REG_DRIVERNAME", PyString_FromString("driverName"));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION", PyInt_FromLong(SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION));
	PyModule_AddObject(m, "PRINTER_CHANGE_JOB", PyInt_FromLong(0x0000FF00));
	PyModule_AddObject(m, "DEVMODE_DISPLAYFLAGS", PyInt_FromLong(DEVMODE_DISPLAYFLAGS));
	PyModule_AddObject(m, "DEVMODE_PAPERWIDTH", PyInt_FromLong(DEVMODE_PAPERWIDTH));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_PRIORITY", PyInt_FromLong(JOB_NOTIFY_FIELD_PRIORITY));
	PyModule_AddObject(m, "PRINTER_STATUS_TONER_LOW", PyInt_FromLong(PRINTER_STATUS_TONER_LOW));
	PyModule_AddObject(m, "PRINTER_CHANGE_ADD_PORT", PyInt_FromLong(PRINTER_CHANGE_ADD_PORT));
	PyModule_AddObject(m, "PRINTER_ACCESS_ADMINISTER", PyInt_FromLong(PRINTER_ACCESS_ADMINISTER));
	PyModule_AddObject(m, "DMPAPER_CSHEET", PyInt_FromLong(DMPAPER_CSHEET));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_PORT_NAME", PyInt_FromLong(JOB_NOTIFY_FIELD_PORT_NAME));
	PyModule_AddObject(m, "PRINTER_ENUM_ICON2", PyInt_FromLong(PRINTER_ENUM_ICON2));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_START_TIME", PyInt_FromLong(PRINTER_NOTIFY_FIELD_START_TIME));
	PyModule_AddObject(m, "PRINTER_CHANGE_ADD_PRINT_PROCESSOR", PyInt_FromLong(PRINTER_CHANGE_ADD_PRINT_PROCESSOR));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_QUEUED", PyInt_FromLong(PRINTER_ATTRIBUTE_QUEUED));
	PyModule_AddObject(m, "DMMEDIA_STANDARD", PyInt_FromLong(DMMEDIA_STANDARD));
	PyModule_AddObject(m, "DMPAPER_B5_JIS_ROTATED", PyInt_FromLong(DMPAPER_B5_JIS_ROTATED));
	PyModule_AddObject(m, "PROCESSOR_ARCHITECTURE_AMD64", PyInt_FromLong(PROCESSOR_ARCHITECTURE_AMD64));
	PyModule_AddObject(m, "DMPAPER_LETTER_ROTATED", PyInt_FromLong(DMPAPER_LETTER_ROTATED));
	PyModule_AddObject(m, "JOB_STATUS_PRINTED", PyInt_FromLong(JOB_STATUS_PRINTED));
	PyModule_AddObject(m, "SPOOL_REG_PRINTSEPARATORFILE", PyString_FromString("printSeparatorFile"));
	PyModule_AddObject(m, "APD_STRICT_DOWNGRADE", PyInt_FromLong(APD_STRICT_DOWNGRADE));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FLAGS_PRINT_MIRROR", PyInt_FromLong(SPOOLSS_DM_PS_FLAGS_PRINT_MIRROR));
	PyModule_AddObject(m, "SPOOL_REG_PRINTKEEPPRINTEDJOBS", PyString_FromString("printKeepPrintedJobs"));
	PyModule_AddObject(m, "SPOOLSS_DM_LAYOUT_NUP_DISABLED", PyInt_FromLong(SPOOLSS_DM_LAYOUT_NUP_DISABLED));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR", PyInt_FromLong(JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR));
	PyModule_AddObject(m, "SPOOLSS_FORM_BUILTIN", PyInt_FromLong(SPOOLSS_FORM_BUILTIN));
	PyModule_AddObject(m, "DMPAPER_ENV_12", PyInt_FromLong(DMPAPER_ENV_12));
	PyModule_AddObject(m, "SPOOLSS_PORT_TYPE_NET_ATTACHED", PyInt_FromLong(SPOOLSS_PORT_TYPE_NET_ATTACHED));
	PyModule_AddObject(m, "DMBIN_TRACTOR", PyInt_FromLong(DMBIN_TRACTOR));
	PyModule_AddObject(m, "PRINTER_STATUS_OK", PyInt_FromLong(0x00000000));
	PyModule_AddObject(m, "DMDITHER_RESERVED7", PyInt_FromLong(DMDITHER_RESERVED7));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_UNTIL_TIME", PyInt_FromLong(PRINTER_NOTIFY_FIELD_UNTIL_TIME));
	PyModule_AddObject(m, "DMBIN_LARGECAPACITY", PyInt_FromLong(DMBIN_LARGECAPACITY));
	PyModule_AddObject(m, "DMPAPER_FANFOLD_LGL_GERMAN", PyInt_FromLong(DMPAPER_FANFOLD_LGL_GERMAN));
	PyModule_AddObject(m, "DMPAPER_JENV_KAKU3", PyInt_FromLong(DMPAPER_JENV_KAKU3));
	PyModule_AddObject(m, "DMPAPER_PENV_2", PyInt_FromLong(DMPAPER_PENV_2));
	PyModule_AddObject(m, "SPL_XCV_MONITOR_LOCALMON", PyString_FromString(",XcvMonitor Local Port"));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FLAGS_PRINT_NEGATIVE", PyInt_FromLong(SPOOLSS_DM_PS_FLAGS_PRINT_NEGATIVE));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_LOCAL", PyInt_FromLong(PRINTER_ATTRIBUTE_LOCAL));
	PyModule_AddObject(m, "PRINTER_CHANGE_ADD_JOB", PyInt_FromLong(PRINTER_CHANGE_ADD_JOB));
	PyModule_AddObject(m, "PRINTER_CHANGE_PRINTER", PyInt_FromLong(0x000000FF));
	PyModule_AddObject(m, "DMBIN_ENVELOPE", PyInt_FromLong(DMBIN_ENVELOPE));
	PyModule_AddObject(m, "DMPAPER_JENV_YOU4_ROTATED", PyInt_FromLong(DMPAPER_JENV_YOU4_ROTATED));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_FILE_TYPE_RENDERING", PyInt_FromLong(SPOOLSS_DRIVER_FILE_TYPE_RENDERING));
	PyModule_AddObject(m, "JOB_STATUS_PAUSED", PyInt_FromLong(JOB_STATUS_PAUSED));
	PyModule_AddObject(m, "DMPAPER_P32K_ROTATED", PyInt_FromLong(DMPAPER_P32K_ROTATED));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_PAGES_PRINTED", PyInt_FromLong(PRINTER_NOTIFY_FIELD_PAGES_PRINTED));
	PyModule_AddObject(m, "PROCESSOR_INTEL_PENTIUM", PyInt_FromLong(PROCESSOR_INTEL_PENTIUM));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_FRIENDLY_NAME", PyInt_FromLong(PRINTER_NOTIFY_FIELD_FRIENDLY_NAME));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_PARAMETERS", PyInt_FromLong(PRINTER_NOTIFY_FIELD_PARAMETERS));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PyInt_FromLong(PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS));
	PyModule_AddObject(m, "PRINTER_STATUS_NO_TONER", PyInt_FromLong(PRINTER_STATUS_NO_TONER));
	PyModule_AddObject(m, "PRINTER_STATUS_OFFLINE", PyInt_FromLong(PRINTER_STATUS_OFFLINE));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_VERSION_2012", PyInt_FromLong(SPOOLSS_DRIVER_VERSION_2012));
	PyModule_AddObject(m, "SPOOLSS_DM_LAYOUT_BOOKLET", PyInt_FromLong(SPOOLSS_DM_LAYOUT_BOOKLET));
	PyModule_AddObject(m, "DMTT_DOWNLOAD_OUTLINE", PyInt_FromLong(DMTT_DOWNLOAD_OUTLINE));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_PORT_NAME", PyInt_FromLong(PRINTER_NOTIFY_FIELD_PORT_NAME));
	PyModule_AddObject(m, "PRINTER_READ", PyInt_FromLong(SEC_STD_READ_CONTROL|PRINTER_ACCESS_USE));
	PyModule_AddObject(m, "SPOOL_REG_VERSIONNUMBER", PyString_FromString("versionNumber"));
	PyModule_AddObject(m, "NOTIFY_TABLE_DEVMODE", PyInt_FromLong(NOTIFY_TABLE_DEVMODE));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_STATUS", PyInt_FromLong(JOB_NOTIFY_FIELD_STATUS));
	PyModule_AddObject(m, "SPOOL_DSUSER_KEY", PyString_FromString("DsUser"));
	PyModule_AddObject(m, "JOB_WRITE", PyInt_FromLong(STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER));
	PyModule_AddObject(m, "DMPAPER_A4SMALL", PyInt_FromLong(DMPAPER_A4SMALL));
	PyModule_AddObject(m, "DMDITHER_RESERVED6", PyInt_FromLong(DMDITHER_RESERVED6));
	PyModule_AddObject(m, "DMPAPER_JENV_CHOU3", PyInt_FromLong(DMPAPER_JENV_CHOU3));
	PyModule_AddObject(m, "PRINTER_STATUS_ERROR", PyInt_FromLong(PRINTER_STATUS_ERROR));
	PyModule_AddObject(m, "DMPAPER_JENV_KAKU3_ROTATED", PyInt_FromLong(DMPAPER_JENV_KAKU3_ROTATED));
	PyModule_AddObject(m, "DMPAPER_NOTE", PyInt_FromLong(DMPAPER_NOTE));
	PyModule_AddObject(m, "SPOOLSS_ARCHITECTURE_IA_64", PyString_FromString("Windows IA64"));
	PyModule_AddObject(m, "DMPAPER_PENV_2_ROTATED", PyInt_FromLong(DMPAPER_PENV_2_ROTATED));
	PyModule_AddObject(m, "DMDITHER_FINE", PyInt_FromLong(DMDITHER_FINE));
	PyModule_AddObject(m, "SPOOL_REG_PRINTOWNER", PyString_FromString("printOwner"));
	PyModule_AddObject(m, "PROCESSOR_INTEL_486", PyInt_FromLong(PROCESSOR_INTEL_486));
	PyModule_AddObject(m, "DEVMODE_DEFAULTSOURCE", PyInt_FromLong(DEVMODE_DEFAULTSOURCE));
	PyModule_AddObject(m, "JOB_STATUS_SPOOLING", PyInt_FromLong(JOB_STATUS_SPOOLING));
	PyModule_AddObject(m, "PRINTER_ENUM_ICON3", PyInt_FromLong(PRINTER_ENUM_ICON3));
	PyModule_AddObject(m, "SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL", PyInt_FromLong(SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL));
	PyModule_AddObject(m, "PRINTER_NOTIFY_OPTIONS_REFRESH", PyInt_FromLong(PRINTER_NOTIFY_OPTIONS_REFRESH));
	PyModule_AddObject(m, "DEVMODE_DISPLAYFREQUENCY", PyInt_FromLong(DEVMODE_DISPLAYFREQUENCY));
	PyModule_AddObject(m, "DMORIENT_PORTRAIT", PyInt_FromLong(DMORIENT_PORTRAIT));
	PyModule_AddObject(m, "DMBIN_LOWER", PyInt_FromLong(DMBIN_LOWER));
	PyModule_AddObject(m, "DEVMODE_NUP", PyInt_FromLong(DEVMODE_NUP));
	PyModule_AddObject(m, "DMPAPER_PENV_1_ROTATED", PyInt_FromLong(DMPAPER_PENV_1_ROTATED));
	PyModule_AddObject(m, "DMDUP_VERTICAL", PyInt_FromLong(DMDUP_VERTICAL));
	PyModule_AddObject(m, "DMPAPER_LEDGER", PyInt_FromLong(DMPAPER_LEDGER));
	PyModule_AddObject(m, "SPOOLSS_RELEASE_BUILD", PyInt_FromLong(SPOOLSS_RELEASE_BUILD));
	PyModule_AddObject(m, "JOB_STATUS_PRINTING", PyInt_FromLong(JOB_STATUS_PRINTING));
	PyModule_AddObject(m, "DMPAPER_JENV_YOU4", PyInt_FromLong(DMPAPER_JENV_YOU4));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMAXYEXTENT", PyString_FromString("printMaxYExtent"));
	PyModule_AddObject(m, "SPOOL_REG_PRINTCOLLATE", PyString_FromString("printCollate"));
	PyModule_AddObject(m, "SPOOL_DSDRIVER_KEY", PyString_FromString("DsDriver"));
	PyModule_AddObject(m, "DEVMODE_BITSPERPEL", PyInt_FromLong(DEVMODE_BITSPERPEL));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMINXEXTENT", PyString_FromString("printMinXExtent"));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_DATATYPE", PyInt_FromLong(JOB_NOTIFY_FIELD_DATATYPE));
	PyModule_AddObject(m, "SPOOL_REGVAL_PRINTDIRECT", PyString_FromString("PrintDirect"));
	PyModule_AddObject(m, "PORT_STATUS_TYPE_INFO", PyInt_FromLong(PORT_STATUS_TYPE_INFO));
	PyModule_AddObject(m, "SPOOL_REG_PRINTPAGESPERMINUTE", PyString_FromString("printPagesPerMinute"));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_SEPFILE", PyInt_FromLong(PRINTER_NOTIFY_FIELD_SEPFILE));
	PyModule_AddObject(m, "SPOOL_REG_PRINTENDTIME", PyString_FromString("printEndTime"));
	PyModule_AddObject(m, "DMPAPER_ENV_ITALY", PyInt_FromLong(DMPAPER_ENV_ITALY));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_TOTAL_BYTES", PyInt_FromLong(PRINTER_NOTIFY_FIELD_TOTAL_BYTES));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_TTDLFMT_DEFAULT", PyInt_FromLong(SPOOLSS_DM_PS_TTDLFMT_DEFAULT));
	PyModule_AddObject(m, "PRINTER_CHANGE_CONFIGURE_PORT", PyInt_FromLong(PRINTER_CHANGE_CONFIGURE_PORT));
	PyModule_AddObject(m, "DMPAPER_PENV_1", PyInt_FromLong(DMPAPER_PENV_1));
	PyModule_AddObject(m, "JOB_READ", PyInt_FromLong(SEC_STD_READ_CONTROL|JOB_ACCESS_ADMINISTER));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_MACHINE_NAME", PyInt_FromLong(JOB_NOTIFY_FIELD_MACHINE_NAME));
	PyModule_AddObject(m, "DMTT_DOWNLOAD", PyInt_FromLong(DMTT_DOWNLOAD));
	PyModule_AddObject(m, "DMBIN_SMALLFMT", PyInt_FromLong(DMBIN_SMALLFMT));
	PyModule_AddObject(m, "DMICM_SATURATE", PyInt_FromLong(DMICM_SATURATE));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_STATUS_STRING", PyInt_FromLong(PRINTER_NOTIFY_FIELD_STATUS_STRING));
	PyModule_AddObject(m, "SPOOLSS_ARCHITECTURE_x64", PyString_FromString("Windows x64"));
	PyModule_AddObject(m, "DEVMODE_PANNINGHEIGHT", PyInt_FromLong(DEVMODE_PANNINGHEIGHT));
	PyModule_AddObject(m, "DMPAPER_A4_ROTATED", PyInt_FromLong(DMPAPER_A4_ROTATED));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST_UPSIDEDOWN", PyInt_FromLong(SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST_UPSIDEDOWN));
	PyModule_AddObject(m, "APD_COPY_FROM_DIRECTORY", PyInt_FromLong(APD_COPY_FROM_DIRECTORY));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_VERSION_200X", PyInt_FromLong(SPOOLSS_DRIVER_VERSION_200X));
	PyModule_AddObject(m, "PRINTER_CHANGE_DELETE_FORM", PyInt_FromLong(PRINTER_CHANGE_DELETE_FORM));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_RESTART", PyInt_FromLong(SPOOLSS_JOB_CONTROL_RESTART));
	PyModule_AddObject(m, "DEVMODE_PANNINGWIDTH", PyInt_FromLong(DEVMODE_PANNINGWIDTH));
	PyModule_AddObject(m, "PRINTER_WRITE", PyInt_FromLong(STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE));
	PyModule_AddObject(m, "SPOOL_DSSPOOLER_KEY", PyString_FromString("DsSpooler"));
	PyModule_AddObject(m, "DSPRINT_UPDATE", PyInt_FromLong(DSPRINT_UPDATE));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_DIRECT", PyInt_FromLong(PRINTER_ATTRIBUTE_DIRECT));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_RAW_ONLY", PyInt_FromLong(PRINTER_ATTRIBUTE_RAW_ONLY));
	PyModule_AddObject(m, "DMTT_SUBDEV", PyInt_FromLong(DMTT_SUBDEV));
	PyModule_AddObject(m, "DMPAPER_ENV_PERSONAL", PyInt_FromLong(DMPAPER_ENV_PERSONAL));
	PyModule_AddObject(m, "SPOOLSS_DM_NUP_DIRECTION_R2L_T2B", PyInt_FromLong(SPOOLSS_DM_NUP_DIRECTION_R2L_T2B));
	PyModule_AddObject(m, "SPOOL_REG_DESCRIPTION", PyString_FromString("description"));
	PyModule_AddObject(m, "SPL_ARCH_W32X86", PyString_FromString("W32X86"));
	PyModule_AddObject(m, "SPOOL_REG_OPERATINGSYSTEMVERSION", PyString_FromString("operatingSystemVersion"));
	PyModule_AddObject(m, "SPOOLSS_MINOR_VERSION_ME", PyInt_FromLong(SPOOLSS_MINOR_VERSION_ME));
	PyModule_AddObject(m, "DMDITHER_ERRORDIFFUSION", PyInt_FromLong(DMDITHER_ERRORDIFFUSION));
	PyModule_AddObject(m, "JOB_STATUS_RESTART", PyInt_FromLong(JOB_STATUS_RESTART));
	PyModule_AddObject(m, "DMRES_COLOR", PyInt_FromLong(DMRES_COLOR));
	PyModule_AddObject(m, "SPOOL_REG_PRINTBINNAMES", PyString_FromString("printBinNames"));
	PyModule_AddObject(m, "PRINTER_CHANGE_ADD_PRINTER", PyInt_FromLong(PRINTER_CHANGE_ADD_PRINTER));
	PyModule_AddObject(m, "SPOOL_REG_ASSETNUMBER", PyString_FromString("assetNumber"));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PyInt_FromLong(PRINTER_ATTRIBUTE_ENABLE_DEVQ));
	PyModule_AddObject(m, "SPOOLSS_DM_LAYOUT_NUP_16", PyInt_FromLong(SPOOLSS_DM_LAYOUT_NUP_16));
	PyModule_AddObject(m, "SPOOLSS_ARCHITECTURE_NT_X86", PyString_FromString("Windows NT x86"));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_OPTIMIZE_ARCHIVAL", PyInt_FromLong(SPOOLSS_DM_PS_OPTIMIZE_ARCHIVAL));
	PyModule_AddObject(m, "PRINTER_CHANGE_ALL", PyInt_FromLong((PRINTER_CHANGE_PRINTER|PRINTER_CHANGE_JOB|PRINTER_CHANGE_FORM|PRINTER_CHANGE_PORT|PRINTER_CHANGE_PRINT_PROCESSOR|PRINTER_CHANGE_PRINTER_DRIVER)));
	PyModule_AddObject(m, "DMPAPER_A6", PyInt_FromLong(DMPAPER_A6));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR", PyInt_FromLong(PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_TTDLFMT_TYPE_42", PyInt_FromLong(SPOOLSS_DM_PS_TTDLFMT_TYPE_42));
	PyModule_AddObject(m, "PRINTER_CHANGE_FAILED_CONNECTION_PRINTER", PyInt_FromLong(PRINTER_CHANGE_FAILED_CONNECTION_PRINTER));
	PyModule_AddObject(m, "SPOOLSS_DM_UNI_QUALITY_DRAFT", PyInt_FromLong(SPOOLSS_DM_UNI_QUALITY_DRAFT));
	PyModule_AddObject(m, "SPOOL_REG_OPERATINGSYSTEMSERVICEPACK", PyString_FromString("operatingSystemServicePack"));
	PyModule_AddObject(m, "PRINTER_ENUM_ICON5", PyInt_FromLong(PRINTER_ENUM_ICON5));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_VERSION_NT4", PyInt_FromLong(SPOOLSS_DRIVER_VERSION_NT4));
	PyModule_AddObject(m, "DMBIN_CASSETTE", PyInt_FromLong(DMBIN_CASSETTE));
	PyModule_AddObject(m, "SPOOL_REG_PRINTATTRIBUTES", PyString_FromString("printAttributes"));
	PyModule_AddObject(m, "PROCESSOR_AMD_X8664", PyInt_FromLong(PROCESSOR_AMD_X8664));
	PyModule_AddObject(m, "DMICM_COLORIMETRIC", PyInt_FromLong(DMICM_COLORIMETRIC));
	PyModule_AddObject(m, "DMNUP_ONEUP", PyInt_FromLong(DMNUP_ONEUP));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_STATUS", PyInt_FromLong(PRINTER_NOTIFY_FIELD_STATUS));
	PyModule_AddObject(m, "PRINTER_CHANGE_PRINTER_DRIVER", PyInt_FromLong((PRINTER_CHANGE_ADD_PRINTER_DRIVER|PRINTER_CHANGE_SET_PRINTER_DRIVER|PRINTER_CHANGE_DELETE_PRINTER_DRIVER)));
	PyModule_AddObject(m, "DMRES_LOW", PyInt_FromLong(DMRES_LOW));
	PyModule_AddObject(m, "PRINTER_STATUS_PAGE_PUNT", PyInt_FromLong(PRINTER_STATUS_PAGE_PUNT));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_FAX", PyInt_FromLong(PRINTER_ATTRIBUTE_FAX));
	PyModule_AddObject(m, "APD_STRICT_UPGRADE", PyInt_FromLong(APD_STRICT_UPGRADE));
	PyModule_AddObject(m, "DMRES_DRAFT", PyInt_FromLong(DMRES_DRAFT));
	PyModule_AddObject(m, "DMPAPER_PENV_7_ROTATED", PyInt_FromLong(DMPAPER_PENV_7_ROTATED));
	PyModule_AddObject(m, "PRINTER_STATUS_WARMING_UP", PyInt_FromLong(PRINTER_STATUS_WARMING_UP));
	PyModule_AddObject(m, "PORT_STATUS_CLEAR", PyInt_FromLong(PORT_STATUS_CLEAR));
	PyModule_AddObject(m, "DMPAPER_ENV_B5", PyInt_FromLong(DMPAPER_ENV_B5));
	PyModule_AddObject(m, "PRINTER_CHANGE_WRITE_JOB", PyInt_FromLong(PRINTER_CHANGE_WRITE_JOB));
	PyModule_AddObject(m, "SPOOLSS_FORM_STRING_TYPE_MUI_DLL", PyInt_FromLong(SPOOLSS_FORM_STRING_TYPE_MUI_DLL));
	PyModule_AddObject(m, "DMORIENT_LANDSCAPE", PyInt_FromLong(DMORIENT_LANDSCAPE));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_START_TIME", PyInt_FromLong(JOB_NOTIFY_FIELD_START_TIME));
	PyModule_AddObject(m, "PRINTER_CHANGE_ADD_PRINTER_DRIVER", PyInt_FromLong(PRINTER_CHANGE_ADD_PRINTER_DRIVER));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER", PyInt_FromLong(SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER));
	PyModule_AddObject(m, "DMBIN_LARGEFMT", PyInt_FromLong(DMBIN_LARGEFMT));
	PyModule_AddObject(m, "DMBIN_MIDDLE", PyInt_FromLong(DMBIN_MIDDLE));
	PyModule_AddObject(m, "SPOOL_REG_PRINTSTARTTIME", PyString_FromString("printStartTime"));
	PyModule_AddObject(m, "DMPAPER_ENV_MONARCH", PyInt_FromLong(DMPAPER_ENV_MONARCH));
	PyModule_AddObject(m, "PRINTER_STATUS_SERVER_UNKNOWN", PyInt_FromLong(PRINTER_STATUS_SERVER_UNKNOWN));
	PyModule_AddObject(m, "DEVMODE_DITHERTYPE", PyInt_FromLong(DEVMODE_DITHERTYPE));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_DELETE", PyInt_FromLong(SPOOLSS_JOB_CONTROL_DELETE));
	PyModule_AddObject(m, "SPOOLSS_MAJOR_VERSION_2008_VISTA", PyInt_FromLong(SPOOLSS_MAJOR_VERSION_2008_VISTA));
	PyModule_AddObject(m, "SPL_ARCH_W32ALPHA", PyString_FromString("W32ALPHA"));
	PyModule_AddObject(m, "SPOOL_REG_PRINTFORMNAME", PyString_FromString("printFormName"));
	PyModule_AddObject(m, "DMPAPER_B6_JIS_ROTATED", PyInt_FromLong(DMPAPER_B6_JIS_ROTATED));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_PRINT_PROCESSOR", PyInt_FromLong(JOB_NOTIFY_FIELD_PRINT_PROCESSOR));
	PyModule_AddObject(m, "PROCESSOR_INTEL_IA64", PyInt_FromLong(PROCESSOR_INTEL_IA64));
	PyModule_AddObject(m, "DEVMODE_PAPERLENGTH", PyInt_FromLong(DEVMODE_PAPERLENGTH));
	PyModule_AddObject(m, "DMSPEC_WIN95_98_ME", PyInt_FromLong(DMSPEC_WIN95_98_ME));
	PyModule_AddObject(m, "SPOOL_REG_SERVERNAME", PyString_FromString("serverName"));
	PyModule_AddObject(m, "SPOOLSS_DM_NUP_BORDER_PRINT", PyInt_FromLong(SPOOLSS_DM_NUP_BORDER_PRINT));
	PyModule_AddObject(m, "DMPAPER_JENV_CHOU4_ROTATED", PyInt_FromLong(DMPAPER_JENV_CHOU4_ROTATED));
	PyModule_AddObject(m, "DMPAPER_STATEMENT", PyInt_FromLong(DMPAPER_STATEMENT));
	PyModule_AddObject(m, "DMSPEC_NT4_AND_ABOVE", PyInt_FromLong(DMSPEC_NT4_AND_ABOVE));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMAXXEXTENT", PyString_FromString("printMaxXExtent"));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_RELEASE", PyInt_FromLong(SPOOLSS_JOB_CONTROL_RELEASE));
	PyModule_AddObject(m, "DSPRINT_REPUBLISH", PyInt_FromLong(DSPRINT_REPUBLISH));
	PyModule_AddObject(m, "DMPAPER_B6_JIS", PyInt_FromLong(DMPAPER_B6_JIS));
	PyModule_AddObject(m, "DMPAPER_PENV_4", PyInt_FromLong(DMPAPER_PENV_4));
	PyModule_AddObject(m, "PRINTER_STATUS_WAITING", PyInt_FromLong(PRINTER_STATUS_WAITING));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FLAGS_GDI_METAFILE_SPOOL", PyInt_FromLong(SPOOLSS_DM_PS_FLAGS_GDI_METAFILE_SPOOL));
	PyModule_AddObject(m, "SPOOLSS_DM_SIGNATURE_PSEXTRA", PyInt_FromLong(SPOOLSS_DM_SIGNATURE_PSEXTRA));
	PyModule_AddObject(m, "DMPAPER_P32KBIG_ROTATED", PyInt_FromLong(DMPAPER_P32KBIG_ROTATED));
	PyModule_AddObject(m, "NOTIFY_TABLE_TIME", PyInt_FromLong(NOTIFY_TABLE_TIME));
	PyModule_AddObject(m, "PROTOCOL_RAWTCP_TYPE", PyInt_FromLong(PROTOCOL_RAWTCP_TYPE));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_COMMENT", PyInt_FromLong(PRINTER_NOTIFY_FIELD_COMMENT));
	PyModule_AddObject(m, "SPOOLSS_MINOR_VERSION_98", PyInt_FromLong(SPOOLSS_MINOR_VERSION_98));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_PAGES_PRINTED", PyInt_FromLong(JOB_NOTIFY_FIELD_PAGES_PRINTED));
	PyModule_AddObject(m, "PRINTER_STATUS_PROCESSING", PyInt_FromLong(PRINTER_STATUS_PROCESSING));
	PyModule_AddObject(m, "DEVMODE_COLLATE", PyInt_FromLong(DEVMODE_COLLATE));
	PyModule_AddObject(m, "PRINTER_STATUS_PAUSED", PyInt_FromLong(PRINTER_STATUS_PAUSED));
	PyModule_AddObject(m, "PRINTER_CHANGE_PORT", PyInt_FromLong((PRINTER_CHANGE_ADD_PORT|PRINTER_CHANGE_CONFIGURE_PORT|PRINTER_CHANGE_DELETE_PORT)));
	PyModule_AddObject(m, "SPL_XCV_MONITOR_TCPMON", PyString_FromString(",XcvMonitor Standard TCP/IP Port"));
	PyModule_AddObject(m, "PRINTER_ACE_MANAGE_DOCUMENTS", PyInt_FromLong(SEC_GENERIC_ALL|READ_CONTROL_ACCESS));
	PyModule_AddObject(m, "SPOOLSS_DM_LAYOUT_NUP_9", PyInt_FromLong(SPOOLSS_DM_LAYOUT_NUP_9));
	PyModule_AddObject(m, "SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA", PyInt_FromLong(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMEDIASUPPORTED", PyString_FromString("printMediaSupported"));
	PyModule_AddObject(m, "PRINTER_STATUS_PAPER_PROBLEM", PyInt_FromLong(PRINTER_STATUS_PAPER_PROBLEM));
	PyModule_AddObject(m, "APD_COPY_NEW_FILES", PyInt_FromLong(APD_COPY_NEW_FILES));
	PyModule_AddObject(m, "PRINTER_CHANGE_DELETE_PRINT_PROCESSOR", PyInt_FromLong(PRINTER_CHANGE_DELETE_PRINT_PROCESSOR));
	PyModule_AddObject(m, "SPOOLSS_ARCHITECTURE_ALL", PyString_FromString("All"));
	PyModule_AddObject(m, "JOB_ACCESS_READ", PyInt_FromLong(JOB_ACCESS_READ));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_NOTIFY_NAME", PyInt_FromLong(JOB_NOTIFY_FIELD_NOTIFY_NAME));
	PyModule_AddObject(m, "DEVMODE_PRINTQUALITY", PyInt_FromLong(DEVMODE_PRINTQUALITY));
	PyModule_AddObject(m, "PRINTER_NOTIFY_INFO_DISCARDED", PyInt_FromLong(PRINTER_NOTIFY_INFO_DISCARDED));
	PyModule_AddObject(m, "SPOOLSS_MINOR_VERSION_2003_XP64", PyInt_FromLong(SPOOLSS_MINOR_VERSION_2003_XP64));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_BYTES_PRINTED", PyInt_FromLong(PRINTER_NOTIFY_FIELD_BYTES_PRINTED));
	PyModule_AddObject(m, "DMPAPER_A5_ROTATED", PyInt_FromLong(DMPAPER_A5_ROTATED));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_LOCATION", PyInt_FromLong(PRINTER_NOTIFY_FIELD_LOCATION));
	PyModule_AddObject(m, "PRINTER_ALL_ACCESS", PyInt_FromLong(SEC_STD_REQUIRED|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_DEVMODE", PyInt_FromLong(JOB_NOTIFY_FIELD_DEVMODE));
	PyModule_AddObject(m, "PRINTER_ENUM_EXPAND", PyInt_FromLong(PRINTER_ENUM_EXPAND));
	PyModule_AddObject(m, "DMPAPER_ENV_DL", PyInt_FromLong(DMPAPER_ENV_DL));
	PyModule_AddObject(m, "SPOOL_REG_FLAGS", PyString_FromString("flags"));
	PyModule_AddObject(m, "DMPAPER_PENV_3", PyInt_FromLong(DMPAPER_PENV_3));
	PyModule_AddObject(m, "PRINTER_EXECUTE", PyInt_FromLong(SEC_STD_READ_CONTROL|PRINTER_ACCESS_USE));
	PyModule_AddObject(m, "DMPAPER_ENV_B6", PyInt_FromLong(DMPAPER_ENV_B6));
	PyModule_AddObject(m, "DMDITHER_COARSE", PyInt_FromLong(DMDITHER_COARSE));
	PyModule_AddObject(m, "DMPAPER_FOLIO", PyInt_FromLong(DMPAPER_FOLIO));
	PyModule_AddObject(m, "SPOOLSS_ARCHITECTURE_ALL_CLUSTER", PyString_FromString("AllCluster"));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_USER_NAME", PyInt_FromLong(JOB_NOTIFY_FIELD_USER_NAME));
	PyModule_AddObject(m, "DEVMODE_LOGPIXELS", PyInt_FromLong(DEVMODE_LOGPIXELS));
	PyModule_AddObject(m, "PRINTER_CHANGE_ADD_FORM", PyInt_FromLong(PRINTER_CHANGE_ADD_FORM));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMACADDRESS", PyString_FromString("printMACAddress"));
	PyModule_AddObject(m, "SPOOL_REGVAL_PRINTWHILESPOOLING", PyString_FromString("PrintWhileSpooling"));
	PyModule_AddObject(m, "SPOOLSS_DM_UNI_QUALITY_MEDIUM", PyInt_FromLong(SPOOLSS_DM_UNI_QUALITY_MEDIUM));
	PyModule_AddObject(m, "SPOOLSS_PRINTER_CONTROL_SET_STATUS", PyInt_FromLong(SPOOLSS_PRINTER_CONTROL_SET_STATUS));
	PyModule_AddObject(m, "APD_COPY_TO_ALL_SPOOLERS", PyInt_FromLong(APD_COPY_TO_ALL_SPOOLERS));
	PyModule_AddObject(m, "DMPAPER_ENV_C3", PyInt_FromLong(DMPAPER_ENV_C3));
	PyModule_AddObject(m, "PRINTER_CHANGE_SET_PRINTER_DRIVER", PyInt_FromLong(PRINTER_CHANGE_SET_PRINTER_DRIVER));
	PyModule_AddObject(m, "SPOOLSS_DM_LAYOUT_NUP_2", PyInt_FromLong(SPOOLSS_DM_LAYOUT_NUP_2));
	PyModule_AddObject(m, "SPOOL_REGVAL_PRINTAFTERSPOOLED", PyString_FromString("PrintAfterSpooled"));
	PyModule_AddObject(m, "SPL_ARCH_WIN40", PyString_FromString("WIN40"));
	PyModule_AddObject(m, "DMPAPER_ENV_9", PyInt_FromLong(DMPAPER_ENV_9));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FLAGS_COMPRESS_BITMAP", PyInt_FromLong(SPOOLSS_DM_PS_FLAGS_COMPRESS_BITMAP));
	PyModule_AddObject(m, "DMPAPER_PENV_8_ROTATED", PyInt_FromLong(DMPAPER_PENV_8_ROTATED));
	PyModule_AddObject(m, "PRINTER_ENUM_NETWORK", PyInt_FromLong(PRINTER_ENUM_NETWORK));
	PyModule_AddObject(m, "SPOOL_PNPDATA_KEY", PyString_FromString("PnPData"));
	PyModule_AddObject(m, "DMPAPER_PENV_4_ROTATED", PyInt_FromLong(DMPAPER_PENV_4_ROTATED));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_DRIVER_NAME", PyInt_FromLong(PRINTER_NOTIFY_FIELD_DRIVER_NAME));
	PyModule_AddObject(m, "DMPAPER_JENV_KAKU2_ROTATED", PyInt_FromLong(DMPAPER_JENV_KAKU2_ROTATED));
	PyModule_AddObject(m, "PRINTER_STATUS_USER_INTERVENTION", PyInt_FromLong(PRINTER_STATUS_USER_INTERVENTION));
	PyModule_AddObject(m, "PRINTER_NOTIFY_TYPE", PyInt_FromLong(PRINTER_NOTIFY_TYPE));
	PyModule_AddObject(m, "SPOOLSS_PORT_TYPE_READ", PyInt_FromLong(SPOOLSS_PORT_TYPE_READ));
	PyModule_AddObject(m, "DMPAPER_B4_JIS_ROTATED", PyInt_FromLong(DMPAPER_B4_JIS_ROTATED));
	PyModule_AddObject(m, "JOB_STATUS_ERROR", PyInt_FromLong(JOB_STATUS_ERROR));
	PyModule_AddObject(m, "DMICMMETHOD_SYSTEM", PyInt_FromLong(DMICMMETHOD_SYSTEM));
	PyModule_AddObject(m, "DMDITHER_RESERVED8", PyInt_FromLong(DMDITHER_RESERVED8));
	PyModule_AddObject(m, "DMICM_CONTRAST", PyInt_FromLong(DMICM_CONTRAST));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_PSLEVEL_1", PyInt_FromLong(SPOOLSS_DM_PS_PSLEVEL_1));
	PyModule_AddObject(m, "DMPAPER_PENV_6", PyInt_FromLong(DMPAPER_PENV_6));
	PyModule_AddObject(m, "DEVMODE_PELSHEIGHT", PyInt_FromLong(DEVMODE_PELSHEIGHT));
	PyModule_AddObject(m, "PRINTER_ACE_PRINT", PyInt_FromLong(GENERIC_EXECUTE_ACCESS|READ_CONTROL_ACCESS|PRINTER_ACCESS_USE));
	PyModule_AddObject(m, "SPOOL_REG_PRINTRATE", PyString_FromString("printRate"));
	PyModule_AddObject(m, "DMPAPER_EXECUTIVE", PyInt_FromLong(DMPAPER_EXECUTIVE));
	PyModule_AddObject(m, "APD_RETURN_BLOCKING_STATUS_CODE", PyInt_FromLong(APD_RETURN_BLOCKING_STATUS_CODE));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMINYEXTENT", PyString_FromString("printMinYExtent"));
	PyModule_AddObject(m, "DMDITHER_NONE", PyInt_FromLong(DMDITHER_NONE));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_VERSION_NT35", PyInt_FromLong(SPOOLSS_DRIVER_VERSION_NT35));
	PyModule_AddObject(m, "PRINTER_ENUM_ICON7", PyInt_FromLong(PRINTER_ENUM_ICON7));
	PyModule_AddObject(m, "DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED", PyInt_FromLong(DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED));
	PyModule_AddObject(m, "PROCESSOR_ARCHITECTURE_IA64", PyInt_FromLong(PROCESSOR_ARCHITECTURE_IA64));
	PyModule_AddObject(m, "PRINTER_ENUM_FAVORITE", PyInt_FromLong(PRINTER_ENUM_FAVORITE));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_POSITION", PyInt_FromLong(JOB_NOTIFY_FIELD_POSITION));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_TS", PyInt_FromLong(PRINTER_ATTRIBUTE_TS));
	PyModule_AddObject(m, "SPOOL_REG_SHORTSERVERNAME", PyString_FromString("shortServerName"));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_CJOBS", PyInt_FromLong(PRINTER_NOTIFY_FIELD_CJOBS));
	PyModule_AddObject(m, "SPOOL_REG_PRINTCOLOR", PyString_FromString("printColor"));
	PyModule_AddObject(m, "DMPAPER_PENV_5_ROTATED", PyInt_FromLong(DMPAPER_PENV_5_ROTATED));
	PyModule_AddObject(m, "DMICMMETHOD_DRIVER", PyInt_FromLong(DMICMMETHOD_DRIVER));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_SUBMITTED", PyInt_FromLong(JOB_NOTIFY_FIELD_SUBMITTED));
	PyModule_AddObject(m, "PROTOCOL_LPR_TYPE", PyInt_FromLong(PROTOCOL_LPR_TYPE));
	PyModule_AddObject(m, "SPOOL_REG_DRIVERVERSION", PyString_FromString("driverVersion"));
	PyModule_AddObject(m, "SPOOL_REG_PRINTRATEUNIT", PyString_FromString("printRateUnit"));
	PyModule_AddObject(m, "PRINTER_CHANGE_PRINT_PROCESSOR", PyInt_FromLong(0x07000000));
	PyModule_AddObject(m, "DMPAPER_P32KBIG", PyInt_FromLong(DMPAPER_P32KBIG));
	PyModule_AddObject(m, "PORT_STATUS_USER_INTERVENTION", PyInt_FromLong(PORT_STATUS_USER_INTERVENTION));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_TOTAL_BYTES", PyInt_FromLong(JOB_NOTIFY_FIELD_TOTAL_BYTES));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_PRINTER_NAME", PyInt_FromLong(JOB_NOTIFY_FIELD_PRINTER_NAME));
	PyModule_AddObject(m, "PRINTER_ENUM_CONNECTIONS", PyInt_FromLong(PRINTER_ENUM_CONNECTIONS));
	PyModule_AddObject(m, "DSPRINT_PENDING", PyInt_FromLong(DSPRINT_PENDING));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_SERVER_NAME", PyInt_FromLong(PRINTER_NOTIFY_FIELD_SERVER_NAME));
	PyModule_AddObject(m, "PRINTER_CHANGE_SET_JOB", PyInt_FromLong(PRINTER_CHANGE_SET_JOB));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_RETAIN", PyInt_FromLong(SPOOLSS_JOB_CONTROL_RETAIN));
	PyModule_AddObject(m, "SPL_ARCH_W32PPC", PyString_FromString("W32PPC"));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_PRIORITY", PyInt_FromLong(PRINTER_NOTIFY_FIELD_PRIORITY));
	PyModule_AddObject(m, "SERVER_READ", PyInt_FromLong(SEC_STD_READ_CONTROL|SERVER_ACCESS_ENUMERATE));
	PyModule_AddObject(m, "PRINTER_CHANGE_SET_FORM", PyInt_FromLong(PRINTER_CHANGE_SET_FORM));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_DEFAULT", PyInt_FromLong(PRINTER_ATTRIBUTE_DEFAULT));
	PyModule_AddObject(m, "SPOOL_REG_LOCATION", PyString_FromString("location"));
	PyModule_AddObject(m, "PRINTER_CHANGE_DELETE_PRINTER_DRIVER", PyInt_FromLong(PRINTER_CHANGE_DELETE_PRINTER_DRIVER));
	PyModule_AddObject(m, "DEVMODE_MEDIATYPE", PyInt_FromLong(DEVMODE_MEDIATYPE));
	PyModule_AddObject(m, "DEVMODE_ORIENTATION", PyInt_FromLong(DEVMODE_ORIENTATION));
	PyModule_AddObject(m, "DEVMODE_YRESOLUTION", PyInt_FromLong(DEVMODE_YRESOLUTION));
	PyModule_AddObject(m, "SPOOLSS_DM_NUP_DIRECTION_T2B_L2R", PyInt_FromLong(SPOOLSS_DM_NUP_DIRECTION_T2B_L2R));
	PyModule_AddObject(m, "DMPAPER_A5", PyInt_FromLong(DMPAPER_A5));
	PyModule_AddObject(m, "PRINTER_STATUS_MANUAL_FEED", PyInt_FromLong(PRINTER_STATUS_MANUAL_FEED));
	PyModule_AddObject(m, "PORT_STATUS_TYPE_ERROR", PyInt_FromLong(PORT_STATUS_TYPE_ERROR));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY", PyInt_FromLong(PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY));
	PyModule_AddObject(m, "SPOOL_REG_OPERATINGSYSTEMHOTFIX", PyString_FromString("operatingSystemHotfix"));
	PyModule_AddObject(m, "SPOOL_REG_PRIORITY", PyString_FromString("priority"));
	PyModule_AddObject(m, "JOB_STATUS_USER_INTERVENTION", PyInt_FromLong(JOB_STATUS_USER_INTERVENTION));
	PyModule_AddObject(m, "PRINTER_STATUS_BUSY", PyInt_FromLong(PRINTER_STATUS_BUSY));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMAXRESOLUTIONSUPPORTED", PyString_FromString("printMaxResolutionSupported"));
	PyModule_AddObject(m, "PRINTER_DRIVER_PACKAGE_AWARE", PyInt_FromLong(PRINTER_DRIVER_PACKAGE_AWARE));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_TOTAL_PAGES", PyInt_FromLong(JOB_NOTIFY_FIELD_TOTAL_PAGES));
	PyModule_AddObject(m, "DMPAPER_PENV_10", PyInt_FromLong(DMPAPER_PENV_10));
	PyModule_AddObject(m, "PRINTER_STATUS_PAPER_JAM", PyInt_FromLong(PRINTER_STATUS_PAPER_JAM));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST", PyInt_FromLong(SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST));
	PyModule_AddObject(m, "SERVER_ALL_ACCESS", PyInt_FromLong(SEC_STD_REQUIRED|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE));
	PyModule_AddObject(m, "DMPAPER_B4", PyInt_FromLong(DMPAPER_B4));
	PyModule_AddObject(m, "DMICMMETHOD_DEVICE", PyInt_FromLong(DMICMMETHOD_DEVICE));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_PAUSE", PyInt_FromLong(SPOOLSS_JOB_CONTROL_PAUSE));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR", PyInt_FromLong(PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PyInt_FromLong(PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST));
	PyModule_AddObject(m, "PRINTER_ENUM_ICON8", PyInt_FromLong(PRINTER_ENUM_ICON8));
	PyModule_AddObject(m, "PORT_STATUS_TYPE_WARNING", PyInt_FromLong(PORT_STATUS_TYPE_WARNING));
	PyModule_AddObject(m, "PRINTER_STATUS_PENDING_DELETION", PyInt_FromLong(PRINTER_STATUS_PENDING_DELETION));
	PyModule_AddObject(m, "PORT_STATUS_PAPER_JAM", PyInt_FromLong(PORT_STATUS_PAPER_JAM));
	PyModule_AddObject(m, "SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS", PyInt_FromLong(SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS));
	PyModule_AddObject(m, "DMPAPER_ENV_14", PyInt_FromLong(DMPAPER_ENV_14));
	PyModule_AddObject(m, "DMPAPER_PENV_5", PyInt_FromLong(DMPAPER_PENV_5));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_NETWORK", PyInt_FromLong(PRINTER_ATTRIBUTE_NETWORK));
	PyModule_AddObject(m, "PRINTER_ENUM_NAME", PyInt_FromLong(PRINTER_ENUM_NAME));
	PyModule_AddObject(m, "PRINTER_ENUM_ICON4", PyInt_FromLong(PRINTER_ENUM_ICON4));
	PyModule_AddObject(m, "DMDITHER_RESERVED9", PyInt_FromLong(DMDITHER_RESERVED9));
	PyModule_AddObject(m, "PORT_STATUS_OUT_OF_MEMORY", PyInt_FromLong(PORT_STATUS_OUT_OF_MEMORY));
	PyModule_AddObject(m, "SPOOL_OID_KEY", PyString_FromString("OID"));
	PyModule_AddObject(m, "JOB_STATUS_PAPEROUT", PyInt_FromLong(JOB_STATUS_PAPEROUT));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_WORK_OFFLINE", PyInt_FromLong(PRINTER_ATTRIBUTE_WORK_OFFLINE));
	PyModule_AddObject(m, "DMPAPER_LETTERSMALL", PyInt_FromLong(DMPAPER_LETTERSMALL));
	PyModule_AddObject(m, "DMPAPER_LEGAL", PyInt_FromLong(DMPAPER_LEGAL));
	PyModule_AddObject(m, "SPOOL_REG_DEFAULTPRIORITY", PyString_FromString("defaultPriority"));
	PyModule_AddObject(m, "SPOOLSS_DM_LAYOUT_NUP_4", PyInt_FromLong(SPOOLSS_DM_LAYOUT_NUP_4));
	PyModule_AddObject(m, "DEVMODE_SCALE", PyInt_FromLong(DEVMODE_SCALE));
	PyModule_AddObject(m, "SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING", PyInt_FromLong(SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING));
	PyModule_AddObject(m, "DMPAPER_P16K_ROTATED", PyInt_FromLong(DMPAPER_P16K_ROTATED));
	PyModule_AddObject(m, "DMSPEC_NT3", PyInt_FromLong(DMSPEC_NT3));
	PyModule_AddObject(m, "JOB_STATUS_BLOCKED_DEVQ", PyInt_FromLong(JOB_STATUS_BLOCKED_DEVQ));
	PyModule_AddObject(m, "PRINTER_ENUM_HIDE", PyInt_FromLong(PRINTER_ENUM_HIDE));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_HIDDEN", PyInt_FromLong(PRINTER_ATTRIBUTE_HIDDEN));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMEMORY", PyString_FromString("printMemory"));
	PyModule_AddObject(m, "PORT_STATUS_PAPER_PROBLEM", PyInt_FromLong(PORT_STATUS_PAPER_PROBLEM));
	PyModule_AddObject(m, "PRINTER_NOTIFY_INFO_DISCARDNOTED", PyInt_FromLong(PRINTER_NOTIFY_INFO_DISCARDNOTED));
	PyModule_AddObject(m, "DMPAPER_ENV_C65", PyInt_FromLong(DMPAPER_ENV_C65));
	PyModule_AddObject(m, "PORT_STATUS_OUTPUT_BIN_FULL", PyInt_FromLong(PORT_STATUS_OUTPUT_BIN_FULL));
	PyModule_AddObject(m, "PRINTER_STATUS_OUTPUT_BIN_FULL", PyInt_FromLong(PRINTER_STATUS_OUTPUT_BIN_FULL));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_FILE_TYPE_HELP", PyInt_FromLong(SPOOLSS_DRIVER_FILE_TYPE_HELP));
	PyModule_AddObject(m, "JOB_STATUS_QUEUED", PyInt_FromLong(0x0000));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_OPTIMIZE_EPS", PyInt_FromLong(SPOOLSS_DM_PS_OPTIMIZE_EPS));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_CANCEL", PyInt_FromLong(SPOOLSS_JOB_CONTROL_CANCEL));
	PyModule_AddObject(m, "PORT_STATUS_PAPER_OUT", PyInt_FromLong(PORT_STATUS_PAPER_OUT));
	PyModule_AddObject(m, "DEVMODE_TTOPTION", PyInt_FromLong(DEVMODE_TTOPTION));
	PyModule_AddObject(m, "DEVMODE_COLOR", PyInt_FromLong(DEVMODE_COLOR));
	PyModule_AddObject(m, "DMRES_MEDIUM", PyInt_FromLong(DMRES_MEDIUM));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_SHARED", PyInt_FromLong(PRINTER_ATTRIBUTE_SHARED));
	PyModule_AddObject(m, "DPD_DELETE_SPECIFIC_VERSION", PyInt_FromLong(DPD_DELETE_SPECIFIC_VERSION));
	PyModule_AddObject(m, "DEVMODE_DUPLEX", PyInt_FromLong(DEVMODE_DUPLEX));
	PyModule_AddObject(m, "SPL_ARCH_W32MIPS", PyString_FromString("W32MIPS"));
	PyModule_AddObject(m, "SPOOL_REG_PRINTLANGUAGE", PyString_FromString("printLanguage"));
	PyModule_AddObject(m, "SPOOL_PRINTERDATA_KEY", PyString_FromString("PrinterDriverData"));
	PyModule_AddObject(m, "PRINTER_STATUS_PRINTING", PyInt_FromLong(PRINTER_STATUS_PRINTING));
	PyModule_AddObject(m, "SPOOL_REG_PRINTSHARENAME", PyString_FromString("printShareName"));
	PyModule_AddObject(m, "DMPAPER_LETTER", PyInt_FromLong(DMPAPER_LETTER));
	PyModule_AddObject(m, "APD_DONT_COPY_FILES_TO_CLUSTER", PyInt_FromLong(APD_DONT_COPY_FILES_TO_CLUSTER));
	PyModule_AddObject(m, "DMPAPER_10X14", PyInt_FromLong(DMPAPER_10X14));
	PyModule_AddObject(m, "SPOOL_REG_PRINTERNAME", PyString_FromString("printerName"));
	PyModule_AddObject(m, "DMICM_ABS_COLORIMETRIC", PyInt_FromLong(DMICM_ABS_COLORIMETRIC));
	PyModule_AddObject(m, "PRINTER_CHANGE_DELETE_PRINTER", PyInt_FromLong(PRINTER_CHANGE_DELETE_PRINTER));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_VERSION_9X", PyInt_FromLong(SPOOLSS_DRIVER_VERSION_9X));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_RESUME", PyInt_FromLong(SPOOLSS_JOB_CONTROL_RESUME));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_ATTRIBUTES", PyInt_FromLong(PRINTER_NOTIFY_FIELD_ATTRIBUTES));
	PyModule_AddObject(m, "MAXDEVICENAME", PyInt_FromLong(32));
	PyModule_AddObject(m, "SPOOL_REG_OPERATINGSYSTEM", PyString_FromString("operatingSystem"));
	PyModule_AddObject(m, "PORT_STATUS_NO_TONER", PyInt_FromLong(PORT_STATUS_NO_TONER));
	PyModule_AddObject(m, "DMDITHER_LINEART", PyInt_FromLong(DMDITHER_LINEART));
	PyModule_AddObject(m, "DMPAPER_PENV_3_ROTATED", PyInt_FromLong(DMPAPER_PENV_3_ROTATED));
	PyModule_AddObject(m, "DMPAPER_FANFOLD_US", PyInt_FromLong(DMPAPER_FANFOLD_US));
	PyModule_AddObject(m, "DSPRINT_PUBLISH", PyInt_FromLong(DSPRINT_PUBLISH));
	PyModule_AddObject(m, "DMPAPER_ENV_C5", PyInt_FromLong(DMPAPER_ENV_C5));
	PyModule_AddObject(m, "SPOOL_REG_PRINTNETWORKADDRESS", PyString_FromString("printNetworkAddress"));
	PyModule_AddObject(m, "DMPAPER_ENV_B4", PyInt_FromLong(DMPAPER_ENV_B4));
	PyModule_AddObject(m, "DMDITHER_GRAYSCALE", PyInt_FromLong(DMDITHER_GRAYSCALE));
	PyModule_AddObject(m, "DEVMODE_POSITION", PyInt_FromLong(DEVMODE_POSITION));
	PyModule_AddObject(m, "SPOOLSS_DEFAULT_SERVER_PATH", PyString_FromString("C:\\WINDOWS\\system32\\spool"));
	PyModule_AddObject(m, "SPOOL_REG_URL", PyString_FromString("url"));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_UNTIL_TIME", PyInt_FromLong(JOB_NOTIFY_FIELD_UNTIL_TIME));
	PyModule_AddObject(m, "SPL_ARCH_IA64", PyString_FromString("IA64"));
	PyModule_AddObject(m, "PRINTER_ENUM_DEFAULT", PyInt_FromLong(PRINTER_ENUM_DEFAULT));
	PyModule_AddObject(m, "DMPAPER_JENV_CHOU3_ROTATED", PyInt_FromLong(DMPAPER_JENV_CHOU3_ROTATED));
	PyModule_AddObject(m, "DEVMODE_FORMNAME", PyInt_FromLong(DEVMODE_FORMNAME));
	PyModule_AddObject(m, "SERVER_WRITE", PyInt_FromLong(STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE));
	PyModule_AddObject(m, "JOB_NOTIFY_TYPE", PyInt_FromLong(JOB_NOTIFY_TYPE));
	PyModule_AddObject(m, "PRINTER_STATUS_POWER_SAVE", PyInt_FromLong(PRINTER_STATUS_POWER_SAVE));
	PyModule_AddObject(m, "SPOOLSS_PORT_TYPE_WRITE", PyInt_FromLong(SPOOLSS_PORT_TYPE_WRITE));
	PyModule_AddObject(m, "SPOOL_REG_UNCNAME", PyString_FromString("uNCName"));
	PyModule_AddObject(m, "SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED", PyInt_FromLong(SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_SHARE_NAME", PyInt_FromLong(PRINTER_NOTIFY_FIELD_SHARE_NAME));
	PyModule_AddObject(m, "DMPAPER_ENV_C4", PyInt_FromLong(DMPAPER_ENV_C4));
	PyModule_AddObject(m, "PRINTER_ENUM_ICON1", PyInt_FromLong(PRINTER_ENUM_ICON1));
	PyModule_AddObject(m, "PRINTER_CHANGE_TIMEOUT", PyInt_FromLong(PRINTER_CHANGE_TIMEOUT));
	PyModule_AddObject(m, "DMMEDIA_GLOSSY", PyInt_FromLong(DMMEDIA_GLOSSY));
	PyModule_AddObject(m, "SPOOLSS_PRINTER_CONTROL_PAUSE", PyInt_FromLong(SPOOLSS_PRINTER_CONTROL_PAUSE));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_TOTAL_PAGES", PyInt_FromLong(PRINTER_NOTIFY_FIELD_TOTAL_PAGES));
	PyModule_AddObject(m, "SPOOLSS_FORM_PRINTER", PyInt_FromLong(SPOOLSS_FORM_PRINTER));
	PyModule_AddObject(m, "PRINTER_CHANGE_SERVER", PyInt_FromLong(PRINTER_CHANGE_SERVER));
	PyModule_AddObject(m, "SPOOLSS_MINOR_VERSION_XP", PyInt_FromLong(SPOOLSS_MINOR_VERSION_XP));
	PyModule_AddObject(m, "PORT_STATUS_WARMING_UP", PyInt_FromLong(PORT_STATUS_WARMING_UP));
	PyModule_AddObject(m, "DMBIN_AUTO", PyInt_FromLong(DMBIN_AUTO));
	PyModule_AddObject(m, "SPOOLSS_MAJOR_VERSION_2000_2003_XP", PyInt_FromLong(SPOOLSS_MAJOR_VERSION_2000_2003_XP));
	PyModule_AddObject(m, "DMDUP_HORIZONTAL", PyInt_FromLong(DMDUP_HORIZONTAL));
	PyModule_AddObject(m, "DMPAPER_A4", PyInt_FromLong(DMPAPER_A4));
	PyModule_AddObject(m, "SPOOLSS_FORM_STRING_TYPE_NONE", PyInt_FromLong(SPOOLSS_FORM_STRING_TYPE_NONE));
	PyModule_AddObject(m, "DMPAPER_P16K", PyInt_FromLong(DMPAPER_P16K));
	PyModule_AddObject(m, "DSPRINT_UNPUBLISH", PyInt_FromLong(DSPRINT_UNPUBLISH));
	PyModule_AddObject(m, "DMBIN_ENVMANUAL", PyInt_FromLong(DMBIN_ENVMANUAL));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_DATATYPE", PyInt_FromLong(PRINTER_NOTIFY_FIELD_DATATYPE));
	PyModule_AddObject(m, "DEVMODE_ICMINTENT", PyInt_FromLong(DEVMODE_ICMINTENT));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_PSLEVEL_2", PyInt_FromLong(SPOOLSS_DM_PS_PSLEVEL_2));
	PyModule_AddObject(m, "SPOOL_REG_PRINTSTATUS", PyString_FromString("printStatus"));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST", PyInt_FromLong(SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST));
	PyModule_AddObject(m, "PROCESSOR_ARCHITECTURE_INTEL", PyInt_FromLong(PROCESSOR_ARCHITECTURE_INTEL));
	PyModule_AddObject(m, "DMPAPER_PENV_9_ROTATED", PyInt_FromLong(DMPAPER_PENV_9_ROTATED));
	PyModule_AddObject(m, "PRINTER_ENUM_SHARED", PyInt_FromLong(PRINTER_ENUM_SHARED));
	PyModule_AddObject(m, "SPOOLSS_DEBUGGING_BUILD", PyInt_FromLong(SPOOLSS_DEBUGGING_BUILD));
	PyModule_AddObject(m, "DMPAPER_ENV_10", PyInt_FromLong(DMPAPER_ENV_10));
	PyModule_AddObject(m, "DMCOLLATE_FALSE", PyInt_FromLong(DMCOLLATE_FALSE));
	PyModule_AddObject(m, "PRINTER_ENUM_ICONMASK", PyInt_FromLong((PRINTER_ENUM_ICON1|PRINTER_ENUM_ICON2|PRINTER_ENUM_ICON3|PRINTER_ENUM_ICON4|PRINTER_ENUM_ICON5|PRINTER_ENUM_ICON6|PRINTER_ENUM_ICON7|PRINTER_ENUM_ICON8)));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_PARAMETERS", PyInt_FromLong(JOB_NOTIFY_FIELD_PARAMETERS));
	PyModule_AddObject(m, "DEVMODE_COPIES", PyInt_FromLong(DEVMODE_COPIES));
	PyModule_AddObject(m, "DMPAPER_DBL_JAPANESE_POSTCARD", PyInt_FromLong(DMPAPER_DBL_JAPANESE_POSTCARD));
	PyModule_AddObject(m, "PRINTER_NOTIFY_INFO_COLOR_MISMATCH", PyInt_FromLong(PRINTER_NOTIFY_INFO_COLOR_MISMATCH));
	PyModule_AddObject(m, "PRINTER_CHANGE_FORM", PyInt_FromLong((PRINTER_CHANGE_ADD_FORM|PRINTER_CHANGE_SET_FORM|PRINTER_CHANGE_DELETE_FORM)));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMAXCOPIES", PyString_FromString("printMaxCopies"));
	PyModule_AddObject(m, "DEVMODE_PELSWIDTH", PyInt_FromLong(DEVMODE_PELSWIDTH));
	PyModule_AddObject(m, "SPOOLSS_DM_BOOKLET_RIGHT_FLIP", PyInt_FromLong(SPOOLSS_DM_BOOKLET_RIGHT_FLIP));
	PyModule_AddObject(m, "JOB_ACCESS_ADMINISTER", PyInt_FromLong(JOB_ACCESS_ADMINISTER));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_PRINTER_NAME", PyInt_FromLong(PRINTER_NOTIFY_FIELD_PRINTER_NAME));
	PyModule_AddObject(m, "PROCESSOR_INTEL_386", PyInt_FromLong(PROCESSOR_INTEL_386));
	PyModule_AddObject(m, "DMPAPER_DSHEET", PyInt_FromLong(DMPAPER_DSHEET));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FLAGS_ROTATE_180", PyInt_FromLong(SPOOLSS_DM_PS_FLAGS_ROTATE_180));
	PyModule_AddObject(m, "PRINTER_ENUM_REMOTE", PyInt_FromLong(PRINTER_ENUM_REMOTE));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_FLAGS_DRV_ERROR_HANDLER", PyInt_FromLong(SPOOLSS_DM_PS_FLAGS_DRV_ERROR_HANDLER));
	PyModule_AddObject(m, "DMMEDIA_TRANSPARENCY", PyInt_FromLong(DMMEDIA_TRANSPARENCY));
	PyModule_AddObject(m, "NOTIFY_TABLE_STRING", PyInt_FromLong(NOTIFY_TABLE_STRING));
	PyModule_AddObject(m, "DMDUP_SIMPLEX", PyInt_FromLong(DMDUP_SIMPLEX));
	PyModule_AddObject(m, "SPOOLSS_DM_BOOKLET_LEFT_FLIP", PyInt_FromLong(SPOOLSS_DM_BOOKLET_LEFT_FLIP));
	PyModule_AddObject(m, "SERVER_ACCESS_ENUMERATE", PyInt_FromLong(SERVER_ACCESS_ENUMERATE));
	PyModule_AddObject(m, "PRINTER_CHANGE_DELETE_PORT", PyInt_FromLong(PRINTER_CHANGE_DELETE_PORT));
	PyModule_AddObject(m, "SPOOLSS_PRINTER_CONTROL_PURGE", PyInt_FromLong(SPOOLSS_PRINTER_CONTROL_PURGE));
	PyModule_AddObject(m, "DMPAPER_PENV_8", PyInt_FromLong(DMPAPER_PENV_8));
	PyModule_AddObject(m, "DMRES_HIGH", PyInt_FromLong(DMRES_HIGH));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_TTDLFMT_TYPE_1", PyInt_FromLong(SPOOLSS_DM_PS_TTDLFMT_TYPE_1));
	PyModule_AddObject(m, "SPOOLSS_DM_UNI_QUALITY_BEST", PyInt_FromLong(SPOOLSS_DM_UNI_QUALITY_BEST));
	PyModule_AddObject(m, "SPOOLSS_ARCHITECTURE_4_0", PyString_FromString("Windows 4.0"));
	PyModule_AddObject(m, "DMPAPER_11X17", PyInt_FromLong(DMPAPER_11X17));
	PyModule_AddObject(m, "PRINTER_ENUM_ICON6", PyInt_FromLong(PRINTER_ENUM_ICON6));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_TIME", PyInt_FromLong(JOB_NOTIFY_FIELD_TIME));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_OBJECT_GUID", PyInt_FromLong(PRINTER_NOTIFY_FIELD_OBJECT_GUID));
	PyModule_AddObject(m, "DMPAPER_P32K", PyInt_FromLong(DMPAPER_P32K));
	PyModule_AddObject(m, "SPL_TCPIP_PORT", PyString_FromString("Standard TCP/IP Port"));
	PyModule_AddObject(m, "DMBIN_UPPER", PyInt_FromLong(DMBIN_UPPER));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_PSLEVEL_3", PyInt_FromLong(SPOOLSS_DM_PS_PSLEVEL_3));
	PyModule_AddObject(m, "SPOOLSS_FORM_STRING_TYPE_LANG_PAIR", PyInt_FromLong(SPOOLSS_FORM_STRING_TYPE_LANG_PAIR));
	PyModule_AddObject(m, "SPOOL_REG_PRINTSTAPLINGSUPPORTED", PyString_FromString("printStaplingSupported"));
	PyModule_AddObject(m, "SPOOL_REG_PRINTNUMBERUP", PyString_FromString("printNumberUp"));
	PyModule_AddObject(m, "PRINTER_STATUS_PAPER_OUT", PyInt_FromLong(PRINTER_STATUS_PAPER_OUT));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_OPTIMIZE_SPEED", PyInt_FromLong(SPOOLSS_DM_PS_OPTIMIZE_SPEED));
	PyModule_AddObject(m, "SERVER_ACCESS_ADMINISTER", PyInt_FromLong(SERVER_ACCESS_ADMINISTER));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_BYTES_PRINTED", PyInt_FromLong(JOB_NOTIFY_FIELD_BYTES_PRINTED));
	PyModule_AddObject(m, "PRINTER_ENUM_LOCAL", PyInt_FromLong(PRINTER_ENUM_LOCAL));
	PyModule_AddObject(m, "DMNUP_SYSTEM", PyInt_FromLong(DMNUP_SYSTEM));
	PyModule_AddObject(m, "DPD_DELETE_UNUSED_FILES", PyInt_FromLong(DPD_DELETE_UNUSED_FILES));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_TTDLFMT_TYPE_3", PyInt_FromLong(SPOOLSS_DM_PS_TTDLFMT_TYPE_3));
	PyModule_AddObject(m, "PRINTER_STATUS_OUT_OF_MEMORY", PyInt_FromLong(PRINTER_STATUS_OUT_OF_MEMORY));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_ENABLE_BIDI", PyInt_FromLong(PRINTER_ATTRIBUTE_ENABLE_BIDI));
	PyModule_AddObject(m, "DMPAPER_ENV_C6", PyInt_FromLong(DMPAPER_ENV_C6));
	PyModule_AddObject(m, "SPOOLSS_DM_NUP_BORDER_NONE", PyInt_FromLong(SPOOLSS_DM_NUP_BORDER_NONE));
	PyModule_AddObject(m, "SPOOL_REG_PORTNAME", PyString_FromString("portName"));
	PyModule_AddObject(m, "DMBIN_FORMSOURCE", PyInt_FromLong(DMBIN_FORMSOURCE));
	PyModule_AddObject(m, "PRINTER_ACCESS_USE", PyInt_FromLong(PRINTER_ACCESS_USE));
	PyModule_AddObject(m, "DMPAPER_A3_ROTATED", PyInt_FromLong(DMPAPER_A3_ROTATED));
	PyModule_AddObject(m, "APD_COPY_ALL_FILES", PyInt_FromLong(APD_COPY_ALL_FILES));
	PyModule_AddObject(m, "DMPAPER_TABLOID", PyInt_FromLong(DMPAPER_TABLOID));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_STATUS_STRING", PyInt_FromLong(JOB_NOTIFY_FIELD_STATUS_STRING));
	PyModule_AddObject(m, "SPOOLSS_DRIVER_FILE_TYPE_OTHER", PyInt_FromLong(SPOOLSS_DRIVER_FILE_TYPE_OTHER));
	PyModule_AddObject(m, "NOTIFY_TABLE_DWORD", PyInt_FromLong(NOTIFY_TABLE_DWORD));
	PyModule_AddObject(m, "DEVMODE_PAPERSIZE", PyInt_FromLong(DEVMODE_PAPERSIZE));
	PyModule_AddObject(m, "SPOOLSS_PORT_TYPE_REDIRECTED", PyInt_FromLong(SPOOLSS_PORT_TYPE_REDIRECTED));
	PyModule_AddObject(m, "DMPAPER_JENV_KAKU2", PyInt_FromLong(DMPAPER_JENV_KAKU2));
	PyModule_AddObject(m, "PORT_STATUS_POWER_SAVE", PyInt_FromLong(PORT_STATUS_POWER_SAVE));
	PyModule_AddObject(m, "DMPAPER_A3", PyInt_FromLong(DMPAPER_A3));
	PyModule_AddObject(m, "JOB_STATUS_DELETED", PyInt_FromLong(JOB_STATUS_DELETED));
	PyModule_AddObject(m, "DMPAPER_12X11", PyInt_FromLong(DMPAPER_12X11));
	PyModule_AddObject(m, "JOB_EXECUTE", PyInt_FromLong(SEC_STD_READ_CONTROL|JOB_ACCESS_ADMINISTER));
	PyModule_AddObject(m, "DMICMMETHOD_NONE", PyInt_FromLong(DMICMMETHOD_NONE));
	PyModule_AddObject(m, "DMPAPER_JAPANESE_POSTCARD_ROTATED", PyInt_FromLong(DMPAPER_JAPANESE_POSTCARD_ROTATED));
	PyModule_AddObject(m, "DMPAPER_FANFOLD_STD_GERMAN", PyInt_FromLong(DMPAPER_FANFOLD_STD_GERMAN));
	PyModule_AddObject(m, "DEVMODE_ICMMETHOD", PyInt_FromLong(DEVMODE_ICMMETHOD));
	PyModule_AddObject(m, "SPL_ARCH_X64", PyString_FromString("x64"));
	PyModule_AddObject(m, "PRINTER_STATUS_DOOR_OPEN", PyInt_FromLong(PRINTER_STATUS_DOOR_OPEN));
	PyModule_AddObject(m, "SPOOL_REG_BYTESPERMINUTE", PyString_FromString("bytesPerMinute"));
	PyModule_AddObject(m, "SPOOLSS_FORM_USER", PyInt_FromLong(SPOOLSS_FORM_USER));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_DOCUMENT", PyInt_FromLong(JOB_NOTIFY_FIELD_DOCUMENT));
	PyModule_AddObject(m, "DMPAPER_PENV_10_ROTATED", PyInt_FromLong(DMPAPER_PENV_10_ROTATED));
	PyModule_AddObject(m, "SPL_LOCAL_PORT", PyString_FromString("Local Port"));
	PyModule_AddObject(m, "PRINTER_ACE_FULL_CONTROL", PyInt_FromLong(SEC_GENERIC_ALL|PRINTER_ALL_ACCESS));
	PyModule_AddObject(m, "SPOOLSS_PRINTER_CONTROL_RESUME", PyInt_FromLong(SPOOLSS_PRINTER_CONTROL_RESUME));
	PyModule_AddObject(m, "DMPAPER_ENV_11", PyInt_FromLong(DMPAPER_ENV_11));
	PyModule_AddObject(m, "PORT_STATUS_OFFLINE", PyInt_FromLong(PORT_STATUS_OFFLINE));
	PyModule_AddObject(m, "PRINTER_NOTIFY_FIELD_AVERAGE_PPM", PyInt_FromLong(PRINTER_NOTIFY_FIELD_AVERAGE_PPM));
	PyModule_AddObject(m, "SPOOL_REG_PRINTMEDIAREADY", PyString_FromString("printMediaReady"));
	PyModule_AddObject(m, "SPOOL_REG_PRINTSPOOLING", PyString_FromString("printSpooling"));
	PyModule_AddObject(m, "JOB_ALL_ACCESS", PyInt_FromLong(SEC_STD_REQUIRED|JOB_ACCESS_ADMINISTER));
	PyModule_AddObject(m, "DMPAPER_PENV_9", PyInt_FromLong(DMPAPER_PENV_9));
	PyModule_AddObject(m, "DMBIN_MANUAL", PyInt_FromLong(DMBIN_MANUAL));
	PyModule_AddObject(m, "DMRES_MONOCHROME", PyInt_FromLong(DMRES_MONOCHROME));
	PyModule_AddObject(m, "SPOOLSS_MINOR_VERSION_0", PyInt_FromLong(SPOOLSS_MINOR_VERSION_0));
	PyModule_AddObject(m, "JOB_NOTIFY_FIELD_DRIVER_NAME", PyInt_FromLong(JOB_NOTIFY_FIELD_DRIVER_NAME));
	PyModule_AddObject(m, "SPOOLSS_DM_LAYOUT_NUP_6", PyInt_FromLong(SPOOLSS_DM_LAYOUT_NUP_6));
	PyModule_AddObject(m, "PRINTER_CHANGE_DELETE_JOB", PyInt_FromLong(PRINTER_CHANGE_DELETE_JOB));
	PyModule_AddObject(m, "DMPAPER_QUARTO", PyInt_FromLong(DMPAPER_QUARTO));
	PyModule_AddObject(m, "DMCOLLATE_TRUE", PyInt_FromLong(DMCOLLATE_TRUE));
	PyModule_AddObject(m, "NOTIFY_TABLE_SECURITYDESCRIPTOR", PyInt_FromLong(NOTIFY_TABLE_SECURITYDESCRIPTOR));
	PyModule_AddObject(m, "PRINTER_CHANGE_SET_PRINTER", PyInt_FromLong(PRINTER_CHANGE_SET_PRINTER));
	PyModule_AddObject(m, "JOB_STATUS_OFFLINE", PyInt_FromLong(JOB_STATUS_OFFLINE));
	PyModule_AddObject(m, "SPOOLSS_DM_PS_OPTIMIZE_PORTABILITY", PyInt_FromLong(SPOOLSS_DM_PS_OPTIMIZE_PORTABILITY));
	PyModule_AddObject(m, "DMPAPER_A6_ROTATED", PyInt_FromLong(DMPAPER_A6_ROTATED));
	PyModule_AddObject(m, "DMTT_BITMAP", PyInt_FromLong(DMTT_BITMAP));
	PyModule_AddObject(m, "SPOOL_REG_PRINTDUPLEXSUPPORTED", PyString_FromString("printDuplexSupported"));
	PyModule_AddObject(m, "PRINTER_ATTRIBUTE_PUBLISHED", PyInt_FromLong(PRINTER_ATTRIBUTE_PUBLISHED));
	Py_INCREF((PyObject *)(void *)&spoolss_Time_Type);
	PyModule_AddObject(m, "Time", (PyObject *)(void *)&spoolss_Time_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_TimeCtr_Type);
	PyModule_AddObject(m, "TimeCtr", (PyObject *)(void *)&spoolss_TimeCtr_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterInfo0_Type);
	PyModule_AddObject(m, "PrinterInfo0", (PyObject *)(void *)&spoolss_PrinterInfo0_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PSDRVEXTRA351_Type);
	PyModule_AddObject(m, "PSDRVEXTRA351", (PyObject *)(void *)&spoolss_PSDRVEXTRA351_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PSDRVEXTRA400_Type);
	PyModule_AddObject(m, "PSDRVEXTRA400", (PyObject *)(void *)&spoolss_PSDRVEXTRA400_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PSDRVEXTRA500_Type);
	PyModule_AddObject(m, "PSDRVEXTRA500", (PyObject *)(void *)&spoolss_PSDRVEXTRA500_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PSDRVEXTRA_Type);
	PyModule_AddObject(m, "PSDRVEXTRA", (PyObject *)(void *)&spoolss_PSDRVEXTRA_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_UNIDRVEXTRA3_4_Type);
	PyModule_AddObject(m, "UNIDRVEXTRA3_4", (PyObject *)(void *)&spoolss_UNIDRVEXTRA3_4_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_UNIDRVEXTRA500_Type);
	PyModule_AddObject(m, "UNIDRVEXTRA500", (PyObject *)(void *)&spoolss_UNIDRVEXTRA500_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_UNIDRVEXTRA_Type);
	PyModule_AddObject(m, "UNIDRVEXTRA", (PyObject *)(void *)&spoolss_UNIDRVEXTRA_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_JTEXP_Type);
	PyModule_AddObject(m, "JTEXP", (PyObject *)(void *)&spoolss_JTEXP_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_OEM_DMEXTRA_Type);
	PyModule_AddObject(m, "OEM_DMEXTRA", (PyObject *)(void *)&spoolss_OEM_DMEXTRA_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DeviceMode_Type);
	PyModule_AddObject(m, "DeviceMode", (PyObject *)(void *)&spoolss_DeviceMode_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterInfo1_Type);
	PyModule_AddObject(m, "PrinterInfo1", (PyObject *)(void *)&spoolss_PrinterInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterInfo2_Type);
	PyModule_AddObject(m, "PrinterInfo2", (PyObject *)(void *)&spoolss_PrinterInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterInfo3_Type);
	PyModule_AddObject(m, "PrinterInfo3", (PyObject *)(void *)&spoolss_PrinterInfo3_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterInfo4_Type);
	PyModule_AddObject(m, "PrinterInfo4", (PyObject *)(void *)&spoolss_PrinterInfo4_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterInfo5_Type);
	PyModule_AddObject(m, "PrinterInfo5", (PyObject *)(void *)&spoolss_PrinterInfo5_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterInfo6_Type);
	PyModule_AddObject(m, "PrinterInfo6", (PyObject *)(void *)&spoolss_PrinterInfo6_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterInfo7_Type);
	PyModule_AddObject(m, "PrinterInfo7", (PyObject *)(void *)&spoolss_PrinterInfo7_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DeviceModeInfo_Type);
	PyModule_AddObject(m, "DeviceModeInfo", (PyObject *)(void *)&spoolss_DeviceModeInfo_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DevmodeContainer_Type);
	PyModule_AddObject(m, "DevmodeContainer", (PyObject *)(void *)&spoolss_DevmodeContainer_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_JobInfo1_Type);
	PyModule_AddObject(m, "JobInfo1", (PyObject *)(void *)&spoolss_JobInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_JobInfo2_Type);
	PyModule_AddObject(m, "JobInfo2", (PyObject *)(void *)&spoolss_JobInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_JobInfo3_Type);
	PyModule_AddObject(m, "JobInfo3", (PyObject *)(void *)&spoolss_JobInfo3_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_JobInfo4_Type);
	PyModule_AddObject(m, "JobInfo4", (PyObject *)(void *)&spoolss_JobInfo4_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetJobInfo1_Type);
	PyModule_AddObject(m, "SetJobInfo1", (PyObject *)(void *)&spoolss_SetJobInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetJobInfo2_Type);
	PyModule_AddObject(m, "SetJobInfo2", (PyObject *)(void *)&spoolss_SetJobInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetJobInfo4_Type);
	PyModule_AddObject(m, "SetJobInfo4", (PyObject *)(void *)&spoolss_SetJobInfo4_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_JobInfoContainer_Type);
	PyModule_AddObject(m, "JobInfoContainer", (PyObject *)(void *)&spoolss_JobInfoContainer_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo0_Type);
	PyModule_AddObject(m, "SetPrinterInfo0", (PyObject *)(void *)&spoolss_SetPrinterInfo0_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo1_Type);
	PyModule_AddObject(m, "SetPrinterInfo1", (PyObject *)(void *)&spoolss_SetPrinterInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo2_Type);
	PyModule_AddObject(m, "SetPrinterInfo2", (PyObject *)(void *)&spoolss_SetPrinterInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo3_Type);
	PyModule_AddObject(m, "SetPrinterInfo3", (PyObject *)(void *)&spoolss_SetPrinterInfo3_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo4_Type);
	PyModule_AddObject(m, "SetPrinterInfo4", (PyObject *)(void *)&spoolss_SetPrinterInfo4_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo5_Type);
	PyModule_AddObject(m, "SetPrinterInfo5", (PyObject *)(void *)&spoolss_SetPrinterInfo5_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo6_Type);
	PyModule_AddObject(m, "SetPrinterInfo6", (PyObject *)(void *)&spoolss_SetPrinterInfo6_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo7_Type);
	PyModule_AddObject(m, "SetPrinterInfo7", (PyObject *)(void *)&spoolss_SetPrinterInfo7_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo8_Type);
	PyModule_AddObject(m, "SetPrinterInfo8", (PyObject *)(void *)&spoolss_SetPrinterInfo8_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfo9_Type);
	PyModule_AddObject(m, "SetPrinterInfo9", (PyObject *)(void *)&spoolss_SetPrinterInfo9_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPrinterInfoCtr_Type);
	PyModule_AddObject(m, "SetPrinterInfoCtr", (PyObject *)(void *)&spoolss_SetPrinterInfoCtr_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_StringArray_Type);
	PyModule_AddObject(m, "StringArray", (PyObject *)(void *)&spoolss_StringArray_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddDriverInfo1_Type);
	PyModule_AddObject(m, "AddDriverInfo1", (PyObject *)(void *)&spoolss_AddDriverInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddDriverInfo2_Type);
	PyModule_AddObject(m, "AddDriverInfo2", (PyObject *)(void *)&spoolss_AddDriverInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddDriverInfo3_Type);
	PyModule_AddObject(m, "AddDriverInfo3", (PyObject *)(void *)&spoolss_AddDriverInfo3_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddDriverInfo4_Type);
	PyModule_AddObject(m, "AddDriverInfo4", (PyObject *)(void *)&spoolss_AddDriverInfo4_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddDriverInfo5_Type);
	PyModule_AddObject(m, "AddDriverInfo5", (PyObject *)(void *)&spoolss_AddDriverInfo5_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddDriverInfo6_Type);
	PyModule_AddObject(m, "AddDriverInfo6", (PyObject *)(void *)&spoolss_AddDriverInfo6_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddDriverInfo8_Type);
	PyModule_AddObject(m, "AddDriverInfo8", (PyObject *)(void *)&spoolss_AddDriverInfo8_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddDriverInfoCtr_Type);
	PyModule_AddObject(m, "AddDriverInfoCtr", (PyObject *)(void *)&spoolss_AddDriverInfoCtr_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo1_Type);
	PyModule_AddObject(m, "DriverInfo1", (PyObject *)(void *)&spoolss_DriverInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo2_Type);
	PyModule_AddObject(m, "DriverInfo2", (PyObject *)(void *)&spoolss_DriverInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo3_Type);
	PyModule_AddObject(m, "DriverInfo3", (PyObject *)(void *)&spoolss_DriverInfo3_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo4_Type);
	PyModule_AddObject(m, "DriverInfo4", (PyObject *)(void *)&spoolss_DriverInfo4_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo5_Type);
	PyModule_AddObject(m, "DriverInfo5", (PyObject *)(void *)&spoolss_DriverInfo5_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo6_Type);
	PyModule_AddObject(m, "DriverInfo6", (PyObject *)(void *)&spoolss_DriverInfo6_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo7_Type);
	PyModule_AddObject(m, "DriverInfo7", (PyObject *)(void *)&spoolss_DriverInfo7_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo8_Type);
	PyModule_AddObject(m, "DriverInfo8", (PyObject *)(void *)&spoolss_DriverInfo8_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverFileInfo_Type);
	PyModule_AddObject(m, "DriverFileInfo", (PyObject *)(void *)&spoolss_DriverFileInfo_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverInfo101_Type);
	PyModule_AddObject(m, "DriverInfo101", (PyObject *)(void *)&spoolss_DriverInfo101_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DriverDirectoryInfo1_Type);
	PyModule_AddObject(m, "DriverDirectoryInfo1", (PyObject *)(void *)&spoolss_DriverDirectoryInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrintProcessorInfo1_Type);
	PyModule_AddObject(m, "PrintProcessorInfo1", (PyObject *)(void *)&spoolss_PrintProcessorInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrintProcessorDirectoryInfo1_Type);
	PyModule_AddObject(m, "PrintProcessorDirectoryInfo1", (PyObject *)(void *)&spoolss_PrintProcessorDirectoryInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_DocumentInfo1_Type);
	PyModule_AddObject(m, "DocumentInfo1", (PyObject *)(void *)&spoolss_DocumentInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_OSVersion_Type);
	PyModule_AddObject(m, "OSVersion", (PyObject *)(void *)&spoolss_OSVersion_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_OSVersionEx_Type);
	PyModule_AddObject(m, "OSVersionEx", (PyObject *)(void *)&spoolss_OSVersionEx_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_FormSize_Type);
	PyModule_AddObject(m, "FormSize", (PyObject *)(void *)&spoolss_FormSize_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_FormArea_Type);
	PyModule_AddObject(m, "FormArea", (PyObject *)(void *)&spoolss_FormArea_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_FormInfo1_Type);
	PyModule_AddObject(m, "FormInfo1", (PyObject *)(void *)&spoolss_FormInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_FormInfo2_Type);
	PyModule_AddObject(m, "FormInfo2", (PyObject *)(void *)&spoolss_FormInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddFormInfo1_Type);
	PyModule_AddObject(m, "AddFormInfo1", (PyObject *)(void *)&spoolss_AddFormInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_AddFormInfo2_Type);
	PyModule_AddObject(m, "AddFormInfo2", (PyObject *)(void *)&spoolss_AddFormInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PortInfo1_Type);
	PyModule_AddObject(m, "PortInfo1", (PyObject *)(void *)&spoolss_PortInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PortInfo2_Type);
	PyModule_AddObject(m, "PortInfo2", (PyObject *)(void *)&spoolss_PortInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PortInfo3_Type);
	PyModule_AddObject(m, "PortInfo3", (PyObject *)(void *)&spoolss_PortInfo3_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PortInfoFF_Type);
	PyModule_AddObject(m, "PortInfoFF", (PyObject *)(void *)&spoolss_PortInfoFF_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_MonitorInfo1_Type);
	PyModule_AddObject(m, "MonitorInfo1", (PyObject *)(void *)&spoolss_MonitorInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_MonitorInfo2_Type);
	PyModule_AddObject(m, "MonitorInfo2", (PyObject *)(void *)&spoolss_MonitorInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPortInfo1_Type);
	PyModule_AddObject(m, "SetPortInfo1", (PyObject *)(void *)&spoolss_SetPortInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPortInfo2_Type);
	PyModule_AddObject(m, "SetPortInfo2", (PyObject *)(void *)&spoolss_SetPortInfo2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPortInfo3_Type);
	PyModule_AddObject(m, "SetPortInfo3", (PyObject *)(void *)&spoolss_SetPortInfo3_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPortInfoFF_Type);
	PyModule_AddObject(m, "SetPortInfoFF", (PyObject *)(void *)&spoolss_SetPortInfoFF_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_SetPortInfoContainer_Type);
	PyModule_AddObject(m, "SetPortInfoContainer", (PyObject *)(void *)&spoolss_SetPortInfoContainer_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrintProcDataTypesInfo1_Type);
	PyModule_AddObject(m, "PrintProcDataTypesInfo1", (PyObject *)(void *)&spoolss_PrintProcDataTypesInfo1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PortVarContainer_Type);
	PyModule_AddObject(m, "PortVarContainer", (PyObject *)(void *)&spoolss_PortVarContainer_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_NotifyOptionType_Type);
	PyModule_AddObject(m, "NotifyOptionType", (PyObject *)(void *)&spoolss_NotifyOptionType_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_NotifyOption_Type);
	PyModule_AddObject(m, "NotifyOption", (PyObject *)(void *)&spoolss_NotifyOption_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_NotifyString_Type);
	PyModule_AddObject(m, "NotifyString", (PyObject *)(void *)&spoolss_NotifyString_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_Notify_Type);
	PyModule_AddObject(m, "Notify", (PyObject *)(void *)&spoolss_Notify_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_NotifyInfo_Type);
	PyModule_AddObject(m, "NotifyInfo", (PyObject *)(void *)&spoolss_NotifyInfo_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_UserLevel1_Type);
	PyModule_AddObject(m, "UserLevel1", (PyObject *)(void *)&spoolss_UserLevel1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_UserLevel2_Type);
	PyModule_AddObject(m, "UserLevel2", (PyObject *)(void *)&spoolss_UserLevel2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_UserLevel3_Type);
	PyModule_AddObject(m, "UserLevel3", (PyObject *)(void *)&spoolss_UserLevel3_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_UserLevelCtr_Type);
	PyModule_AddObject(m, "UserLevelCtr", (PyObject *)(void *)&spoolss_UserLevelCtr_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PrinterEnumValues_Type);
	PyModule_AddObject(m, "PrinterEnumValues", (PyObject *)(void *)&spoolss_PrinterEnumValues_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PortData1_Type);
	PyModule_AddObject(m, "PortData1", (PyObject *)(void *)&spoolss_PortData1_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_PortData2_Type);
	PyModule_AddObject(m, "PortData2", (PyObject *)(void *)&spoolss_PortData2_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_MonitorUi_Type);
	PyModule_AddObject(m, "MonitorUi", (PyObject *)(void *)&spoolss_MonitorUi_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_CorePrinterDriver_Type);
	PyModule_AddObject(m, "CorePrinterDriver", (PyObject *)(void *)&spoolss_CorePrinterDriver_Type);
	Py_INCREF((PyObject *)(void *)&spoolss_InterfaceType);
	PyModule_AddObject(m, "spoolss", (PyObject *)(void *)&spoolss_InterfaceType);
#ifdef PY_MOD_SPOOLSS_PATCH
	PY_MOD_SPOOLSS_PATCH(m);
#endif

}
